Source-linked AI summary
Who is Introducing the Failure? Automatically Attributing Failures of Multi-Agent Systems via Spectrum Analysis
Yu Ge, Linna Xie, Zhong Li, Yu Pei, Tian Zhang
TL;DR
Failure attribution in multi-agent systems is difficult and labor-intensive, despite its importance for debugging. FAMAS replays failed tasks, abstracts execution logs into trajectories, and applies spectrum analysis with agent- and action-behavior metrics. On Who&When, it outperformed all 12 baselines at both attribution levels.
Problem
Failure attribution in MASs remains underexplored and labor-intensive, while complex interactions and natural-language logs make identifying the actions responsible for failures difficult.
Source: §1 · p. 1Method
FAMAS replays failed tasks, abstracts logs into execution trajectories, and uses a MAS-specific suspiciousness formula combining agent- and action-behavior metrics.
Source: §1 · p. 2Results
FAMAS outperformed all 12 baselines on Who&When, achieving 57.61% agent-level and 29.35% action-level attribution accuracy.
Source: §5.3 · p. 12Takeaways & Limitations
By identifying root causes in failed trajectories, FAMAS targets debugging and system refinement.
Source: §1 · p. 1, §8 · p. 16The work focuses on the turn-based multi-agent protocol.
Source: §2.1 · p. 2
Abstract
from arXiv · showhide
Large Language Model Powered Multi-Agent Systems (MASs) are increasingly employed to automate complex real-world problems, such as programming and scientific discovery. Despite their promising, MASs are not without their flaws. However, failure attribution in MASs - pinpointing the specific agent actions responsible for failures - remains underexplored and labor-intensive, posing significant challenges for debugging and system improvement. To bridge this gap, we propose FAMAS, the first spectrum-based failure attribution approach for MASs, which operates through systematic trajectory replay and abstraction, followed by spectrum analysis.The core idea of FAMAS is to estimate, from variations across repeated MAS executions, the likelihood that each agent action is responsible for the failure. In particular, we propose a novel suspiciousness formula tailored to MASs, which integrates two key factor groups, namely the agent behavior group and the action behavior group, to account for the agent activation patterns and the action activation patterns within the execution trajectories of MASs. Through expensive evaluations against 12 baselines on the Who and When benchmark, FAMAS demonstrates superior performance by outperforming all the methods in comparison.
1 Introduction
The introduction frames failure attribution as an important but difficult step in debugging multi-agent systems, because their logs contain complex interactions and ambiguous natural-language actions and states. FAMAS uses repeated executions and spectrum analysis to rank responsible actions, achieving 29.35% action-level attribution accuracy on Who&When.
Context
- Failure attribution remains difficult because MAS logs combine complex agent, tool, and reasoning interactions with ambiguous natural-language descriptions of actions and resulting states.Accurately identifying the action that produced the state directly leading to failure is needed for root-cause debugging and system improvement.Source: §1 · p. 1
State of the art and approach
- Existing benchmarks leave attribution to manual analysis, while LLM-based approaches have achieved limited success, including less than 10% action-level accuracy for Zhang et al..FAMAS applies spectrum-based analysis to repeated executions, assigning higher scores to actions that recur more often across counterpart trajectories.Source: §1 · p. 2
Results
- 29.35% action-level attribution accuracy was achieved by FAMAS on Who&When, 49.13% higher than Zhang et al..The benchmark contains 184 failure traces from 127 MASs, and FAMAS also achieved top performance overall.Source: §1 · p. 2
2 Background
The background formalizes turn-based MAS execution and defines failure attribution around the decisive error in a failed trajectory. It also introduces spectrum-based fault localization as a statistical approach for ranking potentially faulty components.
2.1 Large Language Model Powered Multi-Agent Systems
- A turn-based MAS is modeled with agents, system states, agent-specific actions, state transitions, and a schedule selecting the active agent at each step.An execution trajectory records successive actions and resulting states, and a binary function indicates whether the query succeeds.Source: §2.1 · pp. 2–3
2.2 Failure Attribution in MAS
- Failure attribution identifies the decisive action and state in a failed trajectory, where subsequent actions from the error-decisive state diverge from normal execution and lead to failure.The target is the specific agent–action–state tuple that constitutes the decisive error.Source: §2.2 · pp. 3–4
2.3 Spectrum-Based Fault Localization
- Spectrum-based fault localization uses execution outcomes and component coverage to calculate suspiciousness scores and rank potentially faulty components.Representative formulas include Ochiai, Tarantula, Jaccard, Dstar2, and Kulczynski2.Source: §2.3 · p. 4
3 Methodology
FAMAS motivates spectrum analysis with repeated MAS executions, then addresses natural-language log ambiguity and MAS-specific activation patterns through trajectory abstraction and tailored suspiciousness metrics. The method's motivating example also illustrates why manual log analysis and LLM judging can be challenging.
Attribution challenges
- Manual attribution is time-consuming and expertise-intensive, while LLM judging can be distracted by noisy log entries and superficially salient error text.For handcrafted MASs, Zhang et al. achieved 7.02% action-level accuracy, compared with a 4.16% random baseline.Source: §3 · pp. 4–5
Spectrum-analysis motivation
- Repeated executions provide trajectories in which recurring actions and resulting states can be analyzed to attribute a failed run.The motivating example contrasts a recurring erroneous web search in failed runs with a more effective alternative in successful runs.Source: §3 · p. 5
Trajectory characterization
- FAMAS converts lengthy logs into structured agent–action–state triples using chunked LLM analysis and hierarchical clustering to reconcile semantic variations.The clustering first identifies agents and then groups action–state pairs, producing consistent trajectories for spectrum analysis.Source: §3 · p. 6
Agent Behavior Group
- The Agent Behavior Group uses coverage ratio and frequency proportion to account for differences in agent activation and normalize action frequency within each agent.These metrics are intended to avoid frequency comparisons that favor more active agents.Source: §3 · p. 6
Action Behavior Group
- The Action Behavior Group combines a local frequency enhancement factor for repeated actions with a λ-decay coefficient that attenuates globally recurring repetitions.This design distinguishes unusually frequent actions in failing trajectories from recurrent meta-actions that appear in both successful and failing runs.Source: §3 · p. 6
4 Design
FAMAS has two phases: trajectory replay and abstraction, followed by spectrum analysis. It structures repeated-run logs, scores actions, and ranks entities in the original failed trajectory.
Trajectory Replay & Abstraction
- FAMAS re-executes the failed task multiple times to collect raw logs and uses LLM-based hierarchical clustering to structure them as execution trajectories.The abstraction step is intended to mitigate natural-language ambiguity before spectrum analysis.Source: §4 · p. 7
Spectrum Analysis
- Spectrum analysis estimates scores for actions using a suspiciousness formula that evaluates behavior at both agent and action levels.The analysis operates over the structured trajectories collected from repeated executions.Source: §4 · p. 7
Attribution result
- FAMAS ranks entities in the original failed trajectory by their spectrum scores and returns the top-ranked entity as its attribution.Source: §4 · p. 7
4.1 Phase 1: Trajectory Replay & Abstraction
FAMAS replays independent executions, abstracts their logs into structured agent–action–state trajectories, and refines those trajectories by clustering semantically equivalent behaviors. The resulting behavioral spectrum is structured for subsequent spectrum analysis.
4.1 Phase 1: Trajectory Replay & Abstraction
- The phase acquires logs from multiple MAS runs and transforms them into structured trajectories through replay and abstraction, followed by clustering and refinement.The runs yield execution logs that may succeed or fail because of nondeterministic agent interactions.Source: §4.1 · p. 7, Step 1.1: Primitive Trajectory Replay… · p. 7
Step 1.1: Primitive Trajectory Replay & Abstraction
- An LLM parses manageable chunks of each heterogeneous log into canonical agent–action–state triples, representing the acting agent, its behavior, and the resulting state.The resulting structured trajectories make the raw logs suitable for analysis.Source: Step 1.1: Primitive Trajectory Replay… · p. 7
Step 1.2: Hierarchical Clustering & Trajectory Refinement.
- Clustering first groups primitive triples by agent, then groups action–state descriptions by semantic similarity to produce consistent abstractions.Each primitive trajectory is refined by replacing its triples with corresponding cluster representatives, consolidating semantically equivalent behaviors.Source: Step 1.2: Hierarchical Clustering &… · p. 8, Trajectory Output · p. 8
Trajectory Output.
- FAMAS ranks agent–action–state triples by suspiciousness and uses the highest-ranked triple as its final fault-attribution output.The abstracted trajectories are refined into representative triples that capture essential MAS behavior.Source: Trajectory Output · p. 8
4.2 Phase 2: Spectrum Analysis in MAS
FAMAS constructs execution-spectrum representations and combines agent- and action-level behavior metrics with a spectrum-based suspiciousness formula. It ranks agent–action–state triples to identify a likely failure attribution.
4.2 Phase 2: Spectrum Analysis in MAS
- The spectrum-analysis formula combines Action Coverage Ratio (γ), Action Frequency Proportion (β), Global Frequency Decay, and Local Frequency Enhancement (α) in two behavior groups.The Agent Behavior Group contains γ and β; the Action Behavior Group contains λ-decay and α.Source: §4.2 · p. 8
4.2.1 Matrices for Spectrum Analysis
- Coverage and frequency matrices record triple presence and occurrence counts by trajectory, while an outcome vector marks each execution as successful or failed.Analogous agent-level matrices support analysis of agent behavior alongside triple-level patterns.Source: §4.2.1 · pp. 8–9
4.2.2 Agent Behavior Group
- Action Coverage Ratio (γ) measures how broadly an action–state pair appears across an agent’s executions, while Action Frequency Proportion (β) measures its relative importance in that agent’s behavior.Together, they represent contextual breadth and behavioral intensity to address differing agent activity levels.Source: §4.2.2 · p. 9
4.2.3 Action Behavior Group.
- The λ-decay coefficient captures cross-trajectory frequency patterns, while Local Frequency Enhancement (α) emphasizes abnormal repetition within a failing trajectory.The decay factor attenuates redundant repetitions while preserving initial occurrence signals; the paired metrics target global patterns and locally concentrated anomalies.Source: §4.2.3 · pp. 9–10
4.2.4 Suspiciousness Calculation and Ranking
- The final output is the top-ranked agent–action–state triple, selected by descending suspiciousness scores that combine failure correlation with behavioral anomalies.The score integrates the two behavior groups using Kulczynski2 as its base spectrum-based fault-localization formula.Source: §4.2.4 · p. 10
5 Experiments
Experiments on Who&When assess Famas’s attribution accuracy, efficiency, and parameter sensitivity. Famas outperforms the compared baselines, while replay quantity and suspiciousness-formula components affect its results.
5.1 Evaluation Setup
- The evaluation uses Who&When’s 184 annotated failure logs from 127 MASs and compares Famas with 12 approaches using strict top-1 agent- and action-level accuracy.The benchmark logs were annotated by three experts; Famas uses Qwen2.5-72B for trajectory replay and abstraction, with k=20 and λ=0.9 by default.Source: §5.1 · pp. 10–11
5.3 RQ2: Comparison against Baselines
- On the Who&When benchmark, Famas outperforms all 12 baseline methods, attaining the highest failure-attribution accuracy: 57.61% at the agent level and 29.35% at the action level.Source: §5.3 · p. 12
5.2 RQ1: Effectiveness and Efficiency of Famas
- On 184 failure logs, Famas attributes 106 cases at the agent level and 54 at the action level, with average task time of about 105 minutes.Spectrum analysis typically takes under a minute; replay and abstraction are the primary computational bottleneck. Accuracy is higher on 58 handcrafted logs than on 126 algorithm-generated logs, particularly at the action level.Source: §5.2 · pp. 11–12
5.4 RQ3: Configurations of Famas
- Correct attributions rise with replay quantity: agent-level averages increase from 99.6 at k=5 to 104.6 at k=15, and action-level averages from 46.0 to 50.8.The study reports five repetitions per configuration; the authors note that trajectory quantity and representativeness affect effectiveness.Source: §5.4 · p. 14, Figure 4 · p. 14
- Successful attributions peak around λ=0.90–0.95; at λ=1.00 they fall to 103 agent-level and 46 action-level cases.As λ increases from 0.65 to 0.95, agent-level attributions rise from 104 to 106 and action-level attributions from 47 to 54.Source: §5.4 · p. 14, Figure 5 · p. 14
- Famas improves over the base formula from 100 to 106 agent-level and from 39 to 54 action-level successes; removing any component reduces performance, with λ removal causing the largest decline.The ablation varies decay λ, action coverage γ, and action frequency proportion β.Source: §5.4 · pp. 14–15, Table 3 · p. 14
6 Discussion
FAMAS accuracy peaks at moderate log complexity and is lower for both the simplest and most complex logs. The discussion also identifies validity threats involving implementation, subject selection, metrics, and parameters.
6.1 Impact of Log Complexity on Failure Attribution Performance
- FAMAS performs better on handcrafted than algorithm-generated logs, especially at the action level, where algorithm-generated logs are limited to 10 steps.Handcrafted logs are grouped into five complexity levels by step count, from 0–11 steps at Level 1 to 52–65 at Level 5.Source: §6.1 · p. 15
- Accuracy peaks at complexity Levels 2–3 and declines at Levels 1 and 4–5, where limited context or difficulty isolating decisive steps poses challenges.Figure 6 presents agent- and action-level accuracy across five step-count levels.Source: Figure 6 · p. 15, §6.1 · p. 15
- Hierarchical context modeling and selective trajectory pruning are proposed as future directions for improving performance across log complexities.Source: §6.1 · p. 15
6.2 Threads to Validity
- The authors identify implementation correctness as an internal-validity threat and subject selection as an external-validity threat, using Who&When to mitigate the latter.They describe Who&When as providing diverse failed trajectories across MAS types and realistic scenarios.Source: §6.2 · p. 15
- Construct validity depends on the selected agent- and action-level accuracy metrics and FAMAS parameters; the authors examine both in their evaluation.The metrics are described as widely used in related work [43], and parameter settings and impacts are addressed in Sections 5.1 and 5.4.Source: §6.2 · p. 16
7 Related Work
Prior work studies MAS failures, tests MASs, and localizes faults in traditional software, while automated MAS failure attribution remains comparatively underexplored. FAMAS applies spectrum-based analysis to that problem.
Failure Analysis in MASs
- Earlier MAS failure work includes taxonomies from MAST and TRAIL [3], an interactive debugging tool from AGDebugger [4], LLM-as-a-judge attribution from Zhang et al., and fine-tuned attribution from AgentTracer [43].FAMAS distinguishes itself by applying spectrum analysis rather than directly using LLMs for attribution.Source: §7 · p. 16
Testing of MASs
- MAS testing benchmarks and red-teaming address system effectiveness and vulnerabilities, but failure attribution remains largely unexplored.The cited benchmarks include AgentBench [19], SWE-Bench, and GAIA [24]; red-teaming includes jailbreaking [31] and prompt injection [20] [32].Source: §7 · p. 16
Fault Localization in Traditional Software
- Traditional software fault localization includes spectrum-, mutation-, program-slicing-, and learning-based techniques; SBFL is widely studied for its lightweight scalability, which FAMAS extends to MASs.The cited technique families are spectrum-based [2], mutation-based, program-slicing-based [33], and learning-based [17].Source: §7 · p. 16
8 Conclusion
On the Who&When benchmark, FAMAS achieves the best performance among 12 baselines. It attributes failed trajectories using repeated executions and spectrum analysis of agent and action activation patterns.
- FAMAS achieves the best performance compared with 12 baselines on the Who&When benchmark.Source: §8 · p. 16
- FAMAS identifies the root cause of a failed trajectory by applying spectrum analysis to multiple trajectories collected through repeated task execution.Source: §8 · p. 16
- Its novel suspiciousness formula captures both agent activation and action activation patterns in execution trajectories.Source: §8 · p. 16