ELVIA.Evidence Atlas
← Back to analysis

AI context

ELVIA analysis of: What Makes In-context Learning Effective for Mathematical Reasoning — Problem 2: Released similarity uses KQ instead of K-transpose-Q

Original paper: Jiayu Liu; Zhenya Huang; Chaokun Wang; Xunpeng Huang; Chengxiang Zhai; Enhong Chen. What Makes In-context Learning Effective for Mathematical Reasoning. Proceedings of the 42nd International Conference on Machine Learning, vol. 267, 2025. https://proceedings.mlr.press/v267/liu25ac.html
Source version: 14 physical-page proceedings PDF; LMS3 600a94a5300d9fdd5e023a93cc6ba5d883233211
Source location: Eq21p4; LMS3.py52,101

Question: What does the recorded analysis establish about “Released similarity uses KQ instead of K-transpose-Q”?
Bounded finding:
The acquired script computes \(KQh\), which can reverse selection relative to \(K^\top Qh\). This is a release-specific discrepancy; historical benchmark impact remains unknown.

Recorded check:
Equation (21) uses \(W_K^\top W_Qh\), but the inspected script computes a different matrix product.
Let \(K\) denote the square key-projection matrix after the head expansion at `LMS3.py:52`, and let \(Q\) denote `w_q`. Line 52 assigns `w_k1`\(=K^\top\). Line 101 then evaluates `w_k1.T @ (w_q @ x_B_batch.T)`, which is \(KQh\), rather than \(K^\top Qh\). This is a literal discrepancy with (21), independent of whether (21) itself is an adequate attention-derived score.
For an independent two-dimensional illustration, take \[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,\sqrt2)\) and the released-product distances are \((2,\sqrt2)\). The stability factors are equal, so the selected candidate reverses. A symmetric \(K\) 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 124–129 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, 194 and 218, after selection. The representation routine truncates to 128 tokens (76–77). 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.

Case-wide limitations:
- P1 — Loss-decrease guarantee not established for stated ICL setting — Counterevidence: Labelcounterexample excluded if one expressly assumes common label-independent gradient or stronger cross-samplebound; paper says labels merely omitted
- P1 — Loss-decrease guarantee not established for stated ICL setting — Counterevidence: Same-label example doesnot refute surrogate theorem itself; refutes mapping toattention
- P1 — Loss-decrease guarantee not established for stated ICL setting — Counterevidence: Softmax already approximated; no bounded approximationerror given
- P1 — Loss-decrease guarantee not established for stated ICL setting — Counterevidence: Empirical score canwork despiteinvalidguarantee
- P2 — Released similarity uses KQ instead of K-transpose-Q — Counterevidence: SymmetricKwouldmaskdifference
- P2 — Released similarity uses KQ instead of K-transpose-Q — Counterevidence: No actualmodelweights/inference run
- P2 — Released similarity uses KQ instead of K-transpose-Q — Counterevidence: Exact historicalimplementationunknown
- P3 — Ranking prose says highest where algorithm minimizes — Counterevidence: Algorithm1 andnp.argsortfirstk arecorrectlyascending
- P4 — AppendixD says bothbaselines wrong in cases1and2 — Counterevidence: Figure6greencheckscorrectlymarkthesebaselines
- P4 — AppendixD says bothbaselines wrong in cases1and2 — Counterevidence: Case3rejectionandanswer51remainconsistent
- Unresolved: Per-label vs commonloss assumption ambiguity explicitlyhandled
- Unresolved: Fullsolutionpath describedbutreleasedselectionencodesquestiononlyandtruncates128tokens; historicalcontextunknown
- Unresolved: Rawoutputs,statisticaltest,runrepetitions,Figure4normalizationunavailable
- The original report's complete scope, counterevidence and unresolved questions are retained below.
- This import checks publication format and identity; it does not repeat scientific review.
- Independent human scientific review is pending; author adoption has not been requested.
Source problem ID: p2
Source report index: 2

Original source excerpts (verbatim):
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.
Source: 14 physical-page proceedings PDF; LMS3 600a94a5300d9fdd5e023a93cc6ba5d883233211
Locator: PDF p. 1, Abstract
Source PDF SHA-256: 41da4e437c62c9061e0dc8f9a9c3bb59d2c4eead332f7140545a508abebef9b2

Review status: Independent review pending
Case: icml2025-0345-what-makes-in-context-learning-effective-for-mathematical-reasonin
Revision: 1
Record created: 2026-10-26T04:21:21.357774+00:00
Permalink: https://elvia-atlas.org/atlas/cases/icml2025-0345-what-makes-in-context-learning-effective-for-mathematical-reasonin.html#problem-2
Versioned public record: https://elvia-atlas.org/atlas/evidence/icml2025-0345-what-makes-in-context-learning-effective-for-mathematical-reasonin/records/icml2025-0345-what-makes-in-context-learning-effective-for-mathematical-reasonin.r1.json
Canonical record SHA-256: 9bdb5db87bb6555918b466640d6d71d66ca24ef6c0ad661c6bfb2d6d0b7c148c
The page follows the latest revision; the versioned record identifies this snapshot.