Skip to content

onepounchman/Causal-Retionalization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Towards Trustworthy Explanation: On Causal Rationalization

This repository contains the code for ICML 2023 paper Towards Trustworthy Explanation: On Causal Rationalization.

(Notice: we have updated the results of a baseline method folded-rationalisation (FR)) in our most recent version in arxiv)

Getting Started

Firstly, create the Python environment and activate it

conda create --name pytorch_py38 python=3.8

source activate pytorch_py38

To install the dependencies, run the following command

cd rationale-causal

# Install all python dependencies
pip install -r requirements.txt

Experiments

You can download Beer and Hotel review dataset from https://github.com/YujiaBao/R2A and then put datasets in the data folder.

Before running experiments for Beer review data, utilize cr/data-processing.ipynb to get the short and the noise version data.

Training commands for causal rationalization method:

# real data
./scripts/beer/run_beer_aroma.sh causal-rationale

# synthetic data
./scripts/beer_noise/run_beer_aroma.sh causal-rationale

Acknowledgment

We thank the authors of Can Rationalization Improve Robustness? for their implementations of the baseline methods

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published