arrow
Return

Condor: A Code Discriminator Integrating General Semantics With Code Details

delete2025-10-10
delete0
PRE
AI
Q
Qingyuan Liang
Z
Zhao Zhang
C
Chen Liu
Z
Zeyu Sun
Wenjie Zhang cover
Wenjie Zhang (Wenjie Zhang)
Y
Yizhou Chen
Z
Zixiao Zhao
Q
Q. Luo
W
Wentao Wang
Y
Yanjie Jiang
Y
Yingfei Xiong
L
Lu Zhang
DOI:10.1109/TSE.2025.3620145delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
LLMs demonstrate significant potential across various software engineering tasks. However, they still face challenges in generating correct code on the first attempt when addressing complex requirements. Introducing a discriminator to select reliable outputs from multiple generated results is an effective way to enhance their reliability and stability. Currently, these discriminators fall into two categories: execution-based discriminators and non-execution-based discriminators. Execution-based discriminators face flexibility challenges due to difficulties in obtaining test cases and security concerns, while non-execution-based discriminators, although more flexible, struggle to capture subtle differences in code details. To maintain flexibility while improving the model’s ability to capture fine-grained code details, this paper proposes Condor. We first design contrastive learning to optimize the code representations of the base model, enabling it to reflect differences in code details. Then, we leverage intermediate data from the code modification process to further enrich the discriminator’s training data, enhancing its ability to discern code details. Experimental results indicate that on the subtle code difference dataset (i.e., CodeNanoFix), Condor significantly outperforms other discriminators in discriminative performance: Condor (1.3B) improves the discriminative F1 score of DeepSeek-Coder (1.3B) from 67% to 73%. In discriminating LLM-generated outputs, Condor (1.3B) and Condor (110M) raise the Pass@1 score of Llama-3.1-Instruct (70B) on the CodeNanoFix dataset from 52.64% to 62.63% and 59.64%, respectively. Moreover, Condor demonstrates strong generalization capabilities on the APPS, MBPP, and LiveCodeBench datasets. For example, Condor (1.3B) improves the Pass@1 of Llama-3.1-Instruct (70B) on the APPS dataset by 147.05%.
Keywords:
Code discriminator
code embedding
code generation
code repair

Journal

IEEE Transactions on Software Engineering cover
IEEE Transactions on Software Engineering
IF:
5.6
Papers:
2.9K
Citations:
1.1W

Organization

I
Institute of Software
Scholars:
90
Papers: 45
Citations: 571
P
peking university
Scholars:
11.9W
Papers: 8.7W
Citations: 146
S
Southern University of Science and Technology
Scholars:
5.2K
Papers: 2.1K
Citations: 34
N
National University of Singapore
Scholars:
7.6W
Papers: 6.5W
Citations: 11.4W
researcher View more organizations
Cited Papers

Cited Papers

Do advanced language models eliminate the need for prompt engineering in software engineering?
err
err0
PREAI
errWang,Guoqing; Sun,Zeyu; Ye,Sixiang; Gong,Zhihao; Chen,Yizhou; Zhao,Yifan; Liang,Qingyuan; Hao,Dan
errShare
errSave
Directional Diffusion-Style Code Editing Pre-Training
err
err0
PREAI
errQingyuan Liang; Zeyu Sun; Qihao Zhu; Junhao Hu; Yifan Zhao; Yizhou Chen; Mingxuan Zhu; Guoqing Wang; Lu Zhang
errShare
errSave
Deep learning-based software engineering: progress, challenges, and opportunities
err2024-12-24
err0
errOAAI
errChen, Xiangping; Hu, Xing; Huang, Yuan; Jiang, He; Ji, Weixing; Jiang, Yanjie; Jiang, Yanyan; Liu, Bo; Liu, Hui; Li, Xiaochen; Lian, Xiaoli; Meng, Guozhu; Peng, Xin; Sun, Hailong; Shi, Lin; Wang, Bo; Wang, Chong; Wang, Jiayi; Wang, Tiantian; Xuan, Jifeng; Xia, Xin; Yang, Yibiao; Yang, Yixin; Zhang, Li; Zhou, Yuming; Zhang, Lu
errShare
errSave
Natural Language to Code Translation with Execution
err2022-01-01
err0
errOAAI
errFreda Shi; Daniel Fried; Marjan Ghazvininejad; Luke Zettlemoyer; Sida I. Wang
errShare
errSave
Subtle Errors in Reasoning: Preference Learning via Error-injected Self-editing
err2025-01-01
err0
PREAI
errXu,Kaishuai; Yu,Tiezheng; Hou,Wenjun; Cheng,Yi; Leong,Chak Tou; Li,Liangyou; Jiang,Xin; Shang,Lifeng; Liu,Qun; Li,Wenjie
errShare
errSave
The ManyBugs and IntroClass Benchmarks for Automated Repair of C Programs
err2015-12-01
err212
errOAAI
errLe Goues, Claire; Holtschulte, Neal; Smith, Edward K.; Brun, Yuriy; Devanbu, Premkumar; Forrest, Stephanie; Weimer, Westley
errShare
errSave
CodeBERT: A Pre-Trained Model for Programming and Natural Languages
err2020-01-01
err0
errOAAI
errZhangyin Feng; Daya Guo; Duyu Tang; Nan Duan; Xiaocheng Feng; Ming Gong; Linjun Shou; Bing Qin; Ting Liu; Daxin Jiang; Ming Zhou
errShare
errSave
researcher View more