Explore the research collection
6 entries · Follow this search
- Paper
Post-Training Gemini 4 for Real Engineering Work
Melvin Johnson (VP, Gemini post-training lead, Google DeepMind), 'Post-Training Gemini 4 for Real Engineering Work' (AI Engineer Code Summit, Nov 12 2026; video on YouTube). The talk's core claim: the post-training bottleneck is now task supply, not compute - easy tasks give zero RL signal, because when every rollout on a prompt is correct there is no variance and hence no gradient, and the share of learnable prompts shrinks continuously across successive model iterations. DeepMind's response is a four-step loop run continuously: source hard tasks, grade them like an experienced reviewer, run large-scale RL, then dogfood candidate models with Google's 100,000+ internal engineers (blind comparisons, experimental routing in Antigravity) and feed their failures back as next-generation tasks. Task sourcing: prune 100%-solved single-file tasks; mine real commits and diffs from multi-file repositories and Google's production codebase (production-mined diffs average ~20x the diff size of SWE-bench Verified); build-from-scratch tasks from an empty folder and a written spec; thousands of open-ended tasks graded without pre-existing unit tests. Grading: binary unit tests replaced by multi-criteria rubrics auto-generated from landed PRs (pr_rubric.yaml - root cause, edge cases, scope hygiene, verification), explicitly penalizing 'passing slop'; because agents trained to pass tests bypass checkers and fake evidence, evaluation environments are isolated (git history and remotes removed so answers cannot leak). Honesty: helpfulness is named as a driver of fabrication; models are trained to ground final claims in the actions actually taken and to report partial progress rather than fake completion - fabrication on a hard internal engineering eval fell from 8% (baseline) to ~3% (Hydrogen) to ~1.5% (Carbon), with zero as the stated goal. Context claims: AI now writes ~75% of Google's new code; the attached slide puts Gemini 4 Hydrogen at 57% on Terminal-Bench 4.0 (up from 19.1% for 3.8 Flash) and 2.5x faster than competing models in its class. Flags, as entered: first-party talk, all numbers Google-reported and internal where noted; cataloged from the talk video plus transcript/secondary coverage - the sharing thread's later posts were not read. For the user: a frontier lab's production post-training recipe - the saturation-pruning rule (a prompt with no rollout variance carries no signal) and the rubric-over-unit-test grading design transfer directly to his RL environment and data work, and the fabrication thread pairs with IDs 1806/1861 and the staged Wen entry (slot 32) on grader-shaped dishonesty.
- Paper
A Fix for Softmax and Cross-Entropy
Shows that the standard softmax + cross-entropy implementation (JAX, PyTorch, TensorFlow — all named) silently computes WRONG gradients in finite precision, via two distinct failures, and fixes both by pure reformulation (no higher-precision casting). BUG 1 — SOFTMAX COLLAPSE (hard targets): implementations shift logits by their max, then form the denominator as 1 + e^(−m) where m is the target logit margin; values added to 1.0 are lost to rounding, so once the margin exceeds the PRECISION CLIFF (c ≈ 5.5 in bf16, 16.6 in fp32, 36.7 in fp64) the denominator rounds to exactly 1.0 — the target logit's loss and gradient round to exactly 0, but the NON-target gradients do not (they never add 1.0, staying accurate down to underflow at m ≈ 88), so the gradient silently loses one entry and no longer sums to zero. BUG 2 — SOFTMAX CANCELLATION (soft targets / distillation / KL): standard soft-target CE softmaxes student and teacher separately and subtracts probabilities; rounding destroys the logit difference δ as z_S → z_T, and the forward/backward operation sequences differ so q ≠ p to machine precision EVEN WHEN z_S = z_T exactly — a nonzero gradient noise floor where the true gradient is 0. THE FIX: for hard targets, exclude the argmax/target from the log-sum-exp, compute the margin, combine via softplus(−m), and let autodiff produce the target gradient as the negated sum of the non-target gradients (Σg = 0 by construction, accurate down to underflow); for soft targets, pass teacher logits into the loss and compute q − p IN LOG SPACE from δ using expm1/log1p with a final Σg = 0 correction — gradient exactly 0 when z_S = z_T (implemented via a custom-gradient stop_gradient trick, ~15 lines). SLINGSHOT EXPLANATION: after memorization, margins grow; once a batch sits entirely above the cliff, parameter gradients nearly vanish, Adam's v̂ decays toward zero while weight decay shrinks the weights — until a few examples drop back below the cliff, their gradients abruptly switch back ON and get divided by the decayed √(v̂)+ε, producing a huge step → loss spike → repeat. This gives the Slingshot phenomenon (Thilak et al. 2022) a complete causal mechanism. MARGIN EQUILIBRIA (§5, standalone result): at an AdamW stationary point |g_i| ≈ ε·λ·|θ_i| and |g| ∝ e^(−m) after memorization, so margins saturate at m*(ε) ≈ log(1/ε) — independent of η, β1, β2 (RMSProp and LaProp share it). Default ε=1e-8 is pathological in fp32: its equilibrium log(1/ε) ≈ 18.4 sits JUST ABOVE the fp32 cliff 16.6, so standard CE hits the cliff right before equilibrium; for ε ≥ 1e-7 the equilibrium (≤16.1) sits below the cliff and training settles without spiking. RESULTS (ALL first-party toy experiments — grokking testbeds, 1-layer width-64 ReLU Transformers and 2-layer MLPs on modular arithmetic, full-batch AdamW; NO LLM-scale experiment anywhere): slingshot setting (a+b mod 31, λ=1, ε=1e-8, 5 seeds) — standard CE repeatedly spikes and degrades grokking, 94 ± 5% vs fixed CE 100 ± 0%; no-weight-decay setting — standard CE tracks fixed CE to 61% accuracy until m hits c₃₂ at ~step 1250, where one spike drops accuracy 61% → 23%; fixed CE continues smoothly to 85%. Precision × ε grid: fixed CE reaches 99–100% in bf16, fp32 AND fp64 at every ε, with final margins matching log(1/ε) predictions; standard CE stalls at its format's cliff (bf16 accuracy ~93–95%, fp32 ~94–97%), and even fp64 breaks at ε=1e-16. Prior-work baselines on the same grid: Zero-sum Projection (Liu et al. 2026) collapses to ~49% at ε ≤ 1e-12; StableMax (Prieto et al. 2025) trails fixed CE at every ε with margins blowing up to 10³–10⁴. Four literature grokking benchmarks: fp32 fixed CE matches fp64 standard CE and reaches 100% on all four. DISTILLATION DRIFT (§7): student initialized EXACTLY at teacher weights should not move; with standard soft-target CE the residual gradient is ~1e-17 in fp64 (student stays), ~1e-8 in fp32 (brief KL spike), and ~1e-3 in bf16 — Adam normalizes it into full-size steps, driving the student AWAY from the teacher and degrading accuracy; fixed CE returns g = 0 exactly at all precisions. Caveats: TOY SCALE ONLY — the authors concede (§8) the extreme margins and near-zero student–teacher gaps probed are uncommon in standard large-scale training; whether LLM training actually sits above the cliff in practice is asserted plausible, not demonstrated (mitigating: most LLM stacks compute the loss in fp32, cliff 16.6; the bf16 cliff at 5.5 is low enough that very confident tokens could plausibly cross it — extrapolation, not a result). The distillation experiment is the degenerate identical-initialization case; real student–teacher gaps are larger, where the cancellation error is proportionally smaller — practical drift magnitude unmeasured. "Bug" is a framing choice: the formulas are correct in exact arithmetic; the failure is evaluation order (though the computed gradient is genuinely wrong — sign flips, deleted entries, Σg ≠ 0 — and prior mitigations existed: fp64 casting, StableMax, zero-sum projection; the contribution is the direct fix + the Slingshot/equilibrium explanation). The equilibrium derivation is idealized (stationary point); the Slingshot is not always harmful on the paper's own account (with pre-LN and no weight decay, spikes act as accidental LR decay); "no meaningful slowdown" is claimed without timing benchmarks. Paper is one day old, no independent replication.
- Paper
Simulating Training Spikes of Deep Neural Networks by Layer-wise Random Feature Models
A mechanism paper for training spikes — the sharp temporary train+validation loss surges in LLM pretraining. Diagnostic starting point: ordinary loss fluctuations are driven by data shuffling and reproduce identically across seeds, but spikes occur at DIFFERENT steps for runs differing only in initialization, so spikes are not caused by a single bad data point and outlier removal cannot fully fix them. TOY MODEL (PLRF): a Power-Law Random Feature model — fixed random Gaussian features feeding linear regression, inputs power-law scaled with exponent α. Two necessary conditions for spikes in PLRF: (1) heavy-tailed data (large α) and (2) learning rate near the divergence threshold. At α=0.3 raising the LR just diverges cleanly; at α=0.9 BOTH SGD and Adam produce genuine spikes before divergence (claimed as the first explicit link between training spikes and heavy-tailed data). MECHANISM: decompose the iterate into deterministic full-batch descent plus a random walk accumulating stochastic gradient noise. Concentration of measure makes the loss concentrate on its expectation IFF α ≤ 0.5 (equivalently Σλ_i diverges for eigenvalues λ_i ∝ i^(−2α)); for α > 0.5 a few very large eigenvalues dominate, and when the noise random-walks into alignment with a large-eigenvalue direction, the loss surges. The EXPECTED loss stays smooth — average-case scaling-law analyses remain valid but stop describing individual runs. Side result: spikes occur in convex quadratic models under stochastic optimization — the 3rd-order terms needed for Edge-of-Stability spikes under full-batch GD are NOT necessary once gradient noise exists; and the SGD divergence threshold is not 2/λ_max but solves (1/B)·Σ γλ_i/(2−γλ_i) = 1 — sharpness (λ_max) is only distantly relevant; the whole eigenvalue distribution is what matters. LAYER-WISE SIMULATOR (Algorithm 1): each layer gets a 2nd-order Taylor expansion of validation loss around a checkpoint (per-example gradient second moments factorize through the activation-correlation spectrum — Prediction 5, verified with relative error <0.1, mostly within 5%, across layer types and steps); from ONE checkpoint + one validation pass (activation-correlation eigendecomposition, mean gradient, mean squared per-batch gradient norm, Hessian trace via Hutchinson probing), synthesize Gaussian per-batch gradients and roll the real optimizer map forward — ~5 seconds on CPU for 1,500 steps for one layer, vs 8 min–1.7 hrs of measurement on TPUv4×32 and 40 hrs to train the case-study model. CASE STUDY: vanilla 1.3B decoder-only Transformer (24 blocks, d=2048, C4, ~25.5B tokens, AdamW β2=0.95, peak LR 8.2e-4, NO gradient clipping); changing only β2 0.95 → 0.999 induces spikes (two seeds). Simulating from the step-21k checkpoint, the normal configuration stays comparatively smooth while both spiky configurations show clear bumps — matching the qualitative fact of spikiness, NOT the step (spike timing is random by construction). Activation-correlation eigenvalues are power-law distributed and MORE heavy-tailed for the spiky configuration, especially in lower layers. EQUIVALENT BATCH FACTOR: despite ~524K tokens per batch, the measured equivalent batch factor 𝔅 ≈ 1 — for gradient-noise purposes Transformer LM training sits in the SMALL-BATCH stochastic regime, because per-token gradients vary wildly; token-count batch size does not buy the gradient-noise suppression sequence-count reasoning suggests. β2 RECIPE: make Adam's second-moment decorrelation time ~1/√(η_t·H) instead of ~1/(η_t·H), giving β2 ≈ 1 − √(η_t·𝔗/√𝔑) from measured Hessian trace 𝔗 and per-batch gradient norm 𝔑 — generically an INCREASING β2 schedule as LR decays; fitted schedule β2 0.982 → 0.992 gave final val loss 2.4404 vs 2.4421 for constant 0.95 and 2.4502 (visibly spiky) for constant 0.992 — real but TINY margins (0.0017 over the original; 0.0001 over the best constant), single runs, no seed variance; the sharper finding is the sensitivity — a 0.01 change in constant β2 flips training between smooth and spiky. Caveats (authors' own, unusually candid): the simulator explains spikes only PARTIALLY — measured 2nd-order terms show level "jumps" rather than spike-and-recovery, 1st-order terms are ~20× larger than the quadratic model predicts; cross-layer correlations and >2nd-order terms are needed and absent; the honest claim is "quadratic models at least partially reveal the mechanism," weaker than the abstract's "successfully predicts." "Prediction" is qualitative — a spike-RISK screen from a checkpoint, not a forecast of when. The layer framework rests on imposed assumptions (Gaussian latents with negligible drift; isotropic output-gradient covariance) and EXCLUDES tied embedding/LM-head weights entirely. The β2 mechanism is admittedly unexplained ("a curious mystery"); the recipe is offered as proof of concept. Simulator accuracy degrades badly with batch size in the PLRF check (severe overestimation at B=64) — the DNN case is argued safe only because 𝔅 happens to be ≈1 for this recipe. Single case study: one size (1.3B), one dataset, one recipe, spikiness constructed by pushing β2, no gradient clipping (atypical for production pretraining); Muon is mentioned only as neighboring spectrum work, NOT simulated. All results first-party, no independent replication, paper ~2 weeks old.
- Model
Mirendil-Base — Pretraining at Scale Without a Pretraining Team (Mirendil)
Mirendil — formally launched late June 2026 with a $200M seed at a $1B valuation (a16z + Kleiner Perkins co-led, NVIDIA participating), mission "solve Recursive Self-Improvement (RSI) and use it to democratize frontier AI development" — reports a controlled experiment: starting fully from scratch, can one researcher with AI agents pretrain a strong coding model at scale, with radically less time, headcount, and compute? Claimed result (ALL company-reported, unreplicated): Mirendil-Base, a code-specialized base model, was built by ONE researcher in 3.5 months for < $10M compute, all-in — research, small-scale experiments, agent token spend, data processing, and the final training run. Per the blog: AI agents wrote over 99% of the code, ran experiments, and diagnosed failures; the researcher chose what to try and what to trust. All code was written from scratch from an empty repository on standard libraries (PyTorch, JAX), using open-source projects as references. Training data was organic public data only (GitHub and other public code, web pages, public datasets) — no distillation, no synthetic data, nothing purchased or licensed. Efficiency gains are attributed, without specifics, to an improved architecture, data-mixture tuning, and kernel optimization. Sizes are disclosed ONLY as ranges: Mirendil-Base 100B–500B params; Base-Large 500B–2T (80% through training at announcement); Base-XL 2T–10T (19% through). No exact parameter count, architecture details, training-token count, or hardware is given. Evidence offered is BPB (cross-entropy in bits per byte — loss per byte of text, so models with different tokenizers compare fairly) on code. Fig. 1, BPB on held-out code from Mirendil's OWN repositories (home-turf eval set): Mirendil-Base-Large 0.2177 (still training), Mirendil-Base-XL 0.2181 (still training), Kimi-K3 0.2387, Mirendil-Base 0.2803, Nemotron-550B-Base 0.2918, GLM-5.3 0.2926, DeepSeek-V4-Pro-Base 0.3013, Inkling 0.3467. Fig. 2, BPB on SEVEN EXTERNAL repositories published AFTER the models were trained (post-cutoff, so contamination-resistant by construction) — averages: Kimi-K3 0.193, Mirendil-Base 0.222, GLM-5.3 0.242, DeepSeek-V4-Pro-Base 0.243, Nemotron-550B-Base 0.247; per-repo (codex-sec, grok-build, openworker, json-render, native, scriptc, anydoc), Mirendil-Base finishes second overall, ties Kimi-K3 on json-render (0.127) and GLM-5.3 on native (0.257), and beats Nemotron-550B-Base, GLM-5.3, and DeepSeek-V4-Pro-Base on the remaining rows. Comparison models are all MoE (total/active params: Kimi-K3 2.8T/104B, Nemotron-550B-Base 550B/55B, GLM-5.3 753B/40B, DeepSeek-V4-Pro-Base 1.6T/49B, Inkling 975B/41B). Baseline caveat stated by Mirendil itself: Kimi-K3, GLM-5.3, and Inkling are post-trained models, which generally score slightly worse on BPB than their base versions. Post-training of Mirendil-Base has started; independent evaluations, post-training benchmarks, and API access are promised but NOT yet delivered — no weights, no API, no third-party numbers exist as of the check. Bakouch's comment (the shared post): the external-repo BPB results make it stronger; it appears to be a code-only model; the team "rewrote the full codebase from scratch with agents"; aligns with his Prime Intellect autoresearch work and his view that frontier pretraining doesn't need large teams.
- Paper
Beyond Parameters: Exploring Virtual Logic Depth for Scaling Laws
Proposes virtual logical depth (VLD) as a fourth scaling dimension alongside depth, width, and parameter count: VLD = effective algorithmic depth minus base layer count, increased by repeating whole transformer layers with tied weights inside the computation graph, during training and/or inference — not token-wise test-time scaling. Three reuse patterns (after Takase & Kiyono 2021): sequence (adjacent layers share parameters in uniform blocks), cycle (a block of layers repeated), and inverse cycle (the block repeated in reverse order, motivated by larger gradient norms in higher layers). Repetition factors ×1–×3, cycle up to ×5. Two controlled measurements. (1) Knowledge capacity, operationalized Allen-Zhu & Li-style as absorbed entropy ΔH: train a model to memorize a 640k-token IID random sequence over a 50,257-token vocabulary (~15.6 bits/token, sized to the ~2 bits/parameter estimate) and measure the entropy reduction of its softmax outputs on the training sequence. Across 4-layer GPT-2 models of 5M/10M/15M/20M parameters, capacity grows with parameter count; at fixed parameters (5M and 20M tested), absorbed entropy stays nearly unchanged across all three patterns and factors ×1–×3 (reported in Fig. 4, graphically). (2) Reasoning, measured on synthetic iGSM (500K problems, trained at ≤15 operations, exact-answer accuracy, greedy decoding): GPT-2 models of 4/8/12/16 layers (≈50M/100M/150M/200M) trained from scratch. Cycle is the strongest pattern: the 4-layer model's op15 accuracy rises 46.3% (base) → 62.1% (×2) → 70.7% (×5), and the gains grow under depth distribution shift (op20: 21.8→43.8; op21: 21.2→40.2). A 50M cycle ×2 model (effective depth 12) scores 62.05%, beating the native 12-layer 150M model (61.15%) — reasoning decoupled from parameter count. Real-world check: LLaMA-3.2-3B-Instruct with Cycle VLD inserted before LoRA fine-tuning (both arms from identical pretrained weights, same 2.3B-token multi-domain SFT corpus) improves over base on Math500 30.40→35.40, GPQA 29.80→32.32, AIME 3.33→6.67, HumanEval 37.79→39.52, MBPP 38.36→40.22. "Properly implemented" is load-bearing: pattern and placement matter — inverse cycle at ×1 underperforms the base model (4-layer op15 43.9 vs 46.3; 8-layer 53.3 vs 60.5), and in an 8-layer placement ablation, cycle reuse on later layers only (5–8) scores 64.2 vs 62.0 for all layers and 54.2 for early layers only (below the 60.5 no-VLD baseline). Scaling is also non-monotonic: cycle ×3 dips below ×2 on the 4-layer model (61.6 vs 62.1), and effective depth 32 underperforms depth 16 — the authors flag possible fixed points. No fitted scaling-law functional forms or exponents are given; the laws are qualitative (knowledge ∝ parameters; reasoning ↑ with VLD). Caveats: synthetic experiments cap at 200M from-scratch GPT-2 models; the real-world evidence is a single 3B model with LoRA-only fine-tuning and small absolute gains (AIME 3.33→6.67 is one additional problem in 30); knowledge capacity is a synthetic memorization probe, not natural knowledge; all reuse experiments train (or fine-tune) with the reuse graph in place — inference-only looping of a conventionally trained model is not tested; multi-seed statistics deferred to future work (authors' Appendix I).
- Paper
LAST: Looped Audio Spectrogram Transformer
One full spectrogram pass through D=6 shared blocks, then audio tokens freeze; later passes update only the class token by attending to cached audio keys/values (K/V computed on pass 2, reused). End-to-end training with gradients reaching the first pass. Cached class-token pass costs O(D(C²+NC)) vs O(D(NC²+N²C)) full — the quadratic-in-N term vanishes. On AudioSet (1.9M train / 18,886 eval, from scratch, 12 epochs): R=10 reaches 0.3450 mAP vs 0.3379 for sequential 12-layer AST — +2.1% relative with 49.4% fewer parameters (43.5M vs 86.1M), 42% fewer MACs, 9.8% higher throughput. Passes 2→10 add only 1.2% compute; mAP rises monotonically. Key control: naive full-token recurrence with the same blocks gets worse (0.3247→0.3099 mAP, R=2→10) at ~8× MACs — the gain is specific to class-token-only loops. Robustness: leads sequential D=12 in all 12 corruption families (38 settings; family-mean 0.2651 vs 0.2422) and under temporal masking (0.1383 vs 0.0905). Frozen-feature probe wins 5/8 tasks (FMA-Small 43.5→50.9%; ESC-50, VGGSound, DCASE). Caveats: single seed, trained from scratch; each pass-count data point is a separately trained model — nothing establishes a trained LAST benefits from more passes at inference; absolute mAP modest; no win on speech keyword spotting or US8K — gains concentrate in music/events/environmental tasks.