TL;DR
This paper introduces CORRECT, a novel framework that tackles the challenge of pinpointing the exact cause of failures in complex multi-agent systems (MAS). By distilling recurring error patterns into compact "schemas" and reusing them, CORRECT significantly improves error localization accuracy without requiring any training, making MAS debugging more efficient and reliable.
What Problem Does This Paper Address?
Multi-agent systems (MAS) are becoming increasingly sophisticated, coordinating multiple agents to tackle complex tasks. However, this complexity also introduces a significant debugging challenge: when a MAS fails, it's often difficult to pinpoint the precise agent and step that initiated the cascade of errors. These failure trajectories can be long and convoluted, making it hard for both humans and automated systems to debug. Existing methods struggle with generality, data efficiency (annotating MAS failures is expensive and ambiguous), and computational efficiency, especially in dynamic environments where new error types emerge frequently.
Methods
CORRECT introduces a three-phase approach:
- Offline Schema Extraction: The core idea is that MAS errors, despite surface-level differences, often share underlying structural patterns. CORRECT distills these patterns from past failure trajectories into compact "error schemas." These schemas capture key information like error signatures, contextual conditions, and detection heuristics. To manage the cache size, trajectories are clustered by semantic similarity, and one representative schema is generated per cluster. LLMs are used to generate these schemas.
- Online Schema-Guided Error Recognition: When a new failure occurs, CORRECT retrieves the most relevant schemas from its cache based on semantic similarity to the current trajectory. These schemas are then used to guide an LLM in pinpointing the precise error step. This approach leverages pre-existing knowledge, avoiding the need for expensive retraining and making inference fast.
- Dynamic Schema Management: To keep the schema cache up-to-date and effective, CORRECT employs two mechanisms:
- Schema Expansion: When user feedback confirms successful recognition, new error schemas are generated and added to the cache, prioritizing diverse error patterns.
- Schema Distillation: Frequently accessed schemas are refined to improve their discriminative power and accuracy.
Datasets
- WHO&WHEN dataset: Used for initial analysis and evaluation. This dataset contains annotated trajectories from multi-agent systems.
- CORRECT-Error: A newly introduced large-scale dataset comprising over 2,000 annotated multi-agent trajectories. It was generated using a novel error-injection pipeline guided by real-world failure distributions and validated through human evaluation to ensure realism. This dataset spans diverse tasks, including multi-hop QA, common planning, mathematical reasoning, and scientific problem-solving.
Key Insights and Ideas
- MAS Errors Recur: The fundamental insight is that despite the complexity and apparent uniqueness of MAS failures, there are recurring structural patterns that can be captured and reused. This is a significant departure from treating each failure as an entirely novel problem.
- Schemas as Condensed Knowledge: Error schemas act as distilled, reusable knowledge units that encapsulate the essence of a failure type. This allows for efficient knowledge transfer without the need to process entire, lengthy trajectories.
- Training-Free is Key: The ability to perform error recognition without any additional training is crucial for adapting to dynamic MAS deployments where new error types emerge continuously.
- LLMs as Guided Detectors: While LLMs are powerful, they struggle with precise error localization in complex MAS without guidance. CORRECT leverages LLMs as "guided detectors," using schemas to focus their attention on relevant patterns.
- Human-like Performance is Achievable: The paper demonstrates that CORRECT can achieve performance close to human-level error localization, significantly outperforming existing automated methods.
Key Results
- Significant Accuracy Gains: CORRECT improves step-level error localization accuracy by up to 19.8% over existing advances on the WHO&WHEN dataset. On the new CORRECT-Error benchmark, it achieves an average gain of 28.7%.
- Near-Zero Overhead: The framework operates with minimal computational overhead, making it suitable for real-time deployment.
- Robustness: CORRECT is robust to variations in schema cache size, retrieval noise, and even model upgrades.
- Effective Schema Transfer: Distilled schemas demonstrate strong transferability across different datasets and models, highlighting their generalizability.
- Human-like Discrimination: Human evaluators struggled to distinguish between synthetically injected errors (generated by CORRECT's pipeline) and real-world failures, validating the realism of the generated data and the effectiveness of the schema approach.
Limitations and Future Work
- Subjectivity of Error Labels: Decisive error labels can be inherently subjective, especially in complex MAS with cascading effects, which might introduce instability.
- Integration with Skill Systems: Integrating these error schemas with skill systems in multi-agent frameworks remains an important future direction.
- Retrieval Signal Exploration: While semantic similarity is a robust retrieval signal, exploring more structured retrieval mechanisms, potentially with a dedicated retrieval agent, is a promising avenue.
- Automated Schema Validation: Developing more automated or semi-supervised schema validation pipelines would further reduce reliance on human supervision.
Summary updated