paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Backdoors in Code Summarizers: How Bad Is It?

代码摘要器中的后门:问题有多严重?
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 该论文研究代码摘要模型的后门攻击,属于 Code LLM 安全与数据投毒方向,与用户关注的静态分析、形式化验证、浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉没有直接交集。虽然涉及 Code LLM 与 PL,但核心问题是安全攻防而非 PL→AI 或 AI→PL 的程序分析改进。引用 0 inbox
Chenyu Wang, Zhou Yang, Yaniv Harel, David Lo
crossref: 2026-09-12

AI 速览

一句话:系统实证研究数据、模型与推理因素对代码摘要模型后门攻击效果的影响,并发现 0.004% 的极低投毒率即可成功植入后门。

Code LLM 已被证明易受后门攻击:输入中出现触发器时,模型会生成攻击者期望的恶意输出。已有研究主要关注投毒比例,却未系统考察批量大小、训练轮数、触发器长度等因素。本文以代码摘要任务为例,从数据、模型、推理三个维度开展大规模实证研究,系统分析影响后门有效性的因素。结果表明:开发者可采用较大批量配合较少轮数,用户可适当调高 temperature 或 top-k 以缓解威胁;防御方应优先检查稀有且较长的 token。尤为重要的是,本文推翻了“极低投毒率下攻击无效”的共识——仅投毒 454,451 个样本中的 20 个(0.004%)即可成功植入后门,而常见防御甚至无法移除一个投毒样本,凸显了极低投毒率场景下的防御需求。

问题
现有 Code LLM 后门研究仅关注投毒比例等少数因素,缺乏对训练批量、训练轮数、触发器设计空间(如触发长度)等影响后门有效性的因素的系统理解,威胁程度尚不清晰。
方法
以代码摘要任务为案例,通过数据投毒植入后门,并围绕数据、模型与推理三类因素开展系统的实证对比实验,考察各因素对攻击效果的影响。
评估
在包含 454,451 个样本的数据集上测量不同配置下的攻击成功率,并测试常见防御在极低投毒率下的表现;结果显示 0.004% 的投毒率即可成功植入后门,且现有防御无法移除任何投毒样本。
原文摘要(Abstract)

Large Language Models for Code (Code LLMs) are increasingly employed in software development. However, studies have recently shown that these models are vulnerable to backdoor attacks: when a trigger (a specific input pattern) appears in the input, the backdoor will be activated and cause the model to generate malicious outputs desired by the attacker. Researchers have designed various triggers and demonstrated the feasibility of implanting backdoors by poisoning a fraction of the training data (known as data poisoning). Some basic conclusions have been made, such as backdoors becoming easier to implant when attackers modify more training data. However, existing research has not explored other factors influencing backdoor attacks on Code LLMs, such as training batch size, epoch number, and the broader design space for triggers, e.g., trigger length.To bridge this gap, we use the code summarization task as an example to perform a comprehensive empirical study that systematically investigates the factors affecting backdoor effectiveness and understands the extent of the threat posed by backdoor attacks on Code LLMs. Three categories of factors are considered: data, model, and inference, revealing findings overlooked in previous studies for practitioners to mitigate backdoor threats. For example, Code LLM developers can adopt higher batch sizes with fewer epochs appropriately. Users of code models can adjust inference parameters, such as using a higher temperature or a larger top-k, appropriately. Future backdoor defense can prioritize the inspection of rarer and longer tokens, since they are more effective if they are indeed triggers. Since these non-backdoor design factors can also greatly sway attack performance, future backdoor studies should fully report settings, control key factors, and systematically vary them across configurations. What’s more, we find that the prevailing consensus—that attacks are ineffective at extremely low poisoning rates—is incorrect. The absolute number of poisoned samples matters as well. Specifically, poisoning just 20 out of 454,451 samples (0.004% poisoning rate—far below the minimum setting of 0.1% considered in prior Code LLM backdoor attack studies) successfully implants backdoors! Moreover, the common defense is incapable of removing even a single poisoned sample from this poisoned dataset, highlighting the urgent need for defense mechanisms against extremely low poisoning rate settings.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9574,
  title = {Backdoors in Code Summarizers: How Bad Is It?},
  author = {Chenyu Wang and Zhou Yang and Yaniv Harel and David Lo},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00102}
}