AI 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.
翻译:AI智能体在执行程序化工作流时,往往会生成一系列顺序动作轨迹,这种做法不仅掩盖了潜在的并发性,还导致了重复的逐步推理开销。我们提出BPOP——一个贝叶斯框架,能够从带有噪声的线性化轨迹中推断出潜在的依赖偏序关系。BPOP将轨迹建模为底层有向图结构的随机线性扩展,并通过可解的边界-柔性最大值似然函数实现高效的马尔可夫链蒙特卡洛推断,有效避免了在线性扩展空间上进行#P难度的边际化计算。我们在开源的Cloud-IaC-6套件(一组包含异构大语言模型生成轨迹的云部署任务)和WFCommons科学工作流上进行了评估。实验表明,BPOP在恢复依赖结构方面优于纯轨迹分析和流程挖掘基线方法,而且基于推断所得有向图构建的编译执行器能够有效裁剪不相关的上下文信息,从而显著降低分词使用量和执行时间。