Large Language Models (LLMs) are changing the coding paradigm, known as vibe coding, yet synthesizing algorithmically sophisticated and robust code still remains a critical challenge. Incentivizing the deep reasoning capabilities of LLMs is essential to overcoming this hurdle. Reinforcement Fine-Tuning (RFT) has emerged as a promising strategy to address this need. However, most existing approaches overlook the heterogeneous difficulty and granularity inherent in test cases, leading to an imbalanced distribution of reward signals and consequently biased gradient updates during training. To address this, we propose Test-driven and cApability-adaptive cuRriculum reinfOrcement fine-Tuning (TAROT). TAROT systematically constructs, for each problem, a four-tier test suite (basic, intermediate, complex, edge), providing a controlled difficulty landscape for curriculum design and evaluation. Crucially, TAROT decouples curriculum progression from raw reward scores, enabling capability-conditioned evaluation and principled selection from a portfolio of curriculum policies rather than incidental test-case difficulty composition. This design fosters stable optimization and more efficient competency acquisition. Extensive experimental results reveal that the optimal curriculum for RFT in code generation is closely tied to a model's inherent capability, with less capable models achieving greater gains with an easy-to-hard progression, whereas more competent models excel under a hard-first curriculum. TAROT provides a reproducible method that adaptively tailors curriculum design to a model's capability, thereby consistently improving the functional correctness and robustness of the generated code. All code and data are released to foster reproducibility and advance community research at https://github.com/deep-diver/TAROT.


翻译:大语言模型(LLMs)正在改变编程范式,即所谓氛围编程,但合成算法复杂且鲁棒的代码仍是一个关键挑战。激发LLMs的深度推理能力对于克服这一障碍至关重要。强化微调(RFT)已成为满足这一需求的一种有前景的策略。然而,现有方法大多忽视了测试用例固有的异质难度与粒度,导致奖励信号分布不均衡,进而在训练过程中产生有偏的梯度更新。为解决此问题,我们提出了测试驱动与能力自适应课程强化微调(TAROT)。TAROT为每个问题系统性地构建一个四层测试套件(基础、中级、复杂、边缘),为课程设计与评估提供了一个受控的难度分布。关键在于,TAROT将课程进度与原始奖励分数解耦,实现了基于能力的评估,并能从一系列课程策略组合中进行原则性选择,而非依赖于偶然的测试用例难度构成。这种设计促进了稳定的优化和更高效的能力习得。大量实验结果表明,代码生成中RFT的最佳课程与模型的内在能力密切相关:能力较弱的模型在由易到难的渐进课程中获益更大,而能力更强的模型则在先难后易的课程中表现更优。TAROT提供了一种可复现的方法,能够根据模型能力自适应地定制课程设计,从而持续提升生成代码的功能正确性与鲁棒性。所有代码与数据均已发布,以促进可复现性并推动社区研究,详见 https://github.com/deep-diver/TAROT。

0
下载
关闭预览

相关内容

课程是指学校学生所应学习的学科总和及其进程与安排。课程是对教育的目标、教学内容、教学活动方式的规划和设计,是教学计划、教学大纲等诸多方面实施过程的总和。广义的课程是指学校为实现培养目标而选择的教育内容及其进程的总和,它包括学校老师所教授的各门学科和有目的、有计划的教育活动。狭义的课程是指某一门学科。 专知上对国内外最新AI+X的课程进行了收集与索引,涵盖斯坦福大学、CMU、MIT、清华、北大等名校开放课程。
大语言模型中的检索与结构化增强生成综述
专知会员服务
32+阅读 · 2025年9月17日
基于模型的强化学习综述
专知
42+阅读 · 2022年7月13日
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
大语言模型中的检索与结构化增强生成综述
专知会员服务
32+阅读 · 2025年9月17日
相关基金
国家自然科学基金
4+阅读 · 2017年12月31日
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员