acceptodds
Published as a conference paper at NeurIPS 2026

Logarithmic Depth Suffices for In-Context Gradient Descent

Yingze Li, Dong Wang, Xianglong Liu, Qingyun Zou, Chunnan Wang, Zhiyu Liang, Hongzhi Wang

Abstract

Transformers can perform in-context learning at depths far smaller than the number of optimizer updates suggested by existing gradient-descent interpretations. Prior work shows that an L-layer Transformer can emulate L gradient-descent updates, but this leaves open whether depth is merely a step counter. We show that it is not: in linear self-attention, each layer compounds the algebraic capacity built by previous layers, yielding a tight Θ(log k) depth characterization for computing the final result of k gradient-descent steps on diagonal quadratic tasks. Controlled experiments validate this mechanism: trained linear-attention models exhibit the predicted logarithmic depth transition, and kernel and oracle comparisons identify polynomial degree as the governing bottleneck. Broader experiments show the same depth signal under standard Transformer components, broader ICL regression families, and early-exit probes on Qwen2.5.

Keywords:
Sydney, Main Track

Reviews

Among:
Shape:
123456this paper, Bottom 49%
Figure 1. Mean review rating of the reviewed papers at NeurIPS 2026. This paper averages 4.33 over 3 reviews, above 49% of the others.
Reviewer_hVQnOpenReview ↗
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

  1. 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.

  2. 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.

  3. 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.

  4. Good breadth of extensions: softmax upper bound, looped/weight-tied lower bound, preconditioned GD, an MLP degree corollary, and a non-diagonal treatment.

  5. 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.

  6. 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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

1 comment

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 ∞\infty-norm ≤max⁡(1,η)\le\max(1,\eta) (W1.2) and dmodel=O(log⁡k)d_{\rm model}=O(\log k) (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 6d6d, independent of kk. For W1.1, the construction enforces no selection at all. For fixed η>0\eta>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 Σ\Sigma, implements every kk by exact doubling and increment, and explicitly reads out wkw_k. For W1.2, the norm bound survives unchanged: both the entrywise and the induced ∞\infty-norm of every learned WQ,WK,WVW_Q,W_K,W_V are at most max⁡(1,η)\max(1,\eta). For W1.3, exact routing is what costs width: one slot per coordinate gives dmodel=6d=Θ(d)d_{\rm model}=6d=\Theta(d), a width that no longer grows with kk; the depth lower bound is width-independent. Counting routing therefore leaves the depth L=ℓbin(k)+1≤2⌈log⁡2k⌉+1L=\ell_{\rm bin}(k)+1\le2\lceil\log_2k\rceil+1, the head count H=2H=2, and the norm bound as claimed, at n=d+1n=d+1 tokens, where ℓbin(k)=⌊log⁡2k⌋+ν(k)−1\ell_{\rm bin}(k)=\lfloor\log_2k\rfloor+\nu(k)-1 and ν(k)\nu(k) counts the 1-bits of kk.

Let gg denote the quadratic's linear term, Am=(I−ηΣ)mA_m=(I-\eta\Sigma)^m, and Sm=∑t<m(I−ηΣ)tS_m=\sum_{t<m}(I-\eta\Sigma)^t. Using blocks (u,a,a1,s,g,out)(u,a,a^1,s,g,\mathrm{out}), slot jj stores (ej,Amej,A1ej,Smej,0,0)(e_j,A_me_j,A_1e_j,S_me_j,0,0), and the query stores gg in its gg-block. Thus the all-token sum performs literal matrix multiplication:

XY=∑j=1d(Xej)(ej⊤Y).XY=\sum_{j=1}^d(Xe_j)(e_j^\top Y).

For block injections ErE_r, write M[r,c]=ErEc⊤M[r,c]=E_rE_c^\top and V[r,c]=ErEc⊤V[r,c]=E_rE_c^\top. Every primitive score factors through WK=ErEr⊤, WQ=ErEc⊤W_K=E_rE_r^\top,\ W_Q=E_rE_c^\top, so WK⊤WQ=M[r,c]W_K^\top W_Q=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.
Reviewer_nEpBOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
3
Quality
3
Significance
2
Read review
Summary

Working within the "in-context learning as optimization" framework, where prior work shows an LL-layer Transformer can simulate LL gradient-descent steps, this paper argues that the one-step-per-layer account is a loose upper bound rather than a true barrier, and that depth buys exponentially more optimization than that account suggests. For the family of diagonal quadratics f(w)=12w⊤Σw−g⊤wf(w) = \tfrac{1}{2} w^{\top}\Sigma w - g^{\top} w, the authors reduce reproducing the kk-step GD iterate to representing the scalar convergence polynomial pk(σ)=1−(1−ησ)kp_k(\sigma) = 1 - (1 - \eta\sigma)^k of degree exactly kk, prove a Degree Growth Lemma showing an LL-layer attention-only linear self-attention network outputs a polynomial of degree ≤3L\le 3^{L}, and obtain the width/head/context-independent lower bound L≥⌈log⁡3k⌉L \ge \lceil \log_3 k \rceil (Thm 3); a matching doubling-semigroup/addition-chain construction (Thm 5) computes the exact iterate at depth ≤2⌈log⁡2k⌉+1\le 2\lceil \log_2 k \rceil + 1 with 22 heads and dmodel=O(log⁡k)d_{\mathrm{model}} = O(\log k), giving a Θ(log⁡k)\Theta(\log k) characterization for diagonal covariance. The result extends to simultaneously-diagonalizable and general SPD covariance (the latter on the lower-bound side only, Thm 25), an approximation floor dε≥k/2d_{\varepsilon} \ge \sqrt{k}/2 in a pre-convergence regime (Thm 10), and experiments on 620620 trained linear-attention models plus early-exit probes on Qwen2.5. The contribution is a genuine and largely correct sharpening of the depth/optimization correspondence for ICL, but the headline "suffices" is established in full generality only on the lower-bound side, while the matching upper bound is rigorous only in the (simultaneously-)diagonalizable case.

Strengths and weaknesses

Strengths

  • The central algebraic mechanism is correct, clean, and genuinely width/head/context-independent. The Degree Growth Lemma (Lemma 2, App. A.1) is proven case-by-case via dc(ℓ+1)≤3dc(ℓ)d_c^{(\ell+1)} \le 3 d_c^{(\ell)}, dq(ℓ+1)≤2dc(ℓ)+dq(ℓ)d_q^{(\ell+1)} \le 2 d_c^{(\ell)} + d_q^{(\ell)} with telescoping ∑ℓ<L2⋅3ℓ=3L−1\sum_{\ell<L} 2\cdot 3^{\ell} = 3^{L}-1, making the exact lower bound L≥⌈log⁡3k⌉L \ge \lceil \log_3 k \rceil (Thm 3) a robust impossibility result rather than an artifact of a parameterization.
  • The non-diagonal lower bound (Lemma 24 / Thm 25) is the strongest, most novel contribution and is essentially correct: a total-degree counting argument shows wk(Σ)w_k(\Sigma) carries a degree-exactly-kk component in the entries of Σ\Sigma (leading term −(−η)kΣkw∗≠0-(-\eta)^{k}\Sigma^{k} w^{*} \neq 0), and the "vanishes on an open set ⇒\Rightarrow identically zero" step is valid, yielding 3L≥k3^{L} \ge k. This removes the diagonalization crutch and is fully general in dd, heads, model dimension, and context.
  • The diagonal Θ(log⁡k)\Theta(\log k) characterization is honestly matching and resource-frugal — the upper bound is ≤2⌈log⁡2k⌉+1\le 2\lceil \log_2 k \rceil + 1 with 22 heads, dmodel=O(log⁡k)d_{\mathrm{model}} = O(\log k), and bounded weights, all explicitly tracked. The approximation floor (App. A.4) is a sound technical upgrade: the Chebyshev expansion (Eq. 22), the single-coefficient bound (Eq. 24), and the Stirling/Wallis estimate (Eq. 26) combine to give dε≥k/2d_{\varepsilon} \ge \sqrt{k}/2.

Weaknesses

  • The title's "suffices" — the upper bound — is not established in the generality the lower bound enjoys. The clean Θ(log⁡k)\Theta(\log k) upper bound is proven only for diagonal (Thm 5 / Cor 6) and simultaneously-diagonalizable (Thm 13, baking a fixed shared eigenbasis UU into the weights) covariance, while for general Σ\Sigma the matching upper bound (App. D.4 / D.5) is only a non-constructive sketch — "matrix outer-product accumulation" at dmodel=O(d2)d_{\mathrm{model}} = O(d^2) with no explicit WQ,WK,WVW_Q, W_K, W_V realizing matrix-times-matrix products and no readout control. So a fully general lower bound (Thm 25) is paired with only a restricted upper bound, and the "suffices" claim must be scoped to the (simultaneously-)diagonalizable case in the title and abstract.
  • Even in the diagonal case, the exact construction (Thm 5 / App. D) asserts rather than constructs two load-bearing steps — a real rigor gap for a theorem claiming exact computation. Self-attention isolation relies on "a large positive coefficient on the idj⋅idj\mathrm{id}j \cdot \mathrm{id}j product" so the self-pairing "dominates" (p. 23), but "dominated" is not "exact" in an unnormalized sum over all tokens, and the proof retreats to assuming cross-eigenvalue interactions vanish; the reorganization map P2m←Pm2P{2m} \leftarrow P_m^2, S2m←Sm(1+Pm)S{2m} \leftarrow S_m(1+P_m) (Eqs. 31–33) is realized "with appropriately chosen projection matrices" never exhibited. The paper's own hint (a single-token context per eigenvalue, p. 23) should be promoted to the actual construction.
  • The empirical centerpiece sits below the stated floor at several kk without acknowledgement, and the Qwen probe conflates two quantities. Tables 1/5 and Fig. 7(b) report trained Lcrit<⌈log⁡3k⌉L_{\mathrm{crit}} < \lceil \log_3 k \rceil (even the no-LayerNorm column gives 2<32 < 3 at k=16k=16), reconcilable only because the 10−510^{-5} NMSE threshold is approximate so Thm 3's exact-reproduction premise is not met — a caveat never stated. Separately, the fit Lcrit=20.6+3.42log⁡2kL_{\mathrm{crit}} = 20.6 + 3.42\log_2 k (R2=0.91R^2 = 0.91) rests on 66 points with the intercept (∼21\sim 21 layers) dominating and equates "number of classes" with "number of GD steps," while Pythia corroborates weakly (R2=0.20R^2 = 0.20 at 2.8B; slope −0.52-0.52, reversed, at 6.9B).
Questions
  • Can you give an explicit attention-only (or softmax) construction realizing repeated matrix squaring (I−ηΣ)2m=((I−ηΣ)m)2(I - \eta\Sigma)^{2m} = ((I - \eta\Sigma)^{m})^2 — actual WQ,WK,WVW_Q, W_K, W_V implementing the d×dd\times d products and the readout — to back the Θ(log⁡k)\Theta(\log k) claim for non-diagonalizable Σ\Sigma? If not, please restrict the "suffices" claim in the title and abstract to the (simultaneously-)diagonalizable case.
  • In un-normalized linear attention, how does a token attend only to its own eigenvalue token exactly rather than "dominantly"? Please replace the "large coefficient on idj⋅idj\mathrm{id}_j \cdot \mathrm{id}_j" device with the explicit single-token-per-eigenvalue construction hinted at on p. 23, and give the explicit projection matrices for the reorganization map (Eqs. 31–33), since Thm 5 claims exact computation.
  • Can you state explicitly that the trained LcritL_{\mathrm{crit}} values fall below ⌈log⁡3k⌉\lceil \log_3 k \rceil primarily because the 10−510^{-5} NMSE threshold is approximate (LayerNorm only secondary, since the no-LN column also dips below)? Please also add a controlled exact experiment (attention-only, no LayerNorm, float64 precision) in which the ⌈log⁡3k⌉\lceil \log_3 k \rceil floor is respected.
  • What is the theoretical justification for using number-of-classes as a proxy for kk (number of GD steps) in the Qwen2.5 probe, given that nothing in the theory predicts class count should enter the degree of pkp_k? Absent such a mechanism, why is the fit evidence for this theory rather than a generic "harder tasks need more layers" effect, and can you re-run it against a within-theory complexity axis?
  • Can you state prominently that the approximation barrier dε≥k/2d_{\varepsilon} \ge \sqrt{k}/2 (Thm 10) requires ε≤c0/(ek)\varepsilon \le c_0/(e\sqrt{k}) and k≤κk \le \kappa, and clarify whether any super-constant depth lower bound survives in the fixed-ε\varepsilon regime or once k≳κk \gtrsim \kappa (where pkp_k has essentially converged and low degree suffices)?
Limitations

The authors justify the existence of the limitations discussion in the checklist, but I did not find where it is clearly.

Paper formatting concerns

N/A

Final justification

I carefully checked the response, most of my problems are solved.

1 comment

Response to Reviewer nEpB

Q1. "Can you give an explicit attention-only (or softmax) construction realizing repeated matrix squaring ... actual ... implementing the ... products and the readout ... to back the ... claim for non-diagonalizable ... (Q1.1)? If not,...."

Response. Yes. We can give the explicit construction(Q1.1): it is exact for every SPD Σ\Sigma, and neither diagonalizes Σ\Sigma nor bakes a shared eigenbasis into the weights. Standard-basis column slots implement matrix multiplication exactly, two-head doubling and increment layers realize every kk, and an explicit readout produces wkw_k. With ℓbin(k)=⌊log⁡2k⌋+ν(k)−1\ell_{\rm bin}(k)=\lfloor\log_2k\rfloor+\nu(k)-1 for ν(k)\nu(k) the 1-bit count, the encoded-(Σ,g)(\Sigma,g) resources are L=ℓbin(k)+1≤2⌈log⁡2k⌉+1L=\ell_{\rm bin}(k)+1\le2\lceil\log_2k\rceil+1, H=2H=2, dmodel=6dd_{\rm model}=6d, n=d+1n=d+1. The scoping we adopt is architectural rather than spectral, for this attention-only, unnormalized, augmented-prompt model. Width is where the broader covariance class appears: a general SPD Σ\Sigma has d(d+1)/2d(d+1)/2 free parameters, so any prompt supplying it occupies Θ(d2)\Theta(d^2) numbers, and n=d+1n=d+1 with dmodel=6dd_{\rm model}=6d meets that floor up to a constant. Along the axis the theorem concerns, width does not grow with kk at all, and since Lemma 2 and Theorem 3 are width-, head-, and context-independent, no width substitutes for depth.

Let Am=(I−ηΣ)mA_m=(I-\eta\Sigma)^m, Sm=∑t<m(I−ηΣ)tS_m=\sum_{t<m}(I-\eta\Sigma)^t. In blocks (u,a,a1,s,g,out)(u,a,a^1,s,g,\mathrm{out}), slot jj stores (ej,Amej,A1ej,Smej,0,0)(e_j,A_me_j,A_1e_j,S_me_j,0,0) and the query (0,0,0,0,g,0)(0,0,0,0,g,0), so the all-token sum computes matrix products by

XY=∑j=1d(Xej)(ej⊤Y).XY=\sum_{j=1}^d(Xe_j)(e_j^\top Y).

For block injections ErE_r, write M[r,r′]=ErEr′⊤M[r,r']=E_rE_{r'}^\top and V[r,r′]=ErEr′⊤V[r,r']=E_rE_{r'}^\top. Each primitive score uses WK=ErEr⊤, WQ=ErEc⊤W_K=E_rE_r^\top,\ W_Q=E_rE_c^\top; the only signed score factors 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 $A_{2m}=A_m^2$, $S_{2m}=(I+A_m)S_m$. 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$; the remaining bits of $k$ use $\ell_{\rm bin}(k)$ layers, and $M[u,g]$ with $W_V=\eta V[\mathrm{out},s]$ writes $\eta S_kg=w_k$. --- **Q2.** "In un-normalized linear attention, how does a token attend only to its own eigenvalue token exactly rather than 'dominantly' (**Q2.1**)? Please replace the 'large coefficient on ...' device with the explicit single-token-per-eigenvalue construction hinted at on p. 23 (**Q2.2**), and give the explicit projection matrices for the reorganization map (Eqs. 31-33), since Thm 5 claims exact computation (**Q2.3**)." **Response.** Yes. For **Q2.1**, the replacement is exact and uses no “dominant” attention: the one-slot-per-coordinate construction computes the required matrix product through the full unnormalized attention sum. For **Q2.2**, this construction replaces the “large coefficient on ...” device. For **Q2.3**, we remove the reorganization map in Eqs. (31)–(33) and give the complete $W_Q,W_K,W_V$ matrices for the replacement’s doubling, increment, and readout layers. **Specifically,** storing coordinate $j$ in the $e_j$-slot gives $$\sum_j (Xe_j)(e_j^\top Y)=XY.$$ Hence the full attention sum equals the desired matrix product exactly, while the signed score $M[u,a]-M[u,u]$ cancels the previous state through the residual. The explicit projections are displayed above for every doubling, increment, and readout layer. --- **Q3.** "Can you state explicitly that the trained ... values fall below ... primarily because the ... NMSE threshold is approximate (LayerNorm only secondary, since the no-LN column also dips below) (**Q3.1**)? Please also add a controlled exact experiment (attention-only, no LayerNorm, float64 precision) in which the ... floor is respected (**Q3.2**)." **Response.** Yes. We state it explicitly, and the attention-only, no-LayerNorm, float64 control has been run. For **Q3.1**, the exact theorem assumes pointwise equality whereas $L_{\rm crit}$ uses a positive held-out NMSE, so its premise is not in force at the crossings, LayerNorm is secondary, and we remove the exact-floor overlay. For **Q3.2**, over a frozen grid it establishes the population statement rather than mathematical equality: finite held-out NMSE and the population $L^2$ oracle differ, and without concentration a measured $L_{\rm crit}$ has no deterministic floor. In this control the amplitude is $a\sim{\rm Unif}[-1,1]$, independent of $\sigma\sim{\rm Unif}[1/\kappa,1]$, and the target is $a p_k(\sigma)$, $p_k(\sigma)=1-(1-\eta\sigma)^k$ at $\eta=0.5$. For population output $F(a,\sigma)$ with $\deg F\le3^L$, conditional projection onto $a q(\sigma)$, with $$q(\sigma)=\frac{\mathbb E_a[aF(a,\sigma)]}{\mathbb E[a^2]},$$ cannot increase MSE, gives $\deg q\le3^L$, and cancels $\mathbb E[a^2]$ from population NMSE. For $\Pi_D=\\{q:\deg q\le D\\}$, define $$d_\varepsilon^{L^2}:=\min\\!\left\\{D:\min_{q\in\Pi_D} \frac{\mathbb E_\sigma[(p_k-q)^2]}{\mathbb E_\sigma[p_k^2]} \le\varepsilon\right\\}.$$ So population NMSE at most $\varepsilon$ implies $3^L\ge d_\varepsilon^{L^2}$, which is not a statement about a finite held-out ratio. The control ran all-token unnormalized linear attention, no softmax, MLP, or LayerNorm, on $k\in\\{4,8,16,32,64,128\\}$, $\kappa\in\\{100,1000\\}$, $L=1,\ldots,10$, ten fixed seeds, $\varepsilon\in\\{10^{-3},10^{-5},10^{-8},10^{-12}\\}$, continuously sampled query $\sigma$, and a fixed 65,536-sample held-out set per $(k,\kappa)$. Its weighted-$L^2$ oracle degrees agree at 4,096 and 8,192 quadrature points in all 48 cells, and at $\varepsilon=10^{-12}$ are $4,7,10,14,19$, $26/27$ for $k=4,8,16,32,64,128$: on this grid the $10^{-12}$ threshold measures the $L^2$ degree, not the exact degree $k$. --- **Q4.** "What is the theoretical justification for using number-of-classes as a proxy for ... (number of GD steps) in the Qwen2.5 probe, given that nothing in the theory predicts class count should enter the degree of ... (**Q4.1**)? Absent such a mechanism, why is the fit evidence for this theory rather than a generic 'harder tasks need more layers' effect (**Q4.2**), and can you re-run it against a within-theory complexity axis (**Q4.3**)?" **Response.** We separate the two quantities and adopt the requested theory-internal comparison. The GD-update count $k$ governs $p_k$ and the degree theorem, while $C$ denotes class count in the pretrained-model probe. We will remove the $C\leftrightarrow k$ identification and every claim that the Qwen fit validates the degree-growth mechanism; the Qwen/Pythia associations will be reported as exploratory task-level observations (**Q4.1--Q4.2**). For **Q4.3**, we add a replacement control rather than relabeling the Qwen plot: controlled demonstration regression varies the population condition number $\kappa$, a spectral axis inside the theory. The control uses $\kappa\in\\{10,30,100,300,1000,3000\\}$, $d\in\\{4,16\\}$, $N=2d$, diagonal and fixed-rotation covariance families, $L=1,\ldots,12$, and ten fixed seeds in the same attention-only, no-LayerNorm, float64 architecture. At the fixed depth $L=6$ its four median held-out NMSE values, one per dimension and covariance family, move from $1.883\times10^{-4}$ to $3.031\times10^{-4}$ at $\kappa=10$, and reach approximately $1$ at $\kappa=3000$. This supplies the requested comparison along a theory-internal spectral axis. --- **Q5.** "Can you state prominently that the approximation barrier ... (Thm 10) requires ... and ... (**Q5.1**), and clarify whether any super-constant depth lower bound survives in the fixed-... regime or once ... (where ... has essentially converged and low degree suffices) (**Q5.2**)?" **Response.** Yes. We state the conditions with the theorem. For **Q5.1**, the hypotheses are attention-only unnormalized linear attention, degree-one input coordinates, scalar $\sigma\in[\lambda_{\min},\lambda_{\max}]$, absolute uniform error, $\eta=1/\lambda_{\max}$, $\kappa\ge2$, $k\le\kappa$, and $0<\varepsilon\le c_0/(e\sqrt{k})$ with $c_0=(2e^{3/2}\sqrt\pi)^{-1}$, and for $d_\varepsilon$ the least polynomial degree attaining that uniform error they yield $d_\varepsilon\ge\sqrt{k}/2$ and $L\ge\frac12\log_3k-O(1)$. For **Q5.2**, at fixed $\varepsilon\in(0,1)$ and fixed $\kappa$ no superconstant-in-$k$ approximate lower bound survives once $k\ge\kappa\log(1/\varepsilon)$, so your reading holds from that horizon on, while between $k=\kappa$ and that horizon a growing bound can still survive. Post-convergence, this follows from $$\\|p_k-1\\|_\infty\le(1-1/\kappa)^k\le e^{-k/\kappa},$$ so the degree-zero polynomial $1$ already achieves error $\varepsilon$ beyond that horizon. If $\varepsilon$ instead shrinks with $k$, a growing approximation lower bound can survive even when $k/\kappa\to\infty$: for $\kappa=2$ and $\varepsilon=8^{-k}$, the best degree-$(k-1)$ uniform error is $2\cdot8^{-k}>\varepsilon$, so $d_\varepsilon\ge k$. --- **Limitations.** "The authors justify the existence of the limitations discussion in the checklist, but I did not find where it is clearly." **Response.** We will add a "Limitations and Scope" subsection immediately before the conclusion, findable in one place. It lists the four scope items above: the architecture, attention-only and unnormalized; the prompt format, the column-slot workspace; the regime conditions on the approximation consequence; and the complexity axis $k$.
Reviewer_YVikOpenReview ↗
Rating
4
Clarity
3
Confidence
3
Originality
3
Quality
2
Significance
2
Read review
Summary

This paper studies the Transformer’s ability to emulate gradient descent in the in-context learning setup. Prior works [Von Oswald et al., 2023; Ahn et al., 2023] showed that Transformers can implement gradient descent, but their constructions interpret one layer as one optimizer update. In this paper, the authors argue that an LL-layer linear self-attention Transformers can implement kk steps of GD using only O(log⁡k)O(\log k) layers. The key mechanism behind this is that linear self-attention has a structure where the attention score is obtained by multiplying key and query, and then the score is multiplied by the value. This amplifies the expressible polynomial degree by a factor of 3. The paper provides the upper bound via exact construction and the lower bound via Chebyshev-coefficient proof.

Strengths and weaknesses

Strength

  • This paper is well-written, clearly organized, and the main idea is easy to follow.
  • The proof sketches of each result in the main text are clear enough to understand the high-level approach without looking at the full proof in the appendix.

Weakness

  • W1. I think the proof of Theorem 5 is mostly correct, but it may contain some mistakes. Please correct me if I am mistaken.
    • In Appendix A.5, in “Part 2: The doubling gadget”, the proof chooses M(1)=e2e2⊤M^{(1)}=e_2e_2^\top which gives αj,j(1)=Pm2\alpha_{j,j}^{(1)}=P_m^2. This is correct, but I am concerned that the cross terms αj,1(1),...,αj,d(1)\alpha_{j,1}^{(1)},...,\alpha_{j,d}^{(1)} are not considered. I don’t think these terms are necessarily zero, and they could affect the output of this attention head.
    • If my reasoning is correct, this could be easily fixed by using orthogonal vectors when building the embeddings in Part 1. This would make the cross terms zero and fix the proof, but I think dmodel=O(log⁡k)d_{model}=O(\log k) may need to be changed to like O(dlog⁡k)O(d \log k) or O(log⁡k+d)O(\log k + d). I do not think this is a serious problem though.
  • W2. I am wondering whether it is appropriate to frame this paper as an in-context learning paper.
    • In prior papers studying in-context learning of Transformers on linear regression tasks such as Ahn et al., 2023 [1], the input is typically designed by providing demonstrations of regression tasks, and the model is asked to generate the prediction for an unseen test point. However, current paper does not have this structure in the main theoretical contributions. In my view, it seems more accurate to say that this paper shows Transformers can implement a certain “polynomial” whose degree is exponential in LL.
    • I do agree that this polynomial is exactly the gradient descent update rule. However, my concern is that, to call this in-context learning, the setup should have a structure that, given demonstration examples, the model somehow deduces the internal rule and applies it to unseen samples. This does not seem to be established by the main theory of the paper, except empirically in Section 5.3.
    • This is the major concern I have for this paper. I would be happy if the theory could be extended to the demonstration-based setting. If it is possible, please describe the proof sketch.
  • W3. I think the paper should make a clearer comparison with Sanford et al., 2024 [2].
    • This paper essentially claims that LL-layers of Transformers can perform a task that requires exp⁡(L)\exp(L) number of sequential computations. However, I found that Sanford et al., 2024 [2] have a similar high-level claim: “we show that logarithmic depth is sufficient for transformers to solve basic computational tasks”. The paper should discuss how the mechanism in this paper, especially the theory that the value * key-query structure induces exponential growth, is fundamentally different from the mechanism in Sanford et al., 2024 [2].
  • W4. Section 5.3 should be written more clearly.
    • Some crucial experimental details that are necessary to understand the tasks are deferred to the Appendix without latex hyperlinks. It also does not clearly state the experimental results. The main text should contain at least the information that are necessary to understand, but the current Section 5.3 is not enough.

[1] Ahn, Kwangjun, et al. "Transformers learn to implement preconditioned gradient descent for in-context learning." NeurIPS 2023

[2] Sanford, Clayton, Daniel Hsu, and Matus Telgarsky. "Transformers, parallel computation, and logarithmic depth." ICML 2024

Questions

Q1. What does “pre-convergence regime” mean on pg 6 line 212? Does it mean K≤κK \le \kappa?

Q2. In section 5.1, how are the training and test σ\sigma values chosen?

Q3. I don’t understand how the LL-crit table by κ\kappa in the Appendix I supports the claim of the paper. My understanding is that κ\kappa is used as a proxy for the number of GD steps needed to solve the problem. Is this the correct interpretation? Could you elaborate more on this experiment?

  • I also have an additional question about this broader ICL regression experiment. Is there any evidence that Transformers solve this task by running multi steps of GD? I guess Transformers may learn to implement another method such as Newton’s method. Without clear evidence that learned Transformers are implementing GD (or a similar method), this experiment may not provide much support for the claim of the paper.
Limitations

I think the paper did not adequately address its limitations. One limitation, as mentioned in W2, is that the theory setting does not involve demonstration-based examples.

Paper formatting concerns

None that I noticed.

Final justification

See my comment on the authors' response.

1 comment

Response to Reviewer YVik

W1. "... I am concerned that the cross terms ... are not considered (W1.1). ... this could be easily fixed by using orthogonal vectors when building the embeddings in Part 1 (W1.2). This would make the cross terms zero and fix the proof, but I think ... may need to be changed (W1.3)."

Response. Your orthogonal-vector suggestion points to the right organizing principle, and we make it exact by replacing the doubling gadget and recounting the width. For W1.1, the cross terms are not zero. For W1.2, an orthogonal ID appended additively to the score leaves the payload cross terms in place, so the exact fix stores matrix columns instead: one standard-basis slot per coordinate makes the all-token sum itself the matrix product ∑j(Xej)(ej⊤Y)=XY\sum_j(Xe_j)(e_j^\top Y)=XY, with no ID, mask, or dominance argument. For W1.3, the width does need to be changed, as you anticipated: dmodel=6d=Θ(d)d_{\rm model}=6d=\Theta(d). The head count stays H=2H=2 and the depth L=ℓbin(k)+1≤2⌈log⁡2k⌉+1L=\ell_{\mathrm{bin}}(k)+1\le2\lceil\log_2k\rceil+1, for ℓbin(k)=⌊log⁡2k⌋+ν(k)−1\ell_{\mathrm{bin}}(k)=\lfloor\log_2k\rfloor+\nu(k)-1 with ν(k)\nu(k) the 1-bit count, so doubling and increment layers cover every kk.

In the submitted gadget, with Pi=(1−ησi)mP_i=(1-\eta\sigma_i)^m and Si=∑t<m(1−ησi)tS_i=\sum_{t<m}(1-\eta\sigma_i)^t, the two heads return Pi∑jPjP_i\sum_jP_j and Si∑jPjS_i\sum_jP_j where doubling needs Pi2P_i^2 and PiSiP_iS_i. For fixed η>0\eta>0, with Σ\Sigma the supplied covariance, gg the supplied linear term, Am=(I−ηΣ)mA_m=(I-\eta\Sigma)^m and Sm=∑t<m(I−ηΣ)tS_m=\sum_{t<m}(I-\eta\Sigma)^t, blocks u,a,a1,su,a,a^1,s of slot jj store ej,Amej,A1ej,Smeje_j,A_me_j,A_1e_j,S_me_j, and ErE_r injects block rr. The signed score factors as

W_K^\top W_Q=E_u(E_a-E_u)^\top ,$$ with entries in $\\{0,\pm1\\}$. A doubling layer scores $(A_m-I)_{ji}$ and $(S_m)_{ji}$, both with value $A_me_j$, and the residual gives $A_{2m}=A_m^2$, $S_{2m}=(I+A_m)S_m$. An increment layer adds $A_1A_m$ in one head while a $\delta_{ji}$-scored head moves $A_m$ from the $A$-block to the $S$-block, giving $A_{m+1}=A_1A_m$ and $S_{m+1}=S_m+A_m$. The remaining bits, read from most to least significant, cost one doubling each and one increment per 1-bit; a final layer reads out $w_k=\eta S_kg$. --- **W2.** "... to call this in-context learning, the setup should have a structure that, given demonstration examples, the model somehow deduces the internal rule and applies it to unseen samples (**W2.1**). ... I would be happy if the theory could be extended to the demonstration-based setting. If it is possible, please describe the proof sketch (**W2.2**)." **Response.** Yes, it is possible, and the proof sketch follows. For **W2.1**, the theorem has the structure you name: for fixed $N,d,k$ and $\eta>0$ the prompt carries $N$ demonstrations, $d$ fixed data-independent coordinate-workspace tokens, and a final unseen query, and the network deduces the rule from the demonstrations alone, forming their empirical objective, computing its $k$-step GD endpoint, and applying that endpoint to the query, whose value never enters the moments. Resources are $L=\ell_{\mathrm{bin}}(k)+3\le2\lceil\log_2k\rceil+3$, $H=3$, $d_{\mathrm{model}}=8d+3$; with prompt variables embedded linearly, exact computation here also requires $L\ge\lceil\log_3(2k+1)\rceil$. The tokens are ordered $(x_1,y_1),\ldots,(x_N,y_N),e_1,\ldots,e_d,x_q$, with $x_q$ in a separate block and a constant $1$ in a block $c$. Let $X\in\mathbb R^{N\times d}$ have rows $x_i^\top$, $y=(y_1,\ldots,y_N)^\top$, $\widehat\Sigma=X^\top X/N$, and $\widehat g=X^\top y/N$, and write $M[r,r']=E_rE_{r'}^\top$ for a score map and $V[r,r']=E_rE_{r'}^\top$ for a value copy. One setup layer of three heads, $$\big(M[x,u],\\,-\tfrac{\eta}{N}(V[a,x]+V[a^1,x])\big),\quad \big(M[u,u],\\,V[a,u]+V[s,u]+V[a^1,u]\big),\quad \big(M[y,c],\\,\tfrac1N V[g,x]\big),$$ puts $A_1e_j=(I-\eta\widehat\Sigma)e_j$ in the $a$ and $a^1$ blocks of every slot $j$, $S_1e_j=e_j$ in its $s$ block, and $\widehat g$ in the query's $g$ block; the query's separate $x_q$ block keeps it out of those moments. The chain forms $w_k=\eta\sum_{t<k}(I-\eta\widehat\Sigma)^t\widehat g$. Every chain layer applies to every receiver the all-token recurrence of Appendix A.1, the operative update here, which replaces the query-only display in submitted Eq. (3) since workspace states must evolve; each layer sums over all $N+d+1$ keys, and block zeros, not a mask, make the query inert. A vector readout writes $w_k$ to the query's $\mathrm{out}$ block, and $M[\mathrm{out},x_q]$ with $V[\mathrm{pred},c]$ forms the query self-pair $x_q^\top w_k$. For the lower bound, fix $\eta\ne0$ and require exact equality on a set with nonempty interior: the output has degree at most $3^L$, the target exactly $2k+1$, and under $x_i=t_ie_1,\ x_q=se_1$, the coefficient of $s\\,t_1^{2k-1}y_1$ is $\eta(-\eta)^{k-1}N^{-k}\ne0$. The theorem's scope is this fixed workspace. --- **W3.** "... The paper should discuss how the mechanism in this paper, especially the theory that the value \* key-query structure induces exponential growth, is fundamentally different from the mechanism in Sanford et al., 2024 [2]." **Response.** We agree that the headline logarithmic-depth message and parallel-composition principle are shared; the difference is the computational primitive being parallelized. Sanford et al.'s causal-softmax construction composes a discrete `find` pointer with itself, doubling the represented hop count while accumulating the binary expansion of $k$. Our unmasked linear-attention construction composes continuous matrix-polynomial states: coordinate slots make the value-weighted bilinear-score sum compute $XY=\sum_j(Xe_j)(e_j^\top Y)$, and binary doubling/increment produces the exact $k$-step GD map and its augmented-prompt extension in **W2**. The lower bounds are not directly ordered. Sanford et al.'s Cor. 4.3 is conditional on the one-versus-two-cycles MPC conjecture (Conj. 2.4), with width-head-product and finite-precision restrictions. Ours requires no complexity conjecture within attention-only unnormalized linear self-attention: independently, its trilinear update imposes $\deg_{\ell+1}\le3\deg_\ell$, yielding an exact-computation logarithmic lower bound independent of heads, width, and context length. --- **W4 / Q3.** "Section 5.3 should be written more clearly. ... The main text should contain at least the information that are necessary to understand" (**W4**). "I don't understand how the $L_{\rm crit}$-by-$\kappa$ table ... supports the claim" (**Q3a**). "Is there any evidence that Transformers solve this task by running multi steps of GD? ... [They] may learn ... Newton's method" (**Q3b**). **Response.** We will make Section 5.3 self-contained in the main text. For each experiment, we will state the task, demonstration/query prompt, essential train/test protocol, metric, definition of $L_{\rm crit}$, and principal findings, with direct links to the complete protocols and tables (**W4**). We will distinguish $L_{\rm crit}^{\rm reg}$, the smallest tested model depth whose median endpoint NMSE crosses its threshold, from $L_{\rm crit}^{\rm probe}$, the earliest pretrained-model layer reaching 95% of final-layer accuracy. For **Q3a**, $\kappa$ is the condition number. Under the reference-GD choice $\eta=1/\lambda_{\max}$, it determines spectral conditioning and the reference-GD convergence horizon. The table characterizes how endpoint performance varies along this theory-relevant spectral axis; we will remove the update-count interpretation. For **Q3b**, endpoint loss characterizes the final predictor and does not identify its optimization trajectory. We will state that directly; the exact construction in **W2** provides the requested architecture-level result for the prescribed $k$-step GD map. --- **Q1.** "What does 'pre-convergence regime' mean on pg 6 line 212? Does it mean ...?" **Response.** Yes: pre-convergence means $k\le\kappa$ here. The uniform-approximation theorem also assumes $\eta=1/\lambda_{\max}$, $\kappa\ge2$, and $\varepsilon\le c_0/(e\sqrt{k})$ with $c_0=(2e^{3/2}\sqrt\pi)^{-1}$. The name follows from the slowest-direction residual: for $k\le\kappa$, $(1-1/\kappa)^k\ge(1-1/\kappa)^\kappa\ge1/4$, so the target has not flattened over the spectral interval. --- **Q2.** "In section 5.1, how are the training and test ... values chosen?" **Response.** In Section 5.1 the three context values are the Chebyshev nodes constructed explicitly on $[1/\kappa,1]$, the amplitude is $a\sim N(0,1)$, and the query $\sigma$ is drawn at random from the same interval: the context grid is fixed by construction, and the query is the sampled variable. The held-out draw uses an RNG independent of training, shared across the depths and seeds compared within each $(k,\kappa)$ cell. --- **Limitations.** "One limitation, as mentioned in W2, is that the theory setting does not involve demonstration-based examples." **Response.** We cover that case with the exact demonstration-to-query theorem of **W2**, inside the paper's full/unmasked all-token linear-attention model, and that augmented prompt with its fixed workspace is the theorem's scope.

Comments on the paper

1 comment
Meta-review

Summary

This paper studies linear attention-only transformer’s ability to implement k-step GD on any given diagonal-quadratic instances. Exploiting the fact that each linear attention layer has a degree-3 polynomial of the input, the authors show lower and upper bounds on the number of attention layers LL to implement kk-step GD, which are both of order Θ(log⁡k)\Theta (\log k). The paper also presents experiments beyond the theoretical setup, trying to establish connections to more practical ICL scenarios.

Strengths

  1. The paper is well-written and clearly organized, with intuitive proof sketches and effective figures.
  2. The degree-growth perspective is original and gives a clean explanation of depth as algebraic capacity, beyond simply counting GD steps.
  3. The main lower bounds are strong and architecture-independent. Especially, the non-diagonal lower bound removes restrictive assumptions and seems novel.
  4. The theory is supported by useful extensions (mainly in the appendices), and convincing synthetic experiments.

Weakness

  1. A few reviewers questioned the ICL framing, since the main theory does not directly cover demonstration-based prediction. I concur with Reviewer YVik’s opinion that this paper rather shows Transformers can implement a certain “polynomial” that has degree exponential in LL and corresponds to some GD iterate. Reviewer hVQn also points out that low ICL prediction loss may not require implementing GD.
  2. Reviewers raised a concern that the matching O(log⁡k)O(\log k) upper bound is established only for diagonal or simultaneously diagonalizable settings, while the lower bound is more general. This makes one doubt the validity of the “suffices” claim in the title.
  3. All reviewers went extra miles to examine the proofs, and there are possible issues in the proof of the exact upper-bound construction, including cross terms, token isolation, and unspecified projection matrices.
  4. The scope and assumptions of each result are not always clear, especially for linear attention versus softmax Transformers and the regime conditions of the approximation lower bound.
  5. The experimental evidence has some interpretation issues, including results below the theoretical floor and weak justification of class count as a proxy for GD steps.
  6. A detailed comparison to Sanford et al., 2024 would be helpful.

Some minor questions from AC:

  1. Is there any concrete example of an ICL setup (e.g., in-context regression under some strong assumptions) that boils down to solving the objective in Eq (1) with GD?
  2. Line 273 lists 11 different values of kk and 20 values of LL. How do they make up 620 trained models?

Decision-Relevant Issues for the Author Response

Authors are encouraged to address all substantive concerns and questions raised by the reviewers and the AC. To help focus the response, I would especially like to see clarifications on the main concerns summarized above. These are not meant to be an exhaustive list of issues to address, but a clear response to these points would be especially helpful for the post-rebuttal discussion.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.