CoolFace
Datasetpublic

MemGym/memgym-rm-scenario-ood-webarena

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… See the full description on the dataset page: https://huggingface.co/datasets/MemGym/memgym-rm-scenario-ood-webarena.

sourceHugging Facemitupdated 4mo agoView on Hugging Face
0likes54downloads
Dataset Card

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):

FileRowsUse when…
pairs_paper_eval.jsonl426You want the paper-reported AUROC / ECE / F1 numbers. Subset that the 1.7B QLoRA ckpt-500 evaluator actually scored.
pairs_union.jsonl487You 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 rows426
Accuracy0.354
HARMFUL F1 (support=87)0.293
SAFE F1 (support=339)0.406
AUROC (all 426)*0.425
ECE0.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.

FieldTypeDescription
trajectory_idstringWebArena task identifier
instance_idstringSame as trajectory_id
fork_event_idstringUnique event ID: <task>_<step>_scenario_swap__<strategy>
source_dirstringWebArena cohort name (e.g., gitlab_struct_ms10)
source_modelstringMemory strategy name
stepintAgent step index
perturbationstringscenario_swap__<strategy>
labelint0 = HARMFUL (target=" N"), 1 = SAFE (target=" Y")
completionstringPredicted token (" Y" or " N")
targetstringGold token
messageslist[dict]Full WebArena conversation history
promptstringSerialized prompt (WebArena format)
inputstringAlternative prompt serialization
recorded_actionstringUnperturbed agent action
predicted_actionstringPerturbed agent action
divergedboolWhether actions diverged
n_compactions_activeintActive compaction count
active_summary_charsintActive summary character count
n_messages_in_viewintMessages in agent view
original_msgsintTotal trajectory messages
filtered_msgsintPost-compaction message count
delta_rfloatReward delta (memoryreward − baselinereward)
baseline_rewardfloatBaseline (no-memory) task reward
memory_rewardfloatMemory-augmented task reward
domainstringWebArena application domain
webarena_cohortstringCohort identifier
ood_was_compacted_hereboolWhether memory was compacted at this step
ood_compression_ratiofloatCompression ratio at this step
ood_step_strategystringMemory strategy name
splitstringAlways "eval"
provenancedictData 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.

python
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

bibtex
@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

python
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:

bash
# 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.