Research Papers 论文研究 4h ago Updated 33m ago 更新于 33分钟前 48

Automata from Agent Traces: Failure and Next-Step Prediction 基于智能体轨迹的自动机:失败与下一步预测

LLM-based agent traces are collapsed into a single compact finite-state machine (FSM) that captures cross-run behavioral topology, addressing the opacity of multi-step agent execution FSMs built across twelve public datasets are remarkably compact (7-43 states), replay held-out data with >=0.997 fitness, and construct in milliseconds For next-step prediction, FSM-state context outperforms Agent Workflow Memory on every ground-truth-matched dataset For failure prediction, per-state behavioral fea 将LLM agent的多步骤trace压缩为单一紧凑有限状态机(FSM),恢复跨run共享的行为拓扑结构 FSM在12个公开数据集上仅7-43个状态,重放held-out数据fitness ≥ 0.997,构建耗时毫秒级 FSM-state context在下一步预测任务上全面优于Agent Workflow Memory基线 基于per-state行为特征的失败预测达AUROC 0.94,支持从部分trace提前触发早停 发现agent行为拓扑主要由部署harness而非LLM本身塑造,提供模型无关的安全审计原语

65
Hot 热度
72
Quality 质量
68
Impact 影响力

Analysis 深度分析

TL;DR

  • LLM-based agent traces are collapsed into a single compact finite-state machine (FSM) that captures cross-run behavioral topology, addressing the opacity of multi-step agent execution
  • FSMs built across twelve public datasets are remarkably compact (7-43 states), replay held-out data with >=0.997 fitness, and construct in milliseconds
  • For next-step prediction, FSM-state context outperforms Agent Workflow Memory on every ground-truth-matched dataset
  • For failure prediction, per-state behavioral features achieve held-out AUROC up to 0.94, with an online monitor capable of ranking failing runs above passing ones from partial traces to trigger early stopping
  • The behavioral topology appears shaped more by the deployment harness than by the underlying LLM, offering a model-agnostic structural primitive for safety auditing and runtime monitoring

Why It Matters

This work provides a practical, model-agnostic approach to making LLM agent behavior interpretable and monitorable at scale, which is a critical bottleneck for deploying agents in safety-sensitive environments. By distilling unstructured traces into compact FSMs, practitioners gain a structural substrate that enables both predictive analytics and real-time safety interventions without requiring per-model customization.

Technical Details

  • The core method collapses an entire corpus of agent execution traces into a single finite-state machine, recovering shared cross-run topology that per-trace or success-only approaches miss
  • Evaluated across twelve public datasets, producing FSMs with only 7-43 states that achieve >=0.997 fitness on held-out replay with near-identical topology across data splits
  • Next-step prediction leverages FSM-state context as a feature representation, outperforming Agent Workflow Memory across all ground-truth-matched datasets
  • Failure prediction uses per-state behavioral features to reach AUROC up to 0.94 on held-out data; an online monitor can rank failing runs above passing ones from partial traces, enabling early stopping well before task completion
  • The approach is model-agnostic, suggesting the behavioral topology is determined primarily by the deployment harness rather than the specific LLM powering the agent

Industry Insight

  • Safety auditing and runtime monitoring for LLM agents can leverage compact FSM abstractions as a lightweight, model-agnostic primitive, reducing the need for expensive per-model analysis pipelines
  • Early stopping triggered by partial-trace failure prediction could significantly reduce compute waste in agent deployments, especially in high-volume or cost-sensitive production environments
  • The finding that deployment harnesses shape behavioral topology more than the LLM itself suggests that agent safety improvements may be more effectively targeted at orchestration and tooling layers rather than model selection alone

TL;DR

  • 将LLM agent的多步骤trace压缩为单一紧凑有限状态机(FSM),恢复跨run共享的行为拓扑结构
  • FSM在12个公开数据集上仅7-43个状态,重放held-out数据fitness ≥ 0.997,构建耗时毫秒级
  • FSM-state context在下一步预测任务上全面优于Agent Workflow Memory基线
  • 基于per-state行为特征的失败预测达AUROC 0.94,支持从部分trace提前触发早停
  • 发现agent行为拓扑主要由部署harness而非LLM本身塑造,提供模型无关的安全审计原语

为什么值得看

这篇工作解决了LLM agent行为不透明这一部署核心痛点,将非结构化trace转化为可计算的FSM结构,同时支撑下一步预测和失败预测两个关键场景。其模型无关的特性意味着可快速适配不同agent框架,为安全审计和运行时监控提供实用基础设施。

技术解析

  • 核心方法:将多trace语料坍缩为单一有限状态机(FSM),作为LLM agent行为的结构化底层表示,突破现有per-trace或仅成功样本的局限
  • 模型规格:跨12个公开数据集验证,FSM仅含7-43个状态,重放held-out数据fitness ≥ 0.997,跨split拓扑高度一致,构建时间毫秒级
  • 下一步预测:FSM-state context在所有ground-truth匹配的数据集上均优于Agent Workflow Memory基线
  • 失败预测:per-state行为特征在held-out集上AUROC达0.94;在线监控可从部分trace对失败/成功run排序,提前触发早停
  • 关键洞察:行为拓扑更多由部署harness塑造而非LLM本身,证明存在模型无关的结构化原语可用于安全审计

行业启示

  • 可观测性基础设施化:FSM作为轻量级结构化原语可直接集成到agent部署管道,实现实时安全审计和运行时监控,降低黑盒风险
  • 成本与安全平衡:基于部分trace的失败预测支持提前终止无效运行,既节省计算资源又提升系统安全性,适合高成本agent场景
  • 框架设计优先于模型调优:行为拓扑由harness主导的发现提示团队应优先优化agent框架、工具链和交互协议,而非仅聚焦LLM本身调优

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent LLM 大模型 Research 科学研究 Evaluation 评测 Security 安全