- Rating
- 5
- Clarity
- 3
- Confidence
- 3
- Originality
- 4
- Quality
- 3
- Significance
- 3
Read review
Summary
The paper revisits the standard "ICL-as-optimization" account of in-context learning, in which an L-layer Transformer is interpreted as running L steps of gradient descent (GD) on the least-squares objective defined by the prompt — one optimizer step per layer. The authors ask whether this linear depth accounting is intrinsic, and show that it is not.
For attention-only linear self-attention Transformers on diagonal quadratic tasks, they prove a degree-growth mechanism: because each attention score is bilinear (key × query) and is then multiplied by the value, one layer at most triples the polynomial degree (in the per-coordinate difficulty σ) that the network can represent, so L layers reach degree 3^L rather than L (Lemma 2). Since the exact k-step GD iterate corresponds to the degree-k convergence polynomial p_k(σ) = 1 − (1−ησ)^k, exact computation requires 3^L ≥ k, i.e. L ≥ ⌈log_3 k⌉ (Thm 3). An approximation lower bound via a Chebyshev-coefficient argument shows the barrier survives approximate computation (L ≥ ½ log_3 k − O(1) in a pre-convergence regime, Thm 4/10). A matching constructive upper bound assembles the final iterate by repeated squaring along an addition chain in L ≤ 2⌈log_2 k⌉ + 1 layers with 2 heads, d_model = O(log k), and bounded weights (Thm 5). Together these give a tight Θ(log k) depth complexity (Cor 6).
Extensions cover a softmax upper bound (Thm 17), a depth × loop-count lower bound for looped/weight-tied Transformers (Cor 16), preconditioned GD (Thm 23), an MLP degree corollary (Cor 15), and a non-diagonal / simultaneously-diagonalizable treatment (Thms 13, 25). Experiments on the synthetic diagonal-quadratic testbed show the predicted logarithmic depth transition (620 trained models), a kernel ablation tying the law to per-layer bilinearity, and an oracle-floor comparison; further experiments report the same qualitative signal on broader regression families and on early-exit probes of pretrained Qwen2.5.
Strengths and weaknesses
Strengths
-
Original reframing of a foundational result. The "one-layer-per-GD-step" reading (von Oswald et al. 2023 and follow-ups) is so entrenched that the natural assumption is that depth is a step counter; the paper shows instead that depth is an algebraic-capacity multiplier. Connecting the bilinear structure of attention to polynomial-degree growth, and then to addition-chain / repeated-squaring computation, is a clean and to my knowledge novel angle, with the degree-counting technique sensibly imported from arithmetic circuit complexity.
-
The central proofs are correct and carefully written. I checked them: the Degree Growth Lemma recurrence (d_c^(ℓ+1) ≤ 3·d_c^(ℓ), d_q^(ℓ+1) ≤ 2·d_c^(ℓ) + d_q^(ℓ)) is derived cleanly, head count / width / context length correctly drop out, and the induction to 3^L is right (and matches the "~60,000 at L=10" claim, since 3^10 = 59049). The exact lower bound (Thm 3) is a standard, correct infinite-set ⇒ identical-polynomial argument and is genuinely architecture-independent.
-
The bounds are tight and the lower bounds are non-trivial. The approximation lower bound (Thm 4/10) — affine reduction to a monomial, closed-form Chebyshev expansion of (1+x)^k, the single-coefficient bound E_D(g) ≥ ½|c_{D+1}(g)|, and the Stirling/Wallis estimate — is all correct, with honestly bounded slack. The constructive upper bound (Thm 5) is explicit, with a sound doubling semigroup a_a ⊕ a_b = (P_a P_b, S_a + P_a S_b), bounded weights, and O(log k) width.
-
Good breadth of extensions: softmax upper bound, looped/weight-tied lower bound, preconditioned GD, an MLP degree corollary, and a non-diagonal treatment.
-
The synthetic experiments are convincing: a sharp phase boundary (620 trained models), a kernel ablation consistent with the degree story, and trained NMSE tracking the oracle floor below the critical depth.
-
The writing is well organized; the demand-side (degree-k target) vs supply-side (degree-3^L capacity) framing is effective and the figures communicate the mechanism.
Weaknesses
-
The upper-bound construction is the one place I would ask for more rigor. The per-eigenvalue token routing ("each eigenvalue has a dedicated token", cross-eigenvalue interactions made to vanish "by orthogonal ID embeddings") is handled informally. In linear attention the scores are unbounded bilinear forms with no softmax to enforce selection, so the masking deserves an explicit construction and a check that the stated weight ∞-norm ≤ max(1,η) and d_model = O(log k) survive once routing is counted.
-
Scope vs framing. The tight two-sided Θ(log k) result is for attention-only linear self-attention on diagonal quadratics. For softmax / standard Transformers there is only an upper bound (Thm 17); I did not find a softmax lower bound, so "Transformer depth … Θ(log k)" is not established for standard architectures, and the title/abstract should be calibrated to this.
-
What "computing GD" demands. The lower bound is about representing/approximating the exact convergence polynomial p_k uniformly on the whole interval [λ_min, λ_max]. But low in-context prediction risk only requires accuracy under the actual eigenvalue distribution, and a low-loss network need not output a GD-shaped predictor at all. The "compute k-step GD ⇔ match p_k" equivalence is by definition; whether the lower bound persists for the practically relevant objective (ε-optimal prediction risk under the eigenvalue measure) is not addressed, and is the most important open question for the paper's significance.
-
The real-LLM experiment (Section 5.3, Qwen2.5) is overstated. The conceptual mapping "number of classes k" ↔ "number of GD steps k" is a large leap with no mechanistic justification — these are different quantities, and the theory's k is the optimizer-step count. The fit L_crit = 20.6 + 3.42·log_2 k (R² = 0.91) rests on only ~5 distinct k values over 6 tasks, with a large task-agnostic intercept (~21 of 36 layers) doing most of the work. Crucially, Appendix F shows Pythia-2.8B (R² = 0.20) and Pythia-6.9B (slope −0.52) contradict the prediction, and these are explained away post-hoc ("weaker baseline ICL", "tokenizer mismatch") and "reported for transparency rather than as evidence against the prediction." Selecting which models/tasks count as confirming evidence after seeing the fit is circular. As stated, this is at best a loose correlation, not a test of the mechanism, and the claim that the probe "recovers logarithmic growth … on real NLP ICL tasks" should be substantially softened or supported by a control.
-
Clarity nits. The regime restrictions of the approximation lower bound (κ ≥ 2, k ≤ κ, ε ≤ c0/(e√k)) live in the appendix and should appear next to Thm 4 in the main text. Which results are linear-attention-only vs which transfer to softmax/MLP is spread across many corollaries and is hard to assemble.
Questions
Please refer to the weakness section above.
Limitations
yes
Paper formatting concerns
paper looks good to me.
Final justification
The rebuttal resolved my main concerns about the routing construction and clarified the scope of the theoretical claims.
The authors also appropriately softened the interpretation of the real-LLM experiments and added a relevant excess-risk result.
Some limitations remain regarding the generality of the new result, but they do not outweigh the paper’s technical strength and originality.
Overall, I recommend Accept.
Response to Reviewer hVQn
W1. "... In linear attention the scores are unbounded bilinear forms with no softmax to enforce selection, so the masking deserves an explicit construction (W1.1) and a check that the stated weight ∞-norm ≤max(1,η) (W1.2) and dmodel=O(logk) (W1.3) survive once routing is counted."
Response. We give the explicit construction and show that, once routing is counted, the norm bound survives and the width is 6d, independent of k. For W1.1, the construction enforces no selection at all. For fixed η>0, standard-basis column slots replace the ID-and-dominance device, so the unbounded all-token sum is itself the matrix product, and the cross-token terms are the terms of that product rather than contamination to be suppressed. It is exact for every SPD Σ, implements every k by exact doubling and increment, and explicitly reads out wk. For W1.2, the norm bound survives unchanged: both the entrywise and the induced ∞-norm of every learned WQ,WK,WV are at most max(1,η). For W1.3, exact routing is what costs width: one slot per coordinate gives dmodel=6d=Θ(d), a width that no longer grows with k; the depth lower bound is width-independent. Counting routing therefore leaves the depth L=ℓbin(k)+1≤2⌈log2k⌉+1, the head count H=2, and the norm bound as claimed, at n=d+1 tokens, where ℓbin(k)=⌊log2k⌋+ν(k)−1 and ν(k) counts the 1-bits of k.
Let g denote the quadratic's linear term, Am=(I−ηΣ)m, and Sm=∑t<m(I−ηΣ)t. Using blocks (u,a,a1,s,g,out), slot j stores (ej,Amej,A1ej,Smej,0,0), and the query stores g in its g-block. Thus the all-token sum performs literal matrix multiplication:
XY=∑j=1d(Xej)(ej⊤Y).
For block injections Er, write M[r,c]=ErEc⊤ and V[r,c]=ErEc⊤. Every primitive score factors through WK=ErEr⊤, WQ=ErEc⊤, so WK⊤WQ=M[r,c]; the sole signed score factors explicitly as
W_Q=E_aE_a^\top-E_uE_u^\top,\qquad W_K^\top W_Q=M[u,a]-M[u,u].$$ The two doubling heads $$(M[u,a]-M[u,u],V[a,a]),\qquad(M[u,s],V[s,a])$$ give, after the residual, $A_m+A_m(A_m-I)=A_m^2$ and $S_m+A_mS_m=S_{2m}$. The two increment heads $$(M[u,a],V[a,a^1]),\qquad(M[u,u],-V[a,a]+V[s,a])$$ give $A_{m+1}=A_1A_m$ and $S_{m+1}=S_m+A_m$. Finally $M[u,g]$ with $\eta V[\mathrm{out},s]$ writes $\eta S_kg=w_k$. No selector, mask, limiting coefficient, or reorganization map is assumed. Each displayed $W_Q,W_K,W_V$ has at most one nonzero entry per row, of magnitude at most $\max(1,\eta)$, proving both the entrywise and induced $\infty$-norm bounds. --- **W2.** "... For softmax / standard Transformers there is only an upper bound (Thm 17) ... the title/abstract should be calibrated to this." **W6.** "Which results are linear-attention-only vs which transfer to softmax/MLP is spread across many corollaries and is hard to assemble." **Response.** Yes. We recalibrate the title and the abstract, and we add one scope map. For **W2**, the title becomes *Logarithmic Depth Characterizes Exact $k$-Step Gradient Descent in Augmented-Prompt Attention-Only Linear Self-Attention*, and the abstract says that the two-sided result concerns exact computation of the prescribed empirical-GD prediction, not $\varepsilon$-optimal prediction risk, in attention-only unnormalized linear self-attention. For **W6**, one scope map assembles the results in one place: it lists the exact upper and lower results for that model and the degree-$p$ MLP ceiling $(3p)^L$, and it marks softmax separately, since the submission's softmax discussion is one-sided, this response relies on no softmax theorem, and every two-sided entry on the map is a linear-attention entry. The calibrated wording refers to exactness on both sides: for fixed $\eta\ne0$ and degree-one prompt encoding, exact equality on a prompt-variable set with nonempty interior forces $3^L\ge2k+1$, so $\Theta(\log k)$ attaches to this exact augmented-prompt linear-attention problem rather than to prediction risk. --- **W3.** "... low in-context prediction risk only requires accuracy under the actual eigenvalue distribution, and a low-loss network need not output a GD-shaped predictor at all (**W3.1**). ... whether the lower bound persists for the practically relevant objective ($\varepsilon$-optimal prediction risk under the eigenvalue measure) (**W3.2**) ..." **Response.** Yes: without assuming a GD-shaped predictor, we prove that $\varepsilon$-optimal prediction risk under the eigenvalue measure requires $3^L\ge\frac18\sqrt\kappa\log(1/\varepsilon)$, hence $L=\Omega(\log\kappa+\log\log(1/\varepsilon))$, in the spectrum-given scalar model (**W3.1--W3.2**). This theorem addresses the risk objective in that model; the exact demonstration-based theorem above separately addresses raw-prompt computation. Let $\sigma\sim\mu$ on $[1/\kappa,1]$, let $\gamma\sim\mathcal N(0,1)$ be independent of $\sigma$, set $w^\star=\gamma/\sigma$, and draw $x_q\mid\sigma\sim\mathcal N(0,\sigma)$ independently of $\gamma$, with every initial token coordinate of total degree at most one in $(\sigma,\gamma)$. Write $\mathcal R=\mathbb E[(x_q\widehat w-x_qw^\star)^2]$ for the excess risk of $\widehat w=\Phi_L(\sigma,\gamma)$. Then $\deg\Phi_L\le D=3^L$, and the Hermite expansion of $\Phi_L$ in $\gamma$ isolates a coefficient $a_1(\sigma)$ of degree at most $D-1$, while orthogonality makes every other component nonnegative in risk. Hence $q(\sigma)=1-\sigma a_1(\sigma)$ satisfies $\deg q\le D$, $q(0)=1$, and $$\mathcal R(\Phi_L)\ge \mathbb E_{\sigma\sim\mu}\\!\left[q(\sigma)^2/\sigma\right].$$ Assume $\lambda_{\max}=1$, $\kappa\ge4$, and $d\mu/d\sigma\ge c_\mu>0$ with $c_\mu$ independent of $\kappa$. Exterior Chebyshev extremality (Erdős, Some Remarks on Polynomials, Bull. AMS 53, 1947, Thm. 7) and the Legendre bound $\\|\tilde q\\|_\infty\le\frac{D+1}{\sqrt2}\\|\tilde q\\|_2$ (DLMF 18.3.1, 18.14.1) give $$\\|q\\|_{L^2(\mu)}\ge \frac{\sqrt{c_\mu(1-1/\kappa)}}{(D+1)\\,T_D\big((\kappa+1)/(\kappa-1)\big)}.$$ Hence for $E=\log(1/\varepsilon)\ge C(c_\mu)(\log\kappa+\log E)$, risk at most $\varepsilon$ forces $3^L\ge\frac18\sqrt\kappa\log(1/\varepsilon)$. --- **W4.** "The conceptual mapping 'number of classes $k$' <-> 'number of GD steps $k$' ... these are different quantities, and the theory's $k$ is the optimizer-step count. ... the claim that the probe 'recovers logarithmic growth ... on real NLP ICL tasks' should be substantially softened (**W4.1**) or supported by a control (**W4.2**)." **Response.** We adopt **W4.1** and revise the probe's role. The theory uses $k$ for the GD-update count; the revised probe uses $C$ for class count. We remove the theoretical-logarithmic-growth claim from the abstract and introduction. The main text will report all four model outcomes together: the Qwen2.5-3B fit uses six tasks but five distinct $C$ values and has intercept 20.59 of 36 layers; Pythia-2.8B has $R^2=0.20$, while Pythia-6.9B has slope $-0.52$. We describe these as mixed exploratory task-level correlations, with direct links to the complete protocol and tables in the appendix, and remove the model-specific explanations of the Pythia outcomes. For $\eta\ne0$, $$p_k(\sigma)=1-(1-\eta\sigma)^k$$ has degree $k$ because $k$ counts GD updates, while $C$ enters neither this identity nor the lower bound $3^L\ge k$. The revision therefore assigns the theorem and the probe distinct variables and evidentiary roles. --- **W5.** "The regime restrictions of the approximation lower bound ($\kappa\ge2$, $k\le\kappa$, $\varepsilon\le c_0/(e\sqrt k)$) live in the appendix and should appear next to Thm 4 in the main text." **Response.** Yes. We will state next to Theorem 4 that its $L\ge\frac12\log_3k-O(1)$ consequence is for attention-only unnormalized linear attention with degree-one tracked inputs and uniform error, under $\eta=1/\lambda_{\max}$, $\kappa\ge2$, $k\le\kappa$, and $0<\varepsilon\le c_0/(e\sqrt{k})$, where $c_0=(2e^{3/2}\sqrt\pi)^{-1}$. Under exactly these hypotheses, $d_\varepsilon(k,\kappa)$, the least degree attaining the uniform error, obeys $d_\varepsilon(k,\kappa)\ge\sqrt{k}/2$, while the architectural ceiling requires $3^L\ge d_\varepsilon(k,\kappa)$, giving the stated depth consequence.