Elamur Research
☰
home / papers / 2020 / Transformers as Soft Reasoners over Language

Transformers as Soft Reasoners over Language

Written for the Research library (claude-opus-5-5) from the paper text, in our own words: the license "arXiv — non-exclusive licence to distribute" does not allow redistributing the text itself. Original — arxiv.org/pdf/2002.05867

Summary

The paper tests whether a transformer can perform deductive reasoning when its knowledge is written as plain English sentences rather than in formal logic. Encoding knowledge formally has long been a major obstacle, and this approach avoids it. The authors build synthetic datasets in which each item pairs a small theory of facts and if-then rules (negation allowed, with logic-program semantics) with a statement to label true or false. Questions are generated at controlled depths of required inference. The authors fine-tune RoBERTa on this data and call the resulting models RuleTakers. These models reach about 99% accuracy and stay above 95% on questions that need longer chains of inference than any seen in training. Without further training, they also solve most variants of two independently written rulebases. They handle theories rewritten by crowdworkers and can mostly identify which facts an answer depends on. The study suggests transformers can serve as limited "soft theorem provers" over text. That could make question answering more explainable, open to correction and able to explore counterfactuals.

Key points

  • Data: Each example is a (context, statement, answer) triple. There are five synthetic datasets at increasing reasoning depth. Rules are conjunctive implications, and only consistent, stratified rulebases are used. Data and a demo are released at allenai.org/data/ruletaker.
  • Generalization: Accuracy is about 99% in-distribution and up to 95% on deeper chains than seen in training. With no extra training, the models score 90%+ on five of six variants of two hand-authored rulebases.
  • Paraphrased language and explanations: Models trained and tested on crowdsourced paraphrases reach 98%. An earlier model applied to them without training on paraphrases gets 66%. Identifying which facts an answer depends on reaches 94% F1, with a perfect match on over 70% of questions.
  • Architectures: RoBERTa scores 98%, BERT 95% and the LSTM-based ESIM 80%. The task can be learned without transformers, but transformers learn it more easily.
  • Limits: The 512-token input cap restricts theory size, and inconsistent theories were not tested. Negation as failure can lead to conclusions that clash with everyday natural language inference (NLI) intuitions.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Other

Cited by

207 papers of our library cite it (of the 140673 whose bibliographies we read); 12 of them have a page here, 195 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2002.05867 · arXiv 2002.05867

@misc{clark2020transformers,
  title = {{Transformers as Soft Reasoners over Language}},
  author = {Clark, Peter and Tafjord, Oyvind and Richardson, Kyle},
  year = {2020},
  doi = {10.48550/arxiv.2002.05867},
  eprint = {2002.05867},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2002.05867}
}

References

40 references, 10 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Ralph Abboud, Ismail Ilkan Ceylan, and Thomas Lukasiewicz. Learning to reason: Leveraging neural networks for approximate dnf counting. In AAAI, 2020. find
  2. Ibrahim Abdelaziz, Veronika Thost, Maxwell Crouse, and Achille Fokoue. An experimental study of formula embeddings for automated theorem proving in first-order logic. arXiv, 2002.00423, 2020. find
  3. Krzysztof R. Apt, Howard A. Blair, and Adrian Walker. Towards a theory of declarative knowledge. In Foundations of Deductive Databases and Logic Programming., 1988. find
  4. Nicole Bidoit and Christine Froidevaux. General logical databases and programs: Default logic semantics and stratification. Inf. Comput., 91:15–54, 1991. find
  5. Qian Chen, Xiao-Dan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced lstm for natural language inference. In ACL, 2017. find
  6. Maxwell Crouse, Ibrahim Abdelaziz, Cristina Cornelio, Veronika Thost, Lingfei Wu, Kenneth D. Forbus, and Achille Fokoue. Improving graph neural network representations of logical formulae with subgraph pooling. arXiv, 1911.06904, 2019. find
  7. Ido Dagan, Dan Roth, Mark Sammons, and Fabio Massimo Zanzotto. Recognizing Textual Entailment: Models and Applications. Morgan and Claypool, 2013. find
  8. Ian J. Goodfellow. NIPS 2016 tutorial: Generative adversarial networks. ArXiv, abs/1701.00160, 2016. — [arXiv:1701.00160](https://arxiv.org/abs/1701.00160) find
  9. Han He and Jinho D. Choi. Establishing strong baselines for the new decade: Sequence tagging, syntactic and semantic parsing with BERT. ArXiv, abs/1908.04943, 2019. — [arXiv:1908.04943](https://arxiv.org/abs/1908.04943) find
  10. Ashwin Kalyan, Oleksandr Polozov, and Adam Kalai. Adaptive generation of programming puzzles. Technical report, Georgia Tech, 2019. https://openreview.net/forum?id=HJeRveHKDH. ↗
  11. Aishwarya Kamath and Rajarshi Das. A survey on semantic parsing. In AKBC’19, 2019. find
  12. Guokun Lai, Qizhe Xie, Hanxiao Liu, Yiming Yang, and Eduard Hovy. Race: Large-scale reading comprehension dataset from examinations. In EMNLP, 2017. find our card
  13. Guillaume Lample and Franccois Charton. Deep learning for symbolic mathematics. In ICLR, 2019. find
  14. Kevin Lin, Oyvind Tafjord, Peter Clark, and Matt Gardner. Reasoning over paragraph effects in situations. In Proc. MRQA Workshop (EMNLP’19), 2019. also arXiv:1908.05852. find
  15. Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: a robustly optimized BERT pretraining approach. arXiv preprint arXiv:1907.11692, 2019. find
  16. Bill MacCartney and Christopher D. Manning. Natural logic and natural language inference. Computing Meaning, 47:129–147, 2014. find
  17. Christopher D. Manning and Bill MacCartney. Natural language inference. Stanford University, 2009. find
  18. John W. McCarthy. Programs with common sense. In Proc. Tedding Conf. on the Mechanization of Thought Processes, pages 75–91, 1959. find
  19. John McCarthy. Applications of circumscription to formalizing common sense knowledge. In NMR, 1984. find
  20. Kostas S Metaxiotis, Dimitris Askounis, and John Psarras. Expert systems in production planning and scheduling: A state-of-the-art survey. Journal of Intelligent Manufacturing, 13(4):253–260, 2002. find
  21. Pasquale Minervini, Matko Bosnjak, Tim Rocktäschel, and Sebastian Riedel. Towards neural theorem proving at scale. ArXiv, abs/1807.08204, 2018. find
  22. Pasquale Minervini, Matko Bovs-njak, Tim Rocktaschel, Sebastian Riedel, and Edward Grefenstette. Differentiable reasoning on large knowledge bases and natural language. ArXiv, abs/1912.10824, 2019. — [arXiv:1912.10824](https://arxiv.org/abs/1912.10824) find
  23. Lawrence S Moss. Natural logic and semantics. In Logic, Language and Meaning, pages 84–93. Springer, 2010. find
  24. Mark A Musen and Johan Van der Lei. Of brittleness and bottlenecks: Challenges in the creation of pattern-recognition and expert-system models. In Machine Intelligence and Pattern Recognition, volume 7, pages 335–352. Elsevier, 1988. find
  25. Allen Newell and Herbert A. Simon. The logic theory machine-a complex information processing system. IRE Trans. Information Theory, 2:61– 79, 1956. find
  26. Ilkka Niemelä and Patrik Simons. Smodels - an implementation of the stable model and well-founded semantics for normal lp. In LPNMR, 1997. find
  27. Ankur P. Parikh, Oscar Täckström, Dipanjan Das, and Jakob Uszkoreit. A decomposable attention model for natural language inference. In Proceedings of EMNLP, 2016. find our card
  28. Jason Phang, Thibault Févry, and Samuel R. Bowman. Sentence encoders on stilts: Supplementary training on intermediate labeled-data tasks. ArXiv, abs/1811.01088, 2018. find our card
  29. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. SQuAD: 100,000+ questions for machine comprehension of text. In EMNLP, 2016. find our card
  30. Kyle Richardson, Hai Hu, Lawrence S Moss, and Ashish Sabharwal. Probing natural language inference models through semantic fragments. In AAAI’20, 2020. find our card
  31. David Saxton, Edward Grefenstette, Felix Hill, and Pushmeet Kohli. Analysing mathematical reasoning abilities of neural models. In ICLR, 2019. find our card
  32. Daniel Selsam, Matthew Lamm, Benedikt Bünz, Percy Liang, Leonardo de Moura, and David L. Dill. Learning a SAT solver from single-bit supervision. In ICLR, 2019. find
  33. Koustuv Sinha, Shagun Sodhani, Jin Dong, Joelle Pineau, and William L. Hamilton. Clutrr: A diagnostic benchmark for inductive reasoning from text. In EMNLP/IJCNLP, 2019. find
  34. Kai Sun, Dian Yu, Dong Yu, and Claire Cardie. Improving machine reading comprehension with general reading strategies. In NAACL-HLT, 2018. find
  35. Oyvind Tafjord, Matt Gardner, Kevin Lin, and Peter Clark. Quartz: An open-domain dataset of qualitative relationship questions. In EMNLP/IJCNLP, 2019. find
  36. Alon Talmor, Yanai Elazar, Yoav Goldberg, and Jonathan Berant. olmpics - on what language model pre-training captures. ArXiv, abs/1912.13283, 2019. find our card
  37. Qiang Wang, Bei Li, Tong Xiao, Jingbo Zhu, Changliang Li, Derek F. Wong, and Lidia S. Chao. Learning deep transformer models for machine translation. In ACL, 2019. find our card
  38. Leon Weber, Pasquale Minervini, Jannes Münchmeyer, Ulf Leser, and Tim Rocktäschel. Nlprolog: Reasoning with weak unification for question answering in natural language. In ACL, 2019. find
  39. J. Weston, A. Bordes, S. Chopra, and T. Mikolov. Towards AI-Complete question answering: A set of prerequisite toy tasks. In ICLR, 2016. find our card
  40. Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William W Cohen, Ruslan Salakhutdinov, and Christopher D Manning. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. arXiv preprint arXiv:1809.09600, 2018. find our card