English

OPSDL: On-Policy Self-Distillation for Long-Context Language Models

Computation and Language 2026-04-21 v1 Artificial Intelligence

Abstract

Extending the effective context length of large language models (LLMs) remains a central challenge for real-world applications. While recent post-training methods have made progress in long-context scaling, they either rely on high-quality supervision data or sparse sequence-level rewards, leading to unstable and inefficient optimization. We propose OPSDL, an On-Policy Self-Distillation method for enhancing the Long-context capabilities of LLMs. Unlike other recent self-distillation methods that inject privileged information and rely on the model's in-context learning ability to act as a teacher, OPSDL leverages the model's own inherently strong short-context capability as a self-teacher to supervise its own generation in long-context scenarios. The model first generates responses conditioned on the full long-context, then the self-teacher provides per-token supervision signals via point-wise reverse KL divergence under the relevant extracted short-context. This dense token-level signal encourages faithful use of relevant evidence and mitigates hallucinations induced by irrelevant context. We evaluate OPSDL on long-context benchmarks across a range of models from 7B to 32B parameters. Results show consistent and substantial improvements across varying context lengths, outperforming standard post-training approaches such as SFT and DPO with higher sample efficiency. Notably, these gains are achieved without degrading general short-context performance. These findings highlight the effectiveness of OPSDL as a scalable and stable approach for long-context learning.

Keywords

Cite

@article{arxiv.2604.17535,
  title  = {OPSDL: On-Policy Self-Distillation for Long-Context Language Models},
  author = {Xinsen Zhang and Zhenkai Ding and Tianjun Pan and Run Yang and Chun Kang and Xue Xiong and Jingnan Gu},
  journal= {arXiv preprint arXiv:2604.17535},
  year   = {2026}
}

Comments

9 pages, 1 figure

R2 v1 2026-07-01T12:17:07.501Z