Explore the research collection
2 entries · Follow this search
- Post
What objective is reasoning solving? Reasoning as pathfinding in token space
Alex Wang's essay reframes LLM reasoning as PATHFINDING in token space. Given a prompt x and a verifier r, the target is the set S_x of answers the verifier accepts; each sampled chain z is one path, and the success probability p_x is the total probability mass of paths landing in S_x. The core identity: with a binary reward, expected reward IS p_x, and its policy gradient is exactly REINFORCE - which, expanded, is one step of rejection-sampling fine-tuning (STaR-style) on the model's own successful paths, scaled by the current success rate M/N. Three consequences follow. (1) Why chains lengthen in RL but forcing a single chain longer stops helping: training shifts mass toward whichever paths landed - if successful paths tended to be longer (backtracking, environment feedback, luck), the model learns length; an individual path is never guaranteed to converge, so extra forced length can overshoot into overthinking. Only the DISTRIBUTION is optimized. (2) Best-of-k is the orthogonal, guaranteed axis: success rises as 1-(1-p_x)^k over SAMPLES, not length. (3) RL amortizes search: compute spent finding paths in training is baked into the weights, which is why a trained model often succeeds in one sample at inference. The frame also dissolves two puzzles: CoT faithfulness is not implied by the objective (the reward scores only the final answer; intermediate tokens are unconstrained means, correlated with truth only via pretraining), and reward hacking is geometric - an imperfect verifier makes S_x differ from the truly-correct set, its wrong-but-accepted region is often the EASIEST to reach, and scaling RL samples/length fuzzes the verifier harder, so hacking gets MORE likely with scale before training amplifies the shortcut. Author's conclusion: reasoning is not solving an objective per-path at all; guarantees exist only in aggregate over the path distribution. Flags, as entered: a conceptual essay, not new experiments - its value is the unifying frame (built on Brown et al. 2024 sampling scaling, STaR, Muennighoff et al. 2025, Gema et al. 2025); the binary-verifier setup is an idealization of graded/partial-credit rewards. Cross-references: ID 1695 (the author's associative-memory essay); the catalog's latent-reasoning thread (a path need not be made of tokens at all - the frame extends to latent paths, which is the author's stated motivation); and the monitorability thread - the faithfulness section is the cleanest short statement of why answer-only rewards cannot buy faithful chains.
- Post
You could have invented transformers from memory
A pedagogical explainer (not a research result) deriving linear maps, MLPs, and self-attention as associative key-value memory stores from first principles. The unifying quantity is the interference-to-signal ratio — interference from other stored memories vs the target's signal — and capacity is the number of memories before interference matches signal (random unit keys, query with a stored key). At d_k=64: outer-product linear store ≈64; optimal linear (least-squares/whitened keys) ≈128; ReLU MLP ≈128; squared ReLU / SwiGLU ≈2d_k²/3 ≈2,700–2,900; cubed ReLU ≈2d_k³/15 ≈35,000; self-attention with β=√d_k ≈e^{2√d_k−2} ≈1.2 million; β ∝ log M allows an essentially unbounded store (>2M in experiments). Derivations: interference terms add like a random walk (√M); σ(s)=ReLU(s)^p gives capacity M≈d_k^p; the exponential is a weighted sum of all powers, so capacity grows exponentially in the sharpness β: M≈e^{2β(1−β/d_k)} for β≪d_k; normalizing weights for numerical stability yields exactly f(x)=Vᵀsoftmax(βKx). Unlike MLPs, self-attention is non-parametric: keys/values come from context tokens, so the store grows with context length. Notes that the original transformer's v2/v3 described the feedforward layer as "a kind of attention" (passage removed from later versions) and tried replacing FFNs with learned-key-value attention at similar quality. The long-context section compares β∝log M tricks (Su 2021 entropy scaling, Scalable-Softmax, Qwen LogN-Scaling, Qwen2.5-1M YaRN scaling), driving the interference ratio to ~10⁻⁴ at 2M memories. Author-stated caveat: the count is random-vector recall of a single layer, ignoring training data; companion pointers to bits-per-parameter memorization work (Morris et al. ~3.6 bits/param; Allen-Zhu & Li ~2 bits factual knowledge/param). Includes interactive demos (sliders for M and β with live interference/signal visualization). Asides: a gradient-descent step is a memory write (Irie, Csordás & Schmidhuber); transformers' MLPs store facts in superposition.