ノイズの多いトレースから根本原因へ:エージェント最適化のための構造的軌跡分析と因果抽出
From Noisy Traces to Root Causes: Structural Trajectory Analysis and Causal Extraction for Agent Optimization
July 8, 2026
著者: Ying Chang, Jiahang Xu, Xuan Feng, Chenyuan Yang, Peng Cheng, Yuqing Yang
cs.AI
要旨
長期的なエージェントの最適化は、大規模言語モデル(LLM)がオプティマイザとして機能し、エージェントの障害を診断してポリシーを改善する、反射ベースのメカニズムに依存するようになってきている。しかし、実際の実行トレースを最適化に直接利用することは困難である。大規模なトレースコレクションは冗長で多様性に欠けることが多く、最適化が非効率になり、価値の低い障害への過適合を起こしやすい。また、個々の軌跡にも多くの無関係なステップが含まれており、切り捨てやスライディングウィンドウといった単純なコンテキスト削減手法では、因果的に重要な証拠を破棄し、誤った最適化シグナルを生成する可能性がある。このジレンマを解決するために、我々はSTRACE(Structural TRajectory Analysis and Causal Extraction)を導入する。これは、より高信号・低ノイズの最適化コンテキストを構築し、より正確かつ効果的な最適化を実現するフレームワークである。バッチレベルでは、STRACEは障害パターンをマイニングして冗長なトレースをフィルタリングし、代表的な障害を保持する。選択された各トレース内では、テキスト依存グラフ上で因果関係の特定を行い、非因果的なステップを除去し、最適化のための真の根本原因モジュールを特定する。実証結果は、STRACEが標準的なコンテキストフィルタリングベースラインを大幅に上回ることを示している。特に、難易度の高い形式検証タスク(VeruSAGE-Bench)では、人間の専門家が設計したエージェントの最適化に成功し、成功率を1.4倍(42.5%から58.5%)向上させた。コードはhttps://github.com/moomight/STRACE で公開されている。
English
The optimization of long-horizon agents increasingly relies on reflection-based mechanisms, where a large language model (LLM) acts as an optimizer to diagnose agent failures and improve agent policies. However, real execution traces are difficult to use directly for optimization: large trace collections are often redundant and heterogeneous, making optimization inefficient and prone to overfitting to low-value failures; meanwhile, each individual trajectory also contains many irrelevant steps, while naive context reduction methods such as truncation or sliding windows can discard causally important evidence and produce misleading optimization signals. To resolve this dilemma, we introduce STRACE (Structural TRajectory Analysis and Causal Extraction), a framework that constructs high signal-noise optimization contexts for more precise and effective optimization. At the batch level, STRACE mines failure patterns to filter redundant traces and retain representative failures; within each selected trace, it performs causal localization over a textual dependency graph to remove non-causal steps and identify the true root-cause module for optimization. Empirical results demonstrate that STRACE significantly outperforms standard context-filtering baselines. Notably, on a challenging formal verification task (VeruSAGE-Bench), it successfully optimizes human-expert designed agents, delivering 1.4times success-rate improvement (42.5% to 58.5%). The code is available at https://github.com/moomight/STRACE .