From Sequence to Structure: Relational Uncertainty Propagation for LLM Agents

Zhengzhao Ma, Boxi Cao, Yaojie Lu, Hongyu Lin, Xianpei Han, Le SunarXiv 2026

TL;DR

Current uncertainty quantification (UQ) methods for Large Language Model (LLM) agents treat execution histories as flat, linear sequences, failing to capture how early errors compound over time. This paper introduces RUPA (Relational Uncertainty Propagation for Agents), a framework that models agent trajectories as directed dependency graphs to track and propagate uncertainty across complex reasoning steps. RUPA consistently outperforms traditional UQ methods, enabling earlier failure detection and significantly improving decision-making across diverse long-horizon benchmarks.

What Problem Does This Paper Address?

When LLM agents tackle long-horizon tasks—like navigating a web browser, writing software, or solving complex multi-step math problems—they rarely fail due to a single isolated mistake. Instead, failures typically emerge from a cascading effect: a minor misunderstanding of a tool's output or a slight logical deviation early on propagates through subsequent steps, eventually culminating in a catastrophic failure.

Existing Uncertainty Quantification (UQ) methods are poorly equipped for this. They typically rely on local signals (like token probabilities or per-step confidence) or treat the history as a simple linear sequence. Because they ignore the underlying relational structure of how actions and observations depend on one another, they struggle to identify when an agent has gone off the rails until it is too late.

Methods

The authors propose RUPA (Relational Uncertainty Propagation for Agents), a trajectory-level UQ framework that shifts the paradigm from sequential modeling to structural modeling.

Overview of the RUPA framework, illustrating graph construction, uncertainty propagation, and final estimation.

The core pipeline consists of three main phases:

  1. Relational Trajectory Graph Construction: Instead of a linear text history, RUPA represents the execution prefix as a directed graph $G = (V, E)$. Nodes represent events (user queries, reasoning steps, tool observations, or environment feedback). Edges are dynamically constructed using embedding distances and lexical cues to capture seven distinct relation types: Sequential, Latest, Repetition, Progression, Parallel, Feedback, and Goal Alignment.
  2. Relation-Aware Uncertainty Propagation: RUPA calculates a local uncertainty score for each node (e.g., using predictive entropy for assistant nodes). It then propagates these risks across the graph. Crucially, edge weights are automatically calibrated based on the statistical reliability of each relation type, and a temporal decay factor ensures obsolete states are discounted. RUPA also maintains an uncertainty momentum to preserve long-range execution trends.
  3. Uncertainty Estimation: The final execution risk score ($R_t$) for the current step is a weighted combination of its intrinsic local uncertainty ($U_t$) and the accumulated historical structural uncertainty ($H_t$).

Datasets

The authors evaluated RUPA across three diverse agent benchmarks using six different open-source LLMs (ranging from 26B to 230B parameters):

  • $\tau$-2 (Airline and Retail domains): Evaluates conversational decision-making and multi-turn planning.
  • Terminal-Bench-2: Focuses on terminal-based software engineering and operating system interactions.
  • GAIA: A challenging benchmark for open-domain, complex, multi-modal problem-solving.

Key Insights and Ideas

  • Failures are Distributed, Not Local: Empirical analysis reveals that high-risk anomalies are distributed throughout the execution trajectory rather than concentrating near the final answer. Early intermediate mistakes are the true culprits behind final failures.
  • Relational Structure Matters: Modeling trajectories as graphs with explicit semantic relations (like tracking repeated actions or feedback loops) captures risk dynamics far better than treating them as flat text or simple time-series sequences.
  • Complementary Signal to Entropy: Graph-based propagation provides orthogonal information to token-level entropy. Even when an LLM generates text with high local confidence (low entropy), RUPA can successfully flag high execution risk if the step relies on a structurally flawed history.
Structural analysis showing that failure-indicative signals are distributed across the trajectory and heavily tied to relational patterns like repetition and goal drift.

Key Results

  • Superior Uncertainty Quantification: RUPA consistently achieved the highest AUROC, AUPRC, and F1 scores across all benchmarks and model families. For instance, it improved the average AUROC of the MiniMax-M2.7 model from 0.694 (the strongest baseline) to 0.718.
  • Earlier Failure Detection: In prefix-based evaluations (where the UQ method only sees a fraction of the trajectory), RUPA identified potential failures much earlier than baseline methods. This makes it highly practical for real-time intervention before wasting compute.
  • Actionable Guidance: The authors built an uncertainty-guided agent that samples multiple candidate actions and selects the one with the lowest RUPA score. This simple strategy dramatically boosted downstream task success; for example, Qwen3.5-27B's accuracy on Terminal-Bench-2 jumped from 0.105 (random selection) to 0.213.

Limitations and Future Work

  • Heuristic Graph Construction: While edge weights are dynamically calibrated, the initial edge connections rely on a fixed set of seven predefined relation types and deterministic lexical/embedding heuristics.
  • Computational Overhead: Constructing the graph and running embedding models (like bge-m3) for node matching adds an extra layer of inference overhead, though the authors note the detectors are lightweight.
  • Basic Downstream Intervention: The paper primarily showcases RUPA's utility using a simple sample-and-reject decoding strategy. The authors point out that integrating RUPA with more sophisticated agent architectures—such as those featuring dynamic backtracking, tree search, or explicit self-correction protocols—remains an exciting direction for future work.

Summary updated

BibTeX
@misc{ma2026from,
  author = {Zhengzhao Ma and Boxi Cao and Yaojie Lu and Hongyu Lin and Xianpei Han and Le Sun},
  title = {{From Sequence to Structure: Relational Uncertainty Propagation for LLM Agents}},
  year = {2026},
  eprint = {2608.16002},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.16002},
}
Figure