Towards Controllable Natural Language Inference through Lexical Inference Types
Paper · 2023 · Yingji Zhang, Danilo S. Carvalho, Ian Pratt-Hartmann et al.
Summary
The paper looks at single-step explanatory NLI, where a conclusion is derived from two premises inside an entailment tree. Neural generators can do this step, but there is little control over what kind of reasoning they carry out. The authors first build a taxonomy of lexical inference types for EntailmentBank steps. Each type is defined as an operation on AMR graphs, such as substituting an argument or predicate, inserting an argument, conjoining frames, applying a conditional rule, generalising, or inheriting a property. AMR is used only to make these definitions precise and does not appear in the model.
They then treat a T5 encoder-decoder as a conditional latent variable model whose latent space is steered by the type label. They also introduce T5bottleneck, which adds a compact sentence-level latent space.
According to the authors, adding type labels helps training, inference, and in-context prompting of LLMs. T5bottleneck beats other latent-variable baselines on explanatory inference retrieval. Its latent space also separates the inference types. Changing the label changes the form of the generated conclusion in a predictable way, which suggests partly symbolic behaviour inside a neural model.
Key points
- The taxonomy has 11 types grouped into families:
- substitution: ARG-SUB, PRED-SUB, FRAME-SUB;
- specification/conjunction: ARG-INS, FRAME-CONJ;
- conditional frame insertion/substitution;
- ARG/PRED generalisation;
- property inheritance;
- example, if-then, and others.
- Shares of the most frequent types in EntailmentBank: FRAME-SUB about 20%, ARG-SUB 19%, ARG-INS 18%, COND-FRAME 12%. FRAME-CONJ is 6%, PRED-SUB 5%, and generalisation about 1%.
- The type label can be injected at three places: encoder prefix, decoder prefix, or decoder end. These are compared against a no-type baseline for T5, T5bottleneck and Optimus (BERT-GPT2), using BLEU, cosine, BLEURT, loss and PPL.
- In-context learning improves when the prompt names the type and gives its definition:
- llama3-70b with 10 same-type examples reaches BLEURT 0.54, versus 0.40 without types;
- GPT-4-0613 reaches 0.50 versus 0.40;
- for causal LLMs, adding more shots also helps.
- Controllability was checked only qualitatively. The blacktop/asphalt example yields a different conclusion for each type. A quantitative test would need a new dataset that maps premises and a type to their valid conclusions.
Interesting ideas
- I1. Each reasoning step gets a label taken from a small closed set of graph edits (swap an argument, attach an argument, join two frames, generalise), so the step can be explained by naming its operation.
- I2. A formal graph representation is used only to define and annotate the categories, while the working model never sees it. The formalism serves as precise specification rather than runtime machinery.
- I3. Controllability is tested by holding the input fixed, switching only the operation label, and checking that the output changes in the predicted way. This is an intervention-style evaluation rather than a plain accuracy score.
- I4. The same conditioning signal is fed at several positions (encoder prefix, decoder prefix, decoder end) and the positions are compared, treating "where to inject a label" as a design choice that needs its own test.
- I5. Giving an LLM the type name, a short definition, and examples of the same type noticeably improves its conclusions, even for strong models.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (answer): Every step in a school-test or fable answer could be tagged with one of these frame-level edits, giving the student an explicit trace of how the conclusion came from the premises.
- I2 (learn): Silver labels for inference steps could be produced automatically by diffing the premise and conclusion frames. The learned components then train on these labels without needing the full graph comparison at runtime.
- I3 (learn): This fits evaluation with negative controls, where flipping a single control label must change exactly the expected part of the output and nothing else.
- I4 (back): When generating text from the meaning graph, one could ablate where an operation or style tag enters the generator so that it reliably governs the surface form.
- I5 (learn): LLM teacher prompts could include the inference type and same-type demonstrations, which should yield cleaner silver conclusions for training.
Institutions
Fields, topics and concepts
📚 Shelves 4The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 works
🧭 Topics 1Research subjects and languages the work is about.Reasoning · 1,426 works
Cite
Cite as Yingji Zhang, Danilo S. Carvalho, Ian Pratt-Hartmann and Andre Freitas. 2023. Towards Controllable Natural Language Inference through Lexical Inference Types. arXiv:2308.03581.
@misc{zhang2023controllable,
title = {{Towards Controllable Natural Language Inference through Lexical Inference Types}},
author = {Yingji Zhang, Danilo S. Carvalho, Ian Pratt-Hartmann and Andre Freitas},
year = {2023},
doi = {10.48550/arxiv.2308.03581},
eprint = {2308.03581},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.2308.03581}
}References
- Lasha Abzianidze. 2023. Formal proofs as structured explanations: Proposing several tasks on explainable natural language inference. arXiv preprint arXiv:2311.08637. ↗
- Carl Allen, Ivana Balazevic, and Timothy Hospedales. 2019. What the vec? towards probabilistically grounded embeddings. Advances in neural information processing systems, 32. ↗
- Laura Banarescu, Claire Bonial, Shu Cai, Madalina Georgescu, Kira Griffitt, Ulf Hermjakob, Kevin Knight, Philipp Koehn, Martha Palmer, and Nathan Schneider. 2013. Abstract meaning representation for sembanking. In Proceedings of the 7th linguistic annotation workshop and interoperability with discourse, pages 178–186.
- Danilo S. Carvalho, Yingji Zhang, Giangiacomo Mercatali, and Andre Freitas. 2023. Learning disentangled representations for natural language definitions. In Findings of the European chapter of Association for Computational Linguistics (Findings of EACL). Association for Computational Linguistics. find
- Peter Clark, Oyvind Tafjord, and Kyle Richardson. 2020. Transformers as soft reasoners over language. arXiv preprint arXiv:2002.05867. ↗
- Stephen Clark, Bob Coecke, and Mehrnoosh Sadrzadeh. 2008. A compositional distributional model of meaning. In Proceedings of the Second Quantum Interaction Symposium (QI-2008), pages 133–140. Oxford. find
- Bhavana Dalvi, Peter Jansen, Oyvind Tafjord, Zhengnan Xie, Hannah Smith, Leighanna Pipatanangkura, and Peter Clark. 2021. Explaining answers with entailment trees. arXiv preprint arXiv:2104.08661. ↗
- Prafulla Dhariwal and Alexander Nichol. 2021. Diffusion models beat gans on image synthesis. Advances in neural information processing systems, 34:8780– 8794. find
- Kawin Ethayarajh, David Duvenaud, and Graeme Hirst. 2018. Towards understanding linear word analogies. arXiv preprint arXiv:1810.04882. ↗
- Le Fang, Tao Zeng, Chaochun Liu, Liefeng Bo, Wen Dong, and Changyou Chen. 2021. Transformer-based conditional variational autoencoder for controllable story generation. arXiv preprint arXiv:2101.00828. ↗
- Xiyan Fu and Anette Frank. 2024. Exploring continual learning of compositional generalization in nli. arXiv preprint arXiv:2403.04400. ↗
- Yuxuan Gu, Xiaocheng Feng, Sicheng Ma, Lingyuan Zhang, Heng Gong, Weihong Zhong, and Bing Qin. 2023. Controllable text generation via probability density estimation in the latent space. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 12590–12616, Toronto, Canada. Association for Computational Linguistics. ↗
- Wes Gurnee, Neel Nanda, Matthew Pauly, Katherine Harvey, Dmitrii Troitskii, and Dimitris Bertsimas. 2023. Finding neurons in a haystack: Case studies with sparse probing. arXiv preprint arXiv:2305.01610. ↗
- Irina Higgins, Loïc Matthey, Arka Pal, Christopher P. Burgess, Xavier Glorot, Matthew M. Botvinick, Shakir Mohamed, and Alexander Lerchner. 2016. beta-vae: Learning basic visual concepts with a constrained variational framework. In International Conference on Learning Representations. find
- Jonathan Ho and Tim Salimans. 2022. Classifier-free diffusion guidance. arXiv preprint arXiv:2207.12598. ↗
- Jinyi Hu, Xiaoyuan Yi, Wenhao Li, Maosong Sun, and Xing Xie. 2022. Fuse it more deeply! a variational transformer with layer-wise latent variable inference for text generation. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 697–716, Seattle, United States. Association for Computational Linguistics. ↗
- Ray S Jackendoff. 1992. Semantic structures, volume 18. MIT press. find
- Marco Damonte, Shay B. Cohen, and Giorgio Satta. 2017. An incremental parser for abstract meaning representation. In Proceedings of EACL. ↗
- Peter Jansen, Rebecca Sharp, Mihai Surdeanu, and Peter Clark. 2017. Framing qa as building and ranking intersentence answer justifications. Computational Linguistics, 43(2):407–449. ↗
- Huiqi Deng, Qihan Ren, Hao Zhang, and Quanshi Zhang. 2021. Discovering and explaining the representation bottleneck of dnns. arXiv preprint arXiv:2111.06236. ↗
- Peter Jansen, Elizabeth Wainwright, Steven Marmorstein, and Clayton Morrison. 2018. WorldTree: A corpus of explanation graphs for elementary science questions supporting multi-hop inference. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation (LREC 2018), Miyazaki, Japan. European Language Resources Association (ELRA). ↗
- Yibo Jiang, Goutham Rajendran, Pradeep Ravikumar, Bryon Aragam, and Victor Veitch. 2024. On the origins of linear representations in large language models. arXiv preprint arXiv:2403.03867. ↗
- Aikaterini-Lida Kalouli, Richard Crouch, and Valeria de Paiva. 2020. Hy-NLI: a hybrid system for natural language inference. In Proceedings of the 28th International Conference on Computational Linguistics, pages 5235–5249, Barcelona, Spain (Online). International Committee on Computational Linguistics. find
- Daniel Khashabi, Tushar Khot, Ashish Sabharwal, and Dan Roth. 2018. Question answering as global reasoning over semantic abstractions. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32. find
- Tushar Khot, Ashish Sabharwal, and Peter Clark. 2017. Answering complex questions using open information extraction. arXiv preprint arXiv:1704.05572. ↗
- Seungone Kim, Se June Joo, Doyoung Kim, Joel Jang, Seonghyeon Ye, Jamin Shin, and Minjoon Seo. 2023. The cot collection: Improving zero-shot and few-shot learning of language models via chain-of-thought fine-tuning. arXiv preprint arXiv:2305.14045. ↗
- Diederik P Kingma and Max Welling. 2013. Autoencoding variational bayes. arXiv preprint arXiv:1312.6114. ↗
- Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. 2019. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461. ↗
- Chunyuan Li, Xiang Gao, Yuan Li, Baolin Peng, Xiujun Li, Yizhe Zhang, and Jianfeng Gao. 2020. Optimus: Organizing sentences via pre-trained modeling of a latent space. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 4678–4699.
- Kenneth Li, Oam Patel, Fernanda Viégas, Hanspeter Pfister, and Martin Wattenberg. 2024. Inference-time intervention: Eliciting truthful answers from a language model. Advances in Neural Information Processing Systems, 36.
- Mingjie Li and Quanshi Zhang. 2023. Does a neural network really encode symbolic concepts? In International Conference on Machine Learning, pages 20452–20469. PMLR. ↗
- Zhuang Li, Lizhen Qu, Qiongkai Xu, Tongtong Wu, Tianyang Zhan, and Gholamreza Haffari. 2022. Variational autoencoder with disentanglement priors for low-resource task-specific natural language generation. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 10335–10356, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics. find
- Bill Yuchen Lin, Haitian Sun, Bhuwan Dhingra, Manzil Zaheer, Xiang Ren, and William W Cohen. 2020. Differentiable open-ended commonsense reasoning. arXiv preprint arXiv:2010.14439. ↗
- Guangyi Liu, Zeyu Feng, Yuan Gao, Zichao Yang, Xiaodan Liang, Junwei Bao, Xiaodong He, Shuguang Cui, Zhen Li, and Zhiting Hu. 2023. Composable text controls in latent space with ODEs. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 16543–16570, Singapore. Association for Computational Linguistics. ↗
- Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. 2015. Adversarial autoencoders. arXiv preprint arXiv:1511.05644. ↗
- Jordan Meadows, Marco Valentino, Damien Teney, and Andre Freitas. 2023. A symbolic framework for systematic evaluation of mathematical reasoning with transformers. arXiv preprint arXiv:2305.12563. ↗
- Ivan Montero, Nikolaos Pappas, and Noah A Smith. 2021. Sentence bottleneck autoencoders from transformer language models. arXiv preprint arXiv:2109.00055. ↗
- Neel Nanda, Andrew Lee, and Martin Wattenberg. 2023. Emergent linear representations in world models of self-supervised sequence models. In Proceedings of the 6th BlackboxNLP Workshop: Analyzing and Interpreting Neural Networks for NLP, pages 16–30, Singapore. Association for Computational Linguistics. find
- Jianmo Ni, Gustavo Hernández Ábrego, Noah Constant, Ji Ma, Keith B Hall, Daniel Cer, and Yinfei Yang. 2021. Sentence-t5: Scalable sentence encoders from pre-trained text-to-text models. arXiv preprint arXiv:2108.08877. ↗
- Theo Olausson, Alex Gu, Ben Lipkin, Cedegao Zhang, Armando Solar-Lezama, Joshua Tenenbaum, and Roger Levy. 2023. LINC: A neurosymbolic approach for logical reasoning by combining language models with first-order logic provers. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 5153–5176, Singapore. 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. ↗
- Kiho Park, Yo Joong Choe, and Victor Veitch. 2023. The linear representation hypothesis and the geometry of large language models. arXiv preprint arXiv:2311.03658. ↗
- Xin Quan, Marco Valentino, Louise A Dennis, and André Freitas. 2024. Verification and refinement of natural language explanations through llm-symbolic theorem proving. arXiv preprint arXiv:2405.01379. ↗
- Marco Valentino, Ian Pratt-Hartmann, and André Freitas. 2021. Do natural language explanations represent valid logical arguments? verifying entailment in explainable nli gold standards. ↗
- Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. find
- Marco Valentino, Mokanarangan Thayaparan, Deborah Ferreira, and André Freitas. 2022a. Hybrid autoregressive inference for scalable multi-hop explanation regeneration. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 36, pages 11403– 11411. find
- Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J Liu, et al. 2020. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21(140):1–67. ↗
- Jie Ren, Mingjie Li, Qirui Chen, Huiqi Deng, and Quanshi Zhang. 2022. Towards axiomatic, hierarchical, and symbolic explanation for deep models. find
- Narutatsu Ri, Fei-Tzin Lee, and Nakul Verma. 2023. Contrastive loss is all you need to recover analogies as parallel lines. arXiv preprint arXiv:2306.08221. ↗
- Paul K Rubenstein, Bernhard Schoelkopf, and Ilya Tolstikhin. 2018. On the latent space of wasserstein auto-encoders. arXiv preprint arXiv:1802.03761. ↗
- Thibault Sellam, Dipanjan Das, and Ankur P Parikh. 2020. Bleurt: Learning robust metrics for text generation. arXiv preprint arXiv:2004.04696. ↗
- Tianxiao Shen, Jonas Mueller, Regina Barzilay, and Tommi Jaakkola. 2020. Educating text autoencoders: Latent representation guidance via denoising. In International Conference on Machine Learning, pages 8719–8729. PMLR. ↗
- Adly Templeton, Tom Conerly, Jonathan Marcus, Jack Lindsey, Trenton Bricken, Brian Chen, Adam Pearce, Craig Citro, Emmanuel Ameisen, Andy Jones, Hoagy Cunningham, Nicholas L Turner, Callum McDougall, Monte MacDiarmid, C. Daniel Freeman, Theodore R. Sumers, Edward Rees, Joshua Batson, Adam Jermyn, Shan Carter, Chris Olah, and Tom Henighan. 2024. Scaling monosemanticity: Extracting interpretable features from claude 3 sonnet. Transformer Circuits Thread. find
- Mokanarangan Thayaparan, Marco Valentino, and André Freitas. 2020. A survey on explainability in machine reading comprehension. arXiv preprint arXiv:2010.00389. ↗
- Marco Valentino, Mokanarangan Thayaparan, and André Freitas. 2020. Explainable natural language reasoning via conceptual unification. arXiv preprint arXiv:2009.14539. ↗
- Marco Valentino, Mokanarangan Thayaparan, and André Freitas. 2022b. Case-based abductive natural language inference. In Proceedings of the 29th International Conference on Computational Linguistics, pages 1556–1568. find
- Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. 2008. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th International Conference on Machine Learning, ICML ’08, page 1096–1103, New York, NY, USA. Association for Computing Machinery. find
- Xinyi Wang, Wanrong Zhu, Michael Saxon, Mark Steyvers, and William Yang Wang. 2024. Large language models are latent variable models: Explaining and finding good demonstrations for in-context learning. Advances in Neural Information Processing Systems, 36.
- Hitomi Yanaka, Koji Mineshima, and Kentaro Inui. 2021. SyGNS: A systematic generalization testbed based on natural language semantics. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 103–119, Online. Association for Computational Linguistics. find
- Yingji Zhang, Danilo Carvalho, and Andre Freitas. 2024a. Learning disentangled semantic spaces of explanations via invertible neural networks. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 2113–2134, Bangkok, Thailand. Association for Computational Linguistics. find
- Mokanarangan Thayaparan, Marco Valentino, and André Freitas. 2021. Explainable inference over grounding-abstract chains for science questions. In Findings of the Association for Computational Linguistics: ACL-IJCNLP 2021, pages 1–12. find
- Yingji Zhang, Danilo Carvalho, Marco Valentino, Ian Pratt-Hartmann, and Andre Freitas. 2024b. Improving semantic control in discrete latent spaces with transformer quantized variational autoencoders. In Findings of the Association for Computational Linguistics: EACL 2024, pages 1434–1450, St. Julian’s, Malta. Association for Computational Linguistics. find
- Mokanarangan Thayaparan, Marco Valentino, and André Freitas. 2024. A differentiable integer linear programming solver for explanation-based natural language inference. arXiv preprint arXiv:2404.02625. ↗
- Yingji Zhang, Marco Valentino, Danilo Carvalho, Ian Pratt-Hartmann, and Andre Freitas. 2024c. Graph-induced syntactic-semantic spaces in transformer-based variational AutoEncoders. In Findings of the Association for Computational Linguistics: NAACL 2024, pages 474–489, Mexico City, Mexico. Association for Computational Linguistics. find
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/zhang-2023-towards-controllable-natural-language-inference/