← Latest papers
🤖 AI

TraceGraph: Shared Decision Landscapes for Diagnosing and Improving Agent Trajectories

TraceGraph introduces a graph-based framework that transforms multi-model agent trajectories into shared decision landscapes to reveal hidden navigation differences and failure patterns, which in turn enables a trap-aware recovery pipeline that significantly improves resolution rates on the SWE-bench.

Original authors: Junjie Nian, Kang Chen, Ge Zhang, Yixin Cao, Yugang Jiang

Published 2026-06-01
📖 4 min read☕ Coffee break read

Original authors: Junjie Nian, Kang Chen, Ge Zhang, Yixin Cao, Yugang Jiang

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are watching a group of five different explorers trying to solve a complex maze. In the past, if you wanted to know who was the best explorer, you would just look at the final score: "Did they reach the exit? Yes or No?"

The paper TraceGraph argues that this "Yes or No" score hides too much. It's like judging a chef only by whether the cake was eaten, without noticing if one chef burned the kitchen down to get there, while another took a scenic route through the garden.

Here is how TraceGraph works, explained simply:

1. The Shared Map (The Decision Landscape)

Instead of looking at each explorer's path in isolation, TraceGraph takes all their steps and merges them onto one giant, shared map.

  • The Steps: Every time an AI agent (the explorer) takes an action (like "read a file" or "run a test") and sees a result, it leaves a "footprint."
  • The Clustering: TraceGraph looks at these footprints. If two steps look very similar (e.g., both are trying to fix a specific error in the same file), it draws a line connecting them.
  • The Result: This creates a web or a "landscape" of the task. Some areas are safe and lead to success; others are dead ends.

2. The Three Key Events

Once the map is built, TraceGraph watches how each AI moves across it. It doesn't care about the final score yet; it cares about three specific moments:

  1. Access: Did the AI find the "productive core"? (The safe, high-value area where good work happens).
  2. Trap Exposure: Did the AI wander into a "trap"? (A confusing area where many others have failed or gotten stuck).
  3. Repair: If the AI fell into a trap, did it manage to climb out and get back to the productive core?

3. What the Map Revealed

When the researchers looked at this shared map, they found things that simple scores missed:

  • Different Styles: Some models (like DeepSeek-V3.2) were brave explorers. They often found the productive core, sometimes fell into traps, but were very good at climbing out (Repair). Others (like Qwen3-Next) were very cautious. They rarely fell into traps, but they also rarely found the productive core because they were too afraid to explore.
  • Different Rules for Different Mazes: The researchers tested this on five different types of tasks (like fixing software bugs, searching the web, or using tools). They found that some mazes reward avoiding traps (don't make a mistake!), while others (like fixing software bugs) reward recovering from mistakes. A model that is great at avoiding traps might actually fail at a task where you need to be able to recover from a mistake.

4. The "Trap Detector" Experiment

The most exciting part is how they used this map to help the AI in real-time.

  • The Idea: Since they knew exactly what a "trap" looked like on the map (a specific pattern of actions and errors), they built a detector.
  • The Trigger: When an AI was solving a new problem and stepped into a pattern that matched a known "trap," the detector would sound an alarm.
  • The Rescue: When the alarm went off, the system didn't just let the AI keep failing. It paused and tried two simple fixes:
    1. The "Hot" Fix: It told the AI to try again with a bit more randomness (like shaking the dice) to see if a different path worked.
    2. The "Note" Fix: It gave the AI a gentle reminder note based on the error: "Hey, you seem stuck here. Re-read the error, focus on this specific file, and try one small change."

The Result: On a software repair task (SWE-bench), using this trap detector helped the AI fix about 3 to 4% more problems than it could on its own. It proved that knowing where the traps are allows you to build a safety net that catches the AI before it fails.

Summary

TraceGraph is a tool that stops us from just looking at the final score of an AI. Instead, it builds a shared map of how AI agents move through tasks. It shows us:

  • Which models are brave explorers vs. cautious walkers.
  • Which tasks require avoiding mistakes vs. recovering from them.
  • How to build a simple "safety net" that detects when an AI is about to fall into a known trap and gives it a second chance to fix it.

It turns the black box of "AI failed" into a clear story: "The AI walked into a trap, but with a little help, it could have climbed out."

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →