REVIEW 3 major objections 3 minor 6 cited by
Competition Dynamics Shape Algorithmic Phases of In-Context Learning
T0 review · 3 major / 3 minor · reviewed 2026-08-12 · deepseek-v4-flash
Pith's one-line read Four simple algorithms compete to explain in-context learning, and the winner depends on training and context.
desk verdict A genuinely useful synthetic testbed and a decomposition tool (LIA) that mostly works; the four-algorithm basis is asserted rather than derived, and the acknowledged OOD bias hints at something missing, but the paper is a serious contribution worth engaging. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing object is the Linear Interpolation of Algorithms (LIA), the constrained regression in Eq. 7 that expresses the model's next-token distribution as a convex combination of four hand-defined algorithmic distributions. The four algorithms are: Uni-Ret (unigram retrieval), which weights training-set chains by how well their stationary distributions match the context's token histogram; Bi-Ret (bigram retrieval), which weights by observed transitions; Uni-Inf (unigram inference), which predicts next tokens from the context's token frequencies alone; and Bi-Inf (bigram inference), which estimates the transition matrix from observed transitions in the context. LIA's fitted weights, together with two probes (shuffling the context to test bigram use, and comparing predictions' proximity to seen versus random transition matrices to test retrieval), produce the paper's phase diagram and explain the out-of-distribution generalization dynamics.
What would settle it
Train the same transformer on a mixture of order-2 Markov chains, where the next state depends on the two previous states. If the four-algorithm LIA fits with the same near-zero residual as in the paper, the decomposition is insensitive to a genuinely different algorithm; if the residual is large or a fifth algorithm is needed, the completeness of the basis fails.
Extended reading notes
Core claim
The central discovery is a decomposition: for transformers trained on finite Markov mixtures, the trained model's predicted next-token distribution is well approximated by $p_{\text{model}} \approx \sum_{a} w_a p_a$, where $a$ ranges over Uni-Ret, Bi-Ret, Uni-Inf, and Bi-Inf, and the weights are nonnegative and sum to one (Eq. 7). The weights fitted on in-distribution sequences predict the model's out-of-distribution KL, including its non-monotonic rise and fall during training. The paper reads this as evidence that the four algorithms compete for control of the model, with experimental conditions determining the winner; for example, at moderate data diversity the model first adopts bigram inference (Bi-Inf), which generalizes well, and then is slowly overtaken by bigram retrieval (Bi-Ret), which is better on the training set but worse out of distribution, explaining the transient nature of ICL.
Load-bearing premise
The four hand-defined algorithms are assumed to be a complete basis for whatever the model actually computes, so that every next-token distribution lies approximately in their nonnegative span.
Editorial extensions
If this is right
- The transient nature of ICL follows directly: a training-optimal retrieval algorithm gradually replaces the OOD-optimal inference algorithm, so performance on novel distributions peaks and then decays.
- Data diversity acts as a phase boundary: below a threshold the model stays in retrieval phases, while above it bigram inference can emerge and generalize out of distribution.
- In-distribution measurements alone, namely the LIA weights, can predict out-of-distribution generalization trends during training.
- Model design choices such as width, MLP size, state-space size, and tokenization shift the phase boundaries, so scaling conclusions depend on which algorithm is being promoted.
- ICL findings are setting-dependent; no single mechanism explains behavior across all configurations.
Reading between the lines
- The paper's own controls show that LIA assigns flat weights to arbitrary algorithms, but completeness of the four-algorithm basis remains open; a natural test is to fit LIA on a model trained on an order-2 Markov mixture, where a genuinely different algorithm is known to exist.
- If the competition picture carries over to real LLMs, training interventions such as data composition, architecture, and tokenization could aim to favor the generalizing algorithm rather than minimizing loss alone, and phase diagrams might indicate when continued training becomes harmful.
- The paper notes that LIA's predicted OOD KL is always slightly worse than the model's actual performance; understanding that residual could reveal whether the circuits are truly competitive or partially merged.
- The real-LLM appendix suggests these algorithms may be identifiable in production models, where prompt wording acts as an experimental condition that shifts behavior across algorithmic regimes.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper introduces a synthetic sequence modeling task—learning to simulate a finite mixture of Markov chains—and shows that Transformers trained on this task reproduce several well-known ICL phenomena, including the data diversity threshold, induction head emergence, transient ICL, task retrieval vs. task learning, early ascent, and bounded efficacy. It then defines four interpretable algorithms spanning a unigram/bigram axis and a retrieval/inference axis, and demonstrates via a nonnegative linear interpolation (LIA) that a trained model's next-token distribution is well approximated by a convex combination of these four algorithms on in-distribution sequences. The LIA weights fit on ID data are used to predict OOD performance, which the authors use to explain the transient nature of ICL. Additional experiments probe how model width, tokenization, and data complexity shift the algorithmic phase diagram.
Significance. If the central claims hold, this is a valuable contribution: it provides a unified synthetic testbed that reproduces a broad ICL phenomenology, and it proposes a concrete, interpretable decomposition tool (LIA) with a strong in-distribution fit. The paper is commendable for the breadth of reproduced phenomena, the direct control experiment with arbitrary algorithms (App. I.2), the preliminary mechanistic evidence from attention maps and MLP reconstructions (App. E), and the public code release. The OOD prediction using ID-fitted weights is a genuine, non-circular test. However, the load-bearing assumption that the four hand-defined algorithms form a complete basis for the model's behavior is not established, and the paper's own appendix reports a systematic OOD gap that is the expected signature of a missing component. This undermines the quantitative precision of the competition-dynamics explanation until addressed.
major comments (3)
- [App. K / Sec. 4.2, Eq. (13)] The claim that LIA weights fit on ID data explain OOD performance is load-bearing for the transient-ICL explanation, but the paper's own App. K states that the LIA-predicted OOD KL is systematically higher (worse) than the model's actual OOD performance. As the skeptic notes, this is exactly the signature of a missing algorithm or of context-dependent weights not captured by the fixed four-algorithm basis. The authors should either extend the set with a fifth candidate (e.g., a trigram-inference algorithm or a context-dependent switch between Bi-Inf and Bi-Ret) and show that the gap closes, or quantify the gap relative to the model's OOD KL and show it is within statistical noise. Without this, the quantitative OOD predictions in Fig. 7 do not provide evidence for completeness of the decomposition.
- [Sec. 3.2 / App. I.2] The phase identification protocol distinguishes unigram vs. bigram and retrieval vs. inference, but the shuffle perturbation only destroys first-order transition structure and cannot rule out trigram or higher-order strategies. The arbitrary-algorithm control in App. I.2 shows that the four proposed algorithms receive higher weight than random ones, but this is a discrimination result, not a completeness result; it does not exclude a fifth meaningful algorithm that lies outside the tested set. The paper should state this limitation explicitly and, ideally, test a trigram or other higher-order baseline in the LIA optimization to demonstrate that the four-algorithm basis is not an artifact of the chosen dictionary.
- [Sec. 4.1, Fig. 6-7 and App. A.3.4] The LIA weights are optimized on 300 ID chains and evaluation averages are taken over 30 transition matrices, but the reported curves in Fig. 6 and Fig. 7—and the phase diagrams in Fig. 5 and Fig. 8—do not show error bars or confidence intervals. This makes it difficult to assess whether the sharp transitions and phase boundaries are statistically robust. The authors should add error bars (e.g., via multiple seeds or bootstrap over evaluation matrices) at least for the LIA weight trajectories and the OOD prediction curves, particularly at phase boundaries where the linear fit is reported to be slightly worse (App. I.1).
minor comments (3)
- [App. C.1, item 1] There is a duplicated sentence fragment: "We reproduce this data diversity threshold in We reproduce this phenomena as seen in Fig. 1 (a), Fig. 3 (a,c) and Fig. 27 (a)." This needs to be edited.
- [App. C.2.3] The same section heading, "Effects of equi-FLOPs training while varying model size," appears twice in succession; the second occurrence should be reworded to reflect the actual content (e.g., "Effects of equi-FLOPs training across model sizes").
- [Fig. 3 caption] The caption refers to a "ruby vertical dashed line," but color terms may not be robust in grayscale or for color-blind readers; consider using a label or a distinct line style instead.
Circularity Check
No circular derivation: LIA weights fitted on ID data are applied to independently computed OOD algorithm probabilities, and the paper explicitly reports the residual bias of its own decomposition.
full rationale
The paper's derivation chain is not circular in the load-bearing sense. The four algorithms are defined as closed-form Bayesian/empirical estimators (Eqs. 2-6), and the phase probes in Sec. 3.2 operationalize the same unigram/bigram and retrieval/inference axes; this is a diagnostic classification of model behavior, not a derivation of the algorithms from the phenomena they are claimed to explain. The LIA weights in Eq. 7 are fitted to in-distribution model next-token probabilities, and the OOD predictions in Sec. 4.2 use those same weights with algorithm probabilities evaluated on OOD contexts (Eq. 13). Since the model's OOD KL is not part of the fitting objective, the transient-ICL explanation is an extrapolation rather than a fitted artifact. Appendix I.2's control with arbitrary algorithms shows the fitted weights discriminate against irrelevant dictionary elements, which supports the meaningfulness of the chosen basis, though it does not prove completeness against an omitted fifth strategy; that is an empirical-modeling limitation, not circularity. Appendix K explicitly acknowledges that the predicted OOD KL is systematically slightly worse than the model's actual OOD KL, and interprets it as an imperfect decomposition rather than hiding it. The only self-citation (Bigelow et al., 2023, involving two of the present authors) appears in the intro as one of several probabilistic-automata references and is not load-bearing for any central claim. No equation-level reduction of a predicted result to a fitted input or to a self-citation chain is exhibited, so the appropriate finding is no significant circularity.
Assumptions & free parameters
free parameters (2)
- LIA mixing weights (Uni-Ret, Bi-Ret, Uni-Inf, Bi-Inf) =
varies with N and step; see Fig. 6
- Laplace smoothing constant in Bi-Inf (Eq. 6) =
1
assumptions (5)
- domain assumption Sequences are generated by a finite mixture of Markov chains with rows sampled from Dirichlet(1/k).
- domain assumption The next state depends only on the current state (Markov property).
- ad hoc to paper The four algorithms (Uni-Ret, Bi-Ret, Uni-Inf, Bi-Inf) span the model's behavior, so a nonnegative linear combination captures p_model.
- standard math Shuffling the context preserves unigram statistics while destroying bigram statistics.
- domain assumption The retrieval-proximity test (Eq. 11) correctly distinguishes retrieval from inference solutions.
Cite this review
Pith. "Pith review of Competition Dynamics Shape Algorithmic Phases of In-Context Learning." pith.science (2026). https://pith.science/paper/AQGRVWJI
@misc{pith2026241201003,
author = {Pith},
title = {Pith review of: Competition Dynamics Shape Algorithmic Phases of In-Context Learning},
year = {2026},
howpublished = {\url{https://pith.science/paper/AQGRVWJI}},
note = {Machine review of arXiv:2412.01003}
}
read the original abstract
In-Context Learning (ICL) has significantly expanded the general-purpose nature of large language models, allowing them to adapt to novel tasks using merely the inputted context. This has motivated a series of papers that analyze tractable synthetic domains and postulate precise mechanisms that may underlie ICL. However, the use of relatively distinct setups that often lack a sequence modeling nature to them makes it unclear how general the reported insights from such studies are. Motivated by this, we propose a synthetic sequence modeling task that involves learning to simulate a finite mixture of Markov chains. As we show, models trained on this task reproduce most well-known results on ICL, hence offering a unified setting for studying the concept. Building on this setup, we demonstrate we can explain a model's behavior by decomposing it into four broad algorithms that combine a fuzzy retrieval vs. inference approach with either unigram or bigram statistics of the context. These algorithms engage in a competition dynamics to dominate model behavior, with the precise experimental conditions dictating which algorithm ends up superseding others: e.g., we find merely varying context size or amount of training yields (at times sharp) transitions between which algorithm dictates the model behavior, revealing a mechanism that explains the transient nature of ICL. In this sense, we argue ICL is best thought of as a mixture of different algorithms, each with its own peculiarities, instead of a monolithic capability. This also implies that making general claims about ICL that hold universally across all settings may be infeasible.
Figures
Figures from the paper (39 more)
Forward citations
Cited by 6 Pith papers
-
Mechanistic Foundations of Goal-Directed Control
Context window k is the critical parameter for arbitration-gate formation in an embodied control architecture: no circuit below k≤4, resolved phase structure above k≥8, with EMA-like commitment dynamics.
-
ICLR: In-Context Learning of Representations
As in-context examples grow, Llama-3.1-8B reorganizes its concept representations to mirror the connectivity structure of a graph defined entirely in context.
-
Sequential Correlations Change In-Context Learning: Effective Context Length and Architectural Mismatch
Within-context token correlations reduce ICL to an effective shorter i.i.d. context length, while query–context correlations lower error and favor softmax over linear attention.
-
Distinct Computations Emerge From Compositional Curricula in In-Context Learning
When transformer models see easy component examples before a harder combined math problem in one prompt, they solve unseen versions of the combined problem and store intermediate steps internally, unlike models traine...
-
Decomposing Elements of Problem Solving: What "Math" Does RL Teach?
Reinforcement learning (GRPO) on math LLMs primarily increases execution robustness on already-solvable problems, not planning or coverage of new problems.
-
The broader spectrum of in-context learning
The authors propose a broad definition of in-context learning as any sequence task where context reduces loss, and argue research should study this wider spectrum.
Reference graph
Works this paper leans on
-
[1]
k: The number of states in the Markov chain, fixed to 10 unless mentioned otherwise
-
[2]
l: The length of the sequence generated, fixed to 512 unless mentioned otherwise
-
[3]
URL https://arxiv.org/abs/2405.15618. Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth ´ee Lacroix, Baptiste Rozi `ere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkor...
arXiv 2023
-
[4]
Task Retrieval to Task Learning transition: Researchers have classified the operation of ICL as either “task retrieval” or “task learning” (Min et al., 2022; Pan et al., 2023). To this end, such papers explore effects of, e.g., shuffling next-token predictions in few-shot tasks and finding that one can still achieve almost similar performance as the scena...
work page 2022
-
[5]
This phenomena is empirically observed in Xie et al
Early Ascent: Early ascent describes the phenomena where the error/risk on an ICL task initially increases before decreasing. This phenomena is empirically observed in Xie et al. (2021) while Lin & Lee (2024) suggests an explanation with the linear regression setting. In this work, we show that this phenomena can be reproduced when training with an interm...
work page 2021
-
[6]
,211} for the main experiments
N: The number of training matrices, N ∈ {22, 23, . . . ,211} for the main experiments. The set of Markov chains used for training is constructed by drawingN transition matrices. We draw each row of each transition matrix from a Dirichlet distribution with parameter α = 1k. We index individual transition matrices via a subscript, i.e., Tn and use square br...
work page 2019
-
[8]
Emergence of Non-Bayesian ICL with data diversity : Prior work exploring linear regression tasks shows that ICL performance drastically improves on OOD data with increase in data di- versity Ravent´os et al. (2023); Kirsch et al. (2022); Lu et al. (2024). In specific, Ravent ´os et al. (2023) shows that there is a threshold needed for a “non-Bayesian” ICL...
work page 2023
-
[9]
Optimization Limited Emergence
Formation of induction heads and variants : Induction heads are a specialized attention head that help infer next-token predictions in a context-conditioned manner Elhage et al. (2021); Ols- son et al. (2022); Reddy (2023); Edelman et al. (2024); Aky ¨urek et al. (2024). Often, there is a sudden loss drop that correlates with induction head formation, and...
work page 2021
Show all 20 references
-
[10]
(2023); Anand et al
Transient Nature of In-Context Learning : Recently researchers have found that ICL can be transient during pre-training Singh et al. (2023); Anand et al. (2024); Panwar et al. (2024). In this work we show that this happens when a solution performing better on the training set ...
2023
-
[13]
General Purpose ICL
Bounded Efficacy: Bounded efficacy of biased label ICL is observed empirically in Min et al. (2022) and coined as a term in Lin & Lee (2024). In this work, we show that this happens when the model’s algorithm is a superposition of a retrieval solution and an inference solution...
2022
-
[14]
Random model’s ability to reconstruct a transition matrix: We take a randomly initialized model and report the KL it achieves when trying to reconstruct a transition matrix
-
[15]
inference
Trained model’s ability to reconstruct an unseen transition matrix: We take a trained model, sample an unseen transition matrix, and analyze whether we can reconstruct such an unseen 3Performing this analysis over all seen matrices can be prohibitively expensive, requiring ana...
2023
-
[16]
Panel (a): We observe a very robustBi-Ret solution for N = 22, a very low data diversity
-
[17]
Panel (c): We observe a highly non-monotonic OOD KL divergence forN = 25, a medium data diversity
-
[18]
Specifically, the model first finds the Bi-Inf solution and then moves to a retrieval solu- tion which harms the OOD KL
Panels (d, e): We observe at high data diversity N = 2 6, 28 the transient nature of ICL. Specifically, the model first finds the Bi-Inf solution and then moves to a retrieval solu- tion which harms the OOD KL
-
[19]
memorizing
Panel (f): At a very high data diversity ( N = 211), we observe that the Bi-Ret solution does not show up (at least not noticeably) within the compute budget. We show both the ID and OOD KL divergence of the model and different solutions at fixedN, step, and across context len...
2021
-
[25]
Another question with a slightly different implication is whether the circuit supporting the solution did in fact already emerge, yet is not used
One natural question is whether it could emerge with data diversity under 26, but is just not ob- served due to Uni-Ret and Bi-Ret being found first. Another question with a slightly different implication is whether the circuit supporting the solution did in fact already emerg...
-
[2021]
Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, et al
https://transformer-circuits.pub/2021/framework/index.html. Nelson Elhage, Tristan Hume, Catherine Olsson, Nicholas Schiefer, Tom Henighan, Shauna Kravec, Zac Hatfield-Dodds, Robert Lasenby, Dawn Drain, Carol Chen, et al. Toy models of superposi- tion. arXiv preprint arXiv:220...
2021 arXiv
-
[2023]
BAYESIAN
instead of the default learning positional embedding, which significantly delayed the emer- gence of Bi-Inf. Further discussion about these results are in App. F.2. All matrix weights are ini- tialized as N (0, 0.02) except residual projections which are initialized as N (0, 0...
2019
-
[2024]
URL https://arxiv.org/abs/2306.04891. Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas K ¨opf, Ed- ward Yang, Zach DeVito, Martin Raison, Alykhan Tejani, S...
2019 arXiv
Reviewed August 12, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.