mlsanityData to 7 Oct 2026

Bypassing the Exponential Dependency: Looped Transformers Efficiently Learn In-context by Multi-step Gradient Descent

arXiv 2410.11268 ↗First posted 15 Oct 2024cs.LG cs.AIcited by 21

Not on the map. Why?

Abstract (arXiv)

In-context learning has been recognized as a key factor in the success of Large Language Models (LLMs). It refers to the model's ability to learn patterns on the fly from provided in-context examples in the prompt during inference. Previous studies have demonstrated that the Transformer architecture used in LLMs can implement a single-step gradient descent update by processing in-context examples in a single forward pass. Recent work has further shown that, during in-context learning, a looped Transformer can implement multi-step gradient descent updates in forward passes. However, their theoretical results require an exponential number of in-context examples, n = exp(Omega(T)), where T is the number of loops or passes, to achieve a reasonably low error. In this paper, we study linear looped Transformers in-context learning on linear vector generation tasks. We show that linear looped Transformers can implement multi-step gradient descent efficiently for in-context learning. Our results demonstrate that as long as the input data has a constant condition number, e.g., n = O(d), the linear looped Transformers can achieve a small error by multi-step gradient descent during in-context learning. Furthermore, our preliminary experiments validate our theoretical analysis. Our findings reveal that the Transformer architecture possesses a stronger in-context learning capability than previously understood, offering new insights into the mechanisms behind LLMs and potentially guiding the better design of efficient inference algorithms for LLMs.

Key facts. Cited by 21 papers in the map (data through 7 Oct 2026). Builds on 94 of its 121 references that are in the map. First posted on arXiv 15 Oct 2024.

Builds on

94 of 121 references.

References · 94

  1. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2022Training language models to follow instructions with human feedbackcited by 15,712
  5. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  6. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  7. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  8. 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
  9. 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
  10. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,878
  11. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,769
  12. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
38 more
  1. 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
  2. 2022Scaling Instruction-Finetuned Language Modelscited by 2,997
  3. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  4. 2022Emergent Abilities of Large Language Modelscited by 2,483
  5. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,371
  6. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  7. 2020Making Pre-trained Language Models Better Few-shot Learnerscited by 1,255
  8. 2023LIMA: Less Is More for Alignmentcited by 1,080
  9. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
  10. 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
  11. 2022Super-NaturalInstructions: Generalization via Declarative Instructions on 1600+ NLP Taskscited by 858
  12. 2023LLaMA-Adapter: Efficient Fine-tuning of Language Models with Zero-init Attentioncited by 776
  13. 2022Transformers learn in-context by gradient descentcited by 714
  14. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  15. 2021Cross-Task Generalization via Natural Language Crowdsourcing Instructionscited by 696
  16. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  17. 2023LLaMA-Adapter V2: Parameter-Efficient Visual Instruction Modelcited by 602
  18. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  19. 2021MetaICL: Learning to Learn In Contextcited by 450
  20. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  21. 2022Demonstrate-Search-Predict: Composing retrieval and language models for knowledge-intensive NLPcited by 316
  22. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  23. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  24. 2022Black-Box Tuning for Language-Model-as-a-Servicecited by 254
  25. 2022OPT-IML: Scaling Language Model Instruction Meta Learning through the Lens of Generalizationcited by 235
  26. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
  27. 2022In-context Examples Selection for Machine Translationcited by 172
  28. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 168
  29. 2023Handbook of Convergence Theorems for (Stochastic) Gradient Methodscited by 158
  30. 2023Birth of a Transformer: A Memory Viewpointcited by 154
  31. 2023What In-Context Learning "Learns" In-Context: Disentangling Task Recognition and Task Learningcited by 149
  32. 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 138
  33. 2023Looped Transformers are Better at Learning Learning Algorithmscited by 135
  34. 2023The mechanistic basis of data dependence and abrupt learning in an in-context classification taskcited by 115
  35. 2023In-Context Convergence of Transformerscited by 112
  36. 2022Teaching Algorithmic Reasoning via In-context Learningcited by 111
  37. 2023A Theory for Emergence of Complex Skills in Language Modelscited by 111
  38. 2023Scan and Snap: Understanding Training Dynamics and Token Composition in 1-layer Transformercited by 101

50 most cited of 94 All 94 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 5; 2025: 13; 2026: 3.

21 papers.

Sort:

By area:

  1. 2025A Survey on Latent Reasoningcited by 71
  2. 2024LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformerscited by 35
  3. 2024Circuit Complexity Bounds for RoPE-based Transformer Architecturecited by 26
  4. 2024The Computational Limits of State-Space Models and Mamba via the Lens of Circuit Complexitycited by 21
  5. 2025Enhancing Auto-regressive Chain-of-Thought through Loop-Aligned Reasoningcited by 19
  6. 2025Data Whisperer: Efficient Data Selection for Task-Specific LLM Fine-Tuning via Few-Shot In-Context Learningcited by 19
  7. 2025High-Order Matching for One-Step Shortcut Diffusion Modelscited by 15
  8. 2024Theoretical Constraints on the Expressive Power of mathsfRoPE-based Tensor Attention Transformerscited by 12
  9. 2026Training-Free Looped Transformerscited by 12
  10. 2025Theoretical Guarantees for High Order Trajectory Refinement in Generative Flowscited by 9
  11. 2025Provable Failure of Language Models in Learning Majority Boolean Logic via Gradient Descentcited by 8
  12. 2026Outcome-Based RL Provably Leads Transformers to Reason, but Only With the Right Datacited by 5
9 more
  1. 2025Scaling Law Phenomena Across Regression Paradigms: Multiple and Kernel Approachescited by 4
  2. 2026Loop the Loopies!cited by 4
  3. 2024Unlocking the Theory Behind Scaling 1-Bit Neural Networkscited by 3
  4. 2025Neural Algorithmic Reasoning for Hypergraphs with Looped Transformerscited by 3
  5. 2025When Can We Solve the Weighted Low Rank Approximation Problem in Truly Subquadratic Time?cited by 3
  6. 2025In-Context Probing for Membership Inference in Fine-Tuned Language Modelscited by 3
  7. 2025Time and Memory Trade-off of KV-Cache Compression in Tensor Transformer Decodingcited by 2
  8. 2025Can Transformers Break Encryption Schemes via In-Context Learning?cited by 0
  9. 2025Fundamental Limits of Crystalline Equivariant Graph Neural Networks: A Circuit Complexity Perspectivecited by 0