45
0

Success is in the Details: Evaluate and Enhance Details Sensitivity of Code LLMs through Counterfactuals

Main:8 Pages
16 Figures
Bibliography:4 Pages
6 Tables
Appendix:9 Pages
Abstract

Code Sensitivity refers to the ability of Code LLMs to recognize and respond to details changes in problem descriptions. While current code benchmarks and instruction data focus on difficulty and diversity, sensitivity is overlooked. We first introduce the CTF-Code benchmark, constructed using counterfactual perturbations, minimizing input changes while maximizing output changes. The evaluation shows that many LLMs have a more than 10\% performance drop compared to the original problems. To fully utilize sensitivity, CTF-Instruct, an incremental instruction fine-tuning framework, extends on existing data and uses a selection mechanism to meet the three dimensions of difficulty, diversity, and sensitivity. Experiments show that LLMs fine-tuned with CTF-Instruct data achieve over a 2\% improvement on CTF-Code, and more than a 10\% performance boost on LiveCodeBench, validating the feasibility of enhancing LLMs' sensitivity to improve performance.

View on arXiv
@article{luo2025_2505.14597,
  title={ Success is in the Details: Evaluate and Enhance Details Sensitivity of Code LLMs through Counterfactuals },
  author={ Xianzhen Luo and Qingfu Zhu and Zhiming Zhang and Mingzheng Xu and Tianhao Cheng and Yixuan Wang and Zheng Chu and Shijie Xuyang and Zhiyuan Ma and YuanTao Fan and Wanxiang Che },
  journal={arXiv preprint arXiv:2505.14597},
  year={ 2025 }
}
Comments on this paper

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from. See our policy.