Dataset Viewer
Auto-converted to Parquet Duplicate
trajectory_id
string
instance_id
string
fork_event_id
string
source_dir
string
source_model
string
step
int64
perturbation
string
label
int64
completion
string
target
string
messages
list
prompt
string
input
string
recorded_action
string
predicted_action
string
diverged
bool
n_compactions_active
int64
active_summary_chars
int64
n_messages_in_view
int64
original_msgs
int64
filtered_msgs
int64
delta_r
float64
baseline_reward
float64
memory_reward
float64
domain
string
webarena_cohort
string
ood_was_compacted_here
bool
ood_compression_ratio
float64
ood_step_strategy
string
split
string
provenance
dict
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_5_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
5
scenario_swap__struct_ms10
1
Y
Y
[ { "role": "user", "content": "App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with the 'accessibility' label, then add all issues that have the accessibility label to this epic." }, { "role": "user", "content": "Url: http://127.0.0.1:17099/\nTitle: GitLab — ...
[User] App: gitlab-plan-and-track Goal: Create a new epic called 'Accessibility Initiative' with the 'accessibility' label, then add all issues that have the accessibility label to this epic. [User] Url: http://127.0.0.1:17099/ Title: GitLab — Plan & Track Accessibility tree: INTERACTIVE ELEMENTS (use these IDs with c...
[User] App: gitlab-plan-and-track Goal: Create a new epic called 'Accessibility Initiative' with the 'accessibility' label, then add all issues that have the accessibility label to this epic. [User] Url: http://127.0.0.1:17099/ Title: GitLab — Plan & Track Accessibility tree: INTERACTIVE ELEMENTS (use these IDs with c...
click [76]
click [76]
false
0
0
12
12
12
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
1.496766
webarena_structured
eval
{ "training_path": "results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/trajectory.json", "replay_path": "results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/trajectory.json", "build_view_fn": "memgym.training.data.reward_model_pairs._reconstruct_view", "b...
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_6_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
6
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
click [37]
click [37]
false
0
0
14
14
14
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
1.387744
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_7_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
7
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
click [2]
type [2] Accessibility Initiative # recorded=click [2]
true
0
0
16
16
16
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
1.564518
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_8_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
8
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
type [2] Accessibility Initiative
click [37]
true
0
0
18
18
18
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
1.464618
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_9_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
9
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
click [37]
click [6]
true
0
0
20
20
20
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
2.158735
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_11_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
11
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
click [19]
click [9]
true
0
0
24
24
24
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
2.65425
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_12_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
12
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
click [9]
click [83]
true
0
0
26
26
26
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
2.116699
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_13_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
13
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
recorded=click [83] translated=click [85]
click [20]
true
0
0
28
28
28
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
2.327821
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_14_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
14
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
recorded=click [20] translated=click [22]
scroll [down]
true
0
0
30
30
30
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
2.229838
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1
webarena_webarena_gitlab-plan-and-track_task_h1_15_scenario_swap__struct_ms10
gitlab_struct_ms10
struct_ms10
15
scenario_swap__struct_ms10
1
Y
Y
[{"role":"user","content":"App: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility(...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
"[User]\nApp: gitlab-plan-and-track\nGoal: Create a new epic called 'Accessibility Initiative' with (...TRUNCATED)
click [22]
click [9]
true
0
0
32
32
32
1
0
1
webarena_gitlab-plan-and-track
gitlab_struct_ms10
true
4.495709
webarena_structured
eval
{"training_path":"results/webarena/prompt_fix_v2/gitlab_struct_ms10/gitlab-plan-and-track/task_h1/tr(...TRUNCATED)
End of preview. Expand in Data Studio

MemGym-RM Scenario-OOD — WebArena V2

Description

MemGym-RM-Scenario-OOD-WebArena is a held-out evaluation set designed to test whether MemRM generalizes to a completely different agent domain (WebArena browser tasks) not seen during training (which used SWE-Gym software engineering tasks). Each row is a trajectory step from a WebArena agent running under one of three memory cohorts, with a scenario_swap perturbation applied.

OOD axis: Agent scenario / task domain (SWE-Gym → WebArena).

Ships two files (use pairs_paper_eval.jsonl to reproduce paper metrics):

File Rows Use when…
pairs_paper_eval.jsonl 426 You want the paper-reported AUROC / ECE / F1 numbers. Subset that the 1.7B QLoRA ckpt-500 evaluator actually scored.
pairs_union.jsonl 487 You want the full pair set (3 perturbation classes × 5 apps) — e.g. to re-score on a different checkpoint or run a wider eval. Superset of pairs_paper_eval.jsonl.

The 61-row delta is the contents of one inference shard (1 of 8 planned shards failed to land during the paper run). The split is sticky and label-unbiased — see docs/release/d13_487_vs_426.md (source-only) for the per-perturbation / per-app / per-label / per-prompt-length breakdown.

CRITICAL — which checkpoint backs these numbers:
Metrics come from 1.7B QLoRA checkpoint-500.
Eval file: training_output/lightweight_comparison/eval_results_1p7b_ckpt500_webarena_v2_ood.json

Metric (paper-eval, 426 rows) Value (1.7B ckpt-500)
Total eval rows 426
Accuracy 0.354
HARMFUL F1 (support=87) 0.293
SAFE F1 (support=339) 0.406
AUROC (all 426)* 0.425
ECE 0.478

* See "Known limitations — AUROC reporting" below for caveats.

Do NOT use reward_model_v2_run1/eval_results.json — that file is the 8B model and does not contain WebArena OOD results.

Schema (post-sanitization)

All fields below reflect the field set after sanitize_hf_jsonl.py removes or redacts the private training_path sub-field from provenance.

Field Type Description
trajectory_id string WebArena task identifier
instance_id string Same as trajectory_id
fork_event_id string Unique event ID: <task>_<step>_scenario_swap__<strategy>
source_dir string WebArena cohort name (e.g., gitlab_struct_ms10)
source_model string Memory strategy name
step int Agent step index
perturbation string scenario_swap__<strategy>
label int 0 = HARMFUL (target=" N"), 1 = SAFE (target=" Y")
completion string Predicted token (" Y" or " N")
target string Gold token
messages list[dict] Full WebArena conversation history
prompt string Serialized prompt (WebArena format)
input string Alternative prompt serialization
recorded_action string Unperturbed agent action
predicted_action string Perturbed agent action
diverged bool Whether actions diverged
n_compactions_active int Active compaction count
active_summary_chars int Active summary character count
n_messages_in_view int Messages in agent view
original_msgs int Total trajectory messages
filtered_msgs int Post-compaction message count
delta_r float Reward delta (memory_reward − baseline_reward)
baseline_reward float Baseline (no-memory) task reward
memory_reward float Memory-augmented task reward
domain string WebArena application domain
webarena_cohort string Cohort identifier
ood_was_compacted_here bool Whether memory was compacted at this step
ood_compression_ratio float Compression ratio at this step
ood_step_strategy string Memory strategy name
split string Always "eval"
provenance dict Data lineage (sanitized; private path stripped)

Filter Recipe (487 union → 426 paper-eval)

The eval-results JSON has no row_id field; the canonical join key is the (instance_id, step, source_dir) tuple, which is unique across all 487 source rows.

import json

eval_d = json.load(open(
    "training_output/lightweight_comparison/eval_results_1p7b_ckpt500_webarena_v2_ood.json"
))
keep = {(r["instance_id"], int(r["step"]), r["source_dir"])
        for r in eval_d["per_row_predictions"]}
# len(keep) == 426

with open("pairs_union.jsonl") as f_in, \
     open("pairs_paper_eval.jsonl", "w") as f_out:
    for line in f_in:
        d = json.loads(line)
        if (d["instance_id"], int(d["step"]), d["source_dir"]) in keep:
            f_out.write(line)
# Output line count: 426

The 61 dropped rows belong to the single inference shard that failed during evaluation (1 of 8 planned shards). They are structurally valid but were never scored. The shard mapping is sticky — the same 61 rows would drop on a re-run of the same shard split. The pre-upload sanitize sweep (docs/release/sanitize_hf_jsonl.py) strips private training_path / replay_path values from provenance for both files; row counts are preserved.

License

MIT. See the MemGym repository's docs/licenses.md for the full asset-license matrix.

Citation

@inproceedings{xu2026memgym,
  title     = {MemGym: a Long-Horizon Memory Environment for LLM Agents},
  author    = {Anonymous Authors},
  booktitle = {Advances in Neural Information Processing Systems},
  year      = {2026},
  note      = {Under review}
}

Loading the Dataset

from datasets import load_dataset

# Paper-reproduction (426 rows scored by the 1.7B ckpt-500 evaluator):
ds_paper = load_dataset(
    "MemGym/memgym-rm-scenario-ood-webarena",
    data_files="pairs_paper_eval.jsonl", split="train",
)
print(len(ds_paper))  # 426

# Full union (487 rows) — re-score on your own checkpoint:
ds_full = load_dataset(
    "MemGym/memgym-rm-scenario-ood-webarena",
    data_files="pairs_union.jsonl", split="train",
)
print(len(ds_full))  # 487

Regeneration Recipe

See docs/release/provenance.md artifact #8 and docs/release/d13_487_vs_426.md for the full provenance trace.

Step 1 — rebuild the 487-row union from raw WebArena trajectories:

# Inputs (from the Stage 0.5 EC2 backup mirror or original EC2 host):
#   <wa-root>/grid_idfix/<app>_none/         (5 baseline cohorts)
#   <wa-root>/prompt_fix_v2/<app>_<perturbation>/  (15 OOD cohorts)

python -m memgym.training.scripts.build_webarena_long_context_pairs \
    --baseline-root <wa-root>/grid_idfix \
    --ood-root      <wa-root>/prompt_fix_v2 \
    --baseline-cohort-template "{app}_none" \
    --ood-cohorts gitlab_struct_ms10 gitlab_summ_ms10 gitlab_summ_ms15 \
                  gmail_struct_ms10  gmail_summ_ms10  gmail_summ_ms15 \
                  linear_struct_ms10 linear_summ_ms10 linear_summ_ms15 \
                  paypal_struct_ms10 paypal_summ_ms10 paypal_summ_ms15 \
                  superhuman_struct_ms10 superhuman_summ_ms10 superhuman_summ_ms15 \
    --out pairs_union.jsonl
# Expect: 487 rows; HARD RULE pass when checked with probe_v7_hardrule.

Step 2 — derive the 426-row paper-eval subset from the union + eval JSON (see the filter recipe block above).

Step 3 — sanitize provenance paths before HF upload (docs/release/sanitize_hf_jsonl.py).

Known Limitations

  • 61-row delta (Stage 1 M1): 1 of 8 planned inference shards did not land. The 61 un-evaluated rows are kept in pairs_union.jsonl but excluded from pairs_paper_eval.jsonl. Re-running the same shard split would drop the same 61 rows.
  • HARMFUL class is minority (~20%). Both files share the same class imbalance: 99/487 = 20.3% HARMFUL in the union; 87/426 = 20.4% HARMFUL in the paper-eval. Use class-weighted CE / threshold sweep when re-scoring; do not interpret raw accuracy without the per-class F1.
  • AUROC reporting nuance. The eval results file reports auroc=0.4248 over all 426 rows. Earlier drafts of this README cited Covered AUROC = 0.748 based on a covered-subset filter; that number could not be reproduced from the eval JSON alone and is therefore omitted pending paper-cross-check. Use the per-row predictions in the eval JSON to recompute under whichever subset you intend to cite.
  • Private path in raw file (Stage 3 D01): The pre-sanitize 487-row source file contained an absolute deploy-host path under provenance.training_path in every row. Both files shipped here are post-sanitize — the absolute paths are rewritten to repo-relative paths and the HF-hosted files contain no private paths.
  • EC2-only inputs: Raw WebArena trajectories live under prompt_fix_v2/ and grid_idfix_*/ on the original EC2 host. A full backup mirror is maintained off-EC2 (Stage 0.5); see the regeneration recipe block for the precise input layout.
Downloads last month
131