The paper proposes a robustness metric for LLM input perturbations and releases the ASA attack and the AttestMCP defense.Evaluating and Improving the Robustness of Large Language Models to Input Sequence Variations
ASA achieves a black-box ASR of 73.8% on Gemma-3-4B; a 7-model committee reduces it to 19.3%.
The adversary influences the LLM through input sequence variations. Knowledge is divided into black-box, gray-box, and white-box. ASA only modifies the judge's decision through the query interface; the trojan experiment is white-box for Pythia-1.4B. The MCP goal is prompt injection to tool hijacking. There are also query budget, compute, and time constraints.
- LLMs in production systems face prompt injection, trojans, and the conversion of text injection into tool calls via MCP. The authors argue that existing metrics do not simultaneously account for discrete tokens and autoregressive generation, and state that analyses of judges and MCP remain incomplete.
- The author defines Rstab(f) using the Jensen–Shannon divergence of stepwise output distributions, and for local attacks gives vulnerability not exceeding 1 minus Rclass(h). Black-box ASA uses evolutionary search to test judges. Defenses are heterogeneous committees, multi-layer filtering, and AttestMCP with permission tables plus HMAC.
- ASA's ASR on Gemma-3-4B is 73.8% (Table 4.1, n=200). The 7-model committee is 19.3%. GCG's REASR on Pythia-1.4B is 0.987. MCPSec reduces MCPBench average ASR from 53.7% to 12.4%.
- The authors state that the strict upper bound only covers local attacks; the upper bound on V given by Rstab remains open, and there is a trade-off between robustness and accuracy. The experiments cover the five judges in Table 4.1, Pythia-1.4B, and the three MCPBench models; the paper does not report committee members, and the Table 4.2 title also does not state the target model.
- Evaluated models
- Gemma-3-4B-InstructPythia-1.4BGPT-3.5GPT-4Llama 2Llama 3.2Claude-3-Opus
- Benchmarks
- MT-BenchKaggle “LLMs: You Can’t Please Them All”TDC2023SaTML CTF 2024MCPBench
- Metrics
- ASRTSRRecallREASRRstab(f)Rclass(h)RUT
A paper proposes models, methods, and algorithms for evaluating and improving large language model robustness to adversarial input sequence variations, centered on a generative robustness metric named R_stab(f) based on Jensen-Shannon divergence between stepwise output distributions under small input perturbations. For LLM-as-a-Judge systems, the authors propose the adaptive evolutionary black-box attack ASA, achieving attack success rates up to 73.8% and transferability between open-source models up to 62.6%. On Trojan Detection Challenge 2023 data (Pythia-1.4B), substitute triggers reach a REASR of about 0.99, while true trigger recall is about 0.17 and the baseline about 0.14. At SaTML CTF 2024, the authors systematically identify four categories of methods for bypassing multi-layer defenses, reducing attack success rates from 90% to 15-25%; a committee of 5-7 heterogeneous models reduces the attack success rate on Gemma-3-4B by 47-55 percentage points, dropping to 19.3% with 7 models.
Related events and news
1 events · 0 news mentions
- This event's paper
论文提出LLM对抗输入鲁棒性评估与防御方法
Paper analysis
What problem does this paper attempt to solve?
The paper aims to measure and reduce LLM sensitivity to injection, trojans, and tool hijacking.
The core problem is how to measure and reduce LLM sensitivity to changes in adversarial input sequences, including prompt injection, trojans, and agent tool hijacking.
- Scenario: The authors argue that after models enter production systems, the attack surface increases. A judge whose verdict is altered distorts comparisons and experimental reproducibility; after connecting tools via MCP, text injection can become code execution, file modification, or network requests.
- Gaps: The authors state that visual adversarial frameworks are hard to apply directly to discrete, autoregressive LLMs, and existing metrics do not address both points simultaneously. Targeted attack analysis of judges is incomplete; the quantitative asymmetry between trigger injection and detection was previously open. The authors state that, to their knowledge, no prior work analyzes MCP architecture risks and provides cryptographic proofs for tool calls.
- Hypothesis: The authors believe these attacks share a common cause: learned mappings are sensitive to small input changes in discrete token space.
- Proposed: Formal metrics Rstab(f) and Rclass(h), black-box attack ASA, heterogeneous committees and multi-layer filtering, and MCPBench, AttestMCP, and Commit Boundary.
- Threat Model:
- Goal: Change judge verdicts, bypass filters, activate or reconstruct trojans, or carry out prompt injection to tool hijacking.
- Knowledge: The paper distinguishes black-box, gray-box, and white-box. ASA uses only queries and responses; the Pythia-1.4B trojan experiments are full white-box.
- Capability: The attack maps an input to another input. Constraints include query budget, compute, and time. ASA experiments have a budget of 1000 queries per attack.
- Victim System: LLM-as-a-Judge, LLMs with multi-layer filtering, and agents calling external tools via MCP.
What related research exists?
The authors place the gaps in discrete autoregressive metrics, judge evaluation, and MCP defenses.
From visual robustness to text attacks
- Goodfellow et al. and Madry et al.: Established adversarial robustness analysis in computer vision. The authors state that this framework is difficult to transfer directly to LLMs because the token space is discrete and inference is autoregressive.
- Zou et al.'s GCG, Wallace et al., Perez et al.: GCG generates universal adversarial suffixes; universal triggers can control generation; Perez et al. systematically organize prompt injection.
- Carlini et al.: Extract training data fragments from trained models. The authors state that formal robustness metrics are still underdeveloped and do not simultaneously account for discreteness and autoregressive generation.
Judges and trojans
- Zheng et al.: Proposed using LLMs to automatically evaluate other models' responses. The authors state that this architecture has spread quickly, but robustness analysis against targeted adversarial attacks is still incomplete.
- TDC2023 and TrojAI: Study trojan detection. The authors state that the quantitative asymmetry between trigger injection and detection was an open problem before this work.
Agents and indirect injection
- Greshake et al.: Describe indirect prompt injection in integrated LLM applications, where external content can take over an agent. The authors state that, to their knowledge, no prior work has analyzed the architectural risks of MCP or proposed defenses that provide cryptographic proofs for tool calls.
Baselines and benchmarks
- Baseline methods: Judge attacks compare BI, CWB, CM, and ASA; trojan detection compares random prefixes, PEZ, GBDA, UAT, and GCG. Defenses compare Perplexity Check, Instruction Filtering, Content Moderation, combined filtering, and 3/5/7-model committees; MCP and non-MCP tool integration are compared.
- Benchmarks/datasets: MT-Bench, Kaggle "LLMs: You Can't Please Them All", TDC2023, SaTML CTF 2024, and MCPBench with 847 scenarios.
The authors position this work as filling three gaps: formal metrics that account for discreteness and autoregression, systematic evaluation of LLM-as-a-Judge vulnerabilities, and agent defense algorithms against external tool protocol injection.
How does the paper address this problem?
Use Rstab and Rclass to measure robustness, then use ASA, committees, and MCPSec to test and reduce ASR.
The authors characterize the deviation of the generation distribution under small perturbations with Rstab(f), estimate it empirically using ASR over a fixed attack family, and restrict the actions reachable by attacks using a heterogeneous committee, multi-layer filtering, and MCPSec.
Formal metrics
- Inputs are token sequences over a finite vocabulary. Generation tasks use a distribution f; discrete adjudication uses a deterministic operator h=Dec∘f. The neighborhood Bε(x) can be defined by Hamming, Levenshtein, or semantic distance. Semantic distance defaults to sentence embeddings from all-mpnet-base-v2 unless otherwise stated.
- The generation metric performs teacher forcing along a reference trajectory, comparing next-token distributions step by step, then averages over steps. The reference trajectory defaults to greedy decoding of the original prompt. Experiments default to Jensen–Shannon divergence; with base 2, Cmax=1. The authors write it as Rstab(f)=𝔼[1−sup DT(x,x′)/Cmax], i.e., the smaller the expected supremum of normalized divergence, the higher the metric. This value depends on the reference trajectory and comparison protocol.
- For local attacks that produce no bad output on clean input, stay within the neighborhood, and where bad output necessarily changes the adjudication, the authors claim to prove V(h)≤ 1−Rclass(h). Prompt injection and jailbreak are not in this neighborhood; the authors instead use a calibrated empirical model and state it is not a universal strict upper bound. Parameters are fitted on validation attacks.
- For a fixed attack family, the authors state that ASR is a consistent estimator of vulnerability V(h); its population limit 1 minus V(h) is an upper bound on Rclass(h) under the stated assumptions. When stepwise distributions are unavailable for proprietary models, experiments use 1 minus ASR as a proxy.
ASA and success criteria
- For judges, the authors split attacks into instructive and content: the former injects direct commands, the latter moves the adjudication via content and context. BI belongs to the former; CWB and CM belong to the latter. The text does not provide a reproducible injected sentence.
- ASA is black-box evolutionary search. Experiments use population size N=50, generations G=20, budget N·G=1000 target model queries; fitness weights α=0.8, β=0.2. Mutations include synonym replacement, meaning-preserving rewriting, and insertion of distracting fragments, while maintaining grammar to pass language filters.
- The authors state that under greedy decoding or cached fitness, and when retaining the best of the previous generation, the population's best fitness is monotonically non-decreasing, but global optimality is not guaranteed.
- The success criterion for judge experiments is a score change of at least 2 points, or a change in the comparative adjudication. Decoding is fixed to greedy with temperature=0.
Committee and multi-layer filtering
- The committee takes a majority vote over the parsed adjudications of an odd number of models and computes the agreement ratio; below a threshold, it flags for human review. The paper does not give the threshold value or list the committee members.
- The Condorcet jury theorem concerns majority accuracy when individuals are independent and have accuracy r>0.5. The authors state it does not automatically imply an increase in Rclass. If r is estimated by 1 minus ASR under ASA, Gemma-3-4B does not satisfy this condition; the authors attribute the benefit to heterogeneous composition reducing error correlation.
- Multi-layer defense has input, model, and output layers, with early rejection possible. The SaTML configuration is system instruction, Python filter, and LLM filter. The authors classify bypasses into four categories: code-oriented, ASCII encoding, word splitting, and context misleading; the first three correspond to input normalization, the fourth to context-isolating system instructions.
Trojan protocol and MCPSec
- TDC2023 provides a suspicious model and a target malicious string; the task is to reconstruct the trigger phrase. Recall is a BLEU-style match between predicted trigger and true trigger; REASR is the BLEU between generated output and target string. The authors state these are proxy metrics under the competition protocol, not binary detection recall.
- The three architectural issues of MCP are: capability claims without third-party proof, sampling not authenticating message origin, and implicit trust transfer between multiple servers.
- AttestMCP fixes the permission table at session start, before untrusted data enters, and uses HMAC with the session key to verify RPC packets. The authors state that HMAC cannot distinguish between user-intended calls and calls made by a legitimate client after injection; the authorization boundary relies on the permission table. Abuse that allows tools with permitted arguments can still pass. When |args| does not exceed 4096 bytes, the authors report overhead below 0.1 ms per call.
- Commit Boundary runs agent-generated code in a container with resource limits, performs static analysis and output validation before committing; high-risk cases may require human approval. MCPSec also includes capability certificates, origin marking, cross-server isolation, and replay protection. MCPBench has 847 scenarios.
What experiments did the paper conduct?
On Gemma-3-4B, ASA's ASR is 73.8%; the 7-model committee is 19.3%, and after MCPSec the average is 12.4%.
Experimental Setup
- Models: Table 4.1 lists Gemma-3-27B-Instruct, Gemma-3-4B-Instruct, Llama-3.2-3B-Instruct, GPT-4, Claude-3-Opus. The multi-layer defense experiments mention GPT-3.5 and Llama 2. The trojan is Pythia-1.4B. Rstab approximation uses GPT-4o-mini. MCPBench uses Claude-3.5-Sonnet, GPT-4o, Llama-3.1-70B.
- Data: MT-Bench and Kaggle "LLMs: You Can’t Please Them All", the latter includes ppe_human_preference, search_arena_v1_7k, mt_bench, and code_review; also SaTML CTF 2024, TDC2023, and 847 scenarios from MCPBench. Except for the 847, the attached text does not give the number of items for each subset.
- Attacks: BI, CWB, CM, ASA. On the trojan side: random prefix, PEZ, GBDA, UAT, GCG. Generation attacks also include CUA, JMA, etc., mentioned by the authors; the main table numbers correspond to the first four.
- Defenses: Perplexity Check, Instruction Filtering, Content Moderation, their combination, 3/5/7-model committees; SaTML three-layer defense; MCPSec relative to an unprotected MCP configuration, and MCP relative to non-MCP integration.
- Metrics and Judging: ASR, TSR, Recall, REASR, RUT, and Rstab, Rclass on small samples. A judge success is a score change of at least 2 points or a change in the comparative verdict. Decoding is greedy, temperature=0.
- Samples and Tests: n=50 per model/attack/task, aggregated n=200 across four tasks. Intervals are from 1000 bootstrap resamples. The authors report a difference of 13.3 percentage points between BI and ASA on GPT-4, p<0.01. Near 0.5, for aggregated samples, differences of about 14 percentage points or more, the authors give power 0.80.
Main Results
According to Table 4.1, ASR point estimates (%), aggregated n=200 across four tasks. 95% intervals are in that table, not listed here.
| Model | BI | CWB | CM | ASA | | Gemma-3-27B-Instruct | 57.5 | 48.7 | 67.7 | 72.3 | | Gemma-3-4B-Instruct | 66.7 | 55.5 | 67.4 | 73.8 | | Llama-3.2-3B-Instruct | 60.1 | 47.5 | 47.8 | 58.2 | | GPT-4 | 32.4 | 28.6 | 41.2 | 45.7 | | Claude-3-Opus | 29.8 | 25.3 | 38.5 | 42.9 |
- The authors state ASA is highest on four of the five models. The exception is Llama-3.2-3B-Instruct: BI is 60.1%, ASA is 58.2% (Figure 4.1 and Table 4.1).
- The authors state open models are more vulnerable than proprietary models; in all four columns of Table 4.1, the point estimates for the three open models are higher than those for GPT-4 and Claude-3-Opus. The higher robustness of Llama relative to Gemma is stated by the authors only for CWB, CM, ASA, not for BI. The ASA difference between GPT-4 and Claude-3-Opus is about 2.8 percentage points, with overlapping intervals; the authors state this sample size cannot distinguish them.
- The authors state transfer TSR between open models is 50.5%–62.6%, and the abstract says it reaches 62.6%. System prompt attacks are more effective than user content attacks; the attached text does not give separate numbers for this comparison.
Defenses and Committees
- What was measured: ASR of ASA under filters and committees (Table 4.2). The title does not state the target model. The abstract and 4.2.4 map the 7-model 19.3% to the Gemma-3-4B single-model 73.8%, and state that 5–7 heterogeneous models reduce it by 47–55 percentage points.
- Results: Perplexity Check 58.4±6.8, Instruction Filtering 63.7±6.7, Content Moderation 67.5±6.5, combination 42.1±6.8; 3/5/7-model committees are 39.4±6.8, 26.8±6.1, 19.3±5.5.
- Authors' interpretation: Individual defenses do not block all ASA. Homogeneous committees reduce it less; the paper does not give numbers. If r is taken as 1 minus ASR under ASA, only the two proprietary models in Table 4.1 are above 0.5; the authors therefore do not count the committee results on open models as a direct consequence of the Condorcet condition itself.
Trojan and Multi-Layer Bypass
- Trojan: Pythia-1.4B, TDC2023, full white-box. In Table 4.3, GCG has best single-run Recall 0.167, REASR 0.987; random baseline Recall 0.14, REASR not reported. PEZ, GBDA, UAT have Recall 0.105, 0.116, 0.131, and REASR 0.052, 0.056, 0.030.
- Authors' interpretation: High REASR is relatively easy; true trigger Recall is only 0.027 above the random baseline. The authors hypothesize the asymmetry grows with parameter count and state that tests on larger models are left for future work. The abstract writes REASR about 0.99, Recall about 0.17, corresponding to 0.987 and 0.167 in the table.
- Multi-layer defense: In SaTML CTF 2024, GPT-3.5 and Llama 2 with three-layer defenses can still be bypassed. A controlled experiment reduces the unprotected control's ASR of about 90% to 15%–25%; this sentence does not name the model. The authors state no filter combination blocks all four bypass types simultaneously.
MCPBench
- What was measured: 847 scenarios, three models. Table 5.2 compares MCP and non-MCP tool integration.
- Results: Average ASR from baseline 26.4% to MCP 53.7% (+27.3 percentage points). Breakdown: indirect injection 31.2% vs 47.8%, tool response manipulation 28.4% vs 52.1%, cross-server propagation 19.7% vs 61.3%. MCPSec further reduces average ASR from 53.7% to 12.4%, which the authors state is a 41.3 percentage point decrease. Steady-state extra latency does not exceed 8.3 ms/message, excluding the perplexity filter and content moderation in Table 5.3.
- Authors' interpretation: These ASRs correspond only to the studied agent implementations, tool scenarios, and MCP configurations, and do not cover all agent architectures.
Other Ablations and Analyses
- RUT: 7-model committee, the authors give ΔRobustness about 0.55, parallel ΔCost about 0.08, ΔUtility about 0.02, RUT about 5.5; the number of model calls still increases roughly linearly with the number of members (4.2.4).
- Rstab approximation: GPT-4o-mini, 20 prompts, 5 benign perturbations each, Levenshtein distance 1–2, 120 API calls total. Table 4.4 gives Rstab 0.115±0.139, Rclass 0.050, discrete output retention 5%. The range across prompts in the discussion is 0.005 to 0.540.
- The authors state this sample is consistent with Rstab not being lower than Rclass, but the standard deviation is larger than the mean; the computation is not teacher forcing, top-20 logprobs underestimate divergence and thus overestimate Rstab, and it does not transfer directly to adversarial scenarios.
- vLLM vs HuggingFace: LLaMA-2-13B, A100, generating 256 tokens, throughput 2.8 vs 14.1 req/s (Table 5.1). In Figure 5.4, HF-seq 1.4, HF-batch 2.8, vLLM-base 14.1, vLLM-full 11.7 req/s.
- Security overhead: context 2048, same model and vLLM, CO is 28.4% of baseline inference; perplexity filter 13.5%, AttestMCP 0.03% (Table 5.3). The text states defenses account for about 28% at 2048 and about 12% at 8192.
- ASA hyperparameters fixed at N=50, G=20, α=0.8, β=0.2. The attached text does not give ablation numbers for these hyperparameters.
What are some points that can be further explored?
The authors list strict bounds, an upper bound for Rstab, and cross-hardware validation as unfinished items.
Limitations and future directions noted by the authors
- Computing precise metrics on large models is computationally expensive; strict bounds only cover local attacks; transferring results to the generative metric Rstab(f) remains an open problem; a suitable distance on discrete token space is still unresolved (Section 2.7).
- A strict upper bound for V(f) given by Rstab(f) remains an open problem because conditions on discrete outputs cannot be directly transferred to stepwise divergence (Remark 2.22).
- The authors state there is no method to eliminate the trade-off between robustness and accuracy; defenses for one class of perturbations do not automatically transfer to other classes; applicability depends on the metric d and budget ε (Section 3.3.3 and Chapter 3 conclusion).
- Quantitative estimates of homogeneous committee benefits require separate study; the minimum architectural diversity needed to stably reduce ASR remains open; scaling up Rstab samples and testing on adversarial scenarios is written as next steps (Chapter 4 conclusion).
- Implementation is tied to specific vendor APIs; performance measurements come from a single NVIDIA A100, and extrapolation to other accelerators requires validation (Chapter 5 conclusion).
- Chapter 6, Remark 6.1, describes the generalization drop to unknown attacks as an empirical observation: defenses optimized against known attacks may have lower robustness or safety metrics against new attacks.
Experimental coverage
- Table 4.1 covers 5 judge models, 4 attacks, with four-task aggregation n=200, greedy decoding; the success rule is a score change of at least 2 points or a change in comparative verdict.
- Table 4.2 covers three filters, combinations, and 3/5/7-model committees. The title does not specify the target model, and the paper does not report the committee member list. The ASA query budget is stated as 1000.
- Trojan numbers come from Pythia-1.4B, TDC2023, white-box, comparing random prefixes, PEZ, GBDA, UAT, and GCG.
- MCPBench has 847 scenarios and three models; Table 5.2 gives ASR relative to non-MCP integration, and Section 5.3.5 gives average ASR after MCPSec. The SaTML experiment is written with three layers of defense for GPT-3.5 and Llama 2.
- Numerical comparisons of Rstab and Rclass are only given with GPT-4o-mini, 20 prompts, benign perturbations, top-20 logprobs, and non-teacher forcing. Gray-box is defined in Section 2.1.2, and the attached results do not report ASR under that knowledge level.
Summarize the main content of the paper
Metrics, ASA, and the committee/MCPSec form the whole paper; the main result is the ASR reduction on judge and MCP.
This doctoral thesis provides a set of metrics, attacks, and defenses to evaluate and improve LLM robustness, targeting judges, trojans, and MCP agents.
- Problem: The author argues that prompt injection, training-time triggers, and tool protocol injection in production systems can alter decisions or turn text vulnerabilities into external actions. The common structure is written as discrete token mappings that are sensitive to small input changes.
- Metrics: Rstab(f) compares stepwise output distributions along a reference trajectory under small perturbations; experiments use bounded Jensen–Shannon divergence. The author states that local attacks satisfy vulnerability not exceeding 1 minus Rclass(h); non-local attacks use only calibrated models. Over a fixed attack family, 1 minus ASR is used as an empirical proxy for the upper bound.
- Attacks: ASA performs evolutionary search under black-box with a budget of 1000 queries, and splits judge attacks into direct commands and content manipulation. Success is determined by whether the score changes by at least 2 points, or whether the comparison decision changes.
- Results: In Table 4.1, ASA's ASR on Gemma-3-4B-Instruct is 73.8%, GPT-4 is 45.7%, and Claude-3-Opus is 42.9% (all n=200). The author maps the 7-model committee to 19.3% and claims a 47–55 percentage point drop for 5–7 models. On Pythia-1.4B, GCG's Recall is 0.167, REASR is 0.987, and the random Recall baseline is 0.14. On MCPBench, MCPSec reduces the average ASR from 53.7% to 12.4%. In the SaTML comparison, three-layer defenses reduce about 90% to 15%–25%; this sentence does not mention model names.
- Author's conclusions: The author argues that post-training reconstruction of true triggers is not suitable as a standalone audit and should prioritize preventive data control. When individual committee accuracy does not exceed 0.5, the benefit is attributed to heterogeneity rather than the Condorcet condition itself. The author states that JudgeGuard has been used in Viasat's judge-based recommendation ranking module.