arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.03482cs.CRcs.AIcs.LG

MEMSAD: 基于梯度耦合的内存污染异常检测用于检索增强型智能体

MEMSAD: Gradient-Coupled Anomaly Detection for Memory Poisoning in Retrieval-Augmented Agents

Department of Electrical Engineering and Computer Sciences(电气工程与计算机科学系);University of California, Berkeley(加州大学伯克利分校);Berkeley AI Research(伯克利人工智能研究)

Ishrith Gowda

AI总结:

本文提出MEMSAD,通过梯度耦合定理实现内存污染攻击的检测,证明其在对抗策略下的正确分类保证,并通过实验验证复合防御在所有攻击下的高检测率和低误报率。

摘要:

持久的外部内存使LLM智能体能够在会话间保持上下文,但其安全性属性仍未正式表征。我们正式将针对检索增强型智能体的内存污染攻击建模为一个Stackelberg博弈,并提出一个涵盖三种攻击类别的统一评估框架。修正Chen等人(2024)触发查询规范中的评估协议不一致,我们证明忠实评估使攻击成功率提高了4倍(ASR-R: 0.25→1.00)。我们的主要贡献是MEMSAD(语义异常检测),一种基于校准的防御方法,其基础是梯度耦合定理:在编码器正则性下,异常得分梯度和检索目标梯度可证明相同,因此任何减少检测风险的连续扰动必然降低检索排名。这种耦合产生了一种认证的检测半径,无论对手策略如何都能保证正确分类。我们通过Le Cam的方法证明了极小极大最优性,证明任何阈值检测器需要Ω(1/ρ²)校准样本,而MEMSAD在log(1/δ)因子内达到此水平。我们进一步推导了滚动校准的在线遗憾界,以率O(σ²/³Δ¹/³),并正式刻画了一个离散同义词不变性漏洞,标志着连续空间防御能保证的边界。在3×5攻击-防御矩阵上进行实验,使用bootstrap置信区间、Bonferroni校正的假设检验和Clopper-Pearson验证(n=1,000)证实:复合防御在所有攻击下实现TPR=1.00,FPR=0.00,而同义词替换在Δ ASR-R≈0时逃避检测,暴露了现有嵌入式防御无法弥补的差距。

英文摘要:

Persistent external memory enables LLM agents to maintain context across sessions, yet its security properties remain formally uncharacterized. We formalize memory poisoning attacks on retrieval-augmented agents as a Stackelberg game with a unified evaluation framework spanning three attack classes with escalating access assumptions. Correcting an evaluation protocol inconsistency in the triggered-query specification of Chen et al. (2024), we show faithful evaluation increases measured attack success by $4\times$ (ASR-R: $0.25 \to 1.00$). Our primary contribution is MEMSAD (Semantic Anomaly Detection), a calibration-based defense grounded in a gradient coupling theorem: under encoder regularity, the anomaly score gradient and the retrieval objective gradient are provably identical, so any continuous perturbation that reduces detection risk necessarily degrades retrieval rank. This coupling yields a certified detection radius guaranteeing correct classification regardless of adversary strategy. We prove minimax optimality via Le Cam's method, showing any threshold detector requires $Ω(1/ρ^2)$ calibration samples and MEMSAD achieves this up to $\log(1/δ)$ factors. We further derive online regret bounds for rolling calibration at rate $O(σ^{2/3}Δ^{1/3})$, and formally characterize a discrete synonym-invariance loophole that marks the boundary of what continuous-space defenses can guarantee. Experiments on a $3 \times 5$ attack-defense matrix with bootstrap confidence intervals, Bonferroni-corrected hypothesis tests, and Clopper-Pearson validation ($n=1{,}000$) confirm: composite defenses achieve TPR $= 1.00$, FPR $= 0.00$ across all attacks, while synonym substitution evades detection at $Δ$ ASR-R $\approx 0$, exposing a gap existing embedding-based defenses cannot close.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑