
The first forensic localization benchmark for LLM-based multi-agent systems, with 21,200 interaction logs labeled at the agent, module, and unit levels.
Explore the benchmark ↓ MethodA black-box forensic framework that localizes the source agent, the compromised module, and the contaminated units with log-likelihood scores from a proxy LLM.
See how it works ↓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 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.

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 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.

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.
@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}
}