HARDTESTGEN: A High-Quality RL Verifier Generation Pipeline for LLM Algorithmic Coding

Abstract

Verifiers provide important reward signals for reinforcement learning of large language models (LLMs). However, it is challenging to develop or create reliable verifiers, especially for code generation tasks. A well-disguised wrong solution program may only be detected by carefully human-written edge cases that are difficult to synthesize automatically. To address this issue, we propose HARDTESTGEN, an approach to synthesize high-quality test cases for algorithmic coding problems. We curate a comprehensive algorithmic programming dataset HARDTESTS with 26.6k problems and high-quality synthetic tests. Compared with existing tests, \method tests demonstrate significantly higher accuracy in verifying LLM-generated code (+11.22 percentage points in precision, the percentage of actually correct code within the predicted correct ones). We also show that downstream post-training --- including rejection sampling and reinforcement learning (RL) --- using HARDTESTS verifier results in improved performance of LLM code generation. We open-source our dataset and synthesis pipeline at https://leililab.github.io/HardTests/.

Cite

Text

He et al. "HARDTESTGEN: A High-Quality RL Verifier Generation Pipeline for LLM Algorithmic Coding." International Conference on Learning Representations, 2026.

Markdown

[He et al. "HARDTESTGEN: A High-Quality RL Verifier Generation Pipeline for LLM Algorithmic Coding." International Conference on Learning Representations, 2026.](https://mlanthology.org/iclr/2026/he2026iclr-hardtestgen/)

BibTeX

@inproceedings{he2026iclr-hardtestgen,
  title     = {{HARDTESTGEN: A High-Quality RL Verifier Generation Pipeline for LLM Algorithmic Coding}},
  author    = {He, Zhongmou and Choi, Yee Man and Zhang, Kexun and Bercovich, Ivan and Ji, Jiabao and Zhou, Junting and Xu, Dejia and Zhang, Aidan and Zeng, Yixiao and Li, Lei},
  booktitle = {International Conference on Learning Representations},
  year      = {2026},
  url       = {https://mlanthology.org/iclr/2026/he2026iclr-hardtestgen/}
}