Search arXiv⌕ Search

arXiv subjects

Chaohang Wen

Publications and source records attributed to Chaohang Wen.

2 recordsLinked to original sources

Test-Centric Code Generation: Enhancing Test Diversity, Reliability, and Utilization

Large Language Models (LLMs) have made significant progress in code generation, yet the correctness of generated code remains a major challenge, particularly for complex programming tasks. Test-driven code generation offers a promising solution by leveraging automatically generated tests to guide code generation and verification. However, existing approaches often suffer from insufficient test correctness, limited test diversity, and inadequate utilization of test information. To address these limitations, we propose TCG, a test-centric code generation framework comprising three complementary components: Diverse Test Generation, which combines unit tests and property-based tests to improve behavioral coverage; Reliable Test Curation, which employs syntax checking and execution-based cross-validation to identify reliable tests; and Test-Centric Code Generation, which integrates test information into requirement understanding, code verification, and fault repair. We evaluate TCG using three representative LLMs across six function-level and repository-level code generation benchmarks, comparing it with nine representative baselines. Experimental results show that TCG consistently outperforms all applicable baselines across 18 experimental settings, achieving average improvements of 6.63% to 25.59% in Pass@1. These findings demonstrate the effectiveness of leveraging diverse, reliable tests throughout the code generation process.

cs.SE↗

SRPO: A Cross-Domain Implementation of Large-Scale Reinforcement Learning on LLM

Recent advances of reasoning models, exemplified by OpenAI's o1 and DeepSeek's R1, highlight the significant potential of Reinforcement Learning (RL) to enhance the reasoning capabilities of Large Language Models (LLMs). However, replicating these advancements across diverse domains remains challenging due to limited methodological transparency. In this work, we present two-Staged history-Resampling Policy Optimization (SRPO), which surpasses the performance of DeepSeek-R1-Zero-32B on the AIME24 and LiveCodeBench benchmarks. SRPO achieves this using the same base model as DeepSeek (i.e. Qwen2.5-32B), using only about 1/10 of the training steps required by DeepSeek-R1-Zero-32B, demonstrating superior efficiency. Building upon Group Relative Policy Optimization (GRPO), we introduce two key methodological innovations: (1) a two-stage cross-domain training paradigm designed to balance the development of mathematical reasoning and coding proficiency, and (2) History Resampling (HR), a technique to address ineffective samples. Our comprehensive experiments validate the effectiveness of our approach, offering valuable insights into scaling LLM reasoning capabilities across diverse tasks.

cs.LG↗