SNHE commited on
Commit
903c747
·
verified ·
1 Parent(s): 988e727

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +114 -0
README.md CHANGED
@@ -1,3 +1,117 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ base_model: Qwen/Qwen3.5-35B-A3B
4
+ library_name: transformers
5
+ pipeline_tag: text-generation
6
+ language:
7
+ - en
8
+ tags:
9
+ - llm-agents
10
+ - world-models
11
+ - agent-editing
12
+ - action-judgment
13
+ - tool-use
14
+ - editact
15
  ---
16
+
17
+ # AEWM: Agent-Editing World Model
18
+
19
+ **AEWM is a world model that judges and edits an agent's decisions, rather than predicting tool responses.** Built on **Qwen3.5-35B-A3B**, it combines **Action Judge (AJ)** and **State Revision (SR)** to improve long-horizon reasoning and tool use across **Search, Terminal, and Software Engineering (SWE)**. Its inference framework, **EditAct**, integrates these capabilities into an agent's interaction with the real environment.
20
+
21
+ <!-- The arXiv link is intentionally empty until the paper is available. -->
22
+ <p align="center">
23
+ <a href=""><img src="https://img.shields.io/badge/Paper-arXiv-B31B1B?logo=arxiv&amp;logoColor=white" alt="Paper (arXiv link forthcoming)"></a>
24
+ <a href="https://huggingface.co/RUC-AIBOX/AEWM"><img src="https://img.shields.io/badge/🤗_Hugging_Face-AEWM-FFD21E" alt="AEWM model on Hugging Face"></a>
25
+ <a href="https://huggingface.co/datasets/RUC-AIBOX/AEWM-Action-Judge-Bench"><img src="https://img.shields.io/badge/🤗_Hugging_Face-Benchmark-FFD21E" alt="Action Judge Benchmark on Hugging Face"></a>
26
+ <a href="https://github.com/RUCAIBox/Agent-Editing-World-Model"><img src="https://img.shields.io/badge/Code-GitHub-181717?logo=github&amp;logoColor=white" alt="Code on GitHub"></a>
27
+ </p>
28
+
29
+ ## Model Overview
30
+
31
+ | Property | Description |
32
+ | --- | --- |
33
+ | Base model | [Qwen3.5-35B-A3B](https://huggingface.co/Qwen/Qwen3.5-35B-A3B) |
34
+ | Capabilities | Action Judge and State Revision in one checkpoint |
35
+ | Domains | Search, Terminal, and Software Engineering |
36
+ | Training | Cross-domain mid-training followed by supervised fine-tuning |
37
+ | Release format | Full model weights in Hugging Face Safetensors format |
38
+ | Inference framework | [EditAct](https://github.com/RUCAIBox/Agent-Editing-World-Model) |
39
+
40
+ This checkpoint serves as the **world model**, alongside a separate **agent** that proposes reasoning and actions.
41
+
42
+ ## Method: Editing Decisions, Not Simulating Observations
43
+
44
+ Long-horizon agents can suffer from **task-state contamination**: unsupported assumptions become accepted facts, outdated plans persist, and partial progress is mistaken for completion. Subsequent actions may appear locally reasonable while reinforcing an incorrect understanding of the task.
45
+
46
+ AEWM addresses this problem by modeling how an agent's reasoning and actions shape task progress. Given the observed history and a candidate decision, it judges the decision's contribution and, when necessary, supplies a revised reasoning-action continuation.
47
+
48
+ ### Action Judge
49
+
50
+ AJ classifies a proposed decision into one of three action types:
51
+
52
+ - **Critical:** directly advances the task toward completion.
53
+ - **Exploratory:** gathers relevant information or tests a plausible approach without yet making decisive progress.
54
+ - **Noisy:** is redundant, irrelevant, or misleading in the current task context.
55
+
56
+ This judgment determines whether to retain the proposal or intervene. At inference time, AJ uses only information available before the candidate action is executed.
57
+
58
+ ### State Revision and EditAct
59
+
60
+ For a noisy decision, SR produces revised **reasoning and action** from the same observed history. It directly edits the continuation that enters the agent's execution loop, rather than merely adding a critique or asking the agent to try again.
61
+
62
+ **EditAct** runs four steps:
63
+
64
+ 1. **Propose:** the agent generates its next reasoning and action.
65
+ 2. **Judge:** AEWM classifies the proposal using the current task history.
66
+ 3. **Edit:** retain critical or exploratory decisions; revise noisy ones.
67
+ 4. **Execute:** run the selected action with real tools, then append the selected continuation and actual feedback to history.
68
+
69
+
70
+ ![AEWM training and the EditAct inference framework](method.png)
71
+
72
+ *Method overview from the paper: learning Action Judge and State Revision, integrating them into EditAct, and transferring guided behavior back into an agent through AEWM-RFT.*
73
+
74
+ ## Training
75
+
76
+ AEWM is trained in two stages. **Mid-training** uses approximately **52B tokens** of cross-domain agent trajectories, AJ supervision, and SR supervision. **Supervised fine-tuning** uses **120K curated examples**: 60K AJ and 60K SR examples, with 40K examples per domain.
77
+
78
+ AJ supervision labels decisions using trajectory evidence and consistency checks. SR supervision pairs agent proposals with corrected reasoning-action continuations from the same history. Quality filtering checks annotation consistency and revision quality. The resulting checkpoint supports both judgment and revision across different tool interfaces.
79
+
80
+ **AEWM-RFT** is a separate use of the method: an agent is fine-tuned on verified EditAct trajectories to internalize useful editing behavior. The model in this repository is AEWM itself, used for online judgment and revision.
81
+
82
+ ## Evaluation Highlights
83
+
84
+ ### Action Judge Benchmark
85
+
86
+ The [AEWM Action Judge Benchmark](https://huggingface.co/datasets/RUC-AIBOX/AEWM-Action-Judge-Bench) contains **3,000 annotated decisions**, with 1,000 each from Search, Terminal, and SWE. It evaluates decision classification before execution, reporting accuracy and macro-F1.
87
+
88
+ ![Action Judge macro-F1 across Search, Terminal, SWE, and Overall](action_judge_results.png)
89
+
90
+ **AEWM achieves 70.5% overall macro-F1**, exceeding the strongest compared baseline, DeepSeek-V4-Pro (59.9%), by **10.6 percentage points**. Its macro-F1 scores are **60.9% on Search**, **72.1% on Terminal**, and **77.8% on SWE**. Overall metrics pool all 3,000 decisions.
91
+
92
+ ### End-to-End Agent Performance
93
+
94
+ The paper evaluates EditAct with Qwen3.5-4B, Qwen3.5-9B, and Qwen3.5-35B-A3B on BrowseComp, DeepSearchQA, Terminal-Bench 2.0, SWE-bench Pro, Doc2Repo, and NL2Repo.
95
+
96
+ | backbone | ReAct | Strongest baseline average | EditAct | Gain over strongest baseline |
97
+ | --- | ---: | ---: | ---: | ---: |
98
+ | Qwen3.5-4B | 28.5 | 35.1 | **41.8** | **+6.7** |
99
+ | Qwen3.5-9B | 34.5 | 38.9 | **44.1** | **+5.2** |
100
+ | Qwen3.5-35B-A3B | 42.2 | 45.6 | **48.8** | **+3.2** |
101
+
102
+ *Paper results: mean score (%) across the six benchmarks. The strongest baseline is selected by its six-benchmark average among ReAct, step-level Best@3, and trajectory-level Best@3. Gains are absolute percentage points.*
103
+
104
+ ## Using the Model
105
+
106
+ Serve this checkpoint with a backend that supports **Qwen3.5 reasoning and native tool calls**, then connect it to the [EditAct framework](https://github.com/RUCAIBox/Agent-Editing-World-Model). The agent and AEWM use separate OpenAI-compatible endpoints. Set the world-model endpoint as follows, matching `WM_MODEL` to the name configured by your serving backend:
107
+
108
+ ```bash
109
+ export WM_MODEL="RUC-AIBOX/AEWM"
110
+ export WM_BASE_URL="http://localhost:30001/v1"
111
+ export WM_API_KEY="EMPTY"
112
+ ```
113
+
114
+ `EMPTY` is only for an endpoint without authentication. Configure the agent and tools separately, following the repository's quick start. Use the provided domain-specific AJ/SR prompts and preserve reasoning and tool-call fields; a generic chat prompt is not equivalent to the evaluated workflow.
115
+
116
+ The framework provides `editact_for_search`, `editact_terminal`, and `editact_for_swe` scaffolds. Search requires search and webpage-reading services; Terminal and SWE require an execution sandbox. The [standalone Action Judge evaluator](https://github.com/RUCAIBox/Agent-Editing-World-Model/tree/main/benchmarks/action_judge) instead classifies recorded decisions without executing tools.
117
+