KACE: Generating Knowledge Aware Contrastive Explanations for Natural Language Inference
Paper · 2021 · Qianglong Chen, Feng Ji, Xiangji Zeng et al.
Summary
Most explanation generators in NLP only justify the chosen label ("why A"). This paper argues that contrastive explanations ("why A and not B") are more useful, both for users and for the model. KACE is a post-hoc framework for natural language inference built from three stages:
- A RoBERTa-based rationalizer with cross attention between premise and hypothesis tags the key tokens of each premise-hypothesis pair.
- Those rationale spans are swapped for WordNet hypernyms or hyponyms to produce candidate counterfactual examples. A trained NLI model checks each candidate, and one example is kept for every alternative label. The choice is guided by a loss that balances validity, closeness to the original and diversity.
- The original pair, the selected counterfactual and external knowledge (ConceptNet and dictionary concepts) go into a knowledge-aware generative language model, which writes the contrastive explanation.
A BERT-large NLI classifier that also receives these explanations reaches 91.9% on SNLI, which beats the "why A" system NILE. The work matters because it shows explanations can be both readable and directly useful as model input.
Key points
-
SNLI test accuracy is 91.9% with a BERT-large model enhanced by contrastive explanations. That is 5.7 points above ETPA and 0.6 points above NILE.
-
Counterfactual selection minimises a sum of three terms: a validity term (the model should predict the target label), a distance term (the change should be small) and a diversity term. Distance is a weighted Heterogeneous Manhattan-Overlay Metric computed over rationale positions.
-
In the SNLI ablation (test accuracy), every component helps:
Removed component Test accuracy None (full model) 91.9 External knowledge 91.3 Contrastive explanations 91.1 Rationales 91.5 Counterfactual examples 91.6 -
On IMDB, BERT-base was trained on the original data plus the generated counterfactuals:
- On the counterfactual dev set, accuracy rises from 86.1 to 95.1.
- On the original dev set, it falls from 90.2 to 88.5.
-
The authors announced code at github.com/AI4NLP/KACE.
Interesting ideas
- I1. KACE builds a separate explanation for every competing label, each grounded in a minimally edited input that the model actually assigns to that label, so the explanation of a rejected option rests on concrete evidence.
- I2. Perturbations are restricted to the identified rationale spans, so counterfactuals change the meaning-bearing part while the rest of the sentence stays intact.
- I3. Lexical substitution through WordNet hypernyms and hyponyms is a cheap, controllable way to move a pair between entailment, neutral and contradiction.
- I4. Candidate counterfactuals are filtered by a trained model and then ranked by a loss that balances validity, proximity and diversity, rather than accepting every generated edit.
- I5. Adding counterfactual examples to training data greatly improves accuracy on shifted data at a small cost in-distribution, which is worth measuring on both splits.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (answer): A reader answering a multiple-choice school test could justify each rejected option by showing the smallest change to the story world that would make that option true.
- I2 (learn): Self-play could edit only the frame arguments that the answer depends on, giving sharp minimal-pair negative controls instead of random noise.
- I3 (world): The WordNet ontology underneath the world could generate generalised or specialised variants of a text, to test whether entailment reasoning over entities respects the hypernym direction.
- I4 (learn): The same three-part score could rank silver training variants, keeping only edits that witness parsers agree flip the outcome, that stay close to the source, and that are not near-duplicates.
- I5 (answer): QA on fables could be evaluated on original and minimally perturbed tales side by side, to expose answers that rely on surface cues rather than the meaning graph.
Institutions
📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 9,086 worksArtificial Intelligence · 8,889 worksArts and Humanities · 9,296 worksLanguage and Linguistics · 9,206 works
🧭 Topics 1Research subjects and languages the work is about.Reasoning · 510 works
Cite
Cite as Qianglong Chen, Feng Ji, Xiangji Zeng, Feng-Lin Li, Ji Zhang, Haiqing Chen and Yin Zhang. 2021. KACE: Generating Knowledge Aware Contrastive Explanations for Natural Language Inference. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers).
@inproceedings{chen2021kace,
title = {{KACE: Generating Knowledge Aware Contrastive Explanations for Natural Language Inference}},
author = {Qianglong Chen, Feng Ji, Xiangji Zeng, Feng-Lin Li, Ji Zhang, Haiqing Chen and Yin Zhang},
booktitle = {Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)},
year = {2021},
doi = {10.18653/v1/2021.acl-long.196},
url = {https://doi.org/10.18653/v1/2021.acl-long.196}
}References
- For natural language inference, (Bowman et al., 2015) propose SNLI which contains samples of premise and hypothesis pairs with human annotations. In order to provide interpretable and robust explanations for model decisions, (Camburu et al., 2018) extend the SNLI dataset with natural language explanations of the ground truth labels, named e-SNLI. For explanation generation in NLI, (Kumar and Talukdar, 2020) propose NILE, which utilizes label-specific generators to produce labels along with explanation. find
- However, (Zhao and Vydiswaran, 2021) find NILE do not take into account the variability inherent in human explanation, and propose LIREx which incorporates a rationale enabled explanation generator. In this paper, we consider generating contrastive explanations in NLI. find
- Pepa Atanasova, Jakob Grue Simonsen, Christina Lioma, and Isabelle Augenstein. 2020. Generating fact checking explanations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7352–7364, Online. Association for Computational Linguistics. ↗
- Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. 2017. Enhanced LSTM for natural language inference. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1657–1668, Vancouver, Canada. Association for Computational Linguistics. find
- Afterwards, Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632–642, Lisbon, Portugal. Association for Computational Linguistics. ↗
- Oana-Maria Camburu, Tim Rocktäschel, Thomas Lukasiewicz, and Phil Blunsom. 2018. e-snli: Natural language inference with natural language explanations. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc. ↗
- Qianglong Chen, Feng Ji, Haiqing Chen, and Yin Zhang. 2020a. Improving commonsense question answering by graph-based iterative retrieval over multiple knowledge sources. In Proceedings of the 28th International Conference on Computational Linguistics, pages 2583–2594, Barcelona, Spain (Online). International Committee on Computational Linguistics. find
- Zhongxia Chen, Xiting Wang, Xing Xie, Mehul Parsana, Akshay Soni, Xiang Ao, and Enhong Chen. 2020b. Towards explainable conversational recommendation. In Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 2994–3000. International Joint Conferences on Artificial Intelligence Organization. Main track. find
- Furui Cheng, Yao Ming, and Huamin Qu. 2020. Dece: Decision explorer with counterfactual explanations for machine learning models. IEEE Transactions on Visualization and Computer Graphics. ↗
- Eunsol Choi, He He, Mohit Iyyer, Mark Yatskar, Wen-tau Yih, Yejin Choi, Percy Liang, and Luke Zettlemoyer. 2018. QuAC: Question answering in context. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 2174–2184, Brussels, Belgium. Association for Computational Linguistics. ↗
- Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171–4186, Minneapolis, Minnesota. Association for Computational Linguistics. ↗
- Amirata Ghorbani, James Wexler, James Y Zou, and Been Kim. 2019. Towards automatic concept-based explanations. In Advances in Neural Information Processing Systems, pages 9273–9282. ↗
- Riccardo Guidotti, Anna Monreale, Salvatore Ruggieri, Dino Pedreschi, Franco Turini, and Fosca Giannotti. 2018. Local rule-based explanations of black box decision systems. arXiv preprint arXiv:1805.10820. ↗
- Lisa Anne Hendricks, Ronghang Hu, Trevor Darrell, and Zeynep Akata. 2018. Generating counterfactual explanations with natural language. In ICML Workshop on Human Interpretability in Machine Learning, pages 95–98. ↗
- Haozhe Ji, Pei Ke, Shaohan Huang, Furu Wei, Xiaoyan Zhu, and Minlie Huang. 2020. Language generation with multi-hop reasoning on commonsense knowledge graph. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 725–736, Online. Association for Computational Linguistics. find
- Amir-Hossein Karimi, Gilles Barthe, Borja Balle, and Isabel Valera. 2020. Model-agnostic counterfactual explanations for consequential decisions. In International Conference on Artificial Intelligence and Statistics, pages 895–905. ↗
- Been Kim, Rajiv Khanna, and Oluwasanmi O Koyejo. 2016. Examples are not enough, learn to criticize! criticism for interpretability. In Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc. find
- Sawan Kumar and Partha Talukdar. 2020. NILE : Natural language inference with faithful natural language explanations. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 8730–8742, Online. Association for Computational Linguistics.
- Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. 2020. BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871–7880, Online. Association for Computational Linguistics. ↗
- Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692. ↗
- Ilya Loshchilov and Frank Hutter. 2018. Fixing weight decay regularization in adam. ICLR. find
- Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. 2011. Learning word vectors for sentiment analysis. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pages 142–150, Portland, Oregon, USA. Association for Computational Linguistics.
- Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311–318, Philadelphia, Pennsylvania, USA. Association for Computational Linguistics. ↗
- Jonathan Pilault, Amine El hattami, and Christopher Pal. 2021. Conditionally adaptive multi-task learning: Improving transfer learning in {nlp} using fewer parameters & less data. In International Conference on Learning Representations. find
- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9. find
- Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67. ↗
- Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. 2019. Xlnet: Generalized autoregressive pretraining for language understanding. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc. ↗
- Nazneen Fatema Rajani, Bryan McCann, Caiming Xiong, and Richard Socher. 2019. Explain yourself! leveraging language models for commonsense reasoning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4932–4942, Florence, Italy. Association for Computational Linguistics.
- Zhuosheng Zhang, Yuwei Wu, Hai Zhao, Zuchao Li, Shuailiang Zhang, Xi Zhou, and Xiang Zhou. 2020. Semantics-aware bert for language understanding. In Proceedings of the AAAI Conference on Artificial Intelligence, 05, pages 9628–9635. find
- Karthikeyan Natesan Ramamurthy, Bhanukiran Vinzamuri, Yunfeng Zhang, and Amit Dhurandhar. 2020. Model agnostic multilevel explanations. arXiv preprint arXiv:2003.06005. ↗
- Xinyan Zhao and VG Vydiswaran. 2021. Lirex: Augmenting language inference with relevant explanation. Proceedings of the AAAI Conference on Artificial Intelligence. ↗
- Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. 2016. ” why should i trust you?” explaining the predictions of any classifier. In Proceedings of the 22nd ACM SIGKDD international conference on knowledge discovery and data mining, pages 1135–1144.
- Alon Talmor, Jonathan Herzig, Nicholas Lourie, and Jonathan Berant. 2019. CommonsenseQA: A question answering challenge targeting commonsense knowledge. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4149–4158, Minneapolis, Minnesota. Association for Computational Linguistics. ↗
- James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. 2019. Generating token-level explanations for natural language inference. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 963–969, Minneapolis, Minnesota. Association for Computational Linguistics. ↗
- Sahil Verma, John Dickerson, and Keegan Hines. 2020. Counterfactual explanations for machine learning: A review. arXiv preprint arXiv:2010.10596. ↗
- Sandra Wachter, Brent Mittelstadt, and Chris Russell. 2017. Counterfactual explanations without opening the black box: Automated decisions and the gdpr. Harv. JL & Tech., 31:841. ↗
- D Randall Wilson and Tony R Martinez. 1997. Improved heterogeneous distance functions. Journal of artificial intelligence research, 6:1–34. ↗
- Shuyuan Xu, Yunqi Li, Shuchang Liu, Zuohui Fu, and Yongfeng Zhang. 2020. Learning post-hoc causal explanations for recommendation. arXiv preprint arXiv:2006.16977. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/chen-2021-kace-generating-knowledge-aware-contrastive/