Skip to content

nicola-decao/diffmask

Repository files navigation

DiffMask

Overview

This library contains a Pytorch implementation of Differentiable Masking Explainer (Diffmask), as presented in [1](https://arxiv.org/abs/2004.14992).

Dependencies

Notice that older or newer version could work but they were not tested.

Installation

To install, run

$ python setup.py install

To donwload datasets run

$ ./scripts/download_datasets.sh

To download models, use the following link. Note that these are not the exact same models used for the paper.

Structure

  • diffmask: Contains the source code for DiffMask.

We have 5 jupyter notebbok with the code for reproducing some of the results from our work [1]. Note that since i) the code was refactored and ii) we were not able to realise the exact same models used for the paper, re-generated plots and tables might differ from the ones in our work.

Please cite [1] in your work when using this library in your experiments.

Feedback

For questions and comments, feel free to contact Nicola De Cao.

License

MIT

Citation

[1] Nicola De Cao, Michael Sejr Schlichtkrull, Wilker Aziz, and Ivan Titov. 2020.
How do Decisions Emerge across Layers in Neural Models? Interpretation with Differentiable Masking.
In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP),
pages 3243–3255, Online. Association for Computational Linguistics.

BibTeX format:

@inproceedings{de-cao-etal-2020-decisions,
    title = "How do Decisions Emerge across Layers in Neural Models? Interpretation with Differentiable Masking",
    author = "De Cao, Nicola  and
      Schlichtkrull, Michael Sejr  and
      Aziz, Wilker  and
      Titov, Ivan",
    booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
    month = nov,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2020.emnlp-main.262",
    doi = "10.18653/v1/2020.emnlp-main.262",
    pages = "3243--3255",
}