TL;DR
This paper introduces GT-MCP, a game-theoretic security framework that treats LLM context management as a closed-loop dynamical system to defend against multi-turn prompt injection and context poisoning. By strategically coordinating heterogeneous LLM agents and deploying a rollback-based self-healing mechanism, GT-MCP achieves a 0% controller-level attack success rate over long-horizon interactions.
What Problem Does This Paper Address?
When Large Language Models (LLMs) engage in multi-turn conversations, they don't just generate isolated answers; they maintain a continuously evolving context. This persistence introduces a massive security vulnerability: context poisoning and indirect prompt injection. Attackers can plant malicious instructions inside external documents, tool outputs, or user prompts. While these fragments might look completely benign and locally plausible on a single turn, they accumulate over time, gradually hijacking the model's reasoning trajectory.
Existing defenses focus almost entirely on local, single-turn filtering (e.g., prompt sanitization or input isolation). They fail to regulate how the context state evolves across an entire conversation. Furthermore, emerging standards like the Model Context Protocol (MCP) act merely as passive routing layers without enforcing contextual stability. This paper addresses the critical need for trajectory-level context control in multi-agent LLM systems.
Methods
The authors propose the Game-Theoretic Secure Model Context Protocol (GT-MCP), which models multi-turn context evolution as a bounded adversarial control problem. The framework is structured as a repeated Stackelberg security game where a central controller commits to a selection-and-recovery policy against an adaptive adversary.
The architecture operates in a closed loop through the following steps:
- Context Assembly & Claim Extraction: The controller separates validated memory from untrusted inflows. Candidate responses are generated by three heterogeneous LLM agents (GPT-5.3, Llama-3.1-70B, and DeepSeek-R1). Atomic claims are extracted from these responses and canonicalized.
- Causal Context Graph ($G_t$): The controller maintains a directed graph where nodes represent verified claims and edges represent causal support or entailment relations.
- Strategic Trust Aggregation: Instead of simple majority voting, candidates are scored using a trust function combining three signals:
- Causal Consistency Index (CCI): Measures how well the claims are structurally supported by the causal graph.
- Cross-Agent Agreement (AGR): Evaluates semantic consistency among the peer agents.
- Contextual Drift Score (CDS): Uses Jensen–Shannon divergence to monitor global semantic deviation from the validated trajectory.
- Self-Healing Recovery: If a selected response introduces a drift score exceeding a threshold ($\delta_c$), a self-healing mechanism triggers a targeted rollback. It identifies low-support graph regions, quarantines the malicious fragments, and reverts the context to the shallowest safe historical checkpoint.
Datasets
The approach was evaluated using a simulated, closed-loop multi-turn adversarial environment rather than a static, standard dataset.
- Evaluation Horizon: 500 interaction turns per run, evaluated across 10 independent seeds (totaling 5,000 turn-level observations).
- Composition: 328 turns (65.6%) were benign, and 172 turns (34.4%) contained adversarial perturbations.
- Attack Families: The adversarial turns were distributed across six distinct attack styles inspired by benchmarks like PromptInject and AgentDojo (Direct Injection, Retrieval Poisoning, Tool-Output Injection, Dormant Triggers, Trajectory Steering, and Agreement Mimicry).
Key Insights and Ideas
- Context as a Dynamical State: Shifting the defense paradigm from "filtering bad words" to "stabilizing a dynamical trajectory" allows the system to tolerate minor, local perturbations while strictly preventing long-term adversarial steering.
- The Value of Model Heterogeneity: By utilizing diverse models (GPT, Llama, DeepSeek), the controller exploits different model biases. A strategic controller prevents "agreement mimicry" (where a compromised agent mimics others to pass filters) because claims must still be grounded in the causal graph.
- Surgical Rollbacks vs. Total Resets: Instead of wiping the conversation memory when an attack is detected, the self-healing mechanism uses the causal graph to prune only the untrusted subgraphs, preserving valid context and continuity.
Key Results
- 0% Injection Success Rate (ISR): No adversarial injection attempt managed to successfully compromise the controller level.
- High Contextual Stability: Contextual drift remained tightly bounded in 99.6% of turns. The self-healing recovery layer was rarely needed, activating in only 0.4% of cases.
- Robust Utility: The system maintained stable selected-output win rates above 98%, proving that security constraints did not degrade the quality or fluency of the responses.
- Predictable Overhead: The computational cost scaled linearly, with a highly predictable latency per token of $1.63 \times 10^{-3}$ seconds.
Limitations and Future Work
- Fixed Agent Pool: The evaluation relied on a specific, fixed set of text-based LLMs. Future work needs to explore how multimodal or highly domain-specialized models affect the geometry of the reasoning manifold.
- Epistemic Correctness: Causal grounding and cross-agent agreement act as operational proxies for validity, but they do not guarantee absolute factual truth if the underlying context graph is initially fed noisy or incomplete data.
- Collusion Vulnerability: The threat model assumes a maximum of one Byzantine (compromised) agent at a time. Coordinated multi-agent collusion or advanced semantic-collusion attacks remain an open challenge that requires further study.
Summary updated