用图模型还原LLM智能体运行时的依赖关系,提升故障诊断与优化能力。
GRADE: Graph Representation of LLM Agent Dependency and Execution

- 构建双层图:执行边来自日志,依赖边通过观察/推断分级生成。
- 依赖层在跨数据集测试中预测失败准确率超随机,而运行规模无效。
- 适用于多智能体系统故障定位与大规模效率优化,无需额外标注。
能否用一张图表示所有LLM智能体的运行过程?现有追踪记录仅包含每步操作顺序,缺失其依赖关系、读取状态与复用结果。GRADE恢复这一缺失层:将任一运行建模为包含两层边的图结构——执行边(步骤执行顺序)直接从日志获取;依赖边(步骤依赖来源)极少被记录,故按观测、声明或推断程度分级。统一表示下,各层各得其所。在涵盖工具使用、编程与网络交互的六个智能体数据集上,依赖层能有效预测失败,而运行规模表现不佳;在留一数据集外迁移测试中,依赖层始终优于随机水平,执行层则可精确定位多智能体失败步骤。此外,分析表明通用图神经网络易误读依赖层,而本文特征方法更鲁棒。同一图结构亦可用于单次运行故障诊断与规模化效率/鲁棒性优化。
原文摘要 · Abstract (English)
Can one graph represent every kind of LLM agent's run? A trace records what each step did, never what it relied on, the state it read, and the results it reused. GRADE recovers that missing layer: it models any run as one graph over its step nodes with two edge layers, execution edges (what ran in what order) read from the trace for free, and dependency edges (what each step relied on) rarely logged, so each is graded by how it is known, observed, declared, or inferred. One representation, and each layer earns its place. Across six corpora of LLM agents spanning tool use, coding, and the web, the dependency layer can predict failure where run size is weak and, under leave-one-corpus-out transfer, stays above chance on every held-out class while run size fails. Meanwhile, the execution layer localizes the faulting step in a failed multi-agent run. This work also provides a more in-depth analysis of why generic graph neural networks may misread the dependency layer, unlike our feature-based alternative. The same graph representation opens further uses, carrying from failure diagnosis in a single run to efficiency and robustness optimization at scale.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。