Lune

ICML2025Top-tier venue

Task Generalization with Autoregressive Compositional Structure: Can Learning from D Tasks Generalize to DT Tasks?

Amirhesam Abedsoltan, Huaqing Zhang, Kaiyue Wen, Hongzhou Lin, Jingzhao Zhang, Mikhail Belkin

Abstract

Large language models (LLMs) exhibit remarkable task generalization, solving tasks they were never explicitly trained on with only a few demonstrations. This raises a fundamental question: When can learning from a small set of tasks generalize to a large task family? In this paper, we investigate task generalization through the lens of autoregressive compositional structure, where each task is a composition of T operations, and each operation is among a finite family of D subtasks. This yields a total class of size D T . We first show that generalization to all D T tasks is theoretically achievable by training on only Õ(D) tasks. Empirically, we demonstrate that Transformers achieve such exponential task generalization on sparse parity functions via In-context Learning (ICL) and chain-of-thought (CoT) reasoning. We further show generalization in arithmetic and translation, beyond parity functions.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient and Minimax Optimal In-context Nonparametric Regression with Transformers cites Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection
  • Efficient and Minimax Optimal In-context Nonparametric Regression with Transformers cites Language Models are Few-Shot Learners
  • Efficient and Minimax Optimal In-context Nonparametric Regression with Transformers cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection cites Language Models are Few-Shot Learners
  • Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selection cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Generalization in LLM Problem Solving: The Case of the Shortest Path cites Measuring Compositional Generalization: A Comprehensive Method on Realistic Data
  • Generalization in LLM Problem Solving: The Case of the Shortest Path cites Faith and Fate: Limits of Transformers on Compositionality
  • Learning to Extrapolate to New Tasks: A Relational Approach to Task Extrapolation cites What Can Transformers Learn In-Context? A Case Study of Simple Function Classes
  • Faith and Fate: Limits of Transformers on Compositionality cites Language Models are Few-Shot Learners
  • What Can Transformers Learn In-Context? A Case Study of Simple Function Classes cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Efficient and Minimax Optimal In-context Nonparametric Regression with TransformersMichelle Ching, Ioana Popescu, Nico Smith, Tianyi Ma et al.ICML 2026 · 6 citations
  2. Provable Sample Efficiency of Curriculum Post-Training for Transformer ReasoningDake Bu, Wei Huang, Andi Han, Atsushi Nitanda et al.ICML 2026
  3. Generalization in LLM Problem Solving: The Case of the Shortest PathYao Tong, Jiayuan Ye, Anastasia Borovykh, Reza ShokriICLR 2026
  4. Learning to Extrapolate to New Tasks: A Relational Approach to Task ExtrapolationAdam Ousherovitch, Yixin WangICML 2026

Builds on18

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. What Can Transformers Learn In-Context? A Case Study of Simple Function ClassesShivam Garg, Dimitris Tsipras, Percy Liang, Gregory ValiantNeurIPS 2022 · 883 citations
  3. Faith and Fate: Limits of Transformers on CompositionalityNouha Dziri, Ximing Lu, Melanie Sclar, Xiang Lorraine Li et al.NeurIPS 2023 · 728 citations
  4. Measuring Compositional Generalization: A Comprehensive Method on Realistic DataDaniel Keysers, Nathanael Schärli, Nathan Scales, Hylke Buisman et al.ICLR 2020 · 401 citations
  5. Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm SelectionYu Bai, Fan Chen, Huan Wang, Caiming Xiong et al.NeurIPS 2023 · 356 citations

Related papers

  1. Compositional Capabilities of Autoregressive Transformers: A Study on Synthetic, Interpretable TasksRahul Ramesh, Ekdeep Singh Lubana, Mikail Khona, Robert P. Dick et al.ICML 2024 · 17 citations
  2. Chain-of-Thought Provably Enables Learning the (Otherwise) UnlearnableChenxiao Yang, Zhiyuan Li, David WipfICLR 2025
  3. Learning to grok: Emergence of in-context learning and skill composition in modular arithmetic tasksTianyu He, Darshil Doshi, Aritra Das, Andrey GromovNeurIPS 2024 · 52 citations
  4. Everything Everywhere All at Once: LLMs can In-Context Learn Multiple Tasks in SuperpositionZheyang Xiong, Ziyang Cai, John Cooper, Albert Ge et al.ICML 2025
  5. What Algorithms can Transformers Learn? A Study in Length GeneralizationHattie Zhou, Arwen Bradley, Etai Littwin, Noam Razin et al.ICLR 2024 · 189 citations
Dusk over the sea between two cliffs drawn in fine vertical lines