atharvgaur18 commited on
Commit
7ae19d2
·
verified ·
1 Parent(s): 5bc771f

ActionProof release: upload files

Browse files
README.md ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ base_model: CohereLabs/tiny-aya-global
4
+ base_model_relation: adapter
5
+ library_name: peft
6
+ pipeline_tag: text-generation
7
+ language:
8
+ - en
9
+ tags:
10
+ - actionproof
11
+ - tool-use
12
+ - agents
13
+ - grpo
14
+ - dr-grpo
15
+ - negative-result
16
+ - lora
17
+ - research-only
18
+ datasets:
19
+ - atharvgaur18/actionproof-traces
20
+ ---
21
+
22
+ # ActionProof agent Dn (no-std GRPO): the registered P3 null result
23
+
24
+ **Published for reproducibility, not for use.** Dn is agent D with exactly one change: the group standard deviation is
25
+ removed from the GRPO advantage (TRL `scale_rewards="none"`, Dr. GRPO's advantage without its length normalisation;
26
+ `actionproof/p3/train_nostd.py`). Same warm start (merged Dw), pools, reward R_V, 200 steps, LoRA r16, lr 2e-5, beta 0.02,
27
+ seeds 0-2. Three adapters: `s0`, `s1`, `s2` = `runs/p3_dn_s{0,1,2}/final`.
28
+
29
+ **P3 is a null result.** Registered hypothesis P3-H1 (`PREREGISTRATION_P3.md`): Dn beats D. It does not
30
+ (Dn - D -0.007 [-0.013, -0.001], one-sided p 0.988, seed deltas -0.009, +0.005, -0.016, **not supported**).
31
+ The interval excludes zero on the negative side, so there is no gain and a very small loss. The authors' reading that this fits the theory, because reads are free in ProcureSim,
32
+ was written after the result and is not a tested prediction.
33
+
34
+ ## Lineage
35
+
36
+ `CohereLabs/tiny-aya-global` + Dw adapter ([`atharvgaur18/actionproof-warmstart-dw`](https://huggingface.co/atharvgaur18/actionproof-warmstart-dw), merged) + `s0`, `s1` or `s2`
37
+ (this repository). The adapters load on merged Dw, not on the raw base.
38
+
39
+ ## Tool-call format and system prompt
40
+
41
+ The model is trained and evaluated in AgentTune's Cohere fallback format. There is no chat-template tool block.
42
+ - **System prompt** = ProcureSim policy text (`actionproof.integrity.sim.prompts.PROC_NEUTRAL`, also in
43
+ `data/bench/proc/system_prompt.txt` of the code repository) + a JSON tool-schema block built by
44
+ `actionproof.rollout.episode.system_prompt(env, PROC_NEUTRAL)`. That function uses AgentTune's prompt and schema
45
+ builder when AgentTune is installed, and a dependency-free copy (`actionproof/rollout/lite_format.py`) otherwise.
46
+ - **The model answers with one JSON list per turn and nothing else:**
47
+ `[{"tool_name": "pay_supplier", "parameters": {"po_id": "PO-1A2B3C", "amount_cents": 1000, "idempotency_key": "pay-PO-1A2B3C"}}]`
48
+ - **Tool results come back as a user turn:**
49
+ `Tool result for <name>: <json>` followed by `Continue the task. Call submit_report when you are finished.`
50
+ - **The episode ends** when the model calls `submit_report` with status `completed`, `failed` or `escalated`, or
51
+ when a turn has no parseable call (16 turns, 256 new tokens per turn in the evaluation).
52
+ - The ProcureSim tools are `get_purchase_order`, `find_supplier_order`, `place_supplier_order`, `record_goods_receipt`,
53
+ `list_goods_receipts`, `pay_supplier`, `list_payments`, `refund_payment`, `post_journal_entry`,
54
+ `get_journal_entries`, `escalate_to_human`, `submit_report` (`actionproof/integrity/sim/env.py`).
55
+
56
+ ## Usage (one turn)
57
+
58
+ The adapters are LoRA (r16) on a *parent*, which is not always the public base model (see Lineage). Merge the
59
+ parent chain first, then attach the adapter. Parent chain and merge helper: `actionproof/train/merge.py`.
60
+
61
+ ```python
62
+ # pip install torch transformers peft; git clone https://github.com/atharvgaur1845/actionproof-v2 && cd actionproof-v2 && pip install -e .
63
+ import json, torch
64
+ from huggingface_hub import snapshot_download
65
+ from peft import PeftModel
66
+ from transformers import AutoModelForCausalLM, AutoTokenizer
67
+ from actionproof.bench.generator_proc import DATA, load_tasks
68
+ from actionproof.stage3.env import make_env_s3
69
+ from actionproof.integrity.sim.prompts import PROC_NEUTRAL
70
+ from actionproof.rollout.episode import system_prompt, _agenttune
71
+
72
+ repo = "atharvgaur18/actionproof-agent-dn"
73
+ local = snapshot_download(repo)
74
+ # parent = the base model with the Dw adapter merged in (the "warm start")
75
+ parent = AutoModelForCausalLM.from_pretrained("CohereLabs/tiny-aya-global", torch_dtype=torch.bfloat16, device_map="auto")
76
+ parent = PeftModel.from_pretrained(parent, snapshot_download("atharvgaur18/actionproof-warmstart-dw")).merge_and_unload()
77
+ tok = AutoTokenizer.from_pretrained("CohereLabs/tiny-aya-global")
78
+ model = PeftModel.from_pretrained(parent, f"{local}/s0") # sub-folder of this repository
79
+
80
+ task = load_tasks(DATA / "p1_test_full.jsonl")[0]
81
+ env = make_env_s3(task, "card-demo")
82
+ conv = [{"role": "system", "content": system_prompt(env, PROC_NEUTRAL)},
83
+ {"role": "user", "content": task.prompt}]
84
+ text = tok.apply_chat_template(conv, add_generation_prompt=True, tokenize=False)
85
+ ids = tok(text, return_tensors="pt", add_special_tokens=False).to(model.device)
86
+ out = model.generate(**ids, max_new_tokens=256, do_sample=False)
87
+ reply = tok.decode(out[0, ids["input_ids"].shape[1]:], skip_special_tokens=True)
88
+ print(reply)
89
+ _, _, parse = _agenttune()
90
+ for c in parse(reply) or []:
91
+ print(env.call(c["function"]["name"], json.loads(c["function"]["arguments"] or "{}")))
92
+ ```
93
+
94
+ ## Results (frozen P1 test, 450 tasks, 3 seeds, sampled VSC)
95
+
96
+ | Split | D | Dn |
97
+ |---|---|---|
98
+ | full | 0.810 | 0.806 |
99
+ | pp | 0.931 | 0.911 |
100
+ | rec | 0.909 | 0.905 |
101
+ | wf4 | 0.486 | 0.490 |
102
+ | combo | 0.824 | 0.817 |
103
+ | union (450) | 0.819 | 0.813 |
104
+
105
+ | Contrast (paired task bootstrap, B = 10,000) | Status | Delta VSC [95% interval] |
106
+ |---|---|---|
107
+ | Dn - D | registered P3-H1, **not supported (null)** | -0.007 [-0.013, -0.001] |
108
+ | Dn - Dw | exploratory: no-std GRPO on recovery SFT | +0.134 [+0.113, +0.154] |
109
+ | D - Dw | exploratory: standard GRPO on recovery SFT | +0.140 [+0.121, +0.160] |
110
+
111
+ Per-seed union sampled VSC of Dn: s0 0.814, s1 0.811, s2 0.813.
112
+
113
+ ## Limitations
114
+
115
+ - **Simulator, not production payments.** Every result is on ProcureSim, a SQLite procurement simulator with injected
116
+ write faults (phantom, partial, lost-acknowledgement, duplicate, never-commit). No real payment system, real money
117
+ or real supplier was involved, and nothing here shows the agent is safe to deploy.
118
+ - **Generalisation fails on renamed tools and on the four-step workflow.** Recovery-start training with randomised
119
+ tool names (registered SR1, `results/s4/sr1_summary.json`) did not help on the renamed API (+0.000 [-0.040, +0.042]) and cost VSC on
120
+ the canonical tools (-0.248 [-0.296, -0.201]).
121
+ On the unseen four-step workflow (`wf4`, order, receive, pay, post) the models run the trained three-step sequence
122
+ and skip the new step; the table above shows the wf4 column far below the others.
123
+ - **Arms C and D are not nested.** C is the recovery-start agent A plus recovery SFT. D starts from its own
124
+ recovery-SFT warm start (Dw) and then runs GRPO. The C to D gap is therefore not GRPO's contribution; the
125
+ exploratory 2x2 (`results/audit/dwarm_2x2.json`) is the right reading of what GRPO adds on top of SFT.
126
+ - **P3 is a null result.** Removing the group standard deviation from the GRPO advantage (no-std GRPO, agent Dn) did
127
+ not improve on D (registered P3-H1, `results/p3/p3_summary.json`).
128
+ - **Intervals are over tasks only.** Paired task bootstrap over 450 tasks (B = 10,000) holds the three trained
129
+ models fixed; with three seeds, seed-level power is low. Per-split cells carry no stored interval.
130
+ - One base model (3.35B), one simulated domain, English-language training; Hindi and Hinglish were evaluated as shifts
131
+ only (`docs/submission/WRITEUP.md` section 25).
132
+ - Non-commercial licence inherited from the base model.
133
+
134
+ ## Intended use
135
+
136
+ Research only: reproducing the ActionProof study, probing how training signals shape verification and recovery
137
+ behaviour in tool agents, and benchmarking against ProcureSim. Not for production financial operations, not for
138
+ automated payment decisions, and not for commercial use (CC-BY-NC-4.0, plus the Cohere Labs acceptable-use policy).
139
+
140
+ ## Citation
141
+
142
+ ```bibtex
143
+ @misc{actionproof2026,
144
+ title = {ActionProof: what reinforcement learning teaches tool agents when "ok" does not mean it happened},
145
+ author = {atharvgaur18},
146
+ year = {2026},
147
+ howpublished = {\url{https://github.com/atharvgaur1845/actionproof-v2}},
148
+ note = {Model atharvgaur18/actionproof-agent-dn; code, claims ledger and pre-registrations in the repository}
149
+ }
150
+ ```
151
+
152
+ ## How to evaluate
153
+
154
+ Frozen P1 test: 450 tasks over five splits, 4 sampled episodes (T = 1) plus one greedy episode per task, 16 turns,
155
+ 256 new tokens, scored by the deterministic verifier (verified-success completion, VSC). Needs vLLM and a GPU.
156
+
157
+ ```bash
158
+ git clone https://github.com/atharvgaur1845/actionproof-v2 && cd actionproof-v2 # data/bench/proc/p1_test_*.jsonl are in the repository
159
+ python scripts/p1_eval.py --model runs/p1_dwarm/merged --adapter runs/p3_dn_s0/final --tag <tag> \
160
+ --split p1_test_full --phase test --samples 4 # repeat for p1_test_pp, p1_test_rec, p1_test_wf4, p1_test_combo
161
+ ```
162
+
163
+ `runs/...` is the cluster layout of the original runs. With the public repositories, pass a downloaded directory
164
+ (`huggingface-cli download <repo> --local-dir <dir>`); for an adapter repository `--model` is the merged parent
165
+ (see Lineage; the tool merges the adapter itself, as `actionproof/train/merge.py`) and `--adapter` is `<dir>/<sub-folder>`.
166
+ Evaluate seeds 0, 1, 2 for the three-seed arm (`--tag <ARM>_s0` and so on).
167
+
168
+ `scripts/p1_eval.py` refuses to overwrite a frozen-test output, so write to a fresh checkout or use `--phase dev` on
169
+ `p1_dev_*` splits. The recorded episodes behind every number on this card are in the dataset
170
+ [`atharvgaur18/actionproof-traces`](https://huggingface.co/datasets/atharvgaur18/actionproof-traces); `scripts/verify_numbers.sh`
171
+ recomputes the summaries from them on a CPU.
172
+
173
+
174
+ *Sources: results/p3/p3_summary.json, results/audit/dwarm_2x2.json, results/p1/test/Dn_s*__*.summary.json. Numbers on this card were generated from those files by `release/build_cards.py`; none is typed by hand.*
s0/LINEAGE.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo": "atharvgaur18/actionproof-agent-dn",
3
+ "folder": "s0",
4
+ "source_run": "runs/p3_dn_s0/final",
5
+ "root_base_model": "CohereLabs/tiny-aya-global",
6
+ "real_parent": "merged Dw = base + adapter of actionproof-warmstart-dw (runs/p1_dwarm/merged)",
7
+ "original_base_model_name_or_path": "/scratch/pabitra/actionproof/runs/p1_dwarm/merged",
8
+ "note": "adapter_config.json in this folder has base_model_name_or_path rewritten to the public root base; when real_parent is not 'base', merge the parent chain first (see the repository README).",
9
+ "merge_helper": "actionproof/train/merge.py",
10
+ "code": "https://github.com/atharvgaur1845/actionproof-v2"
11
+ }
s0/adapter_config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "CohereLabs/tiny-aya-global",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "kasa_config": null,
16
+ "layer_replication": null,
17
+ "layers_pattern": null,
18
+ "layers_to_transform": null,
19
+ "loftq_config": {},
20
+ "lora_alpha": 32,
21
+ "lora_bias": false,
22
+ "lora_dropout": 0.0,
23
+ "lora_ga_config": null,
24
+ "megatron_config": null,
25
+ "megatron_core": "megatron.core",
26
+ "modules_to_save": null,
27
+ "monteclora_config": null,
28
+ "peft_type": "LORA",
29
+ "peft_version": "0.21.2",
30
+ "qalora_group_size": 16,
31
+ "r": 16,
32
+ "rank_pattern": {},
33
+ "revision": null,
34
+ "target_modules": [
35
+ "k_proj",
36
+ "up_proj",
37
+ "gate_proj",
38
+ "down_proj",
39
+ "q_proj",
40
+ "o_proj",
41
+ "v_proj"
42
+ ],
43
+ "target_parameters": null,
44
+ "task_type": "CAUSAL_LM",
45
+ "trainable_token_indices": null,
46
+ "use_bdlora": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false,
50
+ "velora_config": null
51
+ }
s0/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad1df4e3d5b35d0f20b7441a3ff8d49faebdc16951820b633171714b3ff799a8
3
+ size 120981200
s1/LINEAGE.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo": "atharvgaur18/actionproof-agent-dn",
3
+ "folder": "s1",
4
+ "source_run": "runs/p3_dn_s1/final",
5
+ "root_base_model": "CohereLabs/tiny-aya-global",
6
+ "real_parent": "merged Dw = base + adapter of actionproof-warmstart-dw (runs/p1_dwarm/merged)",
7
+ "original_base_model_name_or_path": "/scratch/pabitra/actionproof/runs/p1_dwarm/merged",
8
+ "note": "adapter_config.json in this folder has base_model_name_or_path rewritten to the public root base; when real_parent is not 'base', merge the parent chain first (see the repository README).",
9
+ "merge_helper": "actionproof/train/merge.py",
10
+ "code": "https://github.com/atharvgaur1845/actionproof-v2"
11
+ }
s1/adapter_config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "CohereLabs/tiny-aya-global",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "kasa_config": null,
16
+ "layer_replication": null,
17
+ "layers_pattern": null,
18
+ "layers_to_transform": null,
19
+ "loftq_config": {},
20
+ "lora_alpha": 32,
21
+ "lora_bias": false,
22
+ "lora_dropout": 0.0,
23
+ "lora_ga_config": null,
24
+ "megatron_config": null,
25
+ "megatron_core": "megatron.core",
26
+ "modules_to_save": null,
27
+ "monteclora_config": null,
28
+ "peft_type": "LORA",
29
+ "peft_version": "0.21.2",
30
+ "qalora_group_size": 16,
31
+ "r": 16,
32
+ "rank_pattern": {},
33
+ "revision": null,
34
+ "target_modules": [
35
+ "q_proj",
36
+ "o_proj",
37
+ "k_proj",
38
+ "down_proj",
39
+ "gate_proj",
40
+ "up_proj",
41
+ "v_proj"
42
+ ],
43
+ "target_parameters": null,
44
+ "task_type": "CAUSAL_LM",
45
+ "trainable_token_indices": null,
46
+ "use_bdlora": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false,
50
+ "velora_config": null
51
+ }
s1/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7a8fb5108818aec5aa4d405df4bf6e8598c7aca6719d472f3c9139700fe0ba3
3
+ size 120981200
s2/LINEAGE.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "repo": "atharvgaur18/actionproof-agent-dn",
3
+ "folder": "s2",
4
+ "source_run": "runs/p3_dn_s2/final",
5
+ "root_base_model": "CohereLabs/tiny-aya-global",
6
+ "real_parent": "merged Dw = base + adapter of actionproof-warmstart-dw (runs/p1_dwarm/merged)",
7
+ "original_base_model_name_or_path": "/scratch/pabitra/actionproof/runs/p1_dwarm/merged",
8
+ "note": "adapter_config.json in this folder has base_model_name_or_path rewritten to the public root base; when real_parent is not 'base', merge the parent chain first (see the repository README).",
9
+ "merge_helper": "actionproof/train/merge.py",
10
+ "code": "https://github.com/atharvgaur1845/actionproof-v2"
11
+ }
s2/adapter_config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "CohereLabs/tiny-aya-global",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "kasa_config": null,
16
+ "layer_replication": null,
17
+ "layers_pattern": null,
18
+ "layers_to_transform": null,
19
+ "loftq_config": {},
20
+ "lora_alpha": 32,
21
+ "lora_bias": false,
22
+ "lora_dropout": 0.0,
23
+ "lora_ga_config": null,
24
+ "megatron_config": null,
25
+ "megatron_core": "megatron.core",
26
+ "modules_to_save": null,
27
+ "monteclora_config": null,
28
+ "peft_type": "LORA",
29
+ "peft_version": "0.21.2",
30
+ "qalora_group_size": 16,
31
+ "r": 16,
32
+ "rank_pattern": {},
33
+ "revision": null,
34
+ "target_modules": [
35
+ "o_proj",
36
+ "gate_proj",
37
+ "down_proj",
38
+ "v_proj",
39
+ "up_proj",
40
+ "k_proj",
41
+ "q_proj"
42
+ ],
43
+ "target_parameters": null,
44
+ "task_type": "CAUSAL_LM",
45
+ "trainable_token_indices": null,
46
+ "use_bdlora": null,
47
+ "use_dora": false,
48
+ "use_qalora": false,
49
+ "use_rslora": false,
50
+ "velora_config": null
51
+ }
s2/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db62c5821455e8c3c174b11a36a6a824074bc8a09edf37e79de90202d16765cf
3
+ size 120981200