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.
