Research map / Optimization / Implicit bias and generalization
Logarithmic Depth Suffices for In-Context Gradient Descent
Yingze Li, Dong Wang, Xianglong Liu, Qingyun Zou, Chunnan Wang, Zhiyu Liang, Hongzhi Wang
Harbin Institute of Technology · National University of Singapore
Read the paperPlace an idea next to itCheck your own paper ↗
Shows theoretically that linear self-attention Transformers can emulate many steps of gradient descent for in-context learning at logarithmic depth, rather than one layer per update.
AI-extracted summary. Written by AI from the paper's abstract only. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Problem
Prior work shows an L-layer Transformer can emulate L gradient-descent updates in context, leaving open whether depth is merely a step counter for in-context learning.
Approach
In linear self-attention, each layer compounds the algebraic capacity built by previous layers, so depth can yield exponentially more effective gradient-descent steps than layer count, with logarithmic depth sufficing.
Key results
- Abstract claims Transformers can perform in-context learning at depths far smaller than the number of optimizer updates suggested by prior interpretations, with each layer compounding algebraic capacity of previous layers in linear self-attention.
Surprising findings
- Depth is not merely a step counter: logarithmic depth suffices to emulate many gradient-descent updates in linear self-attention.
Limitations
- Analysis limited to linear self-attention as stated in the abstract.
Open problems this paper states
- “Analysis limited to linear self-attention as stated in the abstract.” → Theory covers linear attention, while softmax is only tested empirically. (an open problem in in-context learning as gradient descent)
Open problems in in-context learning as gradient descent
Do in-context gradient descent results for linear attention carry over to softmax and deeper transformers?
- Theory covers linear attention, while softmax is only tested empirically. · 10 papers state it
- Analysis is limited to one or two layers and simple setups. · 5 papers state it
- Experiments are small synthetic regression setups. · 5 papers state it
Experimental setup
Builds on: in-context gradient descent emulation by Transformers
Closest papers by meaning
- How Transformers Utilize Multi-Head Attention in In-Context Learning? A Case Study on Sparse Linear Regression (NeurIPS 2024 · similarity 0.88)
- In-Context Deep Learning via Transformer Models (ICML 2025 · similarity 0.88)
- Linear Transformers are Versatile In-Context Learners (NeurIPS 2024 · similarity 0.87)
- On the Role of Attention Masks and LayerNorm in Transformers (NeurIPS 2024 · similarity 0.86)
- Transformers, parallel computation, and logarithmic depth (ICML 2024 · similarity 0.86)
- On the Learn-to-Optimize Capabilities of Transformers in In-Context Sparse Recovery (ICLR 2025 · similarity 0.86)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.