SearcharxivSearch

arXiv subjects

Niklas Forner

Publications and source records attributed to Niklas Forner.

2 recordsLinked to original sources

Learning Dynamics of Chain-of-Thought State Tracking in a Solvable Transformer Model

Chain-of-thought generation can turn a multi-step computation into a sequence of locally checkable state updates, but the training dynamics by which transformers acquire such updates remain poorly understood. We study this question in a solvable setting: a simplified one-block transformer trained by supervised next-token prediction on state sequences generated by composing permutations. The architecture separates fixed-lag action retrieval, learned by RoPE attention, from a specialized MLP logic module that applies the retrieved permutation to the current state. Using a statistical-physics mean-field description, we derive dynamics for three order parameters measuring attention retrieval, teacher-matrix alignment, and off-target logic overlap. These equations quantitatively match simulations for the order parameters and, combined with a logit-distribution approximation, qualitatively predict the sharp transition in final rollout accuracy. The analysis reveals staged learning: the logic module first learns a mixed heuristic; attention then locks onto the relevant action, enabling efficient MLP alignment. Together, these results provide a controlled mechanistic account of how attention-based retrieval and MLP-based logic co-develop during chain-of-thought state tracking.

cond-mat.dis-nn

BBP Phase Transition for an Extensive Number of Outliers

Random-matrix theory helps disentangle signal from noise in large data sets. We analyze rectangular $p \times q$ matrices $W = W_0 + M$ in which the noise $M$ generates a Marchenko-Pastur bulk, whereas the signal $W_0$ injects an extensive set of degenerate singular values. Keeping $\mathrm{rank}$ $W_0/q$ finite as $p,q \to \infty$, we show that the trace of the resolvent of $W^{\top} W$ obeys a quartic equation for one degenerate signal, yielding an exact spectral density, and derive explicit asymptotics in the strong-signal regime. We map out a detailed generalized Baik-Ben Arous-P\'ech\'e (BBP) phase diagram and clarify how a finite density of spikes reshapes the bulk edges. We further derive a $1/3$-scaling law for the critical signal strength in terms of the rank ratio for rectangular matrices in the finite-to-extensive-rank crossover. Numerical simulations validate the theory and illustrate its relevance for high-dimensional inference tasks with multiple degenerate signals and more general signal distributions.

cond-mat.dis-nn