├── .gitignore ├── LICENSE ├── README.md ├── data ├── beer │ └── README.md ├── snli │ └── README.md └── sst │ └── README.md ├── download_data.sh ├── latent_rationale ├── __init__.py ├── beer │ ├── __init__.py │ ├── constants.py │ ├── evaluate.py │ ├── models │ │ ├── __init__.py │ │ ├── latent.py │ │ ├── model_helpers.py │ │ ├── rl.py │ │ └── simpleclassifier.py │ ├── predict.py │ ├── train.py │ ├── util.py │ └── vocabulary.py ├── common │ ├── __init__.py │ ├── classifier.py │ ├── encoder.py │ ├── generator.py │ ├── latent.py │ └── util.py ├── nn │ ├── __init__.py │ ├── attention.py │ ├── bernoulli_gate.py │ ├── bow_encoder.py │ ├── cnn_encoder.py │ ├── kuma.py │ ├── kuma_attention.py │ ├── kuma_gate.py │ ├── kuma_self_attention.py │ ├── lstm_encoder.py │ ├── position.py │ ├── rcnn.py │ └── rcnn_encoder.py ├── snli │ ├── README.md │ ├── __init__.py │ ├── constants.py │ ├── encoder.py │ ├── evaluate.py │ ├── models │ │ ├── __init__.py │ │ ├── decomposable.py │ │ ├── decomposable_kuma.py │ │ ├── model_helper.py │ │ └── recurrent.py │ ├── plotting.py │ ├── predict.py │ ├── text.py │ ├── train.py │ └── util.py └── sst │ ├── constants.py │ ├── evaluate.py │ ├── models │ ├── __init__.py │ ├── baseline.py │ ├── latent.py │ ├── model_helpers.py │ └── rl.py │ ├── plotting.py │ ├── predict.py │ ├── train.py │ ├── util.py │ └── vocabulary.py └── requirements.txt /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/README.md -------------------------------------------------------------------------------- /data/beer/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/data/beer/README.md -------------------------------------------------------------------------------- /data/snli/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/data/snli/README.md -------------------------------------------------------------------------------- /data/sst/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/data/sst/README.md -------------------------------------------------------------------------------- /download_data.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/download_data.sh -------------------------------------------------------------------------------- /latent_rationale/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/beer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/beer/constants.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/constants.py -------------------------------------------------------------------------------- /latent_rationale/beer/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/evaluate.py -------------------------------------------------------------------------------- /latent_rationale/beer/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/beer/models/latent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/models/latent.py -------------------------------------------------------------------------------- /latent_rationale/beer/models/model_helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/models/model_helpers.py -------------------------------------------------------------------------------- /latent_rationale/beer/models/rl.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/models/rl.py -------------------------------------------------------------------------------- /latent_rationale/beer/models/simpleclassifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/models/simpleclassifier.py -------------------------------------------------------------------------------- /latent_rationale/beer/predict.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/predict.py -------------------------------------------------------------------------------- /latent_rationale/beer/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/train.py -------------------------------------------------------------------------------- /latent_rationale/beer/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/util.py -------------------------------------------------------------------------------- /latent_rationale/beer/vocabulary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/beer/vocabulary.py -------------------------------------------------------------------------------- /latent_rationale/common/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/common/classifier.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/common/classifier.py -------------------------------------------------------------------------------- /latent_rationale/common/encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/common/encoder.py -------------------------------------------------------------------------------- /latent_rationale/common/generator.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/common/generator.py -------------------------------------------------------------------------------- /latent_rationale/common/latent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/common/latent.py -------------------------------------------------------------------------------- /latent_rationale/common/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/common/util.py -------------------------------------------------------------------------------- /latent_rationale/nn/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/nn/attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/attention.py -------------------------------------------------------------------------------- /latent_rationale/nn/bernoulli_gate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/bernoulli_gate.py -------------------------------------------------------------------------------- /latent_rationale/nn/bow_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/bow_encoder.py -------------------------------------------------------------------------------- /latent_rationale/nn/cnn_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/cnn_encoder.py -------------------------------------------------------------------------------- /latent_rationale/nn/kuma.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/kuma.py -------------------------------------------------------------------------------- /latent_rationale/nn/kuma_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/kuma_attention.py -------------------------------------------------------------------------------- /latent_rationale/nn/kuma_gate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/kuma_gate.py -------------------------------------------------------------------------------- /latent_rationale/nn/kuma_self_attention.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/kuma_self_attention.py -------------------------------------------------------------------------------- /latent_rationale/nn/lstm_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/lstm_encoder.py -------------------------------------------------------------------------------- /latent_rationale/nn/position.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/position.py -------------------------------------------------------------------------------- /latent_rationale/nn/rcnn.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/rcnn.py -------------------------------------------------------------------------------- /latent_rationale/nn/rcnn_encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/nn/rcnn_encoder.py -------------------------------------------------------------------------------- /latent_rationale/snli/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/README.md -------------------------------------------------------------------------------- /latent_rationale/snli/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/snli/constants.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/constants.py -------------------------------------------------------------------------------- /latent_rationale/snli/encoder.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/encoder.py -------------------------------------------------------------------------------- /latent_rationale/snli/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/evaluate.py -------------------------------------------------------------------------------- /latent_rationale/snli/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/snli/models/decomposable.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/models/decomposable.py -------------------------------------------------------------------------------- /latent_rationale/snli/models/decomposable_kuma.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/models/decomposable_kuma.py -------------------------------------------------------------------------------- /latent_rationale/snli/models/model_helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/models/model_helper.py -------------------------------------------------------------------------------- /latent_rationale/snli/models/recurrent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/models/recurrent.py -------------------------------------------------------------------------------- /latent_rationale/snli/plotting.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/plotting.py -------------------------------------------------------------------------------- /latent_rationale/snli/predict.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/predict.py -------------------------------------------------------------------------------- /latent_rationale/snli/text.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/text.py -------------------------------------------------------------------------------- /latent_rationale/snli/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/train.py -------------------------------------------------------------------------------- /latent_rationale/snli/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/snli/util.py -------------------------------------------------------------------------------- /latent_rationale/sst/constants.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/constants.py -------------------------------------------------------------------------------- /latent_rationale/sst/evaluate.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/evaluate.py -------------------------------------------------------------------------------- /latent_rationale/sst/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /latent_rationale/sst/models/baseline.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/models/baseline.py -------------------------------------------------------------------------------- /latent_rationale/sst/models/latent.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/models/latent.py -------------------------------------------------------------------------------- /latent_rationale/sst/models/model_helpers.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/models/model_helpers.py -------------------------------------------------------------------------------- /latent_rationale/sst/models/rl.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/models/rl.py -------------------------------------------------------------------------------- /latent_rationale/sst/plotting.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/plotting.py -------------------------------------------------------------------------------- /latent_rationale/sst/predict.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/predict.py -------------------------------------------------------------------------------- /latent_rationale/sst/train.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/train.py -------------------------------------------------------------------------------- /latent_rationale/sst/util.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/util.py -------------------------------------------------------------------------------- /latent_rationale/sst/vocabulary.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/latent_rationale/sst/vocabulary.py -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bastings/interpretable_predictions/HEAD/requirements.txt --------------------------------------------------------------------------------