mlsanityData to 7 Oct 2026

Towards Understanding the Relationship between In-context Learning and Compositional Generalization

arXiv 2403.11834 ↗First posted 18 Mar 2024cs.CL cs.LGcited by 5

Not on the map. Why?

Abstract (arXiv)

According to the principle of compositional generalization, the meaning of a complex expression can be understood as a function of the meaning of its parts and of how they are combined. This principle is crucial for human language processing and also, arguably, for NLP models in the face of out-of-distribution data. However, many neural network models, including Transformers, have been shown to struggle with compositional generalization. In this paper, we hypothesize that forcing models to in-context learn can provide an inductive bias to promote compositional generalization. To test this hypothesis, we train a causal Transformer in a setting that renders ordinary learning very difficult: we present it with different orderings of the training instance and shuffle instance labels. This corresponds to training the model on all possible few-shot learning problems attainable from the dataset. The model can solve the task, however, by utilizing earlier examples to generalize to later ones (i.e. in-context learning). In evaluations on the datasets, SCAN, COGS, and GeoQuery, models trained in this manner indeed show improved compositional generalization. This indicates the usefulness of in-context learning problems as an inductive bias for generalization.

Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 51 of its 65 references that are in the map. First posted on arXiv 18 Mar 2024.

Builds on

51 of 65 references.

References · 51

  1. 2017Attention Is All You Needcited by 59,932
  2. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  5. 2016Layer Normalizationcited by 5,579
  6. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  7. 2017Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networkscited by 4,861
  8. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
  9. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  10. 2019On the Variance of the Adaptive Learning Rate and Beyondcited by 763
  11. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  12. 2018Universal Transformerscited by 613
38 more
  1. 2016RL2: Fast Reinforcement Learning via Slow Reinforcement Learningcited by 490
  2. 2021MetaICL: Learning to Learn In Contextcited by 450
  3. 2022Complexity-Based Prompting for Multi-Step Reasoningcited by 387
  4. 2016Learning to reinforcement learncited by 369
  5. 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 303
  6. 2019Measuring Compositional Generalization: A Comprehensive Method on Realistic Datacited by 280
  7. 2019Compositionality decomposed: how do neural networks generalise?cited by 264
  8. 2020COGS: A Compositional Generalization Challenge Based on Semantic Interpretationcited by 260
  9. 2021Meta-learning via Language Model In-context Tuningcited by 163
  10. 2016Language to Logical Form with Neural Attentioncited by 158
  11. 2019Good-Enough Compositional Data Augmentationcited by 158
  12. 2020Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?cited by 147
  13. 2021The Devil is in the Detail: Simple Tricks Improve Systematic Generalization of Transformerscited by 117
  14. 2018Meta-Learning for Low-Resource Neural Machine Translationcited by 105
  15. 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 102
  16. 2019Compositional generalization through meta sequence-to-sequence learningcited by 98
  17. 2020Compositional Generalization in Semantic Parsing: Pre-training vs. Specialized Architecturescited by 95
  18. 2020Learning Compositional Rules via Neural Program Synthesiscited by 74
  19. 2021Making Transformers Solve Compositional Taskscited by 72
  20. 2019Meta-learning of Sequential Strategiescited by 68
  21. 2020Zero-Shot Cross-Lingual Transfer with Meta Learningcited by 66
  22. 2020Learning to Recombine and Resample Data for Compositional Generalizationcited by 65
  23. 2021Meta-Learning to Compositionally Generalizecited by 62
  24. 2019Linguistic generalization and compositionality in modern artificial neural networkscited by 58
  25. 2019Compositional generalization in a deep seq2seq model by separating syntax and semanticscited by 56
  26. 2021Unlocking Compositional Generalization in Pre-trained Models Using Intermediate Representationscited by 55
  27. 2020Compositional Generalization by Learning Analytical Expressionscited by 53
  28. 2023How Do In-Context Examples Affect Compositional Generalization?cited by 51
  29. 2022Evaluating the Impact of Model Scale for Compositional Generalization in Semantic Parsingcited by 50
  30. 2019Compositional Generalization for Primitive Substitutionscited by 48
  31. 2020The EOS Decision and Length Extrapolationcited by 46
  32. 2019Domain Adaptive Dialog Generation via Meta Learningcited by 41
  33. 2021Systematic Generalization with Edge Transformerscited by 38
  34. 2020Hierarchical Poset Decoding for Compositional Generalization in Languagecited by 26
  35. 2022On the Compositional Generalization Gap of In-Context Learningcited by 24
  36. 2022Revisiting the Compositional Generalization Abilities of Neural Sequence Modelscited by 20
  37. 2020Revisiting Iterative Back-Translation from the Perspective of Compositional Generalizationcited by 19
  38. 2021Inducing Transformer's Compositional Generalization Ability via Auxiliary Sequence Prediction Taskscited by 19

50 most cited of 51 All 51 (JSON)

Built on by

Cited by year

Citing papers per year: 2024: 2; 2025: 3.

5 papers.