Youdunit: Single-Call Counterfactual Necessity in Multi-Agent LLM Systems
Marissa Li ⋅ Stephanie Gao ⋅ Kenny Guo ⋅ Xingjian Li ⋅ William Chang ⋅ Goran Radanovic
Abstract
Agentic systems built on large language models (LLMs) are increasingly deployed in high stakes settings, but the causal mechanisms by which adversarial agents induce harmful outcomes remain poorly understood. We address this with a single-call counterfactual necessity test for multi-agent LLM systems that asks: which specific agent communication was necessary for the harmful outcome? In contrast with actual causality frameworks that reason over causes defined over sets of actions, we use one attribution rule throughout: single-call necessity for a selected proximate call. The key technical contribution is the Gumbel-Max tape, which lifts the token level Gumbel-Max counterfactual generator from a single LLM to a multi-agent conversation. GPU random number generator (RNG) states are recorded during a factual run on a tape shared across all agents, then replayed during counterfactual (CF) runs everywhere except at the intervened call. Applied to the BAD-ACTS benchmark across $176$ adversarial scenarios spanning four multi-agent environments, two prompting conditions (non-safe and safe), and two models (Qwen3-8B and Llama-3.1-8B-Instruct), the test shows that single-call necessity tracks communication structure. Decentralized and hierarchical environments (Travel Planning, Financial Article Writing) exhibit, in the non-safe condition, the largest aggregate causal effect (ACE) and the centralized environment (Code Generation) a weak one, whereas in sequential debate (Multi-Agent Debate) the attack does not raise harm above its base rate, leaving no effect to attribute. These conclusions are robust to the choice of intervention: replacing the fixed neutral text with a message sampled from the benign version of the same agent preserves the sign of ACE in $11$ of $12$ combinations of environment, condition, and model. A replay sanity check confirms that all CF effects under identity intervention are exactly zero, validating the tape mechanism. The results identify where targeted defenses are likely to be effective in deployed agentic systems.
Successful Page Load