Evaluating and Improving the Robustness of Large Language Models to Input Sequence Variations
作者: Narek Maloyan
分类: cs.CR, cs.CL, cs.LG
发布日期: 2026-10-01
备注: PhD thesis, 2026. 118 pages
💡 一句话要点
提出评估与提升大语言模型对输入序列变异的鲁棒性的方法
🎯 匹配领域: 支柱一:机器人控制 (Robot Control) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 鲁棒性评估 对抗性攻击 安全性 模型防御 Jensen-Shannon散度 自适应进化算法 多层防御
📋 核心要点
- 现有的大语言模型在面对对抗性输入时,容易受到提示注入和后门攻击的影响,导致鲁棒性不足。
- 论文提出了一种新的鲁棒性评估指标R_stab(f),并设计了针对不同攻击类型的防御方法,旨在提升模型的安全性。
- 实验结果表明,使用新方法的模型在多个基准测试中显著降低了攻击成功率,提升了系统的整体鲁棒性。
📝 摘要(中文)
在生产系统中,大语言模型(LLMs)面临提示注入、特洛伊木马(后门)和自动质量指标的操控等挑战。本文开发了评估和提升LLM对对抗性输入序列变异鲁棒性的方法和算法。我们提出了基于Jensen-Shannon散度的生成鲁棒性指标R_stab(f),并证明了针对局部攻击的决策保持概率与鲁棒性之间的关系。对于非局部攻击,提出了一个经过校准的经验模型。实验结果显示,ASA自适应进化黑箱攻击在LLM作为评判系统中达到了73.8%的攻击成功率,并在Trojan Detection Challenge 2023中取得了显著的性能提升。
🔬 方法详解
问题定义:本文主要解决大语言模型在面对对抗性输入序列变异时的鲁棒性不足问题。现有方法在评估和防御这些攻击时存在局限性,无法有效应对多样化的攻击形式。
核心思路:论文提出了一种基于Jensen-Shannon散度的生成鲁棒性指标R_stab(f),用于评估模型在小扰动下的输出分布变化。同时,针对局部和非局部攻击,设计了相应的防御策略,以增强模型的鲁棒性。
技术框架:整体架构包括鲁棒性评估模块、攻击模型模块和防御策略模块。评估模块计算R_stab(f),攻击模型生成对抗样本,防御策略模块则应用适应性进化算法进行防御。
关键创新:最重要的技术创新在于提出了R_stab(f)指标和ASA自适应进化黑箱攻击方法,这些方法在评估和防御方面相较于现有技术具有显著的优势。
关键设计:在设计中,采用了HMAC保护的数据包进行工具调用认证,确保了低于0.1毫秒的响应时间。同时,针对多层防御系统,系统化了四类绕过策略,显著降低了攻击成功率。
🖼️ 关键图片
📊 实验亮点
实验结果显示,ASA方法在LLM作为评判系统中达到了73.8%的攻击成功率,且在Trojan Detection Challenge 2023中,替代触发器的REASR接近0.99,而真实触发器的召回率为0.17,相较于基线的0.14有显著提升。此外,使用5-7个异构模型的委员会策略将Gemma-3-4B的攻击成功率降低了47-55个百分点,最终达到19.3%。
🎯 应用场景
该研究的潜在应用领域包括安全性要求高的自然语言处理系统,如在线客服、自动内容审核和智能助手等。通过提升大语言模型的鲁棒性,可以有效防止恶意攻击,保护用户数据安全,增强系统的可信度和稳定性。未来,该方法还可以扩展到其他类型的机器学习模型和应用场景中。
📄 摘要(原文)
Large language models (LLMs) in production systems face prompt injections, trojans (backdoors), and manipulation of automatic quality metrics. This thesis develops models, methods, and algorithms for evaluating and improving LLM robustness to adversarial input sequence variations. We propose R_stab(f), a generative robustness metric based on the Jensen-Shannon divergence between per-step output distributions under small input perturbations. For localized attacks we prove V(h) <= 1 - R_class(h), where R_class(h) is the probability that a decision operator h keeps its decision under small perturbations. For non-localized attacks we propose a calibrated empirical model. For LLM-as-a-Judge systems we develop ASA, an adaptive evolutionary black-box attack that reaches an attack success rate (ASR) of up to 73.8%, with transfer between open models up to 62.6%. On Trojan Detection Challenge 2023 data (Pythia-1.4B), surrogate triggers reach REASR ~0.99 while recall of the true triggers is ~0.17 against a baseline of ~0.14. On SaTML CTF 2024 we systematize four classes of bypasses of multi-layer defenses, which reduce the ASR from 90% to 15-25%. Committees of 5-7 heterogeneous models reduce the ASR for Gemma-3-4B by 47-55 percentage points, to 19.3% with 7 models. For agentic systems based on the Model Context Protocol (MCP), we propose AttestMCP, which attests tool calls with HMAC-protected packets at under 0.1 ms per call, and the Commit Boundary isolation pattern. On the MCPBench benchmark of 847 scenarios they reduce the average ASR from 53.7% to 12.4%. The methods are implemented in the JudgeGuard and TrojanArmor software suites and the MCPSec module.