Activation Probes Surface Code-Security Signals that the Model's Output Misses
作者: Ivan Wiryadi
分类: cs.CR, cs.LG
发布日期: 2026-08-10
备注: 6 pages, 1 figure. Accepted at the TAIGR workshop, ICML 2026
💡 一句话要点
提出激活探针以揭示模型输出遗漏的安全信号
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 代码安全 激活探针 AI编码代理 安全审查 机器学习
📋 核心要点
- 核心问题:现有的闭合权重模型无法被审查,人工安全审查无法跟上代码生成速度,导致安全漏洞难以识别。
- 方法要点:通过训练线性探针来分析开放权重模型的激活,评估其在识别安全信号方面的有效性。
- 实验或效果:激活探针在61-67%的案例中成功识别出脆弱函数,显著优于随机猜测和模型的直接输出。
📝 摘要(中文)
随着AI编码代理在生产代码中占据越来越大的份额,人工安全审查的效率无法跟上代码生成的速度。现有的闭合权重模型使得部署团队无法读取其内部机制,因此可以使用开放权重模型作为审查者。本文探讨了通过读取审查者的激活是否能恢复出安全信号,而这些信号在直接询问审查者时可能会被遗漏。研究表明,在针对真实披露的漏洞进行测试时,激活探针在61-67%的情况下能够正确识别出脆弱函数,超越了50%的随机猜测线,且在所有提示下均优于模型的直接输出。
🔬 方法详解
问题定义:本文旨在解决AI编码代理生成的代码中潜在安全漏洞的识别问题。现有的闭合权重模型使得审查团队无法直接访问其内部机制,导致安全审查效率低下。
核心思路:论文提出通过使用开放权重模型的激活探针来捕捉安全信号,探索激活信息是否能揭示出直接询问模型时遗漏的安全信息。
技术框架:研究采用了一种线性探针方法,针对一组成对的脆弱和修复的Python函数进行训练。探针在未重新训练的情况下,测试其在真实漏洞上的表现。
关键创新:最重要的创新在于通过激活探针的方式,成功识别出模型输出中未能捕捉的安全信号。这一方法与传统的直接询问模型的方式有本质区别。
关键设计:在实验中,探针的设计包括对每个模型训练一个线性探针,并在未见过的漏洞类型上进行测试,确保探针的泛化能力。
🖼️ 关键图片
📊 实验亮点
实验结果显示,激活探针在61-67%的情况下成功识别出脆弱函数,超越了50%的随机猜测线,并且在所有提示下均优于模型的直接输出。这表明激活信息在安全信号识别中的重要性。
🎯 应用场景
该研究的潜在应用场景包括软件开发中的自动化安全审查、代码审计工具的改进以及AI辅助的代码生成系统。通过提高安全漏洞的识别率,可以显著降低软件发布后的安全风险,提升整体代码质量。
📄 摘要(原文)
AI coding agents now write a growing share of production code, and human security review does not scale at the rate code is generated. The agents in widest use are closed-weight, so a deploying team cannot read their internals. It can instead run an open-weight model as a reviewer over the agent's output. That reviewer's activations are readable. We ask whether reading those activations recovers a security signal that simply asking the same reviewer misses. We fit a single linear probe per model on a corpus of paired vulnerable-and-fixed Python functions, then test it without retraining on real disclosed vulnerabilities whose weakness type the probe never saw in training, across five open-weight reviewer models. On the vulnerabilities fixed by changing a single function, the probe scores the vulnerable function above its fix on 61-67% of cases for every model, beating the 50% chance line. It also beats the same model's prompted YES/NO win-rate read from its logits, under every prompt we try. Asking the model for a written verdict, even with chain-of-thought, returns the same answer on the vulnerable and fixed function most of the time and so cannot tell them apart. Model activations carry a code-security signal that prompting the same model misses.