发现大模型内部隐藏编码的共通信号,可实时检测隐蔽数据外泄。
MIRAGE: A Polarity-Flipping Encoding Subspace in LLM Agents

- 在残差流中发现共享低维编码子空间,支持多种隐蔽编码方式。
- 用逻辑回归探测器识别隐藏编码,准确率高达AUC 0.975–1.000。
- 适用于检测模型内隐蔽行为,尤其适合安全监控场景。
当大模型代理被强制执行隐蔽编码(如Base64、ROT13、首字母诗、同义词链等)时,输出内容可规避检测,但其内部计算仍暴露特征。在九类编码与五种架构下的八种模型中,这些计算由残差流中的共享低维编码子空间支撑。基于八类编码训练的逻辑回归探针,在第九类上实现AUC 0.975–1.000,读取的是内在计算而非表面特征。同一方向在规划标记处呈现第二类机制性信号:正向激活表示模型将内联模拟编码,负向激活表示将调用工具外包,从而在编码生成前区分两种执行策略。我们构建MIRAGE(模型内隐蔽生成外泄读出器),利用双通道实时监测。在126个代理外泄场景中,其性能达AUC=0.918,显著优于仅依赖输出的检测(AUC=0.518)。监测性能本质取决于模型几何结构:良性编码的误报率从Qwen-7B的0%到Phi-3.5的100%不等,揭示探针能真实反映模型是否在几何上分离隐蔽与公开编码。在所有测试攻击预算下,抑制该子空间的行为均导致编码保真度下降,此为实证规律,非结构性不可能性断言。
原文摘要 · Abstract (English)
When LLM agents are coerced into covertly encoding sensitive data (Base64, ROT13, acrostic, synonym chains, and beyond), the resulting outputs evade output-side detection but the underlying computation does not. Across nine encoding families and eight models from five architecture families, that computation is supported by a shared low-dimensional encoding subspace in the residual stream. A logistic-regression probe trained on eight encoding families recovers the held-out ninth at AUC 0.975-1.000, reading the computation rather than surface features. The same direction exhibits a second mechanistic signature at the planning token, flipping polarity to activate positively when the model will simulate the encoding inline and negatively when it will outsource it to a tool call, distinguishing two execution strategies before the encoded text exists. We build MIRAGE (Model-Internal Readout of Agentic Generation Exfiltration), a two-channel real-time monitor exploiting both signals. On 126 agentic exfiltration scenarios, it reaches AUC = 0.918, substantially outperforming output-only detection (AUC = 0.518). Monitor performance is fundamentally a property of the host model's geometry: benign-encoding false-positive rate ranges from 0% on Qwen-7B to 100% on Phi-3.5, revealing that the probe faithfully reads whether a model's geometry separates covert from overt encoding. Across all tested adversarial budgets, every attack suppressing the subspace also destroyed encoding fidelity, reported as an empirical regularity on the evaluated budgets, not a structural impossibility claim.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。