@inproceedings{ruan-etal-2025-breaking,
title = "Breaking the Attention Trap in Code {LLM}s: A Rejection Sampling Approach to Enhance Code Execution Prediction",
author = "Ruan, Xingcheng and
Geng, Haoxiang and
Xia, Yunhui and
Zhao, Bingran",
editor = "Christodoulopoulos, Christos and
Chakraborty, Tanmoy and
Rose, Carolyn and
Peng, Violet",
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2025",
month = nov,
year = "2025",
address = "Suzhou, China",
publisher = "Association for Computational Linguistics",
url = "https://preview.aclanthology.org/author-page-yu-wang-polytechnic/2025.findings-emnlp.592/",
doi = "10.18653/v1/2025.findings-emnlp.592",
pages = "11111--11120",
ISBN = "979-8-89176-335-7",
abstract = "Code-specific Large Language Models (Code LLMs) have greatly improved performance across code-related tasks, offering substantial benefits in practical applications. However, existing research reveals significant performance bottlenecks in Code Execution tasks, which requires models to predict the execution results of given code snippets. This study identifies that, the Attention Trap phenomenon in training data constitutes a key constraint on model performance. To address this phenomenon, we propose the Attention Cracking with Rejection Sampling (AC-RS) method. The method first applies structural optimization to training data to eliminate attention traps. Then, it conducts secondary training on the outputs generated by the fine-tuned model to mitigate potential negative impacts from manual data intervention. Experimental results show that AC-RS significantly enhances the accuracy of Code Execution while preserving models' original capabilities. Notably, the optimized 7B model achieves Code Execution accuracy comparable to 32B model and GPT-4o."
}Markdown (Informal)
[Breaking the Attention Trap in Code LLMs: A Rejection Sampling Approach to Enhance Code Execution Prediction](https://preview.aclanthology.org/author-page-yu-wang-polytechnic/2025.findings-emnlp.592/) (Ruan et al., Findings 2025)
ACL