{"type":"ScholarlyArticle","title":"Transformers as Soft Reasoners over Language","authors":[{"name":"Peter Clark","slug":"peter-clark","given":"Peter","family":"Clark","affiliation":"Allen Institute for AI , Seattle , WA"},{"name":"Oyvind Tafjord","slug":"oyvind-tafjord","given":"Oyvind","family":"Tafjord","affiliation":"Allen Institute for AI , Seattle , WA"},{"name":"Kyle Richardson","slug":"kyle-richardson","given":"Kyle","family":"Richardson","affiliation":"Allen Institute for AI , Seattle , WA"}],"abstract":"Beginning with McCarthy's Advice Taker (1959), AI has pursued the goal of providing a system with explicit, general knowledge and having the system reason over that knowledge. However, expressing the knowledge in a formal (logical or probabilistic) representation has been a major obstacle to this research. This paper investigates a modern approach to this problem where the facts and rules are provided as natural language sentences, thus bypassing a formal representation. We train transformers to reason (or emulate reasoning) over these sentences using synthetically generated data. Our models, that we call RuleTakers, provide the first empirical demonstration that this kind of soft reasoning over language is learnable, can achieve high (99%) accuracy, and generalizes to test data requiring substantially deeper chaining than seen during training (95%+ scores). We also demonstrate that the models transfer well to two hand-authored rulebases, and to rulebases paraphrased into more natural language. These findings are significant as it suggests a new role for transformers, namely as limited \"soft theorem provers\" operating over explicit theories in language. This in turn suggests new possibilities for explainability, correctability, and counterfactual reasoning in question-answering.","doi":"10.24963/ijcai.2020/537","url":"https://ijcai.org/proceedings/2020/537","pdf":"https://ijcai.org/proceedings/2020/0537.pdf","markdown":"https://ijcai.org/proceedings/2020/537.md","bibtex":"https://ijcai.org/proceedings/2020/bibtex/537","volume":{"slug":"2020","title":"Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2020","url":"https://ijcai.org/proceedings/2020/","year":2020,"location":"Yokohama","dates":"January 2021 (postponed from 11-17 July 2020)","editors":"Christian Bessiere","isbn":"978-0-9992411-6-5","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2020"},"section":"Natural Language Processing","track":"Main track","number":537,"pages":{"first":3882,"last":3890},"keywords":["Natural Language Processing: Question Answering"],"videos":[{"label":"Video","url":"https://videos.ijcai20.org/25246/file_25246.m3u8","length_sec":293,"provider":"hls"}],"references":[{"position":1,"raw":"[Abboud et al., 2020] R. Abboud, I. Ceylan, and T. Luk- asiewicz. Learning to reason: Leveraging neural networks for approximate dnf counting. In AAAI, 2020.","title":"Learning to reason: Leveraging neural networks for approximate dnf counting","authors":"R Abboud, I Ceylan, T Lukasiewicz","year":"2020","venue":"AAAI","doi":null,"url":null,"internal_url":null},{"position":2,"raw":"[Abdelaziz et al., 2020] Ibrahim Abdelaziz, Veronika Thost, Maxwell Crouse, and Achille Fokoue. An experimental study of formula embeddings for automated theorem prov- ing in first-order logic. arXiv, 2002.00423, 2020.","title":"An experimental study of formula embeddings for automated theorem proving in first-order logic","authors":"Ibrahim Abdelaziz, Veronika Thost, Maxwell Crouse, Achille Fokoue","year":"2020","venue":null,"doi":null,"url":null,"internal_url":null},{"position":3,"raw":"[Apt et al., 1988] K. Apt, H. Blair, and A. Walker. Towards a theory of declarative knowledge. In Foundations of De- ductive Databases and Logic Programming., 1988.","title":"Towards a theory of declarative knowledge","authors":"K Apt, H Blair, A Walker","year":"1988","venue":"Foundations of Deductive Databases and Logic Programming","doi":null,"url":null,"internal_url":null},{"position":4,"raw":"[Bidoit and Froidevaux, 1991] N. Bidoit and C. Froidevaux. General logical databases and programs: Default logic se- mantics and stratification. Inf. Comput., 91:15-54, 1991.","title":"General logical databases and programs: Default logic semantics and stratification","authors":"N Bidoit, C Froidevaux","year":"1991","venue":"Inf. Comput","doi":null,"url":null,"internal_url":null},{"position":5,"raw":"[Chen et al., 2017] Qian Chen, Xiao-Dan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced lstm for natural language inference. In ACL, 2017.","title":"Enhanced lstm for natural language inference","authors":"Qian Chen, Xiao-Dan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, Diana Inkpen","year":"2017","venue":"ACL","doi":null,"url":null,"internal_url":null},{"position":6,"raw":"[Dagan et al., 2013] Ido Dagan, Dan Roth, Mark Sammons, and Fabio Zanzotto. Recognizing Textual Entailment: Models and Applications. Morgan and Claypool, 2013.","title":"Recognizing Textual Entailment: Models and Applications","authors":"Ido Dagan, Dan Roth, Mark Sammons, Fabio Zanzotto","year":"2013","venue":null,"doi":null,"url":null,"internal_url":null},{"position":7,"raw":"[He and Choi, 2019] Han He and Jinho D. Choi. Establish- ing strong baselines for the new decade: Sequence tag- ging, syntactic and semantic parsing with bert. ArXiv, abs/1908.04943, 2019.","title":"Establishing strong baselines for the new decade: Sequence tagging, syntactic and semantic parsing with bert","authors":"He, ; Choi, Han He, Jinho D Choi","year":"2019","venue":null,"doi":null,"url":null,"internal_url":null},{"position":8,"raw":"[Kalyan et al., 2019] Ashwin Kalyan, Oleksandr Polozov, and Adam Kalai. Adaptive generation of program- ming puzzles. Technical report, Georgia Tech, 2019. (https://openreview.net/forum?id=HJeRveHKDH).","title":"Adaptive generation of programming puzzles","authors":"Ashwin Kalyan, Oleksandr Polozov, Adam Kalai","year":"2019","venue":null,"doi":null,"url":"https://openreview.net/forum?id=HJeRveHKDH)","internal_url":null},{"position":9,"raw":"[Kamath and Das, 2019] Aishwarya Kamath and Rajarshi Das. A survey on semantic parsing. In AKBC'19, 2019.","title":"Aishwarya Kamath and Rajarshi Das. A survey on semantic parsing","authors":"Das Kamath","year":"2019","venue":"AKBC'19","doi":null,"url":null,"internal_url":null},{"position":10,"raw":"[Lai et al., 2017] G. Lai, Q. Xie, H. Liu, Y. Yang, and E. Hovy. RACE: Large-scale reading comprehension dataset from examinations. In EMNLP, 2017.","title":"RACE: Large-scale reading comprehension dataset from examinations","authors":"G Lai, Q Xie, H Liu, Y Yang, E Hovy","year":"2017","venue":"EMNLP","doi":null,"url":null,"internal_url":null},{"position":11,"raw":"[Lample and Charton, 2019] G. Lample and F. Charton. Deep learning for symbolic mathematics. In ICLR, 2019.","title":"Deep learning for symbolic mathematics","authors":"G Lample, F Charton","year":"2019","venue":"ICLR","doi":null,"url":null,"internal_url":null},{"position":12,"raw":"[Lin et al., 2019] 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.","title":"Reasoning over paragraph effects in situations","authors":"Kevin Lin, Oyvind Tafjord, Peter Clark, Matt Gardner","year":"2019","venue":"Proc. MRQA Workshop (EMNLP'19)","doi":null,"url":null,"internal_url":null},{"position":13,"raw":"[Liu et al., 2019] 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 ap- proach. arXiv preprint arXiv:1907.11692, 2019.","title":"RoBERTa: a robustly optimized BERT pretraining approach","authors":"Liu","year":"2019","venue":null,"doi":null,"url":null,"internal_url":null},{"position":14,"raw":"[MacCartney and Manning, 2014] Bill MacCartney and Chris Manning. Natural logic and natural language inference. Computing Meaning, 47:129-147, 2014.","title":"Natural logic and natural language inference","authors":"Manning Maccartney","year":"2014","venue":"Computing Meaning","doi":null,"url":null,"internal_url":null},{"position":15,"raw":"[Manning and MacCartney, 2009] Christopher D. Manning and Bill MacCartney. Natural language inference. Stan- ford University, 2009.","title":"Natural language inference","authors":"Christopher D Manning, Bill Maccartney","year":"2009","venue":null,"doi":null,"url":null,"internal_url":null},{"position":16,"raw":"[McCarthy, 1959] John W. McCarthy. Programs with com- mon sense. In Proc. Tedding Conf. on the Mechanization of Thought Processes, pages 75-91, 1959.","title":"Programs with common sense","authors":"John W Mccarthy","year":"1959","venue":"Proc. Tedding Conf. on the Mechanization of Thought Processes","doi":null,"url":null,"internal_url":null},{"position":17,"raw":"[McCarthy, 1984] J. McCarthy. Applications of circumscrip- tion to formalizing commonsense. In NMR, 1984.","title":"Applications of circumscription to formalizing commonsense","authors":"J Mccarthy","year":"1984","venue":"NMR","doi":null,"url":null,"internal_url":null},{"position":18,"raw":"[Metaxiotis et al., 2002] Kostas S Metaxiotis, Dimitris Ask- ounis, and John Psarras. Expert systems in production planning and scheduling: A state-of-the-art survey. Jour- nal of Intelligent Manufacturing, 13(4):253-260, 2002.","title":"Expert systems in production planning and scheduling: A state-of-the-art survey","authors":"Dimitris Kostas S Metaxiotis, John Askounis, Psarras","year":"2002","venue":"Journal of Intelligent Manufacturing","doi":null,"url":null,"internal_url":null},{"position":19,"raw":"[Musen and Van der Lei, 1988] 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.","title":"Of brittleness and bottlenecks: Challenges in the creation of pattern-recognition and expert-system models","authors":"Van Musen, ; Der Lei, A Mark, Johan Musen, Van Der Lei","year":"1988","venue":"Machine Intelligence and Pattern Recognition","doi":null,"url":null,"internal_url":null},{"position":20,"raw":"[Newell and Simon, 1956] A. Newell and H. Simon. The logic theory machine-a complex information processing system. IRE Trans. Information Theory, 2:61-79, 1956.","title":"The logic theory machine-a complex information processing system","authors":"A Newell, H Simon","year":"1956","venue":"IRE Trans. Information Theory","doi":null,"url":null,"internal_url":null},{"position":21,"raw":"[Parikh et al., 2016] Ankur Parikh, Oscar Täckström, Dipan- jan Das, and Jakob Uszkoreit. A decomposable attention model for natural language inference. In EMNLP, 2016.","title":"A decomposable attention model for natural language inference","authors":"Ankur Parikh, Oscar Täckström, Dipanjan Das, Jakob Uszkoreit","year":"2016","venue":"EMNLP","doi":null,"url":null,"internal_url":null},{"position":22,"raw":"[Rajpurkar et al., 2016] P. Rajpurkar, J. Zhang, K. Lopyrev, and P. Liang. SQuAD: 100,000+ questions for machine comprehension of text. In EMNLP, 2016.","title":"SQuAD: 100,000+ questions for machine comprehension of text","authors":"P Rajpurkar, J Zhang, K Lopyrev, P Liang","year":"2016","venue":"EMNLP","doi":null,"url":null,"internal_url":null},{"position":23,"raw":"[Richardson and Sabharwal, 2019] Kyle Richardson and Ashish Sabharwal. What does my qa model know? de- vising controlled probes using expert knowledge. ArXiv, abs/1912.13337, 2019.","title":"What does my qa model know? devising controlled probes using expert knowledge","authors":"Sabharwal Richardson, Kyle Richardson, Ashish Sabharwal","year":"2019","venue":null,"doi":null,"url":null,"internal_url":null},{"position":24,"raw":"[Richardson et al., 2020] Kyle Richardson, Hai Hu, Lawrence S Moss, and Ashish Sabharwal. Probing natural language inference models through semantic fragments. In AAAI'20, 2020.","title":"Probing natural language inference models through semantic fragments","authors":"Kyle Richardson, Hai Hu, Lawrence S Moss, Ashish Sabharwal","year":"2020","venue":"AAAI'20","doi":null,"url":null,"internal_url":null},{"position":25,"raw":"[Saxton et al., 2019] David Saxton, Edward Grefenstette, Felix Hill, and Pushmeet Kohli. Analysing mathematical reasoning abilities of neural models. In ICLR, 2019.","title":"Analysing mathematical reasoning abilities of neural models","authors":"David Saxton, Edward Grefenstette, Felix Hill, Pushmeet Kohli","year":"2019","venue":"ICLR","doi":null,"url":null,"internal_url":null},{"position":26,"raw":"[Selsam et al., 2019] 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.","title":"Learning a SAT solver from single-bit supervision","authors":"Daniel Selsam, Matthew Lamm, Benedikt Bünz, Percy Liang, Leonardo De Moura, David L Dill","year":"2019","venue":"ICLR","doi":null,"url":null,"internal_url":null},{"position":27,"raw":"[Sinha et al., 2019] K. Sinha, S. Sodhani, J. Dong, J. Pineau, and W. Hamilton. CLUTRR: a diagnostic benchmark for inductive reasoning from text. In EMNLP, 2019.","title":"CLUTRR: a diagnostic benchmark for inductive reasoning from text","authors":"K Sinha, S Sodhani, J Dong, J Pineau, W Hamilton","year":"2019","venue":"EMNLP","doi":null,"url":null,"internal_url":null},{"position":28,"raw":"[Tafjord et al., 2019] Oyvind Tafjord, Matt Gardner, Kevin Lin, and Peter Clark. Quartz: An open-domain dataset of qualitative relationship questions. In EMNLP, 2019.","title":"Quartz: An open-domain dataset of qualitative relationship questions","authors":"Oyvind Tafjord, Matt Gardner, Kevin Lin, Peter Clark","year":"2019","venue":"EMNLP","doi":null,"url":null,"internal_url":null},{"position":29,"raw":"[Talmor et al., 2019] A. Talmor, Y. Elazar, Y. Goldberg, and J. Berant. oLMpics -on what language model pre-training captures. ArXiv, abs/1912.13283, 2019.","title":"oLMpics -on what language model pre-training captures","authors":"A Talmor, Y Elazar, Y Goldberg, J Berant","year":"2019","venue":null,"doi":null,"url":null,"internal_url":null},{"position":30,"raw":"[Wang et al., 2019] Q. Wang, B. Li, T. Xiao, J. Zhu, C. Li, D. Wong, and L. Chao. Learning deep transformer models for machine translation. In ACL, 2019.","title":"Learning deep transformer models for machine translation","authors":"Q Wang, B Li, T Xiao, J Zhu, C Li, D Wong, L Chao","year":"2019","venue":"ACL","doi":null,"url":null,"internal_url":null},{"position":31,"raw":"[Weber et al., 2019] 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.","title":"Nlprolog: Reasoning with weak unification for question answering in natural language","authors":"Leon Weber, Pasquale Minervini, Jannes Münchmeyer, Ulf Leser, Tim Rocktäschel","year":"2019","venue":"ACL","doi":null,"url":null,"internal_url":null},{"position":32,"raw":"[Weston et al., 2016] J. Weston, A. Bordes, S. Chopra, and T. Mikolov. Towards AI-Complete question answering: A set of prerequisite toy tasks. In ICLR, 2016.","title":"Towards AI-Complete question answering: A set of prerequisite toy tasks","authors":"J Weston, A Bordes, S Chopra, T Mikolov","year":"2016","venue":"ICLR","doi":null,"url":null,"internal_url":null}],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}