Skip to content

Tracing Agentic Failure from the Flow of Success

🕒 Published (v1): 2026-07-14 13:16 UTC · Source: Arxiv · link

Why this paper was selected

Sharon Li (UW-Madison); causal failure attribution in LLM agent trajectories; critical for harness debugging

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

💬 Ask ChatGPT✦ Ask Claude

TL;DR

OAT frames agentic failure attribution as unsupervised one-class learning: train exclusively on successful trajectories modeled as continuous latent paths via Neural Controlled Differential Equations (Neural CDEs), then at inference flag steps in failure trajectories whose latent representations deviate from the learned normal dynamics. Trained on only 100 successful trajectories with no failure annotations, OAT outperforms GPT-4o and GPT-5 prompting pipelines by +20% F1 in-domain and +7% F1 OOD, while running 200–5000× faster with zero token cost at inference.

Problem

Existing failure attribution methods either require expensive frontier-LLM prompting at inference time or demand step-level error annotations on failure trajectories—labels that are costly, inherently ambiguous, and hard to scale. No prior work performs step-level failure localization without any failure-trajectory supervision.

Method

OAT (One-class Agent Tracing) represents each trajectory step \(t\) as a latent vector \(h_t \in \mathbb{R}^{d_h}\) extracted from a hidden layer of the acting LLM (mean-pooled, PCA-projected to 64 dims). Successful trajectories are normalized to \([0,1]\) and modeled as continuous latent paths using Neural CDEs:

\[z(u) = z(0) + \int_0^u f(v, z(v); \theta_f)\, \frac{d\tilde{X}(v)}{dv}\, dv\]

where the control path \(X(u)\) is a natural cubic spline over step representations. A learned gating function \(q(\cdot)\) suppresses out-of-distribution spline derivatives element-wise, improving OOD robustness. The model is trained to minimize reconstruction error on successful trajectories (Eq. 5). At inference time, per-step anomaly scores \(e_t = \|h'_t - \hat{h}(u_t)\|_2^2\) localize failure-contributing steps via either top-\(k\) selection or conformal prediction thresholding at miscoverage rate \(\alpha\).

Key Contributions

  • Formalizes unsupervised failure attribution: training only on successful trajectories, no step-level annotations required.
  • Proposes Neural CDE-based one-class learning for continuous latent trajectory modeling in agentic settings, with a novel gated control path for OOD robustness.
  • Introduces conformal prediction detection as a principled, distribution-free threshold yielding adaptive failure step identification with false-positive rate guarantees.
  • Demonstrates the first practical, real-time failure attribution system: <1 GB VRAM, zero inference token cost, 7–16 ms latency vs. 4–40 s for prompting baselines.

Results

  • In-domain (MCP-Atlas): OAT (CP) achieves F1 = 0.435 vs. GPT-4o F1 = 0.212 (+20%); AUROC = 0.629; trained on ~80 successful trajectories with no failure data.
  • OOD (Who&When): OAT (CP) achieves F1 = 0.211 vs. GPT-5 F1 = 0.152 (+7%); AUROC = 0.758; despite domain shift from single-agent tool-calling (Qwen3.5-27B) to multi-agent (GPT-4o).
  • Latency: OAT = 7–16 ms; GPT-4o = 4,241–4,522 ms; GPT-5 = 37,819–39,626 ms (200–5000× faster).
  • Token cost: OAT = 0 output tokens; GPT-4o ≈ 118–121; GPT-5 ≈ 2,694–3,012.
  • Top-\(k\) detection favors recall/hit rate; CP detection favors precision and F1 balance.

Limitations

  • Training and evaluation data are small-scale: only 103 successful and 88 failure trajectories from MCP-Atlas, with manual annotation for failure steps.
  • Step representations require white-box access to an LLM's internal hidden states, precluding use with API-only black-box agents.
  • The model uses the same backbone (Qwen3.5-27B) to both simulate trajectories and extract representations; generalization to other backbone LLMs is not fully characterized.
  • Top-\(k\) detection requires prior knowledge of the expected number of failure-contributing steps per trajectory.
  • Qualitative failure cases are noted but not fully analyzed in the main text.

Relevance to Agentic AI / LLM Agents

Reliable deployment of LLM agents on long-horizon tasks (coding, scientific research) depends critically on post-hoc debugging tools, and this work directly attacks the bottleneck of step-level failure localization without annotation cost. By showing that successful-trajectory dynamics encode enough signal to detect deviations at failure, OAT provides a lightweight, always-on diagnostic layer that could be integrated into any open-weight agentic system. The conformal prediction framing offers formal false-positive rate control, which is directly relevant to auditing and compliance in high-stakes agentic deployments. The OOD generalization result—training on single-agent tool-calling traces and attributing failures in multi-agent collaboration traces—suggests the method captures generic properties of healthy agentic behavior rather than task-specific patterns.