TL;DR
TraceGraph is a novel graph-based framework that pools multi-model AI agent trajectories into a single, shared "decision landscape." By mapping out where agents succeed ("productive cores") and where they stumble ("trap regions"), TraceGraph moves evaluation beyond simple pass/fail metrics to reveal distinct model behaviors and benchmark demands. Furthermore, using these historical trap regions as real-time triggers allows a lightweight recovery pipeline to boost agent performance on complex software engineering tasks.
What Problem Does This Paper Address?
When evaluating LLM-based agents on complex benchmarks, we typically reduce an entire multi-step interaction trajectory down to a single scalar score: did it pass or fail? While useful for leaderboards, these aggregate scores act as a black box. They fail to reveal how an agent succeeded, where it went wrong, or whether two models with identical scores followed completely different paths.
AI agent trajectories are long, branching, and messy—mixing tool calls, code edits, and environment feedback. Up until now, we have lacked a shared coordinate system to align and compare these trajectories across different models. Without it, researchers cannot easily diagnose systemic failure modes or understand what specific behavioral processes a benchmark actually rewards.
Methods
TraceGraph solves this by constructing a model-agnostic task graph from pooled rollouts across multiple models, executing in three main stages:
- Building the Shared Landscape: Each action-observation step is encoded into a sparse set of symbolic keys (e.g., tool type, command class, error patterns, file cues). Pairwise similarity between steps is calculated using an IDF-weighted Jaccard overlap. These steps are then woven into a mutual-$k$NN graph and decomposed into biconnected components (BCCs), where the "gates" between components represent critical strategy or phase transitions.
- Outcome Overlays: Terminal rewards (success/failure) are smoothed and diffused across the graph structure using a page-rank-style diffusion process. This highlights high-yield regions (Productive Cores) and low-yield regions (Trap Regions).
- Rollout Event Profiling: Any individual agent's path can then be characterized by three simple events:
- Access ($A$): Did the agent reach a productive core?
- Trap Exposure ($E$): Did it fall into a trap region?
- Repair ($R$): Did it enter a trap but successfully navigate back to a productive core?
Trap-Aware Recovery Pipeline
Taking it a step further, the authors turn these graph-derived trap regions into an online, runtime detector. When a live agent enters a state that matches a historical trap signature, the system triggers a Prefix-Fork intervention. It snapshots the environment and tries alternative continuation policies: either bumping up the sampling diversity (Hot) or injecting a localized, non-oracular hint prompt (Note) urging the agent to re-examine its evidence.
Datasets
The observational analysis was performed on the public cx-cmu agent trajectory dataset, spanning 7,329 records across 427 tasks attempted by five models (DeepSeek-R1, DeepSeek-V3.2, Gemini-2.5-Flash, Qwen3-235B, and Qwen3-Next). This dataset includes five distinct interaction splits:
- MCPBench: Model Context Protocol tool orchestration.
- Search: Web search and answer synthesis.
- SWE-bench: Software repository editing and testing.
- $\tau^2$-bench: Real-world API tool use under strict policies.
- TerminalBench: Command-line operating system tasks.
For the downstream causal recovery experiments, the authors evaluated 500 instances from the SWE-bench Verified pool using three entirely separate continuation models (Qwen3.6-35B-A3B, GLM-5.1, and DeepSeek-V4-Pro).
Key Insights and Ideas
- Identical Scores, Different Styles: Models that look identical on a leaderboard can have completely different navigation profiles. For instance, DeepSeek-V3.2 is a high-exploration, high-repair model, whereas Qwen3-Next achieves similar scores through conservative, shallow navigation that strictly avoids traps.
- Benchmarks Demand Different Capabilities: Benchmarks are not just "harder" or "easier"—they test fundamentally different structural properties. $\tau^2$-bench heavily penalizes mistakes (high negative trap demand), meaning agents must be highly risk-averse. Conversely, SWE-bench heavily rewards Repair, meaning agents must be resilient enough to recover from failed tests or bad edits.
- Traps Aren't Always Dead Ends: Human annotation revealed that 36% of trap blocks actually represent active exploration rather than terminal loops. Traps are simply low-outcome regions, making them perfect candidates for targeted interventions rather than immediate restarts.
Key Results
- Validation: Human annotators confirmed that 82% of TraceGraph’s automatically identified "gates" corresponded to actual human-judged strategy or phase shifts.
- SWE-bench Improvements: When deployed on SWE-bench Verified, the trap-aware recovery pipeline significantly boosted performance. On the subset of tasks where the trap detector fired, the best pooled single-factor policy raised the official resolved rate from 40.4% to 43.5% (+3.1 percentage points). On instances where all three evaluation models triggered the detector, the resolved rate jumped from 41.0% to 44.8% (+3.8 pp).
- Provider-Specific Fixes: Interestingly, the optimal recovery strategy depends on the model. Qwen3.6 benefited most from the localized text prompt (Note, +4.7 pp), while GLM-5.1 and DeepSeek-V4-Pro responded best to a simple temperature increase (Hot, +4.6 pp and +3.4 pp respectively).
Limitations and Future Work
- Descriptive, Not Predictive: TraceGraph maps out historical traffic post-hoc; it is an analytical instrument rather than a predictive model for entirely unseen tasks.
- Symbolic Key Coarseness: The framework relies on canonicalized symbolic keys (like file paths and error codes) to build the graph, which means it can miss fine-grained natural language semantics—a limitation particularly noticeable in open-ended web search tasks.
- Scope of Recovery: The recovery pipeline was only tested on SWE-bench (which has a high structural demand for repair). Different styles of intervention will be required for trap-averse benchmarks like $\tau^2$-bench, where preventing an action before it happens is more critical than recovering afterward.
Summary updated