arXiv:2509.16203cs.LG2025-09

提出可有效逆向检测大模型后门触发词的新方法。

Inverting Trojans in LLMs

  • 采用贪心扩展单个词元构建触发词,避免梯度搜索难题。
  • 通过激活空间相似度评估,隐式过滤干扰词元,提升检测精度。
  • 在真实后门数据上成功还原触发词,适用于安全敏感场景。

尽管图像领域已发展出高效的后门检测与逆向方法,但将其迁移至大语言模型(LLM)面临三大挑战:其一,LLM输入空间为离散的词元序列,无法使用基于梯度的搜索;其二,需考虑约30,000^k个可能的词元组合(k为触发词长度);其三,需排除与目标响应强相关的词元以避免误报,但某些领域缺乏可靠黑名单。本文提出一种新的触发词逆向方法,包含三个核心组件:(i)离散搜索,从精选单个词元开始,贪心扩展生成候选触发词;(ii)隐式黑名单机制,通过计算候选触发词与少量清洁样本在激活空间的平均余弦相似度进行筛选;(iii)当候选触发词引发高误分类率且决策置信度异常高时判定为有效后门。不同于多数近期工作,本方法在真实后门数据上可靠检测并成功还原了原始触发短语。

原文摘要 · Abstract (English)

While effective backdoor detection and inversion schemes have been developed for AIs used e.g. for images, there are challenges in "porting" these methods to LLMs. First, the LLM input space is discrete, which precludes gradient-based search over this space, central to many backdoor inversion methods. Second, there are ~30,000^k k-tuples to consider, k the token-length of a putative trigger. Third, for LLMs there is the need to blacklist tokens that have strong marginal associations with the putative target response (class) of an attack, as such tokens give false detection signals. However, good blacklists may not exist for some domains. We propose a LLM trigger inversion approach with three key components: i) discrete search, with putative triggers greedily accreted, starting from a select list of singletons; ii) implicit blacklisting, achieved by evaluating the average cosine similarity, in activation space, between a candidate trigger and a small clean set of samples from the putative target class; iii) detection when a candidate trigger elicits high misclassifications, and with unusually high decision confidence. Unlike many recent works, we demonstrate that our approach reliably detects and successfully inverts ground-truth backdoor trigger phrases.

后门检测大模型安全触发词逆向

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。