Binz et al. review recent meta-learned models that can reproduce human-like compositional generalization behaviors (Lake & Baroni, Reference Lake and Baroni2023), but they stop short of endorsing meta-learning as a theoretical framework for understanding human compositionality. Here, we elaborate on this proposal, articulating the hypothesis that human compositionality can be understood as an emergent property of an inner-loop, in-context learning algorithm that is itself meta-learned.
Compositionality has played a key theoretical role in cognitive science since its inception (Chomsky, Reference Chomsky1957), providing an explanation for human systematic and productive generalization behaviors. These phenomena are readily explained by the compositionality of classical cognitive architectures, as the design of their symbolic representations and structure-sensitive operations intrinsically guarantees that they can redeploy familiar constituents in novel constructions (Fodor & Pylyshyn, Reference Fodor and Pylyshyn1988). It has been argued that neural networks are in principle incapable of playing the same explanatory role because they lack these architectural features (Fodor & Pylyshyn, Reference Fodor and Pylyshyn1988; Marcus, Reference Marcus1998).
Much work has explored inductive biases that might encourage compositionality to emerge in neural networks (Russin, Jo, O'Reilly, & Bengio, Reference Russin, Jo, O'Reilly and Bengio2020a; Smolensky, Reference Smolensky1990; Webb et al., Reference Webb, Frankland, Altabaa, Krishnamurthy, Campbell, Russin and Cohen2024), but meta-learning offers an original solution to the puzzle. As Binz et al. emphasize, when an inner-loop, in-context learning algorithm emerges within the activation dynamics of a meta-learning neural network, it can have fundamentally different properties than the outer-loop algorithm. Thus, even if the outer-loop algorithm lacks these inductive biases, the network may nevertheless implement an emergent in-context learning algorithm that embodies them implicitly.
Lake and Baroni (Reference Lake and Baroni2023) have shown that such an inner-loop algorithm can pass tests of compositionality that standard neural networks fail (Lake & Baroni, Reference Lake, Baroni, Dy and Krause2018). The question, then, is whether such networks can serve as explanatory models of human compositional generalization. Can we think of human compositionality as an emergent property of an inner-loop, in-context learning algorithm? How might we evaluate such a hypothesis? Here, we consider two independent aspects of this proposal: First, its implications for neural mechanisms, and second, for development.
One straightforward mechanistic prediction is that employing inner-loop, in-context learning mechanisms, rather than outer-loop learning mechanisms, should facilitate compositional generalization behaviors. Cognitive and computational neuroscience provides empirical support for this prediction. Cognitive control – the ability to overcome existing prepotent responses and to flexibly adapt to arbitrary goals (Miller & Cohen, Reference Miller and Cohen2001) – is an important capacity for human in-context learning. The neural mechanisms known to be involved in cognitive control, such as working memory, gating, and top-down modulation in the prefrontal cortex (Miller & Cohen, Reference Miller and Cohen2001; O'Reilly & Frank, Reference O'Reilly and Frank2006; Russin, O'Reilly, & Bengio, Reference Russin, O'Reilly and Bengio2020b), are also thought to be essential to compositional abilities such as inferring and applying rules (Calderon, Verguts, & Frank, Reference Calderon, Verguts and Frank2022; Collins & Frank, Reference Collins and Frank2013; Frank & Badre, Reference Frank and Badre2012; Kriete, Noelle, Cohen, & O'Reilly, Reference Kriete, Noelle, Cohen and O'Reilly2013), deductive and inductive reasoning (Crescentini et al., Reference Crescentini, Seyed-Allaei, De Pisapia, Jovicich, Amati and Shallice2011; Goel, Reference Goel2007), and processing complex syntax (Thompson-Schill, Reference Thompson-Schill and Cutler2005). Thus, a shared set of neural mechanisms may underlie both in-context learning and compositionality in humans, lending support to the meta-learning hypothesis.
A second, independent prediction is a developmental one – that human compositional generalization abilities are themselves meta-learned over the course of development. Adults come into any psychological experiment equipped with a wealth of prior experience. The meta-learning hypothesis predicts that this includes experiences encouraging the adoption of more compositional learning strategies (i.e., ones sensitive to implicit compositional structure). In general, children exhibit a developmental trajectory consistent with this hypothesis. Older children learn new tasks more efficiently (Bergelson, Reference Bergelson2020), especially when these tasks involve cognitive capacities essential to in-context learning, such as working memory and executive functions (Munakata, Snyder, & Chatham, Reference Munakata, Snyder and Chatham2012). Furthermore, children improve throughout development on tasks involving the composition of rules (Piantadosi & Aslin, Reference Piantadosi and Aslin2016; Piantadosi, Palmeri, & Aslin, Reference Piantadosi, Palmeri and Aslin2018).
Innate mechanisms or inductive biases may still be required to successfully meta-learn a compositional inner-loop algorithm in the first place. Indeed, studies in machine learning have shown that architecture seems to be an important factor in determining whether in-context learning capabilities emerge (Chan et al., Reference Chan, Santoro, Lampinen, Wang, Singh, Richemond and Hill2022). Similarly, findings from cognitive and computational neuroscience have emphasized the importance of architectural features such as prefrontal gating mechanisms for the emergence of abstract representations that could mediate subsequent in-context generalization abilities (Collins & Frank, Reference Collins and Frank2013; Frank & Badre, Reference Frank and Badre2012; Kriete et al., Reference Kriete, Noelle, Cohen and O'Reilly2013; Rougier, Noelle, Braver, Cohen, & O'Reilly, Reference Rougier, Noelle, Braver, Cohen and O'Reilly2005). These inductive biases can also explain incidental hierarchical rule learning and generalization in infants (Werchan, Collins, Frank, & Amso, Reference Werchan, Collins, Frank and Amso2015, Reference Werchan, Collins, Frank and Amso2016). Thus, a combination of innate architectural features and meta-learning experiences may be necessary for human compositionality to emerge.
The meta-learning datasets used in previous modeling efforts have typically been developmentally unrealistic because they have been contrived to engender narrow compositional generalization abilities that are specific to a particular type of task. Could meta-learning in less explicitly structured learning scenarios lead to the acquisition of broader compositional generalization abilities? This question deserves careful empirical study, but we may draw a preliminary insight from the success of large language models (Brown et al., Reference Brown, Mann, Ryder, Subbiah, Kaplan and Dhariwal2020), which develop in-context learning abilities (von Oswald et al., Reference von Oswald, Niklasson, Schlegel, Kobayashi, Zucchet, Scherrer and Sacramento2023; Xie, Raghunathan, Liang, & Ma, Reference Xie, Raghunathan, Liang and Ma2022) that in some cases exhibit human-like compositionality (Webb, Holyoak, & Lu, Reference Webb, Holyoak and Lu2022; Wei et al., Reference Wei, Wang, Schuurmans, Bosma, Ichter, Xia and Zhou2023; Zhou et al., Reference Zhou, Schärli, Hou, Wei, Scales, Wang and Chi2022). Unlike models explicitly designed for meta-learning, large language models are trained to predict the next token on very large datasets of unstructured text. These datasets contain more language data than humans are exposed to in an entire lifetime (Linzen & Baroni, Reference Linzen and Baroni2021), so future work needs to investigate what kinds of inductive biases are necessary to improve their sample efficiency. However, these models provide proof of concept that neural networks can develop compositional in-context learning algorithms by training on relatively unstructured data.
Binz et al. shy away from a robust commitment to meta-learning as a theoretical framework, instead emphasizing its utility as a methodological tool. Here, we have demonstrated how the meta-learning perspective on human compositionality can generate testable empirical hypotheses about underlying mechanisms and developmental trajectory. If such a research program bears fruit, it will elevate meta-learning from a useful tool to a novel cognitive theory.
Binz et al. review recent meta-learned models that can reproduce human-like compositional generalization behaviors (Lake & Baroni, Reference Lake and Baroni2023), but they stop short of endorsing meta-learning as a theoretical framework for understanding human compositionality. Here, we elaborate on this proposal, articulating the hypothesis that human compositionality can be understood as an emergent property of an inner-loop, in-context learning algorithm that is itself meta-learned.
Compositionality has played a key theoretical role in cognitive science since its inception (Chomsky, Reference Chomsky1957), providing an explanation for human systematic and productive generalization behaviors. These phenomena are readily explained by the compositionality of classical cognitive architectures, as the design of their symbolic representations and structure-sensitive operations intrinsically guarantees that they can redeploy familiar constituents in novel constructions (Fodor & Pylyshyn, Reference Fodor and Pylyshyn1988). It has been argued that neural networks are in principle incapable of playing the same explanatory role because they lack these architectural features (Fodor & Pylyshyn, Reference Fodor and Pylyshyn1988; Marcus, Reference Marcus1998).
Much work has explored inductive biases that might encourage compositionality to emerge in neural networks (Russin, Jo, O'Reilly, & Bengio, Reference Russin, Jo, O'Reilly and Bengio2020a; Smolensky, Reference Smolensky1990; Webb et al., Reference Webb, Frankland, Altabaa, Krishnamurthy, Campbell, Russin and Cohen2024), but meta-learning offers an original solution to the puzzle. As Binz et al. emphasize, when an inner-loop, in-context learning algorithm emerges within the activation dynamics of a meta-learning neural network, it can have fundamentally different properties than the outer-loop algorithm. Thus, even if the outer-loop algorithm lacks these inductive biases, the network may nevertheless implement an emergent in-context learning algorithm that embodies them implicitly.
Lake and Baroni (Reference Lake and Baroni2023) have shown that such an inner-loop algorithm can pass tests of compositionality that standard neural networks fail (Lake & Baroni, Reference Lake, Baroni, Dy and Krause2018). The question, then, is whether such networks can serve as explanatory models of human compositional generalization. Can we think of human compositionality as an emergent property of an inner-loop, in-context learning algorithm? How might we evaluate such a hypothesis? Here, we consider two independent aspects of this proposal: First, its implications for neural mechanisms, and second, for development.
One straightforward mechanistic prediction is that employing inner-loop, in-context learning mechanisms, rather than outer-loop learning mechanisms, should facilitate compositional generalization behaviors. Cognitive and computational neuroscience provides empirical support for this prediction. Cognitive control – the ability to overcome existing prepotent responses and to flexibly adapt to arbitrary goals (Miller & Cohen, Reference Miller and Cohen2001) – is an important capacity for human in-context learning. The neural mechanisms known to be involved in cognitive control, such as working memory, gating, and top-down modulation in the prefrontal cortex (Miller & Cohen, Reference Miller and Cohen2001; O'Reilly & Frank, Reference O'Reilly and Frank2006; Russin, O'Reilly, & Bengio, Reference Russin, O'Reilly and Bengio2020b), are also thought to be essential to compositional abilities such as inferring and applying rules (Calderon, Verguts, & Frank, Reference Calderon, Verguts and Frank2022; Collins & Frank, Reference Collins and Frank2013; Frank & Badre, Reference Frank and Badre2012; Kriete, Noelle, Cohen, & O'Reilly, Reference Kriete, Noelle, Cohen and O'Reilly2013), deductive and inductive reasoning (Crescentini et al., Reference Crescentini, Seyed-Allaei, De Pisapia, Jovicich, Amati and Shallice2011; Goel, Reference Goel2007), and processing complex syntax (Thompson-Schill, Reference Thompson-Schill and Cutler2005). Thus, a shared set of neural mechanisms may underlie both in-context learning and compositionality in humans, lending support to the meta-learning hypothesis.
A second, independent prediction is a developmental one – that human compositional generalization abilities are themselves meta-learned over the course of development. Adults come into any psychological experiment equipped with a wealth of prior experience. The meta-learning hypothesis predicts that this includes experiences encouraging the adoption of more compositional learning strategies (i.e., ones sensitive to implicit compositional structure). In general, children exhibit a developmental trajectory consistent with this hypothesis. Older children learn new tasks more efficiently (Bergelson, Reference Bergelson2020), especially when these tasks involve cognitive capacities essential to in-context learning, such as working memory and executive functions (Munakata, Snyder, & Chatham, Reference Munakata, Snyder and Chatham2012). Furthermore, children improve throughout development on tasks involving the composition of rules (Piantadosi & Aslin, Reference Piantadosi and Aslin2016; Piantadosi, Palmeri, & Aslin, Reference Piantadosi, Palmeri and Aslin2018).
Innate mechanisms or inductive biases may still be required to successfully meta-learn a compositional inner-loop algorithm in the first place. Indeed, studies in machine learning have shown that architecture seems to be an important factor in determining whether in-context learning capabilities emerge (Chan et al., Reference Chan, Santoro, Lampinen, Wang, Singh, Richemond and Hill2022). Similarly, findings from cognitive and computational neuroscience have emphasized the importance of architectural features such as prefrontal gating mechanisms for the emergence of abstract representations that could mediate subsequent in-context generalization abilities (Collins & Frank, Reference Collins and Frank2013; Frank & Badre, Reference Frank and Badre2012; Kriete et al., Reference Kriete, Noelle, Cohen and O'Reilly2013; Rougier, Noelle, Braver, Cohen, & O'Reilly, Reference Rougier, Noelle, Braver, Cohen and O'Reilly2005). These inductive biases can also explain incidental hierarchical rule learning and generalization in infants (Werchan, Collins, Frank, & Amso, Reference Werchan, Collins, Frank and Amso2015, Reference Werchan, Collins, Frank and Amso2016). Thus, a combination of innate architectural features and meta-learning experiences may be necessary for human compositionality to emerge.
The meta-learning datasets used in previous modeling efforts have typically been developmentally unrealistic because they have been contrived to engender narrow compositional generalization abilities that are specific to a particular type of task. Could meta-learning in less explicitly structured learning scenarios lead to the acquisition of broader compositional generalization abilities? This question deserves careful empirical study, but we may draw a preliminary insight from the success of large language models (Brown et al., Reference Brown, Mann, Ryder, Subbiah, Kaplan and Dhariwal2020), which develop in-context learning abilities (von Oswald et al., Reference von Oswald, Niklasson, Schlegel, Kobayashi, Zucchet, Scherrer and Sacramento2023; Xie, Raghunathan, Liang, & Ma, Reference Xie, Raghunathan, Liang and Ma2022) that in some cases exhibit human-like compositionality (Webb, Holyoak, & Lu, Reference Webb, Holyoak and Lu2022; Wei et al., Reference Wei, Wang, Schuurmans, Bosma, Ichter, Xia and Zhou2023; Zhou et al., Reference Zhou, Schärli, Hou, Wei, Scales, Wang and Chi2022). Unlike models explicitly designed for meta-learning, large language models are trained to predict the next token on very large datasets of unstructured text. These datasets contain more language data than humans are exposed to in an entire lifetime (Linzen & Baroni, Reference Linzen and Baroni2021), so future work needs to investigate what kinds of inductive biases are necessary to improve their sample efficiency. However, these models provide proof of concept that neural networks can develop compositional in-context learning algorithms by training on relatively unstructured data.
Binz et al. shy away from a robust commitment to meta-learning as a theoretical framework, instead emphasizing its utility as a methodological tool. Here, we have demonstrated how the meta-learning perspective on human compositionality can generate testable empirical hypotheses about underlying mechanisms and developmental trajectory. If such a research program bears fruit, it will elevate meta-learning from a useful tool to a novel cognitive theory.
Financial support
M. J. F. is supported by ONR grant N00014-23-1-2792. E. P. and J. R. are supported by COBRE grant no. 5P20GM103645-10.
Competing interest
None.