AI Post Transformers • Interactive Visualization

Simple Self-Distillation for Better Code Generation

Apple’s 2026 result is visually simple and conceptually sharp: sample code from the model itself, filter only the emptiest stubs, fine-tune on those outputs, then decode again. This page focuses on the geometry of that loop: where probability mass tightens, where exploration survives, and why code benchmarks make the claim unusually testable.

Primary Claim Self-sampled SFT can lift code pass rates
Main Result 42.4 → 55.3 pass@1
Control Removed No teacher • no verifier • no RL
Episode signal
baseline decoding only post-SSD uplift
Why code is a clean testbed

Code exposes the tradeoff directly: pass@1 measures first-shot reliability, while pass@k shows whether useful solution branches still exist after sharpening the model.

Self-Distillation Loop

Step through the training loop. The bright path is what Apple keeps; the dimmed bays are the supervision mechanisms intentionally left out.

Lock vs Fork Token Landscape

The heatmap shows mock next-token uncertainty across positions in code solutions. Toggle between baseline and SSD to see confidence sharpen at lock points while branch mass remains at fork points.

Benchmark Surface

Mocked from the episode’s reported pattern: broad gains across model families, with larger jumps on harder problems and unusually strong preservation of pass@5.

Distillation Family Tree

Click a node to trace how targets evolved: teacher logits, sequence outputs, same-architecture teachers, pseudo-labeling, on-policy rollouts, verifier-backed code alignment, and finally Apple’s stripped-down self-loop.

References

Embarrassingly Simple Self-Distillation Improves Code Generation
Zhang, Bai, Zheng, Jaitly, Collobert, Zhang • 2026 • arXiv:2604.01193
Distilling the Knowledge in a Neural Network
Hinton, Vinyals, Dean • 2015
Born Again Neural Networks
Furlanello et al. • 2018
Noisy Student
Xie et al. • 2020
Evaluating Large Language Models Trained on Code
Chen et al. • 2021 • HumanEval / Codex
LiveCodeBench
Jain et al. • 2024
SelfCodeAlign
Wei et al. • 2024
GenX
Wang et al. • 2024
OpenCodeInterpreter
Zheng et al. • 2024