Robust Code RL via Faulty-Code-Driven Test case Synthesis and Dense Reward Shaping

Yiwen Zhang, Xiaodong Yan, Zhenyu Huang, Deng Zhao, Liang Jiang +4 more
8/25/2026
cs.AIcs.SE
rlrlhf-rlvr-dpo

No confident code implementation found for this paper.

Abstract

Reinforcement Learning from Verifiable Rewards (RLVR) is pivotal for enhancing LLM code generation, yet its efficacy is often hindered by insufficient test case coverage, leading to reward hacking and policy degradation. To address this, we propose RobustTests, a framework featuring a faulty-code-driven test case synthesis strategy.

Show full abstract

By leveraging "near-correct" faulty codes, RobustTests captures latent logical discrepancies and employs validator agents with behavioral feature clustering to filter invalid or redundant test cases. Additionally, a stepwise dense reward function based on pass rates is introduced to mitigate false negatives and enhance training robustness. Using this pipeline, we construct an augmented version of the CodeContests+ dataset with superior diagnostic utility. Experimental results show that RL fine-tuning of Qwen3-32B via RobustTests achieves a 3% absolute gain on LiveCodeBench, demonstrating its effectiveness in advancing LLM code generation proficiency. Codes and data are available at https://huggingface.co/datasets/sid6/RobustTests.

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{zhang2026robust,
  title  = {Robust Code RL via Faulty-Code-Driven Test case Synthesis and Dense Reward Shaping},
  author = {Yiwen Zhang and Xiaodong Yan and Zhenyu Huang and Deng Zhao and Liang Jiang and Qing Cui and Zujie Wen and Zhiqiang Zhang and Jun Zhou},
  year   = {2026},
  eprint = {2608.24135},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.24135v2}
}

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

Discussion