Table of Contents
Fetching ...

De-Linearizing Agent Traces: Bayesian Inference of Latent Partial Orders for Efficient Execution

Dongqing Li, Zheqiao Cheng, Geoff K. Nicholls, Quyu Kong

TL;DR

This work addresses the inefficiency of re-planning in multi-step LLM agent execution by learning a latent, executable partial-order over actions from noisy traces. It introduces BPOP, a Bayesian poset model with latent embeddings and a tractable frontier-softmax likelihood, enabling offline inference of dependency structure that can be compiled into a Graph Execution Engine for frontier-based execution. The approach yields principled uncertainty quantification, improved structure recovery over baselines, and substantial token-usage and runtime reductions in real cloud provisioning and scientific workflow tasks. Across WFCommons and Cloud-IaC-6 benchmarks, BPOP demonstrates robust structural fidelity and scalable efficiency, underscored by a tri-modal execution framework that balances determinism and resilience in practical deployments.

Abstract

I agents increasingly execute procedural workflows as sequential action traces, which obscures latent concurrency and induces repeated step-by-step reasoning. We introduce BPOP, a Bayesianframework that infers a latent dependency partial order from noisy linearized traces. BPOP models traces as stochastic linear extensions of an underlying graph and performs efficient MCMC inference via a tractable frontier-softmax likelihood that avoids #P-hard marginalization over linear extensions. We evaluate on our open-sourced Cloud-IaC-6, a suite of cloud provisioning tasks with heterogeneous LLM-generated traces, and WFCommons scientific workflows. BPOP recover dependency structure more accurately than trace-only and process-mining baselines, and the inferred graphs support a compiled executor that prunes irrelevant context, yielding substantial reductions in token usage and execution time.

De-Linearizing Agent Traces: Bayesian Inference of Latent Partial Orders for Efficient Execution

TL;DR

This work addresses the inefficiency of re-planning in multi-step LLM agent execution by learning a latent, executable partial-order over actions from noisy traces. It introduces BPOP, a Bayesian poset model with latent embeddings and a tractable frontier-softmax likelihood, enabling offline inference of dependency structure that can be compiled into a Graph Execution Engine for frontier-based execution. The approach yields principled uncertainty quantification, improved structure recovery over baselines, and substantial token-usage and runtime reductions in real cloud provisioning and scientific workflow tasks. Across WFCommons and Cloud-IaC-6 benchmarks, BPOP demonstrates robust structural fidelity and scalable efficiency, underscored by a tri-modal execution framework that balances determinism and resilience in practical deployments.

Abstract

I agents increasingly execute procedural workflows as sequential action traces, which obscures latent concurrency and induces repeated step-by-step reasoning. We introduce BPOP, a Bayesianframework that infers a latent dependency partial order from noisy linearized traces. BPOP models traces as stochastic linear extensions of an underlying graph and performs efficient MCMC inference via a tractable frontier-softmax likelihood that avoids #P-hard marginalization over linear extensions. We evaluate on our open-sourced Cloud-IaC-6, a suite of cloud provisioning tasks with heterogeneous LLM-generated traces, and WFCommons scientific workflows. BPOP recover dependency structure more accurately than trace-only and process-mining baselines, and the inferred graphs support a compiled executor that prunes irrelevant context, yielding substantial reductions in token usage and execution time.
Paper Structure (71 sections, 41 equations, 24 figures, 19 tables)

This paper contains 71 sections, 41 equations, 24 figures, 19 tables.

Figures (24)

  • Figure 1: System Architecture Comparison. The Traditional Agent (left) functions as a "Perpetual Intern," where reliance on "Cognitive Redundancy" and "Sequential Execution" creates a bottleneck of high latency. In contrast, the BPOP Agent (right) operates as a "Domain Expert," utilizing "BPOP Inference" to explicitly de-linearize traces into verifiable "Executable SOPs'.
  • Figure 2: From Chaos to Structure. BPOP infers the latent Hasse diagram (Left) from diverse linear traces (Right), identifying that $a_1$ and $a_2$ are concurrent (Frontier).
  • Figure 3: Latent Representation of Partial Order. Action 1 strictly dominates all others ($1 \succ \{2,3,4\}$). Actions 2 and 3 intersect across dimensions, encoding concurrency ($2 \parallel 3$).
  • Figure 4: Scientific Workflow Performance (IP-Cov=0.95). Top: SRASearch; Bottom: Epigenomics. BPOP maintains both high Edge-F1 and feasibility, whereas baselines fail to produce executable graphs on the more complex workflow.
  • Figure 5: Recovered vs. True SOPs (IP-Cov=0.95). Green: correct dependencies; red: missed edges (unsafe); orange: false positives (safe). On SRASearch(Left), BPOP recovers the fork--join structure with F1=$0.91$ (TP=$29/30$, FN=$1$). On Epigenomics(Right), BPOP recovers most true dependencies despite multiple synchronization barriers (F1=$0.78$, TP=$44/48$, FN=$4$)
  • ...and 19 more figures

Theorems & Definitions (3)

  • Definition 1.1: Strict partial order / poset
  • Definition 1.2: Dimension
  • Definition 1.3: Realizer