Efficient KL Divergence Estimation via Truncated Top-K Integration for Large Language Models
Xinyuan Wang, Luozhijie Jin, Bo Wang, Yuan Li, Zhangyue Yin, Xipeng Qiu
Abstract
Kullback-Leibler (KL) divergence regularization is essential for stabilizing reinforcement learning from human feedback (RLHF) in large language models (LLMs), yet its exact computation requires summing over vocabularies of all tokens, incurring prohibitive memory costs during training. Existing stochastic estimators circumvent this bottleneck by estimating KL divergence using only the sampled token from the trajectory, but suffer from high variance (k1) or systematic bias (k2). We propose TIKE (Top-k Importance-weighted KL Estimator), which exploits the Zipfian structure of language model distributions: by deterministically integrating over only the top-k tokens, TIKE captures most of the probability mass while effectively reducing memory cost. To ensure correctness in off-policy settings characteristic of Group Relative Policy Optimization (GRPO), we incorporate importance sampling weights that correct for distribution shift between rollout and optimization policies. Experiments on models across diverse benchmarks demonstrate that TIKE consistently outperforms stochastic baselines, while exhibiting substantially lower gradient variance. Our analysis reveals that TIKE closely tracks the exact Rao-Blackwellized estimator with near-zero variance, offering a practical path toward stable, memory-efficient KL regularization for reasoning-intensive LLMs training.- Anthology ID:
- 2026.acl-long.405
- Volume:
- Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)
- Month:
- July
- Year:
- 2026
- Address:
- San Diego, California, United States
- Editors:
- Maria Liakata, Viviane P. Moreira, Jiajun Zhang, David Jurgens
- Venue:
- ACL
- SIG:
- Publisher:
- Association for Computational Linguistics
- Note:
- Pages:
- 8973–8985
- Language:
- URL:
- https://preview.aclanthology.org/ingest-acl/2026.acl-long.405/
- DOI:
- Cite (ACL):
- Xinyuan Wang, Luozhijie Jin, Bo Wang, Yuan Li, Zhangyue Yin, and Xipeng Qiu. 2026. Efficient KL Divergence Estimation via Truncated Top-K Integration for Large Language Models. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 8973–8985, San Diego, California, United States. Association for Computational Linguistics.
- Cite (Informal):
- Efficient KL Divergence Estimation via Truncated Top-K Integration for Large Language Models (Wang et al., ACL 2026)
- PDF:
- https://preview.aclanthology.org/ingest-acl/2026.acl-long.405.pdf