Explore the research collection
2 entries · Follow this search
- Paper
Multi-Token Prediction Done Right (Soft Multi-Token Prediction / Soft-MTP)
Standard multi-token prediction (MTP) trains each future-token head with cross-entropy against the data. This paper shows that gradient decomposes EXACTLY into two parts: a KL self-distillation term that pulls each MTP head toward the model's own position-aligned next-token (NTP) distribution — the distribution that will later verify its drafts in speculative decoding — and a residual term equal to the NTP cross-entropy gradient against the one-hot target. The residual is the problem: it carries ~4x lower signal-to-noise ratio than the KL term (4.1x at 167M, widening to 4.6x at 1.2B, because its signal is the shrinking NTP error while its one-hot sampling noise is irreducible), yet it accounts for ~80% of the MTP gradient reaching the shared trunk, and a unit step along it consistently INCREASES NTP loss — it is anti-aligned with the NTP update, increasingly so with scale. The fix is the KL gradient-recovery trick: when two distributions share a linear output head, the KL gradient can be recovered exactly by combining the two cross-entropy gradients through straight-through routing — in code, one line added to the NTP hidden state (h0[:, k:] += hk.detach() - hk, with a rescaling factor in the real implementation) leaves the forward numerics untouched while routing the negative NTP-CE gradient into each MTP head, exactly cancelling the residual. No KL is ever computed, no vocabulary-sized logit matrices are materialized, and it stays compatible with fused cross-entropy kernels — unlike explicit KL self-distillation or its top-k / argmax approximations. The result, Soft-MTP, works for both DeepSeek-style sequential and Meta-style parallel MTP, adds no parameters, and has no measurable overhead. Experiments: LLaMA-style models 167M–1.2B, DeepSeek-style MTP with K=3 heads (each head 3.2% of trunk non-embedding params, lambda_MTP = 1.0), FineWeb-Edu ~31.5B tokens (60k steps, batch 0.5M tokens, seq 2048, ~1.3x Chinchilla for the largest size), trained with the Muon optimizer (update-RMS rescaling). Findings: Soft-MTP lowers NTP loss vs standard MTP at every scale with the gap widening with scale, and lowers MTP loss from 689M onward; self-speculative decoding improves in all five domains tested (FineWeb-Edu, Wikipedia, Books, Science, Math) at every scale — acceptance length +1.8–2.2% and speedup +1.4–1.5% on average, with MTP distributions measurably closer to the NTP verifier (lower KL and TV); zero-shot average accuracy improves over standard MTP at every scale (~+0.1 pt at 167M/332M, ~+0.5 pt at 689M/1.2B, where Soft-MTP also overtakes the NTP-only baseline); math and code fine-tuning at 1.2B is stronger. Against the expensive alternative, Soft-MTP matches or exceeds direct KL-divergence minimization on most metrics — keeping hard CE supervision at the LM head and routing recovered KL gradients only through the MTP heads and trunk is sufficient. The repo ships a test verifying the recovered gradient equals the explicit KL(q||p) gradient to machine precision in float64, plus toggles for hard_mtp / soft_mtp / direct_kl / ntp under one loss function.
- Benchmark
ForesightBench: Benchmarking Research Foresight in Large Language Models
Tests whether frontier models can predict empirical research outcomes without running code. An agentic pipeline converts fresh arXiv preprints (8–24 Aug 2026 window, post every published cutoff) into samples: a retrieval agent pulls one controlled within-paper comparison (method passage + setup + result row, method cells hidden), rewritten as a first-person researcher's note ending with the question; hidden method cells are the answer key. Every sample hand-audited. Corpus: 316 samples from 42 preprints; eval set: 42 samples (one per preprint), 268 graded slots. Metric: capped relative error e = min(|pred−true|/max(|true|,1e-6), 1); sample error = mean over slots, model error = mean over samples. 13 frontier models (OpenRouter, no web search, reasoning-high, temp 0.4) + local Qwen3.5 4B. Results: models get the direction right (Kimi K3 82%, GPT-6 Astra 80%, frontier 72–79%, 4B 65%) but are systematically conservative — undershoot on 52–67% of slots, median predicted move 0.49–0.91 of the real one. GPT-6 Astra lowest mean error 0.300 (median 0.169); copy-the-baseline reference 0.374. Reasoning tokens don't matter (1,038–11,011 tokens/sample, ~10× spread, no significant gains; Astra among the most frugal at 1,536). Error by area: safety-interp 0.45, agents 0.42, applied ML 0.38, LLM-train 0.26, llm-eval 0.17, vision 0.16 — holds for every model. Three failure modes from trace reading: unfaithful CoT; lapse in cognizance of the setup (mode-2 traces average 0.56 error vs 0.27 without — every model); proposal bias/sycophancy. Hardest samples: TRACE-Memory (83% of frontier calls directionally wrong), attention-mean pruning (67%), OPSD padding (40–47%). Inference-time intervention from the failure analysis: decompose the setup into threads/sub-threads (depth-2 recursive fan-out, cap 6/pass, built on pi 1.1.0) before any implementation — "the autoresearch loop must take cognizance of the entire setup before beginning implementation." Tested via a small autoresearch brief: task both the custom harness and vanilla pi (outer GLM 5.3 Flash, inner GPT-6 Luna, $4.00 inner budget/run) with building a long-horizon agent, evaluate the built agents on 75 held-out DABstep hard tasks, two seeds each: custom-harness agents 44.0%/48.0% (mean 46.0%) vs vanilla 40.0%/36.0% (mean 38.0%), and cheaper/faster at eval time (0.57/0.43¢ and 55/50s per task vs 0.86/0.80¢ and 107/120s). Caveats (author's own): two seeds → "indicative rather than conclusive," seed-to-seed spread half the between-arm gap; 42-sample eval set, small model gaps; no independent reproduction; contamination control is assumed, not verified, for three models without published cutoffs; all figures first-party.