Multi-Agent ForensicsPaper

Forensic Localization in LLM Multi‑Agent Systems

Anjun Gao1*Yueyang Quan2*Yufei Xia1Zhuqing Liu2Minghong Fang1†
1University of Louisville2University of North Texas
*Equal contribution†Corresponding author
NeurIPS 2026
A memory poisoning example in a three-agent finance pipeline: the planner is the source agent, its Memory is the compromised module, and two poisoned query-plan pairs are the compromised units; the executor invokes the target tool.
Given an incorrect tool invocation, forensic localization identifies the source agent that the attacker compromised, the module of this agent that was exploited, and the units inside the module that carry the malicious payload. Here, two poisoned memory pairs in the planner lead the executor to invoke the attacker-chosen tool.

Abstract

LLM-based multi-agent systems extend single agents with role specialization and inter-agent communication, but they also expand the attack surface: an attacker can compromise an externally writable module of one agent, and the malicious payload may propagate across communication hops before some downstream agent invokes an attacker-chosen tool. Existing defenses against such attacks can often be circumvented by stronger or adaptive attacks, which motivates a complementary forensic capability that traces an incorrect tool invocation back to its root cause. We formulate this task as three-level forensic localization, where the goal is to jointly identify the source agent that the attacker compromises, the specific module of this agent that is exploited, and the exact units inside this module carrying the malicious payload.

To enable systematic evaluation, we construct MAFL-Bench, the first forensic localization benchmark for LLM-based multi-agent systems, which spans three application scenarios, four communication structures, and twelve attack instances, with 21,200 interaction logs annotated at the agent, module, and unit levels.

We further propose MATracer, a black-box forensic framework that resolves the three-level attribution through a coarse-to-fine cascade driven by log-likelihood queries on a proxy LLM, progressively localizing the source agent, the compromised module, and the contaminated units. Extensive experiments show that MATracer accurately localizes the attack across diverse multi-agent settings, outperforms ten baselines on nearly every configuration and attack, and remains robust under adaptive attacks.

MAFL-Bench

MAFL-Bench covers four attack categories, each targeting one module of an agent: direct prompt injection on the user query, indirect prompt injection on tool observations, memory poisoning on the memory store, and plan-of-thought backdoor on in-context demonstrations. Every log records the full inter-agent messages, per-agent contexts, and tool histories, labeled with the source agent, the compromised module, and the contaminated units.

3application scenarios
4communication structures
12attack instances
21,200annotated logs
The four communication structures: Chain, Tree, Random, and Multi-agent debate.
The four communication structures cover linear pipelines (Chain), hierarchical delegation (Tree), stochastic relay (Random), and peer review (Multi-agent debate).

Example interaction logs

One log from MAFL-Bench for each attack category, all on the financial analyst pipeline. Text in red is injected by the attacker, and long messages are shortened with “...”.

MATracer

MATracer works in a coarse-to-fine cascade and scores every candidate with a proxy LLM, so it needs no access to the backbone models of the agents. After screening the user query for a direct injection, MATracer narrows the search from the whole trace to one source agent, then to one module of this agent, and finally to the contaminated units.

Overview of MATracer: query screening, then Stage 1 localizes the source agent, Stage 2 the compromised module, and Stage 3 the compromised units.
Overview of MATracer. Query screening handles payloads in the user query, and the three stages then localize the source agent, the compromised module, and the compromised units.
Step-by-step on the example in the first figure

Output of this step

Results

MATracer is compared with ten baselines from failure localization, poisoning forensics, context attribution, and prompt-injection monitoring on all six configurations of MAFL-Bench. The accuracy is cumulative across the three levels: a unit-level prediction counts as correct only when the agent, the module, and the exact set of contaminated units all match the ground truth.

Neutralizes attacksRemoving the units that MATracer identifies reduces the attack success rate to at most 0.15 on every configuration and attack.
Robust to adaptive attacksAgainst adaptive attackers who know the pipeline, MATracer keeps unit-level accuracy between 0.85 and 0.92.
FastMATracer analyzes one interaction log in 2 to 3 seconds, more than ten times faster than RAGForensics.

BibTeX

@inproceedings{gao2026forensic,
  title     = {Forensic Localization in {LLM} Multi-Agent Systems},
  author    = {Gao, Anjun and Quan, Yueyang and Xia, Yufei and Liu, Zhuqing and Fang, Minghong},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}