工作日早上 7 点读 AI,周日早上 8 点读周报订阅邮件

METAL LAB

Automata from Agent Traces: Failure and Next-Step Prediction

arXiv:2608.236702026-08-26

研究者把大量LLM智能体执行记录压缩成一个小型有限状态机,同时用来预测下一步动作和提前发现失败

基于大语言模型的智能体在完成任务时会留下冗长杂乱的执行记录,人工难以逐条审查安全性。作者把12个公开数据集的全部执行记录压缩进一个只有7到43个状态的紧凑有限状态机(FSM),并证明这个FSM同时能用于预测下一步动作和预测任务失败。该FSM在毫秒级时间内构建完成,对留出数据的回放拟合度达到0.997以上。

METAL LAB 解读图

从执行记录到一个FSM,再到两种预测

证据状态已报告实测结果

  1. 收集执行记录将12个公开智能体数据集中的工具调用、动作标签和消息转换为活动符号
  2. 合并为紧凑FSM把所有记录插入前缀树,再按最后进入的活动合并状态,得到7到43个状态的确定性FSM
  3. 下一步动作预测以当前FSM状态为上下文,在所有可对照真实标签的数据集上top-1准确率超过AWM
  4. 失败预测按状态提取访问频率、错误率等特征,留出测试集AUROC最高达0.94
  5. 运行时监控仅观察执行记录的32%即可提前叫停可能失败的运行,在SWE-agent上节省68%剩余计算量
这是 METAL LAB 制作的解读图,并非论文作者提供的原图。

他们做了什么

  1. 把智能体的每条消息(工具调用、动作标签或命令)映射成一个符号,将所有执行记录合并进一个前缀树,再按照进入状态的最后一个活动进行合并,得到一个无需任何学习超参数的确定性有限状态机。
  2. 在全部12个数据集上,构建出的FSM始终保持紧凑,状态数在7到43之间,对留出数据的回放拟合度不低于0.997,构建过程仅需毫秒级时间,复杂度随语料规模线性增长。
  3. 把FSM的当前状态作为预测下一步动作的上下文信息,在所有可与真实标签对照的数据集上都超过了此前的Agent Workflow Memory(AWM,一种只从成功记录中提取线性工作流的方法)。
  4. 在失败预测任务中,按状态提取的行为特征(访问频率、消息长度、错误率等)在留出测试集上的AUROC(0.5代表随机猜测,1.0代表完美区分)最高达到0.94;在线监控器仅看到执行记录的32%就能筛出可能失败的运行并提前终止。
  5. 研究观察到,智能体行为的结构模式更多是由部署系统(工具配置、运行环境)决定,而非所用的大语言模型本身:用四种不同大语言模型的记录合并训练出的同一个FSM,依然能几乎完美拟合每个模型各自的记录。
Figure 1: FSM evolution on SWE-agent. State count |Q| (red, left) and test fitness (blue, right) over training traces, with FSM snapshots at six milestones. The state space grows incrementally as new behavioral modes appear, while fitness saturates early (≥0.99 at 240 traces, 15% of training); construction completes in milliseconds.
Figure 1: FSM evolution on SWE-agent. State count |Q| (red, left) and test fitness (blue, right) over training traces, with FSM snapshots at six milestones. The state space grows incrementally as new behavioral modes appear, while fitness saturates early (≥0.99 at 240 traces, 15% of training); construction completes in milliseconds.
Table 1: FSM extraction results on eight labeled real-trace datasets (excluding SWE-smith synthetic). |Q|: states. Fit: test replay fitness. †RPNI timeout at 120 s. Full baselines in Table 8; SWE-smith and the unlabeled datasets appear in Appendix D.1.
OursRPNIAlergia
Dataset|Q|Fit|Q|Fit|Q|FitCompr.
SWE-agent250.99959,510†0.646350.9992,380×
WebArena251.0003821.0001491.00015×
AgentNet251.00062,495†0.742451.0002,500×
tau2-bench (air)181.0006,506†0.844230.999361×
tau2-bench (ret)191.00014,249†0.837251.000750×
tau2-bench (tel)431.00063,897†0.491750.9991,486×
ATBench151.000899†0.984151.00060×
OSWorld270.99738,232†0.706310.9991,416×
Figure 2: Next-step prediction cross-entropy (bits, ↓). (a) Per-dataset: FSM-conditioned methods (red) achieve 3–5× lower CE than baselines. (b) Average ranking: FSM-conditioned variants outperform their non-FSM counterparts on all four datasets. RPNI overfits worse than Uniform due to sparse transitions across thousands of states.
Figure 2: Next-step prediction cross-entropy (bits, ↓). (a) Per-dataset: FSM-conditioned methods (red) achieve 3–5× lower CE than baselines. (b) Average ranking: FSM-conditioned variants outperform their non-FSM counterparts on all four datasets. RPNI overfits worse than Uniform due to sparse transitions across thousands of states.
Table 2: Next-step prediction cross-entropy (bits, ↓). 5×5-fold CV across all datasets. Best per dataset in bold. The “FSM” columns use the FSM-state context format (ASG-minimal) selected on validation in Section 4.3.
MethodSWE-smSWE-agW&WM2WATBAvg
Uniform3.1704.5853.0002.8073.8073.474
Unigram2.4612.8502.2291.8562.7992.439
RPNI3.8514.2842.8553.5492.4483.397
Our FSM0.6381.0710.9630.7561.2430.934
FSM-PPM-AD0.4630.7410.6240.7821.3090.784
Ens(D0/3/5/7)0.4650.7000.6210.7361.2620.757
NGram-LR-K70.4640.6870.6100.7961.1810.748
ESN-H640.4760.6910.5800.7461.1840.735
FSM-LR-K70.4600.6860.5820.7551.1620.729
FSM-ESN-H640.4740.7000.5460.7531.1850.732
Figure 3: Failure prediction. (a) AUROC: FSM features (red) vs. raw trace statistics (blue) vs. fitness alone (gray). FSM features outperform raw features on SWE-agent (+7.9pp). (b) Early prediction: FSM features at 50% completion achieve 92% of final AUROC on SWE-agent. Solid: FSM; dashed: baseline.
Figure 3: Failure prediction. (a) AUROC: FSM features (red) vs. raw trace statistics (blue) vs. fitness alone (gray). FSM features outperform raw features on SWE-agent (+7.9pp). (b) Early prediction: FSM features at 50% completion achieve 92% of final AUROC on SWE-agent. Solid: FSM; dashed: baseline.
Table 3: FSM context format ablation (tau2-bench retail, N=1,095, gpt-4.1-mini top-1 %).
Context formatTop-1 (%)
No memory (trace prefix only)27.6
AWM (linear success workflows) (Wang et al., 2025d)52.9
ASG-full (state + transitions + full graph)52.2
ASG++ (ASG-full + multi-step continuations)49.2
ASG-success (success-only ASG-full)50.3
ASG (minimal: probabilities + top-15 continuations)65.1
Figure 4: FSM-based runtime monitor. Cycle-rate over trace progress for one failing (red) vs. one successful (blue) SWE-agent run. The failing trace exceeds the cycle-rate threshold (0.778) at 32% of trace completion (vertical dashed line), triggering early termination. The successful trace stays below threshold and continues until natural completion.
Figure 4: FSM-based runtime monitor. Cycle-rate over trace progress for one failing (red) vs. one successful (blue) SWE-agent run. The failing trace exceeds the cycle-rate threshold (0.778) at 32% of trace completion (vertical dashed line), triggering early termination. The successful trace stays below threshold and continues until natural completion.
Table 4: FSM vs. AWM as context for an LLM next-action predictor (gpt-4.1-mini, top-1 %). 6/8 gaps statsig at p<10−8. †tau2-retail used for FSM-context-format selection (§4.2); other 7 held out.
DatasetNAWMFSMΔ
WebArena4,80065.581.2+15.7
SWE-smith30074.7100.0+25.3
SWE-agent1,20067.770.5+2.8
tau2-bench (tel)1,09528.545.6+17.1
tau2-bench (ret)†1,09552.965.1+12.2
tau2-bench (air)48056.557.3+0.8
ATBench60047.862.5+14.7
OSWorld1,28655.070.7+15.7
Figure 10: Per-dataset test fitness across all methods including Alergia. Our FSM achieves ≥0.997 fitness on all panels. Process mining baselines (Heur., Ind.) achieve competitive fitness but with low precision (Table 18).
Figure 10: Per-dataset test fitness across all methods including Alergia. Our FSM achieves ≥0.997 fitness on all panels. Process mining baselines (Heur., Ind.) achieve competitive fitness but with low precision (Table 18).
Table 5: Evaluation datasets. |𝒜|: alphabet size. ∗7 primary + 17 rare. ‡4 LLMs. aTrivially separable.
DatasetDomainTraces|𝒜|Labels
Labeled (main results)
SWE-smithCoding5009
SWE-agentCoding2,00024∗
WebArenaWeb nav.8,33724
AgentNetDesktop GUI5,00024
tau2-bench (air)Cust. svc.800‡17
tau2-bench (ret)Cust. svc.1,824‡18
tau2-bench (tel)Telecom1,824‡42
ATBenchSafety1,00014
OSWorldDesktop OS2,16626
Unlabeled (Appendix D.1)
Who_and_WhenMulti-agent1848
Mind2WebWeb nav.5007
GUI-OdysseyMobile GUI7,7356✓a
Figure 11: Runtime comparison. Left: FSM construction time (1–110 ms) vs. RPNI (7,000–36,000 ms) with speedup ratios annotated. Right: per-trace replay latency (0.003–0.015 ms), enabling real-time monitoring.
Figure 11: Runtime comparison. Left: FSM construction time (1–110 ms) vs. RPNI (7,000–36,000 ms) with speedup ratios annotated. Right: per-trace replay latency (0.003–0.015 ms), enabling real-time monitoring.
Table 6: Cross-model failure-prediction AUROC across three tau2-bench suites. Self-AUROC (diagonal) and mean cross-AUROC (off-diagonal); σ over the 4 self-AUROCs and 12 cross-pair AUROCs. Mean cross-AUROC across all 36 pairs is 0.786 vs. self mean 0.877 (0.091 gap). Self/cross fitness on airline 1.000/0.962, retail 1.000/0.972, telecom 1.000/0.990.
Self-AUROC (diagonal)Cross-AUROC (off-diagonal)
Suitemeanσrangemeanσrangegap
τ2 airline0.9260.0510.84–0.970.7730.1020.56–0.920.154
τ2 retail0.7490.0520.68–0.820.6810.0750.54–0.790.068
τ2 telecom0.9560.0280.92–0.990.9050.0450.82–0.990.051
Mean (3 suites)0.8770.7860.091
Figure 13: Random and permuted trace rejection rates. Our FSM achieves near-100% rejection across most datasets, while RPNI shows poor permuted rejection on WebArena.
Figure 13: Random and permuted trace rejection rates. Our FSM achieves near-100% rejection across most datasets, while RPNI shows poor permuted rejection on WebArena.
Table 7: Compression results on unlabeled datasets. Same methodology as Table 1.
OursRPNIAlergia
Dataset|Q|Fit|Q|Fit|Q|FitCompr.
Who_and_When91.0009710.984121.000108×
Mind2Web81.0004760.97081.00060×
GUI-Odyssey71.00021,255†0.929240.9993,036×
Figure 14: FSM convergence: test fitness (right axis) and state count (left axis) as training traces are added. Fitness converges rapidly; the state space stabilizes later as rare patterns appear.
Figure 14: FSM convergence: test fitness (right axis) and state count (left axis) as training traces are added. Fitness converges rapidly; the state space stabilizes later as rare patterns appear.
Table 12: k-Tails results. |Q|: states. Fit: test fitness. TO: timeout (300s). Our method requires no hyperparameter.
Oursk-Tails (k=1)k-Tails (k=2)
Dataset|Q|Fit|Q|Fit|Q|Fit
SWE-smith101.000221.000531.000
SWE-agent250.999740.9963320.993
WebArena251.000300.7431720.743
AgentNet251.000330.806TO
tau2-bench (air)181.000370.9737310.773
tau2-bench (ret)191.000460.9978740.888
tau2-bench (tel)431.0002100.930TO
Who_and_When91.000140.541200.541
Mind2Web81.000340.965950.905
GUI-Odyssey71.000730.9647590.939
Figure 16: (a) State compression across labeled datasets: our FSM (10–43 states) vs. Alergia (10–149) and RPNI (382–63,897), with compression ratios annotated. (b) Cross-dataset fitness matrix: replaying traces from one dataset through another’s FSM. Diagonal entries (in-distribution) approach 1.0; off-diagonal entries (OOD) drop to near-zero for structurally distinct pairs (AUROC 1.000), except schema-sharing tau2-bench airline↔retail (near-1.0).
Figure 16: (a) State compression across labeled datasets: our FSM (10–43 states) vs. Alergia (10–149) and RPNI (382–63,897), with compression ratios annotated. (b) Cross-dataset fitness matrix: replaying traces from one dataset through another’s FSM. Diagonal entries (in-distribution) approach 1.0; off-diagonal entries (OOD) drop to near-zero for structurally distinct pairs (AUROC 1.000), except schema-sharing tau2-bench airline↔retail (near-1.0).
Table 14: Failure prediction AUROC (held-out). Main: full GBT pipeline. FSM-D ablation: training-free LR, Len+Ent vs. +per-state KL (Δ = gain). SWE-smith synthetic; tau2-bench aggregates 4 models.
MainFSM-D ablation
Dataset|𝒜|HoldoutLen+EntFSM-DΔ
tau2-bench (tel)420.9410.7250.857+0.132
WebArena240.9030.7180.773+0.056
AgentNet240.8900.7240.724+0.000
ATBench140.8940.5550.703+0.147
tau2-bench (air)170.8640.6250.777+0.152
SWE-agent240.7990.6900.689−0.001
tau2-bench (ret)180.7790.5960.660+0.064
OSWorld260.7740.7700.778+0.008
SWE-smith90.7030.6950.702+0.006
Table 15: Failure prediction with Alergia FSMs under matched pipeline. Identical features, classifier, and CV protocol; FSM source varies. CV: 10×5-fold; Holdout: held-out test AUROC.
CV AUROCHoldout AUROC
DatasetOursAlergiaOursAlergia
tau2-bench (tel)0.9230.7480.9150.752
WebArena0.8640.8440.8880.868
AgentNet0.8710.8710.8720.872
SWE-agent0.7900.7090.8050.714
tau2-bench (air)0.7920.6640.8260.764
tau-bench (ret)0.7890.6060.6660.498
tau-bench (air)0.7580.6510.8410.810
tau2-bench (ret)0.7130.5760.7430.575
SWE-smith0.6850.6530.6730.683
Table 17: Failure prediction: neural models on sequence vs. FSM features. CV AUROC (10×5-fold). Bold: FSM>Seq for same model.
MLPGRUTransformer
DatasetSeqFSMSeqFSMSeqFSM
SWE-smith0.6630.6990.6830.7000.6490.665
SWE-agent0.7820.7900.7620.7930.7790.751
tau2-tel0.9620.9690.9580.9700.9640.967
tau2-air0.8160.8390.7930.8150.8190.845
tau2-ret0.7470.8000.6980.7890.7550.798
WebArena0.8480.8610.8180.8350.8600.868
AgentNet0.8780.9200.8770.9170.8760.917
FSM wins7/77/76/7
Table 18: Precision analysis. Rand./Perm.: acceptance rate (lower is better).
OursRPNI
DatasetRand.Perm.Rand.Perm.
SWE-smith0.0%0.1%0.0%0.0%
SWE-agent0.0%0.05%0.0%1.6%
WebArena0.0%0.02%0.2%75.3%
AgentNet0.0%0.02%0.2%0.9%
tau2-bench (air)0.0%0.0%0.0%11.5%
tau2-bench (ret)0.0%0.0%0.0%3.1%
tau2-bench (tel)0.0%0.0%0.0%0.0%
Table 19: Adversarial trace rejection rate (%, ↑). Five mutations per trace.
DatasetSubst.InsertDeleteSwapSuffix
SWE-smith8110098100100
SWE-agent871009710097
tau2-tel77966193100
tau2-air7890779397
tau2-ret79928095100
WebArena100968410068
AgentNet1001009710099
Table 20: PM4Py miner results. Fit: replay fitness. Prec: precision from conformance checking. p/t: Petri net places/transitions.
Alpha MinerHeuristic MinerInductive Miner
Datasetp/tFitPrecp/tFitPrecp/tFitPrec
Who_and_When3/80.370.1910/231.000.3116/241.000.27
SWE-smith7/90.150.2013/221.000.3625/331.000.23
Mind2Web2/70.630.2915/290.960.4523/301.000.32
SWE-agent12/240.050.0021/591.000.2044/701.000.13
tau2-bench (air)3/170.450.2415/370.950.2063/931.000.17
tau2-bench (ret)3/180.460.2312/320.950.2136/581.000.14
tau2-bench (tel)4/40.460.2510/130.950.8015/191.000.42
GUI-Odyssey2/60.580.3312/220.980.6421/271.000.46
WebArena23/240.240.1135/710.980.5517/421.000.10
AgentNet174/240.300.0035/840.990.4518/391.000.13
Table 21: Convergence and generalization. Left: fraction at which fitness reaches 0.99. Right: train−test fitness gap at increasing fractions (all within ±0.003). Convergence behavior is similar across extraction levels (Appendix G.2).
ConvergenceGen. gap (train−test)
DatasetTrain0.99 atFrac|Q|10%30%60%100%
Who_and_When14785%9+0.002+0.00100
SWE-smith4004010%10−0.002−0.0010−0.001
Mind2Web400205%8−0.003−0.00100
SWE-agent1,60024015%25−0.002−0.001−0.001+0.001
Table 22: Conditional entropy (bits) by context order. The large drop from order 0→1 and convergence by order 2–3 shows strong sequential regularity.
Datasetk=0k=1k=2k=3Drop 0→1
SWE-agent2.161.060.800.7951%
SWE-smith1.980.630.550.5568%
Mind2Web1.690.740.790.6856%
Table 23: Early prediction AUROC (holdout) by trace completion fraction. FSM vs. raw-statistic baseline.
FractionSWE-agentSWE-smith
FSMBaseFSMBase
10%0.6570.4000.7220.416
25%0.6560.4560.6870.693
50%0.7260.6770.6810.668
75%0.7260.6720.6880.685
100%0.7730.7530.6820.692
Table 24: Activity granularity robustness. |𝒜|: alphabet size. Fit: test fitness. AUROC: failure prediction (entropy-based).
DatasetLevel|𝒜|FitAUROC
SWE-smithrole-only41.0000.688
role-type91.0000.692
role-action91.0000.692
tool-only91.0000.692
SWE-agentrole-only21.0000.663
role-type180.9990.659
role-action180.9990.659
tool-only180.9990.659
Table 25: Best monitoring rules by F1 score. All rules use a single FSM-derived feature with a fixed threshold.
DatasetRulePrec.RecallF1
SWE-agentcycle-rate >0.8850.9560.4510.613
SWE-smithcycle-rate >0.8780.2670.7500.393
Table 26: Failure prediction: FSM features vs. probabilistic baselines (holdout AUROC).
DatasetFSM feat.Trans. CELikelihoodN-gram
SWE-agent0.8130.4520.6260.317
SWE-smith0.7180.7190.7110.622
Table 27: ProbGuard (Wang et al., 2025b) vs. our FSM features for failure prediction. ProbGuard column = best AUROC over 20 configurations (Kunsafe× horizon, polarity-aware); FSM column = holdout AUROC from Table 14. Our FSM wins on every shared dataset by mean +17.6pp.
DatasetProbGuard (Wang et al., 2025b)FSM features (ours)Δ
τ2-bench (tel)0.7090.941+0.232
τ2-bench (air)0.7230.864+0.141
τ2-bench (ret)0.5660.779+0.213
SWE-agent0.6830.799+0.116
SWE-smith0.5250.703+0.178
Mean (5 shared datasets)0.6410.817+0.176
Table 28: Fitness under 10% perturbation intensity. Baseline fitness shown for reference.
DatasetSubst.Insert.SwapTrunc.Base
SWE-smith0.6580.8250.8921.0001.000
SWE-agent0.8180.8850.9380.9990.999
Mind2Web0.8810.9850.9991.0001.000
Who&When0.8280.8651.0001.0001.000
Table 29: Statistical next-step prediction: top-1 accuracy (%, ↑) on full validation sets.
DatasetStepsUnigramFSMAWMAWM cov.
SWE-smith5,50050.0100.034.534.5%
WebArena17,14626.281.181.092.9%
SWE-agent22,28849.165.726.657.0%
tau2 (tel)23,05533.061.819.859.0%
tau2 (air)4,02030.869.255.991.3%
tau2 (ret)10,20727.472.663.591.4%
Mind2Web88680.280.20.00.0%
Table 30: Cross-dataset transfer: FSM vs. raw feature AUROC. Bold: FSM advantage > 3pp.
Test dataset
TrainFeaturesSWE-smSWE-ag
SWE-smithFSM0.6810.715
Raw0.6940.683
SWE-agentFSM0.6480.780
Raw0.6820.720

研究结果

  • 在全部12个公开数据集上,提取出的FSM始终保持7到43个状态的紧凑规模,对留出数据的回放拟合度不低于0.997,且构建时间仅为毫秒级。
  • 在下一步动作预测中,以FSM状态为上下文的方法在所有可与真实标签对照的数据集上的top-1准确率都超过AWM(例如SWE-smith为100%对34.5%,tau2-telecom为61.8%对19.8%),受控实验显示FSM状态条件化平均带来0.155比特(21%)的交叉熵改善。
  • 在失败预测中,按状态提取的特征在留出测试集上的AUROC最高达到0.94(tau2-bench telecom),在SWE-agent上比原始轨迹统计特征高出7.9个百分点,而仅用拟合度作特征的AUROC约为0.50。
  • 仅使用执行记录前50%的内容,FSM特征就能达到完整记录时AUROC的92%;在SWE-agent上,监控器在执行完成32%时就能提前终止可能失败的运行,节省了68%的剩余计算量,精确率85.9%、召回率95.5%。
  • 与自动机学习基线RPNI相比,FSM用少15到3036倍的状态数达到相当或更高的回放拟合度,构建速度也快得多(1到110毫秒对7000到36000毫秒)。

可应用场景

  • 自动把智能体的执行历史压缩成小型结构,用于安全审计或定位导致故障的具体行为状态
  • 在已部署的智能体旁运行轻量级实时监控器,在运行过程中发现失败迹象就提前终止
  • 利用同时包含成功和失败记录的FSM上下文,作为只依赖成功记录的工作流记忆系统的替代或补充,辅助推荐下一步动作

局限与待验证事项

  • 评测仅限于编程智能体、网页导航、客服对话等领域的12个公开数据集,活动符号表规模较小,为6到42个符号。
  • 运行时监控器的规则(如周期率阈值)在状态种类丰富的数据集上表现良好,但在tau2-bench retail和SWE-smith等状态多样性较低的领域中区分能力不足,作者指出需要针对具体数据集调整规则。
  • 作者明确指出,FSM恢复的只是观测到的表层活动顺序(directly-follows automaton),而非智能体背后真正的生成规则,后者从纯正例数据中原理上不可能被识别。
  • 跨模型的失败预测特征迁移并不完美:模型自身平均AUROC为0.877,而跨模型平均AUROC为0.786,存在明显差距。
  • 对于共享相同结构模式的领域(如tau2-bench的航空与零售套件),FSM难以清楚区分分布外与分布内的记录,这是一个例外情况。

为什么重要

如果冗长不透明的智能体执行日志能被压缩成一个小巧、可检视的结构,团队就无需逐条人工阅读即可对已部署的智能体进行安全审计、异常监控和提前叫停。由于该方法不依赖特定的大语言模型,它为多种不同的智能体系统提供了一个可复用的结构化基础工具。

本文术语

  • 有限状态机(FSM) · 一种用一组可能情形(状态)及状态间转移规则来描述系统行为的数学模型
  • 回放拟合度(replay fitness) · 把真实执行记录放入FSM中逐步回放时,FSM能够成功跟随的比例,越接近1.0说明FSM对真实行为的解释越准确
  • AUROC · 衡量模型区分两种结果(如成功与失败)能力的指标,0.5代表随机猜测,1.0代表完美区分
  • Agent Workflow Memory(AWM) · 一种此前的方法,只从成功的执行记录中提取线性工作流程,本文用作对比基线
  • 交叉熵(cross-entropy) · 以比特为单位衡量模型预测的下一步动作概率与实际结果差距的指标,数值越低表示预测越准确

论文原文摘要(英文)

LLM-based agents execute multi-step tasks, but their behavioral structure remains opaque: long unstructured traces resist the safety auditing and runtime monitoring that deployment requires. Existing approaches operate per-trace or success-only, so they miss the cross-run topology that links next-step and failure prediction. To recover that shared structure, we collapse an entire trace corpus into a single, compact finite-state machine (FSM) that serves as a structural substrate for the otherwise unpredictable behavior of LLM agents. Across twelve public datasets, the FSMs are compact (7-43 states), replay held-out data at >=0.997 fitness with near-identical topology across splits, and build in milliseconds. This substrate addresses both prediction goals. For next-step prediction, FSM-state context outperforms Agent Workflow Memory on every ground-truth-matched dataset. For failure prediction, per-state behavioral features reach held-out AUROC up to 0.94, and an online monitor ranks failing runs above passing ones from a partial trace, triggering early stopping well before completion. Behavioral topology thus appears shaped more by the deployment harness than by the LLM, providing a model-agnostic structural primitive for safety auditing and runtime monitoring.

作者 · Seonglae Cho, Franklin Cardenoso Fernandez, Umar Mohammed, Zekun Wu, Kleyton Da Costa, Ilham Wicaksono, Adriano Koshiyam

在 arXiv 阅读

最新论文

全部论文 →

METAL LAB 最新报道

图片来源: Seonglae Cho et al., arXiv:2608.23670, CC BY 4.0