arXiv:2611.12016cs.LGNov 2026

Manuscript Offprint

arXiv:2611.12016

Speculative Self-Distillation enables Efficient Knowledge Internalization

Shayan Talaei, Agam Bhatia, Arshia Soltani Moakhar, Jonas Hübotter, Amin Saberi, Azalia Mirhoseini

Abstract

Many real-world applications require language models to internalize knowledge that was absent from pretraining, to incorporate continually updated facts, or to learn new domain skills. Self-distillation has emerged as a natural approach for this task. A model conditioned on the source material acts as the teacher, and an unconditioned student is trained to reproduce the teacher's behavior closed-book. We propose Speculative Self-Distillation (SSD), an efficient per-token mixed-policy method for self-distillation. The student generates each rollout by default, while the teacher intervenes only at positions where its next-token distribution substantially diverges from the student's. Unlike off-policy distillation with teacher-generated prefixes, this design keeps training rollouts close to the student's test-time behavior, while avoiding the low-signal states that fully on-policy rollouts drift into. In effect, SSD lets the teacher steer the rollout exactly where the privileged context changes the prediction. On three closed-book QA benchmarks measuring fact recall, knowledge updates, and skill acquisition, SSD nearly matches on-policy distillation while using 38–69% fewer supervised tokens and consistently outperforms off-policy distillation on the held-out test set. On a forgetting stress test, SSD retains the most general capability while also achieving the best in-domain accuracy and using less supervision than the on-policy baseline. Overall, SSD establishes a new accuracy–efficiency–forgetting Pareto frontier for self-distillation. Project web page is available at ssd-distill.github.io.

1 Introduction

Practical deployments often require language models to use knowledge that was absent from pretraining, such as updated facts, new discoveries, or domain-specific information (Lewis et al., 2020; Petroni et al., 2021; Gao et al., 2024b). A common solution is in-context learning (ICL), where the relevant information is supplied in the prompt at inference time (Brown et al., 2020; Dong et al., 2024).

While effective, this approach has several limitations: it uses context space, requires careful prompt or retrieval design (Liu et al., 2022), and adds per-query inference cost. Models can also fail to use relevant evidence reliably even when it is present in the context (Liu et al., 2024; Gao et al., 2024b). Parametric learning offers a complementary approach by distilling new knowledge into the model's weights, where it remains available without repeatedly retrieving and processing the source material at inference time.

*Equal contribution. Correspondence: {stalaei, agam2026, asoltan}@stanford.edu.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Speculative Self-Distillation decoding loop. (1) The student receives the prompt xx, while the teacher receives both xx and the privileged context CC. (2) At each rollout position, both models propose a next-token distribution conditioned on the jointly decoded prefix. (3) If the switching divergence DswitchD_{switch} between the two distributions exceeds the threshold τ\tau, the teacher samples the next token; otherwise the student does. The loop continues until the rollout termination condition is met.

A large body of work has therefore studied how to move knowledge from context into the model's weights (Yang et al., 2025; Lin et al., 2025). Self-distillation has emerged as one powerful tool for this setting (Snell et al., 2022; Shenfeld et al., 2026a). The idea is to recast the model's ICL capability as training signal, conditioning the same model on the source material to obtain a more informed token distribution from this teacher, and then distilling that distribution back into the unconditioned student. The central difficulty is choosing which rollout states should carry that distillation signal.

Existing self-distillation methods differ in how they generate training rollouts, creating a tradeoff between distribution match and learning signal. We make this tradeoff explicit with the supervision signal: the per-token forward Kullback–Leibler divergence between the teacher's and student's next-token distributions along a rollout (Kullback & Leibler, 1951). On-policy rollouts match the student's test-time distribution, but are signal-starved: after the student commits to an early prefix, the teacher is conditioned on that prefix and can only provide a coherent continuation. Off-policy rollouts preserve stronger signal by using teacher-generated prefixes, but train the student on trajectories it will not produce at test time. Both choices therefore allocate supervision inefficiently. On-policy training spends it on positions where the teacher has little to add, whereas off-policy training spends it on states the student will not visit. This raises our central question: can we preserve the signal of off-policy rollouts while staying close to the student's distribution?

This inefficient allocation of supervision signal motivates a method that uses teacher generation selectively while keeping rollouts close to the student. We propose Speculative Self-Distillation (SSD), a compute-efficient, per-token mixed-policy method built around inflection tokens: positions where privileged context substantially changes the teacher's next-token distribution relative to the student's. In SSD the student generates the rollout by default. At each token position, SSD compares the teacher's and student's next-token distributions. If the divergence between them exceeds a threshold τ\tau (we use the Jensen–Shannon divergence (JSD; Lin, 1991) in most experiments), the position is marked as an inflection token and the teacher generates the next token (Figure 1). The teacher distribution and distillation loss are still evaluated at every response position; only the policy that emits the rollout token changes. The threshold τ\tau provides a single knob that interpolates between prior approaches: small τ\tau recovers off-policy distillation, while large τ\tau recovers on-policy distillation (Section 4.6).

Across three closed-book QA benchmarks, SSD nearly matches on-policy accuracy while using substantially fewer supervised tokens, reducing supervised-token usage by 48%, 38%, and 69% relative to on-policy self-distillation on Company Memo, Wikipedia, and Science Q&A, respectively. SSD is 1.35 points below on-policy on Company Memo and 0.08 and 0.15 points above it on Wikipedia and Science Q&A. Across 4B, 7B, and 14B models on Science Q&A, SSD achieves at least on-policy accuracy with 23–55% fewer supervised tokens at the evaluations reported in Table 1. Crucially, this efficiency does not come at the expense of the model's prior capabilities.

On a forgetting stress test that fine-tunes Qwen2.5-7B on a chemistry split, we measure the mean accuracy change (Δ\Delta) across six broad benchmarks relative to the base model. In this setting, SSD forgets less than either baseline while also achieving the highest in-domain accuracy. Its average general performance drops by 1.4 points, compared with 4.5 points for on-policy and 6.6 points for off-policy distillation. Compared with on-policy self-distillation, SSD therefore improves all three axes of accuracy, forgetting, and efficiency at once in this experiment, rather than trading one against another. Our contributions are as follows:

  • A signal-based diagnosis of the off-policy/on-policy tradeoff. Using the per-token teacher–student divergence as a diagnostic for the supervision available along a rollout, we show that on-policy self-distillation is signal-starved at later positions while off-policy rollouts carry signal throughout, accounting for on-policy training's compute inefficiency (Section 3.1).

  • Speculative Self-Distillation. We propose SSD, a per-token mixed-policy method in which the student generates by default and the teacher takes over only at inflection positions where the teacher–student divergence exceeds a threshold τ\tau. A single τ\tau interpolates between off-policy (τ→0\tau \to 0) and on-policy (τ→∞\tau \to \infty) self-distillation (Section 3).

  • On-policy accuracy at a fraction of the supervision. Across three knowledge-acquisition tasks (private documents, Wikipedia knowledge updates, and scientific Q&A), SSD nearly matches on-policy self-distillation accuracy using 38–69% fewer supervised tokens. We also show that a sweep over τ\tau traces the accuracy–efficiency Pareto frontier between the off-policy and on-policy endpoints (Section 4).

  • Reduced forgetting without sacrificing in-domain accuracy. On a forgetting stress test, SSD retains the most general capability while achieving the highest in-domain accuracy and using less supervision than the on-policy baseline (Section 4.4).

References (75)