seonglae commited on
Commit
7f26f64
Β·
1 Parent(s): ce42ee1

prose: split two run-ons, drop the We-find openers, cut a restated clause and give Related Work its third paragraph

Browse files
app/src/content/chapters/02-extraction.mdx CHANGED
@@ -44,5 +44,5 @@ These alphabets are small by construction, against the tens of thousands of symb
44
  Even a 42-tool telecom customer service agent (tau2-bench telecom [@barres2025tau2]) needs only 43 states to capture its behavioral structure β€” the agent can only call the tools we gave it. So its capabilities stay bounded and so does its alphabet.
45
 
46
  <Note variant="info" title="How sensitive is the result to this choice?">
47
- $\phi$ is the one design decision in the pipeline β€” so we stress-test it. Fitness stays at or above 0.999 across all four granularities, from role-only (two to four symbols) to full tool-level β€” failure prediction stays within 0.03 [AUROC](https://texonom.com/c3fea8b9caa445768eb529fb629818c7) (area under the ROC curve) on any dataset β€” the rules above are one valid setting, not the only one.
48
  </Note>
 
44
  Even a 42-tool telecom customer service agent (tau2-bench telecom [@barres2025tau2]) needs only 43 states to capture its behavioral structure β€” the agent can only call the tools we gave it. So its capabilities stay bounded and so does its alphabet.
45
 
46
  <Note variant="info" title="How sensitive is the result to this choice?">
47
+ $\phi$ is the one design decision in the pipeline β€” so we stress-test it. Fitness stays at or above 0.999 across all four granularities, from role-only (two to four symbols) to full tool-level, and failure prediction stays within 0.03 [AUROC](https://texonom.com/c3fea8b9caa445768eb529fb629818c7) (area under the ROC curve) on any dataset. The rules above are one valid setting, not the only one.
48
  </Note>
app/src/content/chapters/03-construction.mdx CHANGED
@@ -34,7 +34,7 @@ The SWE-agent prefix tree with 59,510 states collapses to just **25 states** β€”
34
 
35
  The FSM $\mathcal{M} = (Q, \mathcal{A}, \delta, q_0)$ encodes the agent's **behavioral topology**. Recurring patterns become loops. And the state count tracks the number of distinct behavioral modes.
36
 
37
- In the tau2-bench retail and telecom customer service agents, a tool-call loop (`assistant:tool_call` to `tool:text`) dominates execution, with the conversational path through `assistant:text` as a separate branch. We find that in a coding agent the `search`, `edit`, `execute` cycle accounts for most of the trace.
38
 
39
  <HtmlEmbed
40
  src="embeds/fsm-force-graph.html"
 
34
 
35
  The FSM $\mathcal{M} = (Q, \mathcal{A}, \delta, q_0)$ encodes the agent's **behavioral topology**. Recurring patterns become loops. And the state count tracks the number of distinct behavioral modes.
36
 
37
+ In the tau2-bench retail and telecom customer service agents, a tool-call loop (`assistant:tool_call` to `tool:text`) dominates execution, with the conversational path through `assistant:text` as a separate branch. In a coding agent the `search`, `edit`, `execute` cycle accounts for most of the trace.
38
 
39
  <HtmlEmbed
40
  src="embeds/fsm-force-graph.html"
app/src/content/chapters/06-prediction.mdx CHANGED
@@ -6,17 +6,17 @@ import Accordion from '../../components/Accordion.astro';
6
 
7
  # Prediction: Next Step and Failure
8
 
9
- We find the same FSM state answers both questions an operator asks: what the agent will do next, and whether this run is heading for failure. Both read off the per-state transition distribution, which compactness makes reliable.
10
 
11
  ## Next-Step Prediction
12
 
13
- At each step the predictor estimates $P(a_t \mid \text{context})$, scored by [cross-entropy](https://texonom.com/fefc71fd930a41a7842f39bccb3abcc9) in bits via 5$\times$5-fold [cross-validation](https://texonom.com/184e7cfc80d6410188922d27ef4ef52c) (CV). Conditioning on FSM state alone, with no learning beyond an [order-1 Markov model](https://texonom.com/3bde15938b6b4c79981a3e0523b9877d), accounts for 83 to 99% of the total cross-entropy improvement on each dataset. We find the average drops to **0.93 bits**, a **62% cut** from the unigram baseline at 2.44 bits.
14
 
15
  <Sidenote>
16
- We find RPNI goes the other way: 3.40 bits, worse than a unigram. Its state count, from hundreds to tens of thousands, spreads each transition estimate too thin, so the per-state distributions are noise.
17
  </Sidenote>
18
 
19
- The cleanest test holds the predictor fixed and adds FSM state as a feature: under absolute discounting, FSM state conditioning adds **+0.155 bits on average** (0.580 vs 0.735) and helps on every one of six datasets, from +0.016 on SWE-agent to +0.364 on Mind2Web, whose branching web-action vocabulary gains most from knowing where in the workflow it is. We find that combining FSM state with a small learned model gives the best predictor in the study, at **0.73 bits**.
20
 
21
  ## Workflow Memory
22
 
@@ -33,7 +33,7 @@ The gain generalizes to the agent's own LLM: feeding the current FSM state as co
33
  | ATBench | 600 | 47.8 | **62.5** | +14.7 |
34
  | OSWorld [@xie2024osworld] | 1,286 | 55.0 | **70.7** | +15.7 |
35
 
36
- The margin runs from +0.8 points on tau2-bench airline to +25.3 on SWE-smith β€” and it never reverses: on none of the eight does AWM come out ahead. Four of the eight gaps clear 15 points.
37
 
38
  AWM extracts linear workflows from successful traces only, and it cannot represent cycles or branching.
39
 
@@ -62,7 +62,7 @@ Replay a trace through the FSM and read off **per-state behavioral features** (v
62
  Raw fitness is useless here (AUROC near 0.50): successful and failed traces both replay perfectly. But the signal is in the **per-state decomposition** and in *surprise*: failing traces take low-probability transitions under the FSM.
63
  </Note>
64
 
65
- Failure prediction scales with machine size: more states give a finer map of where a run can go wrong. The 43-state telecom agent tops out at **0.941**; WebArena [@zhou2024webarena] (0.903) and AgentNet [@wang2025opencua] (0.890) follow; SWE-agent [@yang2024sweagent] β€” with 25 states β€” reaches 0.799. ATBench, the only safety-labeled benchmark, reaches 0.894 (0.864 Β± 0.024 under repeated CV). We see across all eight real-trace datasets the CV standard deviation stays in 0.012 to 0.031 β€” so these aren't single-split artifacts.
66
 
67
  <Wide>
68
  <HtmlEmbed
@@ -74,7 +74,7 @@ Failure prediction scales with machine size: more states give a finer map of whe
74
 
75
  Inspect per-state feature importances and failure modes in the [failure view](https://seongland.com/article/asg/browser?tab=failure).
76
 
77
- And the predictors are interpretable. On SWE-agent the single strongest feature is whether the trace reaches the `submit` state: 94.8% of successes get there, only 55.7% of failures do. And we find this isn't a length proxy β€” structural features score 0.790 against 0.659 for trace length alone. Successful runs touch only 9 of 25 states along a focused `search`, `edit`, `submit` path β€” and failures spread across all 25 (Jaccard overlap 0.206).
78
 
79
  ## Runtime Monitor
80
 
 
6
 
7
  # Prediction: Next Step and Failure
8
 
9
+ The same FSM state answers both questions an operator asks: what the agent will do next, and whether this run is heading for failure. Both read off the per-state transition distribution, which compactness makes reliable.
10
 
11
  ## Next-Step Prediction
12
 
13
+ At each step the predictor estimates $P(a_t \mid \text{context})$, scored by [cross-entropy](https://texonom.com/fefc71fd930a41a7842f39bccb3abcc9) in bits via 5$\times$5-fold [cross-validation](https://texonom.com/184e7cfc80d6410188922d27ef4ef52c) (CV). Conditioning on FSM state alone, with no learning beyond an [order-1 Markov model](https://texonom.com/3bde15938b6b4c79981a3e0523b9877d), accounts for 83 to 99% of the total cross-entropy improvement on each dataset. The average drops to **0.93 bits**, a **62% cut** from the unigram baseline at 2.44 bits.
14
 
15
  <Sidenote>
16
+ RPNI goes the other way: 3.40 bits, worse than a unigram. Its state count, from hundreds to tens of thousands, spreads each transition estimate too thin, so the per-state distributions are noise.
17
  </Sidenote>
18
 
19
+ The cleanest test holds the predictor fixed and adds FSM state as a feature: under absolute discounting, FSM state conditioning adds **+0.155 bits on average** (0.580 vs 0.735) and helps on every one of six datasets, from +0.016 on SWE-agent to +0.364 on Mind2Web, whose branching web-action vocabulary gains most from knowing where in the workflow it is. Combining FSM state with a small learned model gives the best predictor in the study, at **0.73 bits**.
20
 
21
  ## Workflow Memory
22
 
 
33
  | ATBench | 600 | 47.8 | **62.5** | +14.7 |
34
  | OSWorld [@xie2024osworld] | 1,286 | 55.0 | **70.7** | +15.7 |
35
 
36
+ The margin runs from +0.8 points on tau2-bench airline to +25.3 on SWE-smith, and four of the eight gaps clear 15 points.
37
 
38
  AWM extracts linear workflows from successful traces only, and it cannot represent cycles or branching.
39
 
 
62
  Raw fitness is useless here (AUROC near 0.50): successful and failed traces both replay perfectly. But the signal is in the **per-state decomposition** and in *surprise*: failing traces take low-probability transitions under the FSM.
63
  </Note>
64
 
65
+ Failure prediction scales with machine size: more states give a finer map of where a run can go wrong. The 43-state telecom agent tops out at **0.941**; WebArena [@zhou2024webarena] (0.903) and AgentNet [@wang2025opencua] (0.890) follow; SWE-agent [@yang2024sweagent] β€” with 25 states β€” reaches 0.799. ATBench, the only safety-labeled benchmark, reaches 0.894 (0.864 Β± 0.024 under repeated CV). Across all eight real-trace datasets the CV standard deviation stays in 0.012 to 0.031 β€” so these aren't single-split artifacts.
66
 
67
  <Wide>
68
  <HtmlEmbed
 
74
 
75
  Inspect per-state feature importances and failure modes in the [failure view](https://seongland.com/article/asg/browser?tab=failure).
76
 
77
+ And the predictors are interpretable. On SWE-agent the single strongest feature is whether the trace reaches the `submit` state: 94.8% of successes get there, only 55.7% of failures do. And this isn't a length proxy β€” structural features score 0.790 against 0.659 for trace length alone. Successful runs touch only 9 of 25 states along a focused `search`, `edit`, `submit` path β€” and failures spread across all 25 (Jaccard overlap 0.206).
78
 
79
  ## Runtime Monitor
80
 
app/src/content/chapters/07-discussion.mdx CHANGED
@@ -17,14 +17,15 @@ A 25-state machine can be read and checked by a person; the 59,510-state prefix
17
 
18
  Three lines of work touch this one.
19
 
20
- **State machines placed around agents.** StateFlow runs an agent through a state machine somebody wrote by hand [@wu2024stateflow], a definite finite automaton can be bolted onto a chatbot pipeline the same way [@sun2024dfa_llm], FlowMind builds a workflow from an API surface [@jin2024flowmind], and AFlow and ADAS search over agentic workflow designs [@zhang2025aflow; @hu2024adas], while MetaAgent assembles a whole multi-agent system out of one [@chen2025metaagent]. In every one of them the machine is an input β€” here it is an output, recovered from traces the agent had already produced.
 
21
  **Experience kept as memory.** Agent Workflow Memory induces reusable routines from past trajectories [@wang2024agent_workflow_memory], Experience-to-Strategy trains a graph of them [@xia2025experience_to_strategy], ExpeL distils insights out of them [@zhao2024expel], and Voyager accumulates a skill library [@wang2023voyager]. Each of those keeps fragments of behavior. The automaton keeps the topology instead.
22
 
23
  **Automata learned from observation.** Model learning turns a black-box system into a state machine [@vaandrager2017model], Weiss and colleagues pull one out of a recurrent network with membership and equivalence queries [@weiss2018extracting], DeepDFA learns one by gradient [@umili2024deepdfa], prompt chaining extracts one from a flow description [@ali2024flowfsm], and AALpy packages the classical algorithms [@muskardin2022aalpy]. Process mining, which discovers process models from event logs, is the closest classical neighbour: van der Aalst's textbook treatment [@vanderaalst2016process], its re-thinking for the agent era [@berti2024processmining], an evaluation of large language models at the task [@grohs2024process_mining_llm], and skill learning from mined processes [@chen2024skill_process_mining]. This one works from a different input: positive traces only, no oracle to query, and an alphabet small enough that one merge suffices.
24
 
25
  ## Limitations
26
 
27
- The FSM accepts the observed prefix language, not the agent's true generating language: like any trace-replay method, it can't tell a trace that stays within the observed transition patterns from a legitimate one. The extraction function $\phi$ needs a small amount of per-domain knowledge β€” and fully automatic discovery of it is future work β€” failure prediction degrades on simpler machines: AUROC falls to 0.799 on SWE-agent and 0.70 on the 10-state SWE-smith β€” both are smaller task spaces, with less structure to exploit. Extending the workflow-memory comparison beyond AWM to other memory-injection methods is future work.
28
 
29
  For agents with much larger action spaces or weaker sequential structure, the construction stays minimal but stops being compact β€” and the per-state observation density that drives every result above would degrade with it.
30
 
 
17
 
18
  Three lines of work touch this one.
19
 
20
+ **State machines placed around agents.** StateFlow runs an agent through a state machine somebody wrote by hand [@wu2024stateflow], a definite finite automaton can be bolted onto a chatbot pipeline the same way [@sun2024dfa_llm], FlowMind builds a workflow from an API surface [@jin2024flowmind], and AFlow and ADAS search over agentic workflow designs [@zhang2025aflow; @hu2024adas], while MetaAgent assembles a whole multi-agent system out of one [@chen2025metaagent]. In every one of them the machine is an input β€” here it is an output, recovered from traces the agent had already produced.
21
+
22
  **Experience kept as memory.** Agent Workflow Memory induces reusable routines from past trajectories [@wang2024agent_workflow_memory], Experience-to-Strategy trains a graph of them [@xia2025experience_to_strategy], ExpeL distils insights out of them [@zhao2024expel], and Voyager accumulates a skill library [@wang2023voyager]. Each of those keeps fragments of behavior. The automaton keeps the topology instead.
23
 
24
  **Automata learned from observation.** Model learning turns a black-box system into a state machine [@vaandrager2017model], Weiss and colleagues pull one out of a recurrent network with membership and equivalence queries [@weiss2018extracting], DeepDFA learns one by gradient [@umili2024deepdfa], prompt chaining extracts one from a flow description [@ali2024flowfsm], and AALpy packages the classical algorithms [@muskardin2022aalpy]. Process mining, which discovers process models from event logs, is the closest classical neighbour: van der Aalst's textbook treatment [@vanderaalst2016process], its re-thinking for the agent era [@berti2024processmining], an evaluation of large language models at the task [@grohs2024process_mining_llm], and skill learning from mined processes [@chen2024skill_process_mining]. This one works from a different input: positive traces only, no oracle to query, and an alphabet small enough that one merge suffices.
25
 
26
  ## Limitations
27
 
28
+ The FSM accepts the observed prefix language, not the agent's true generating language: like any trace-replay method, it can't tell a trace that stays within the observed transition patterns from a legitimate one. The extraction function $\phi$ needs a small amount of per-domain knowledge, and fully automatic discovery of it is future work. Failure prediction degrades on simpler machines: AUROC falls to 0.799 on SWE-agent and 0.70 on the 10-state SWE-smith β€” both are smaller task spaces, with less structure to exploit. Extending the workflow-memory comparison beyond AWM to other memory-injection methods is future work.
29
 
30
  For agents with much larger action spaces or weaker sequential structure, the construction stays minimal but stops being compact β€” and the per-state observation density that drives every result above would degrade with it.
31