一句话:提出 CodeSteer,利用程序分析得到的后向切片与控制流路径,在推理时重分配 LLM 注意力以提升混淆代码理解。
代码混淆广泛用于隐藏程序逻辑,给人工与自动化分析带来困难。作者初步研究发现,大语言模型在混淆代码上的性能显著下降,说明其依赖表层词法线索而非深层语义推理。为此提出 CodeSteer:一种事后注意力引导方法,将模型注意力重新分配到语义相关的程序元素上——用于输出预测的后向切片,以及用于执行推理的控制流路径。该方法把轻量级程序分析与推理阶段的注意力引导结合,引导 LLM 关注程序的核心输入—输出依赖。在多个模型与数据集上的实验表明,CodeSteer 显著改善混淆代码上的表现,常能恢复到与未混淆程序相当的准确率。作者还通过缓冲区溢出检测案例展示其实用价值,说明其在恶意软件/漏洞分析与混淆代码逆向中的潜力。
Code obfuscation is widely used in software systems and malware to conceal program logic and hinder analysis, posing significant challenges for both human developers and automated tools. While large language models (LLMs) have shown strong capabilities in code understanding, our preliminary study shows that LLM performance significantly degrades on obfuscated code, suggesting a reliance on superficial lexical cues rather than deep semantic reasoning. To address this limitation, we propose CodeSteer, a novel attention steering approach that reallocates model attention toward semantically relevant program elements, including backward slices for output prediction and control-flow paths for execution reasoning. Our method integrates lightweight program analysis with inference-time attention steering to guide LLMs toward the core input-to-output dependencies of a program. Experiments across multiple models and datasets demonstrate that CodeSteer significantly improves performance on obfuscated code, often recovering comparable accuracy to the level of unobfuscated programs. We also show CodeSteer’s practical utility through a case study on buffer overflow detection, highlighting its potential for malware/vulnerability analysis and reverse engineering of obfuscated code.
@inproceedings{paperbot12297,
title = {Post-hoc Attention Steering of Large Language Models for Robust Code Understanding under Obfuscation},
author = {Xiaokai Rong and Aashish Yadavally and Tien N. Nguyen},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3837556}
}