AnaLog: Testing Analytical and Deductive Logic Learnability in Language Models

26521

Authors

nan

Abstract

AbstractWe investigate the extent to which pre-trained language models acquire analytical and deductive logical reasoning capabilities as a side effect of learning word prediction. We present AnaLog, a natural language inference task designed to probe models for these capabilities, controlling for different invalid heuristics the models may adopt instead of learning the desired generalisations. We test four languagemodels on AnaLog, finding that they have all learned, to a different extent, to encode information that is predictive of entailment beyond shallow heuristics such as lexical overlap and grammaticality. We closely analyse the best performing language model and show that while it performs more consistently than other language models across logical connectives and reasoning domains, it still is sensitive to lexical and syntactic variations in the realisation of logical statements.

Keywords

nan

Full Content

Proceedings of the 11th Joint Conference on Lexical and Computational Semantics, pages 55 - 68 July 14-15, 2022 ©2022 Association for Computational Linguistics AnaLog: Testing Analytical and Deductive Logic Learnability in Language Models Samuel Ryb Tufts University samuel.ryb@tufts.edu Mario Giulianelli University of Amsterdam m.giulianelli@uva.nl Arabella Sinclair University of Aberdeen arabella.sinclair@abdn.ac.uk Raquel Fernández University of Amsterdam raquel.fernandez@uva.nl Abstract We investigate the extent to which pre-trained language models acquire analytical and deduc- tive logical reasoning capabilities as a side ef- fect of learning word prediction. We present AnaLog, a natural language inference task de- signed to probe models for these capabilities, controlling for different invalid heuristics the models may adopt instead of learning the de- sired generalisations. We test four language models on AnaLog, finding that they have all learned, to a different extent, to encode in- formation that is predictive of entailment be- yond shallow heuristics such as lexical over- lap and grammaticality. We closely analyse the best performing language model and show that while it performs more consistently than other language models across logical connec- tives and reasoning domains, it still is sensitive to lexical and syntactic variations in the reali- sation of logical statements. 1 Introduction Logical reasoning (Lakoff, 1970; MacCartney and Manning, 2007; Smith, 2020) is at the core of many downstream NLP tasks, such as dialogue and story generation (Fan et al., 2018; Welleck et al., 2019); narrative understanding and summari- sation (Mostafazadeh et al., 2016; Vashishtha et al., 2020); question answering (Weber et al., 2019; Shi et al., 2021); relation extraction (Massey et al., 2015; Kassner et al., 2020; Yanaka et al., 2021); and visual comprehension (Suhr et al., 2017, 2019; Sethuraman et al., 2021). Because most of the cur- rent approaches to these tasks rely on pre-trained language models (LMs), it is essential to under- stand whether LMs can perform logical reasoning. One way of verifying LMs’ reasoning abilities is using a natural language inference (NLI) task (Da- gan et al., 2005; Giampiccolo et al., 2007; Bowman et al., 2015; Bhagavatula et al., 2020; Rudinger et al., 2020). In NLI, an LM is given a premise and a hypothesis, and its task is to predict the logical relation between the two. Yet, LMs typ- ically learn to solve NLI by using invalid heuris- tics, for example by extracting overlapping patterns between premises and hypotheses (McCoy et al., 2019), or by using specific lexical items and sen- tence grammaticality as simplistic predictors of entailment (Poliak et al., 2018). In this paper, we examine whether pre-trained LMs rely solely on shallow heuristics, or whether they can use relevant reasoning abilities to make inferences. To do so, we develop a new NLI task, AnaLog,1 that requires LMs to encode different logical reasoning patterns and we probe the be- haviour of four masked and autoregressive LMs on this new dataset. Using interpretability mea- sures, we find that, as a side effect of learning word prediction, all LMs under scrutiny have—to some extent—learned to encode information that is pre- dictive …

Content truncated to 500 words

Labeled Text

AbstractWe investigate the extent to which pre-trained language models acquire analytical and deductive logical reasoning capabilities as a side effect of learning word prediction. We present AnaLog, a natural language inference task designed to probe models for these capabilities, controlling for different invalid heuristics the models may adopt instead of learning the desired generalisations. We test four languagemodels on AnaLog, finding that they have all learned, to a different extent, to encode information that is predictive of entailment beyond shallow heuristics such as lexical overlap and grammaticality. We closely analyse the best performing language model and show that while it performs more consistently than other language models across logical connectives and reasoning domains, it still is sensitive to lexical and syntactic variations in the realisation of logical statements.

Publication Details

Paper ID:
26521
Year:
2022
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan