Obtaining human-like performance in NLP is often argued to require compositional generalisation . Whether neural networks exhibit this ability is usually studied by training models on highly compositional synthetic data . However , compositionality in natural language is much more complex than the rigid , arithmeticlike version such data adheres to , and artificial compositionality tests thus do not allow us to determine how neural models deal with more realistic forms of compositionality . In this work , we re-instantiate three compositionality tests from the literature and reformulate them for neural machine translation ( NMT ) . Our results highlight that : i ) unfavourably , models trained on more data are more compositional ; ii ) models are sometimes less compositional than expected , but sometimes more , exemplifying that different levels of compositionality are required , and models are not always able to modulate between them correctly ; iii ) some of the non-compositional behaviours are mistakes , whereas others reflect the natural variation in data . Apart from an empirical study , our work is a call to action : we should rethink the evaluation of compositionality in neural networks and develop benchmarks using real data to evaluate compositionality on natural language , where composing meaning is not as straightforward as doing the math . 1 Although the successes of deep neural networks in natural language processing ( NLP ) are astounding and undeniable , they are still regularly criticised for lacking the powerful generalisation capacities that characterise human intelligence . A frequently mentioned concept in such critiques is compositionality : the ability to build up the meaning of a complex expression by combining the meanings of its parts ( e.g. Partee , 1984 ) . Compositionality is assumed to play an essential role in how humans understand language , but whether neural networks also exhibit this property has since long been a topic of vivid debate ( e.g. Fodor and Pylyshyn , 1988 ; Smolensky , 1990 ; Marcus , 2003 ; Nefdt , 2020 ) . Studies about the compositional abilities of neural networks consider almost exclusively models trained on synthetic datasets , in which compositionality can be ensured and isolated ( e.g. Lake and Baroni , 2018 ; Hupkes et al . , 2020 ) . 2 In such tests , the interpretation of expressions is computed completely locally : every subpart is evaluated independently -without taking into account any external context -and the meaning of the whole expression is then formed by combining the meanings of its parts in a bottom-up fashion . This protocol matches the type of compositionality observed in arithmetic : the meaning of ( 3 + 5 ) is always 8 , independent of the context it occurs in . However , as exemplified by the sub-par performance of symbolic models that allow only strict , local protocols , compositionality in natural domains is far more intricate than this rigid , arithmeticlike variant of compositionality . Natural language seems very compositional , but at the same time , it is riddled with cases that are difficult to interpret with a strictly local interpretation of compositionality . Sometimes , the meaning of an expression does not derive from its parts ( e.g. for idioms ) , but the parts themselves are used compositionally in other contexts . In other cases , the meaning of an expression does depend on its parts in a compositional way , but arriving at this meaning requires a more global approach because the meanings of the parts need to be disambiguated by information from elsewhere . For instance , consider the meaning of homonyms ( " these dates are perfect for our dish / wedding " ) , potentially idiomatic expressions ( " the child kicked the bucket off the pavement " ) , or scope ambiguities ( " every human likes a cat " ) . This paradoxical tension between local and global forms of compositionality inspired many debates on the compositionality of natural language . Likewise , it impacts the evaluation of compositionality in NLP models . On the one hand , local compositionality seems necessary for robust and reliable generalisation . Yet , at the same time , global compositionality is needed to appropriately address the full complexity of language , which makes evaluating compositionality of state-of-the-art models ' in the wild ' a complicated endeavour . In this work , we face this challenge head-on . We concentrate on the domain of neural machine translation ( NMT ) , which is paradigmatically close to the tasks typically considered for compositionality tests , where the target represents the ' meaning ' of the input . 3 Furthermore , MT is an important domain of NLP , for which compositional generalisation is important to produce more robust translations and train adequate models for low-resource languages ( see , e.g. Chaabouni et al . , 2021 ) . As an added advantage , compositionality is traditionally well studied and motivated for MT ( Rosetta , 1994 ; Janssen and Partee , 1997 ; Janssen , 1998 ) . We reformulate three theoretically grounded tests from Hupkes et al . ( 2020 ) : systematicity , substitutivity and overgeneralisation . Since accuracycommonly used in artificial compositionality testsis not a suitable evaluation metric for MT , we base our evaluations on the extent to which models behave consistently , rather than correctly . In our tests for systematicity and substitutivity , we consider whether processing is local ; in our overgeneralisation test , we consider how models treat idioms that are assumed to require global processing . Our results indicate that models often do not behave compositionally under the local interpretation , but exhibit behaviour that is too local in other cases . In other words , models have the ability to process phrases both locally and globally but do not always correctly modulate between them . We further show that some inconsistencies reflect variation in natural language , whereas others are true compositional mistakes , exemplifying the need for both local and global compositionality as well as illustrating the need for tests that encompass them both . With our study , we contribute to ongoing questions about the compositional abilities of neural networks , and we provide nuance to the nature of this question when natural language is concerned : how local should the compositionality of models for natural language actually be ? Aside from an empirical study , our work is also a call to action : we should rethink the evaluation of compositionality in neural networks and develop benchmarks using real data to evaluate compositionality on natural language , where composing meaning is not as straightforward as doing the math . In conclusion , with this work , we contribute to the question of how compositional models trained on natural data are , and we argue that MT is a suitable and relevant testing ground to ask this question . Focusing on the balance between local and global forms of compositionality , we formulate three different compositionality tests and discuss the issues and considerations that come up when considering compositionality in the context of natural data . Our tests indicate that models show both local and global processing , but not necessarily for the right samples . Furthermore , they underscore the difficulty of separating helpful and harmful types of non-compositionality , stressing the need to rethink the evaluation of compositionality using natural language , where composing meaning is not as straightforward as doing the math . The Npeople Vtransitive the N sl people . E.g. The poet criticises the king .

Challenge: Existing studies on compositional generalization of neural models use synthetic data which limits the scope of analysis only to local expressions without global contexts considered.
Approach: They reformulate three theoretically grounded compositionality tests composed of systematicity, substitutivity for local and overgeneralisation for global on how models treat idioms.
Outcome: They find that models trained on more data are more compositional but less compositional than expected and make non-compositional behaviours by mistake.