Do Deep Neural Networks Capture Compositionality in Arithmetic Reasoning? (2023)

Abstract: Compositionality is a pivotal property of symbolic reasoning. However, how well recent neural models capture compositionality remains underexplored in the symbolic reasoning tasks. This study empirically addresses this question by systematically examining recently published pre-trained seq2seq models with a carefully controlled dataset of multi-hop arithmetic symbolic reasoning. We introduce a skill tree on compositionality in arithmetic symbolic reasoning that defines the hierarchical levels of complexity along with three compositionality dimensions: systematicity, productivity, and substitutivity. Our experiments revealed that among the three types of composition, the models struggled most with systematicity, performing poorly even with relatively simple compositions. That difficulty was not resolved even after training the models with intermediate reasoning steps.

## introduction integrating symbolic reasoning capabilities into neural models has been a crucial goal of artificial intelligence @xcite . with this in mind, many researchers investigated how well modern neural models achieve symbolic reasoning (lake and baroni, 2018). however, recent studies have reported conflicting results on this; some suggest that neural models can solve complex multi-hop reasoning @xcite , while others claim that models struggle even with performing simple symbolic operations @xcite . as a step toward further understanding neural models' symbolic reasoning ability, this study systematically analyzes recently published pretrained seq2seq models using a carefully controlled dataset of multi-hop arithmetic symbolic reasoning. @xmath0, @xmath1, @xmath2, @xmath3 @xmath4, @xmath5, @xmath6, @xmath7 ## skill tree in arithmetic reasoning we take arithmetic reasoning as the domain for our exploration because it allows us to synthesize questions systematically, as we show in this paper, which helps examine a model's composition ability in a controlled manner. furthermore, the arithmetic reasoning ability of neural models has gained much attention as modern large language models still struggle with this problems @xcite . specifically, we use multi-hop arithmetic reasoning problems as follows: question: @xmath8, @xmath9, @xmath10, @xmath11: 3 here, the value assigned to the variable c is asked. ## experiments and results we adopted nine combinations of training and test domains as shown in the first column of we identified that the systematicity generalization of reference and arithmetic operations (setting 2, 3 → 5; from @xmath13,@xmath14,@xmath15,@xmath16,@xmath17,@xmath18,@xmath19,@xmath20, yet difficult to solve (refer to appendix d for results on other tasks.). to better understand why neural models struggle with this setting, we decomposed the complexity of this setting and analyzed the model performance. note that @xcite also suggested that neural models lack systematicity generalization ability in the context of semantic parsing; our results corroborate their findings from the context of arithmetic multihop reasoning. is this difficulty specific to arithmetic symbolic reasoning? we experimented with the ## analysis ## related work the analysis of the compositional generalization ability of neural models and arithmetic multi-hop reasoning problems have typically been studied separately; this study has merged these two directions. as for composition generalization analy-sis, several studies analyzed neural models using datasets such as scan (lake and baroni, 2018), cogs @xcite , and cfq @xcite . these mainly focused on compositionality in the context of semantic parsing; the composition ability toward symbol manipulations (e.g., multi-hop arithmetic reasoning) is typically out of focus. as for arithmetic reasoning, neural models' abilities have been analyzed typically using benchmarks such as drop @xcite . it has recently been reported that such dataset has superficial cues @xcite , which made it unclear how much arithmetic reasoning neural model achieves; our study using a carefully controlled dataset contributed to the exact weakness of neural models in this context. ## conclusion in this study, we have empirically investigated the arithmetic multi-hop reasoning ability of modern neural models through the lens of compositional generalization ability. to systematically analyze neural models' ability, we have defined a skill tree that organizes the (hierarchical) complexity levels of the multi-hop symbolic reasoning dataset. our experiments have revealed that the major weakness lies in systematicity, even with a relatively simple composition. through the ablation studies, we also have found that difficulty in systematicity is pronounced in accessing knowledge that is not written in input but stored in models. furthermore, even in training models with intermediate steps that explicate the composition, they struggle to capture systematicity. we also found the difficulty of multi-hop reasoning in compositional generalization. these highlight the exact weakness of neural models and encourage studies to overcome such limitations.