PolicyLong: Towards On-Policy Context Extension

Junlong Jia, Ziyang Chen, Xing Wu, Chaochen Gao, TingHao Yu +2 more
4/9/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Extending LLM context windows is hindered by scarce high-quality long-context data. Recent methods synthesize data with genuine long-range dependencies via information-theoretic verification, selecting contexts that reduce a base model's predictive entropy. However, their single-pass offline construction with a fixed model creates a fundamental off-policy gap: the static screening landscape misaligns with the model's evolving capabilities, causing the training distribution to drift. We propose PolicyLong, shifting data construction towards a dynamic on-policy paradigm. By iteratively re-executing data screening (entropy computation, retrieval, and verification) using the current model, PolicyLong ensures the training distribution tracks evolving capabilities, yielding an emergent self-curriculum. Crucially, both positive and hard negative contexts derive from the current model's entropy landscape, co-evolving what the model learns to exploit and resist. Experiments on RULER, HELMET, and LongBench-v2 (Qwen2.5-3B) show PolicyLong consistently outperforms EntropyLong and NExtLong, with gains growing at longer contexts (e.g., +2.54 at 128K on RULER), confirming the value of on-policy data evolution.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{jia2026policylong,
  title  = {PolicyLong: Towards On-Policy Context Extension},
  author = {Junlong Jia and Ziyang Chen and Xing Wu and Chaochen Gao and TingHao Yu and Feng Zhang and Songlin Hu},
  year   = {2026},
  eprint = {2604.07809},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2604.07809v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2604.07809.svg)](https://codeofpaper.com/paper/2604.07809)

Discussion