Experiment report · nanoGPT · source-length ablation · single seed

Shuffled-component transfer works — but only from young models

Follow-up to the first shuffle-transfer run. The same aggressive transformation (permute all 12 MLPs and all 144 attention heads, reset the tied embedding, discard the optimizer) was applied to snapshots of one source model at 500, 1,500, 3,000, and 10,000 training steps. Each transformed model was retrained for 3,000 steps against the same scratch trajectory.

host: ubuntu@sun path: /home/ubuntu/gpt2-shuffle-transfer/runs/ablation run date: 2026-07-27 shuffle seed: 20260727 (shared)
Highlight · the headline question
Shuffling the components of a converged model gives negative transfer — retraining it is measurably worse than training from scratch.

The two most-trained sources are the closest thing to "converged" here, and both lose: the 3,000-step source (val loss 3.47, at the run's loss plateau) finished +0.0404 worse than scratch, and the 10,000-step source (val loss 3.15) finished +0.0858 worse and trailed at every one of the 13 matched checkpoints. Both penalties are Holm-significant, and the damage grows with source training. Positive transfer appeared only from a barely trained 500-step source (−0.0055) — the opposite of a converged model. Caveats: even 10k steps is not fully converged (loss was still falling), and this is one seed and one shuffle permutation.

Result: transfer is real, transient, and fades as the source model ages.

Components shuffled from a 500-step source beat scratch at all 13 matched checkpoints and finished −0.00548 validation loss better. A 1,500-step source gave the largest early speedup (−0.160 at retrain step 500) but crossed behind scratch and finished slightly worse. The 3,000-step source finished +0.0404 worse, and the 10,000-step source was worse at every checkpoint (+0.0858 final). All four final differences are significant after Holm correction on paired validation batches. Interpretation: partially trained components carry broadly reusable structure, but continued training specializes them to their original layer/head context — after shuffling, that specialization becomes a liability. Single source trajectory and one shuffle seed, so cross-seed generality is untested.

Headline numbers

Final validation loss after 3,000 retraining steps (1.47B tokens), versus scratch at 3.4720. Lower is better.

Source 500 · final Δ
−0.0055
better at 13/13 checkpoints
Source 1,500 · final Δ
+0.0131
but best early gain: −0.160 @ step 500
Source 3,000 · final Δ
+0.0404
crossed behind scratch at step 1,000
Source 10,000 · final Δ
+0.0858
worse at 13/13 checkpoints

Learning curves by source age

Darker blue = older source model. The ordering is clean and monotonic in age: every added unit of source training makes the shuffled components less useful to the retrained model, even though the source itself keeps improving (5.27 → 3.15 validation loss from step 500 to 10,000).

Validation loss vs retrain step

Linear axes · 13 matched checkpoints per condition · identical LR schedule (20k-step cosine horizon)

Gap to scratch at every checkpoint

Transfer − scratch validation loss · log-x · below zero = transfer ahead

Final gap vs source age

After 3,000 retrain steps · whiskers = paired 95% CI (tiny) · log-x

Whole-curve cost (AUC) vs source age

Validation-loss AUC − scratch AUC · integrates the early speedup · log-x

Validation loss · log–log

Retrain steps 250–3,000 · all five runs

Training loss · log–log

EMA (α 0.15) of per-10-step loss · retrain phase

The source model the snapshots came from

One uninterrupted 10,000-step scratch run · log–log · marked points are the four snapshot ages

Hover any panel for exact values. One optimizer step = 491,520 tokens; the source run processed 4.92B tokens by step 10,000.

Statistical check

Each checkpoint compares the same 100 validation batches, paired per batch: 20,000 bootstrap resamples for the 95% CI and a normal paired test with Holm correction across all 52 condition/checkpoint comparisons. This measures evaluation-sample uncertainty only — not variance across training seeds or shuffle permutations.

Source stepsSource val lossFinal val lossFinal Δ vs scratchPaired 95% CIHolm pAUC Δ
5005.27083.4666−0.00548[−0.00717, −0.00379]2.1e−09−0.03548
1,5003.80153.4851+0.01306[+0.01140, +0.01476]1.1e−50−0.01983
3,0003.47203.5124+0.04039[+0.03870, +0.04213]≈0+0.03932
10,0003.15303.5578+0.08580[+0.08382, +0.08783]≈0+0.13483
All four final differences exclude zero after Holm correction — strong evidence the saved models genuinely differ on sampled validation data. But the 500-step gain of 0.00548 is statistically detectable without being practically large, and the whole ablation shares one source trajectory and one shuffle seed.

All matched checkpoints

Validation loss difference to scratch at each retrain checkpoint. Green = transfer ahead of scratch.

StepScratch valΔ src 500Δ src 1,500Δ src 3,000Δ src 10,000

Transformation held constant

Every snapshot received the identical transformation (same realized permutations and embedding reset, seed 20260727), isolating source-training age as the only variable.

1MLP bag. All 12 complete MLP modules permuted across layers without replacement.
2Attention-head bag. All 144 (layer, head) pairs permuted across every slot; each head carries its Q/K/V rows and matching output-projection columns.
3Embedding reset. Tied token-embedding / LM-decoder matrix reinitialized once and kept tied.
4Optimizer reset. No optimizer state crosses the boundary; every retrain gets a fresh fused AdamW.
Preserved: positional embeddings, layer norms, layer-level structure. Retraining config identical to scratch: 6e-4 peak LR, 1,000-step warmup, 20,000-step cosine horizon, global batch 491,520 tokens, bf16, 4 × RTX 4090 D.
Schedule correction. The first exploratory run (the previous report) accidentally gave the transfer model a 3,000-step cosine decay horizon while scratch used 20,000. Those artifacts are archived under *_decay3000 and are not used here. With matched schedules, the corrected 3,000-source comparison is +0.0334 final (previously reported +0.0381 under the unfair schedule) — the qualitative conclusion for that condition is unchanged.

Integrity audit

Automated verification (audit_ablation.py) of the completed artifacts.

status: pass
  • Source snapshots correspond to requested optimizer steps (500 / 1,500 / 3,000 / 10,000)
  • All MLP and head tensor assignments are exact permutations
  • Tied embedding/decoder reset is identical across conditions
  • Position embeddings preserved
  • No optimizer state crosses the transformation boundary; fresh AdamW after every retrain
  • All evaluation steps and learning rates match the scratch baseline
  • All 52 paired significance records and report artifacts exist
  • Runs executed serially (10k source, then 500 / 1.5k / 3k retrains); nothing beyond 10k was run