一句话:提出 RT-Distiller,从开发者社区讨论中挖掘并结构化推理链,微调 LLM 提升代码推理能力。
该论文针对 LLM 在复杂多步代码推理任务中表现不足、高质量推理数据稀缺的问题,提出 RT-Distiller 框架。它从软件工程社区讨论中挖掘、重构并丰富推理链,将其与软件开发生命周期(SDLC)原则对齐,使非结构化、不完整的讨论转化为可支持迭代改进的真实解题策略。基于 RT-Distiller 生成的 12,444 条推理增强样本,作者微调得到 CodeThinker。在 LiveCodeBench 上,CodeThinker 在中等难度代码问题上的 pass@1 比基座模型提升 42.86%,并分别超过 GPT-4o-mini 和 GPT-4o 达 73.14% 与 115.86%;消融实验表明各组件均对推理能力有贡献。
Large Language Models (LLMs) have significantly advanced automated code generation, yet they struggle with complex coding tasks requiring multi-step logical reasoning. High-quality reasoning data is crucial for improving LLMs’ reasoning capabilities, but such datasets remain scarce. Existing approaches either rely on computationally expensive reinforcement learning (RL) or error-prone reasoning chains synthesized by LLMs, posing challenges in scalability and accuracy. To address this challenge, we propose RT-Distiller, a novel framework that mines, restructures, and enriches reasoning chains from community-driven discussions on software engineering platforms. RT-Distiller refines unstructured and incomplete discussions of coding problems by aligning them with Software Development Life Cycle (SDLC) principles, ensuring that reasoning chains capture real-world problem-solving strategies and support iterative refinement. To evaluate the effectiveness of RT-Distiller, we introduce CodeThinker, an LLM fine-tuned on 12,444 reasoning-augmented samples generated by RT-Distiller. Experiments on LiveCodeBench show that CodeThinker surpasses its base model by 42.86% on medium-level code problems in terms of pass@1 and outperforms GPT-4o-mini and GPT-4o by 73.14% and 115.86%, respectively. Our ablation study further highlights that each component of RT-Distiller contributes to the reasoning capabilities of CodeThinker.
@inproceedings{abs-2503-14838,
title = {Think Like Human Developers: Harnessing Community Knowledge for Structured Code Reasoning},
author = {Chengran Yang and Zhensu Sun and Hong Jin Kang and Jieke Shi and David Lo},
booktitle = {ICSE},
year = {2026},
doi = {10.1145/3744916.3764550}
}