VerIF: Verification Engineering for Reinforcement Learning in Instruction Following

Hao Peng, Yunjia Qi, Xiaozhi Wang, Bin Xu, Lei Hou +1 more
6/11/2025
cs.CLcs.AI

Official code: THU-KEG/VerIF (60 stars, Apache-2.0, last commit 2026-03-30).

Abstract

Reinforcement learning with verifiable rewards (RLVR) has become a key technique for enhancing large language models (LLMs), with verification engineering playing a central role. However, best practices for RL in instruction following remain underexplored. In this work, we explore the verification challenge in RL for instruction following and propose VerIF, a verification method that combines rule-based code verification with LLM-based verification from a large reasoning model (e.g., QwQ-32B). To support this approach, we construct a high-quality instruction-following dataset, VerInstruct, containing approximately 22,000 instances with associated verification signals. We apply RL training with VerIF to two models, achieving significant improvements across several representative instruction-following benchmarks. The trained models reach state-of-the-art performance among models of comparable size and generalize well to unseen constraints. We further observe that their general capabilities remain unaffected, suggesting that RL with VerIF can be integrated into existing RL recipes to enhance overall model performance. We have released our datasets, codes, and models to facilitate future research at https://github.com/THU-KEG/VerIF.

View on arXivView PDF

Code Implementations(1)

THU-KEG/VerIFOfficial100%
Apache-2.0

[EMNLP 2025] Verification Engineering for RL in Instruction Following

603Roff, ShellJun 3, 20256 months agoApache-2.0

Similar Papers

Cite this paper

@article{peng2025verif,
  title  = {VerIF: Verification Engineering for Reinforcement Learning in Instruction Following},
  author = {Hao Peng and Yunjia Qi and Xiaozhi Wang and Bin Xu and Lei Hou and Juanzi Li},
  year   = {2025},
  eprint = {2506.09942},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.09942v1}
}

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

Discussion