Trajectory-Aware Policy Optimization: Closing the State Distribution Gap in Long-Horizon LLM RL

Zhicheng Cai, Weinan Dai, Yuyan Zhou, Wei-Ying Ma, Ya-Qin Zhang +1 more
10/9/2026
cs.LG
rlrlhf-rlvr-dpo

No confident code implementation found for this paper.

Abstract

Reinforcement learning (RL) has become a dominant paradigm for enhancing LLMs' reasoning capabilities. Yet long-horizon autoregressive rollouts introduce a fundamental limitation: local policy mismatch can compound into severe state distribution shift over trajectories. Existing LLM RL methods, such as GRPO and GSPO, control policy mismatch at the token or sequence level, but overlook this trajectory-induced shift, causing training instability and eventual collapse as the horizon grows. To close the state distribution gap, we propose Trajectory-Aware Policy Optimization (TAPO), a principled framework that theoretically derives the state-distribution correction from the off-policy policy gradient and incorporates it into the RL objective. TAPO further employs a geometric-mean estimator for variance reduction, together with a length-aware dynamic clipping that prevents overly deviated updates across the trajectory. Extensive experiments demonstrate that TAPO significantly surpasses existing LLM RL algorithms across eight competition-level benchmarks, achieving up to 48% and 12% improvement over GRPO on mathematical reasoning and algorithmic coding, with substantially enhanced training stability.

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!

Similar Papers

Cite this paper

@article{cai2026trajectoryaware,
  title  = {Trajectory-Aware Policy Optimization: Closing the State Distribution Gap in Long-Horizon LLM RL},
  author = {Zhicheng Cai and Weinan Dai and Yuyan Zhou and Wei-Ying Ma and Ya-Qin Zhang and Hao Zhou},
  year   = {2026},
  eprint = {2610.13020},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.13020v1}
}

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/2610.13020.svg)](https://codeofpaper.com/paper/2610.13020)

Discussion