ELVIA.Evidence Atlas
ICML 2025ELVIA assessment Major

What Makes In-context Learning Effective for Mathematical Reasoning

Jiayu Liu, Zhenya Huang, Chaokun Wang, Xunpeng Huang, Chengxiang Zhai, Enhong Chen

ELVIA analysis

Independent review pending

The proposed demonstration score has encouraging reported empirical results, but its claimed theoretical guarantee is not established for the stated in-context-learning setting. The proof requires an unstated cross-sample gradient condition, and its identification of an additive attention update with loss minimization has the wrong direction under the declared gradient convention. Exact scalar examples expose both gaps. These are central theoretical defects and warrant Major revision. Three bounded Minor findings concern a released matrix transpose, contradictory ranking prose, and an inaccurate case-study summary. All 14 physical PDF pages and six figures were inspected, with complete static reading of the two-file public release. No author code or LLM inference was run. Scientific adjudication remains pending.

Problem 1. Loss-decrease guarantee not established for stated ICL setting

Major
Evidence and reasoning

Problem statement

The stated smoothness assumptions and demonstration condition guarantee decreasing test loss for the proposed in-context attention update.

Use scalar squared loss ℓy(F)=12(F−y)2,\ell_y(F)=\tfrac12(F-y)^{2}, with d=d′=1,d=d^\prime=1, ht=h=WK=WV=z0=1,h_t=h=W_K=W_V=z_0=1, demonstration label 0,0, and test label 2.2. Pretraining copies of input 2,2, label 2,2, give W0=1W_0=1 and Hessian H=4.H=4. Every per-label output gradient is globally 11-Lipschitz.

Proof

Theorem 1 and its proof, equations (11)–(12) on page 4 and (33)–(34) on page 12, use within-loss smoothness as a bound between gradients from different labeled samples. Equations (3)–(9) also identify incompatible parameter updates.

The notation section says that labels are omitted for brevity. Under this ordinary supervised reading, Lipschitz continuity of ∇Fℓy(F)\nabla_F\ell_y(F) in F,F, for each label y,y, does not imply ∥∇Fℓyt(Wht)−∇Fℓy0(Wz0)∥≤μ∥W(ht−z0)∥. \|\nabla_F\ell_{y_t}(Wh_t)-\nabla_F\ell_{y_0}(Wz_0)\| \leq\mu\|W(h_t-z_0)\|. There is an uncontrolled label-dependent term. Take scalar squared loss ℓy(F)=12(F−y)2\ell_y(F)=\tfrac12(F-y)^{2} and d=d′=1,ht=h=WK=WV=1,z0=1,y0=0,yt=2.d=d'=1,\quad h_t=h=W_K=W_V=1,\quad z_0=1, \quad y_0=0,\quad y_t=2. Let the pretraining set have nn copies of input 22 and label 2.2. Its average loss is 12(2W−2)2,\tfrac12(2W-2)^{2}, so W^=1=W0\widehat W=1=W_0 as required by (44), and H=4>0.H=4>0. Each output-loss gradient is globally 1-Lipschitz. The demonstration satisfies (55), since ∇Fℓ0(1)=1=WVh/d.\nabla_F\ell_0(1)=1=W_Vh/\sqrt d.

The two gradients with respect to WW are gt=−1g_t=-1 and g0=1.g_0=1. The eigenvalue ratio in (77) is one. Its left side is 1,1, while its right side is zero because ht=z0.h_t=z_0. Thus its strict sufficient condition holds. Nevertheless, W^ϵ,z0=44+ϵ<1,ℓ2(W^ϵ,z0)>ℓ2(1)=12(ϵ>0).\widehat W_{\epsilon,z_0}=\frac4{4+\epsilon}<1, \qquad \ell_2(\widehat W_{\epsilon,z_0})>\ell_2(1)=\frac12 \quad(\epsilon>0). For n=1000,n=1000, ϵ=1/n,\epsilon=1/n, the exact new loss is 8008002/16008001,8008002/16008001, an increase of approximately 0.00024997.0.00024997. The derivative at zero is +1/4,+1/4, so making the upweighting arbitrarily small does not help. The failed step [missing] (#missing) tries to bound 22 by zero.

Distinct labeled problems are not assumed to have injective representations in the paper. This example uses the permitted coincidence of representations, not contradictory labels for one stipulated deterministic mathematical problem. If the intended theorem instead assumes one common, label-independent loss function or explicitly assumes the cross-sample bound [missing] (#missing), this particular example is excluded. That would be a materially narrower hypothesis than ordinary per-label smoothness and must be stated and justified for the reasoning task.

Set the test label to zero in the preceding construction and leave everything else unchanged. The theorem condition still holds. The surrogate minimizer now does reduce the test loss, so this variant is not a counterexample to that surrogate conclusion. However, equation (3) has zero-shot output 11 and one-shot linear-attention output 1+1=2.1+1=2. Its squared test loss rises from 1/21/2 to 2.2.

This directly refutes the claimed identification of the two procedures inside the paper’s own linearized model. Under (55), the attention increment is a positive gradient outer product; [influence] (#influence) is a negative Hessian-preconditioned increment. Calling the former a conceptual analogy does not make their loss changes equal. Reversing the loss-gradient convention would also require changing (55) and the influence calculation. Moreover, no approximation error bound connects softmax attention (22), linear attention (33), contextual representations and the final answer loss.

The proof’s first-order Taylor step (99)/(3030) also supplies no remainder bound ensuring that the particular finite choice ϵ=1/∣Dpre∣\epsilon=1/|D_{\rm pre}| stays in a loss-decreasing neighborhood. A valid negative derivative establishes a sufficiently small neighborhood under regularity, not an unquantified universal finite-step guarantee. This is an additional proof-scope limitation; the two exact examples above do not rely on it.

Page 5 states that examples failing the condition will have a negative effect. Theorems 1 and 2 are presented as sufficient conditions, not necessary ones. Even in the retraining surrogate with a shared zero-label squared loss, put h=3,h=3, ht=WK=WV=1h_t=W_K=W_V=1 and keep the same pretraining objective. Equation (5) holds, C1=1,C_1=1, and (77) reads 1>8,1>8, which fails. Yet W^ϵ=4/(4+9ϵ)\widehat W_\epsilon=4/(4+9\epsilon) reduces test loss for every ϵ>0.\epsilon>0. Failure of the bound therefore cannot establish harmfulness. Replacing unknown absolute quantities by a percentile threshold, as LMS3 does, is a practical heuristic that needs empirical validation.

The assessment of Problem 1 is Major. It affects the advertised theoretical explanation and guarantee, not a peripheral presentation detail. A defensible repair must state the required loss/label regularity, derive the loss change for the actual attention update or explicitly limit the theorem to retraining, control finite-step/approximation errors where a guarantee is claimed, and describe rejection as a heuristic unless a separate necessity result is established. This review does not supply or certify such a replacement theorem. The empirical success of the score is not refuted by these examples.

□\square

Possible revision

State the required loss/label regularity, analyze the actual attention update or restrict the theorem to retraining, and control finite-step and approximation errors. Treat rejection as heuristic unless necessity is established. No replacement theorem or empirical repair is certified.

Problem 2. Released similarity uses KQ instead of K-transpose-Q

Minor
Evidence and reasoning

Problem statement

The release implements the specified selection transform WK⊤WQh.W_K^\top W_Qh.

Let KK be the expanded square key projection and QQ the raw query projection. No symmetry assumption on KK is stated.

Proof

Equation (21) uses WK⊤WQh,W_K^\top W_Qh, but the inspected script computes a different matrix product.

Let KK denote the square key-projection matrix after the head expansion at `LMS3.py:52`, and let QQ denote `w_q`. Line 5252 assigns `w_k1`=K⊤.=K^\top. Line 101101 then evaluates `w_k1.T @ (w_q @ x_B_batch.T)`, which is KQh,KQh, rather than K⊤Qh.K^\top Qh. This is a literal discrepancy with (2121), independent of whether (2121) itself is an adequate attention-derived score.

For an independent two-dimensional illustration, take K=(1201),Q=V=I,ht=(1,2)⊤,h1=(1,0)⊤, h2=(0,1)⊤.K=\begin{pmatrix}1&2\\0&1\end{pmatrix},\quad Q=V=I, \quad h_t=(1,2)^\top,\quad h_1=(1,0)^\top,\ h_2=(0,1)^\top. The intended distances are (0,2)(0,\sqrt2) and the released-product distances are (2,2).(2,\sqrt2). The stability factors are equal, so the selected candidate reverses. A symmetric KK would hide the defect, but no symmetry constraint is specified. This is Minor, scoped to the pinned release and its agreement with the written algorithm; the local repair removes one transpose after confirming the projection convention. No real Llama activations, weights or experiments were executed, and the amount or direction of benchmark impact is unknown.

The same static read identifies additional scope differences: lines 124124–129129 encode only the question field, while the paper says the whole demonstration reasoning path is included. Solutions are added to the final prompt at lines 170,170, 194194 and 218,218, after selection. The representation routine truncates to 128128 tokens (7676–7777). Thus the release does not implement a selection score over the full question-and-solution text as described. These observations should be reconciled with the exact experimental version; they do not establish what historical runs encoded.

□\square

Possible revision

Remove the extra transpose after confirming the head and projection convention, and reconcile the representation content and truncation with the historical experimental version. The finite illustration and static source reading are not a benchmark rerun.

Problem 3. Ranking prose says highest where algorithm minimizes

Minor
Evidence and reasoning

Problem statement

Section 4 says to select the highest product scores.

The score is nonnegative distance times nonnegative stability, under the surrounding minimization discussion.

Proof

Page 5 twice describes selecting the highest product scores, although the score is a product of quantities to minimize.

Algorithm 1, page 13, selects the smallest scores. The release likewise uses ascending `np.argsort` and takes its first kk indices (134134–136136). For two candidate scores 11 and 2,2, these two instructions choose different candidates. The surrounding minimization discussion, pseudocode and code agree on the smaller value. The correction is to replace “highest” by “smallest” in the prose. This is Minor; no reversed ranking in the inspected implementation is alleged.

□\square

Possible revision

Replace “highest” with “smallest” in the prose. No implementation reversal or empirical recalculation is needed to establish this wording correction.

Problem 4. Appendix D says both baselines are wrong in Cases 1 and 2

Minor
Evidence and reasoning

Problem statement

Appendix D says both OpenAI and Best-validate are wrong in Cases 11 and 2.2.

Use the exact printed problems, answers and green correctness marks.

Proof

Page 13 says both OpenAI and Best-validate made errors in cases 11 and 2.2. Figure 6 explicitly shows one of these baselines correct in each case.

In case 1,1, the line through (7,8)(7,8) and (9,0)(9,0) has slope −4-4 and intercept 36,36, giving sum 32.32. Best-validate and LMS3 both return 3232 and both have green check marks. In case 2,2, (x−y)(x+y)=−2y2+1(x-y)(x+y)=-2y^{2}+1 simplifies to x2+y2=1.x^{2}+y^{2}=1. OpenAI and LMS3 both return the correct circle label C, again with green checks. Thus this is a confirmed error in the textual summary, not in those figure labels. Case 33’s total 8+16+19+8=518+16+19+8=51 and depicted rejection remain consistent. The correction is local and Minor; it weakens the particular case-study contrast, not the aggregate tables.

□\square

Possible revision

Identify which baseline fails in each example. This is a local text correction, not a recalculation of aggregate performance.

Supporting record & provenance

Work status

Current version

Version 1

Minhao Liu · Initial report · Version 1

Independent review pending

Original claim and review scope

We prove that the reasoning efficacy (measured by empirical prediction loss) can be bounded by an LLM-oriented semantic similarity and an inference stability of demonstrations, which is general for both one-shot and few-shot scenarios.

14 physical-page proceedings PDF; LMS3 600a94a5300d9fdd5e023a93cc6ba5d883233211; PDF p. 1, Abstract

Actual review scope

The recorded inspection concerns these source locations: Eq3-12 pp. 3-4; Theorems1-2; A Eq25-38 pp. 12-13; rejection prosep5; Eq21p4; LMS3.py52,101; Section 4p5; Algorithm 1p13; LMS3.py134-136; AppendixDp13; Figure 6p14.

Submit an author revisionContribute a review