LEMON: Equivariant Learning over Attention Maps for Zero-Shot Misbehavior Monitoring on New LLMs
作者: Guy Bar-Shalom, Mor Geva, Fabrizio Frasca, Haggai Maron
分类: cs.AI
发布日期: 2026-10-15
💡 一句话要点
提出LEMON以解决新LLM的零-shot失误监控问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 失误监控 几何深度学习 图神经网络 零-shot迁移
📋 核心要点
- 现有的监控方法在面对新出现的LLM时需重复标注,成本高且效率低。
- 本文提出LEMON,通过几何深度学习原理,构建了一个对注意力图不变的监控网络,支持零-shot迁移。
- 在16个LLM和六个数据集上,LEMON在幻觉和越狱监控任务中表现优异,显著提升监控效果。
📝 摘要(中文)
大型语言模型在高风险环境中表现出失误,影响其部署。虽然可以使用外部LLM进行监控,但成本高昂。现有的内部表示监控方法受限于训练模型,需重复标注。为避免这一成本,本文提出了一种基于内部表示的零-shot监控方法LEMON,利用几何深度学习原理,构建了一个对跨模型注意力不变的在线图神经网络监控器。LEMON在16个LLM和六个数据集上进行测试,在零-shot跨模型设置下,在幻觉和越狱监控任务中超越所有基线,提升幅度最高达14个ROC-AUC点。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在高风险环境中失误监控的问题。现有方法依赖于外部LLM或内部表示监控,后者需针对每个新模型进行重复标注,成本高昂且效率低下。
核心思路:论文提出LEMON,通过将跨模型注意力图的不匹配视为代数对称性,利用几何深度学习构建一个不变的在线监控网络,以实现零-shot迁移。
技术框架:LEMON的整体架构为图神经网络,处理注意力图时采用逐token处理方式,实时输出监控得分。主要模块包括注意力图输入、图神经网络处理和得分输出。
关键创新:LEMON的核心创新在于其对注意力图的代数对称性建模,使得监控器能够在不同模型间有效迁移,克服了传统方法的局限性。
关键设计:LEMON在设计上采用了轻量级的图神经网络结构,损失函数通过优化监控得分的准确性来进行调整,确保在处理不同模型时保持高效性和准确性。
🖼️ 关键图片
📊 实验亮点
在16个大型语言模型和六个数据集的实验中,LEMON在幻觉和越狱监控任务中超越所有基线,提升幅度最高达14个ROC-AUC点,显示出其在零-shot跨模型监控中的优越性能。
🎯 应用场景
LEMON的研究成果在多个领域具有潜在应用价值,尤其是在需要高可靠性和安全性的自然语言处理任务中,如金融、医疗和法律等高风险行业。通过有效监控LLM的失误,能够提升系统的安全性和用户信任度,推动智能系统的广泛应用。
📄 摘要(原文)
Large language models exhibit misbehaviors that hinder deployment in high-stakes settings. One approach to monitor such failures is to use an external LLM as a monitor, but this is prohibitively expensive. A well-known and efficient class of monitors can detect such failures from internal representations (such as activation probes), but are tied to the model they were trained on, requiring costly re-annotation as new LLMs appear. A natural way to avoid this repeated annotation cost is to develop internal-representation based monitors that transfer zero-shot across LLMs. However, such transfer is challenging because internal representations are not naturally aligned across models; in particular, attention maps, known to contain signals of misbehavior, may differ in head function, ordering, and model depth. In this work, we characterize those cross-model attention mismatches as algebraic symmetries and use geometric deep learning principles to build LEMON (Language-model Equivariant MOnitoring Network) an online graph neural network-based monitor, whose predictions are invariant under these symmetries. LEMON processes attention maps token-by-token, as they are produced and outputs a score after every token (or every window of $W$ tokens) at negligible cost. Across 16 LLMs and six datasets, in the zero-shot cross-model setting, LEMON outperforms all baselines on both hallucination and jailbreak monitoring tasks, improving over the strongest by up to 14 ROC-AUC points.