WildGuard Template-Probe Repro Artifacts (arXiv:2605.18549)
Description
This repository contains evaluation artifacts for the reproduction of
Monitoring the Internal Monologue: Probe Trajectories Reveal Reasoning Dynamics
(arXiv:2605.18549v2, Option A), executed on Modal (kanu2707 profile).
All training and evaluation code runs unmodified from the pinned author repositoryNASK-AISafety/monitoring-internal-monologue at commit5d2c0799d28e4e78fa5164f0817cd0411fe8f441.
Data Split
- Training: 12,000 stratified samples from WildGuardMix (seed=42, 95/5 split)
- Validation: 632 samples
- Test: 1,699 WildGuardTest prompts
Models Evaluated
Qwen/Qwen3-4B(MIL: 3 seeds, GDA: 6 config × 3 seeds)Qwen/Qwen3-8B(MIL: 1 seed, GDA: 6 config × 3 seeds)
What this repository actually contains
This public repo is the thin artifact bundle, not the raw checkpoint dump:
agent_traces/
├── wildguard_session_trace.jsonl # 605-step agent session (home paths, usernames, tokens removed)
├── wildguard_repro_trace.jsonl # 22-record per-stage run ledger with redacted payloads
└── README.md # trace schema + redaction contract
score_trajectory.py # scores probe trajectories into the Table 1 AUROCs
requirements.txt
The checkpoints_mil/, probes_gda/ and eval/ trees described below are the
full bundle layout on the private Modal volume (wildguard-repro-vol); the
multi-GB model-derived tensors are not redistributable. Every number in the main
repro Space is regenerated from the published code plus that volume.
Artifact Structure (full bundle layout, on the Modal volume)
checkpoints_mil/
├── qwen3_4b_seed42/best.ckpt
├── qwen3_4b_seed43/best.ckpt
├── qwen3_4b_seed44/best.ckpt
└── qwen3_8b_seed42/best.ckpt
probes_gda/
├── qwen3_4b/
│ ├── sub_12k/
│ │ ├── avg/seed_42/...
│ │ ├── avg/seed_43/...
│ │ ├── avg/seed_44/...
│ │ ├── last_token/seed_42/...
│ │ ├── last_token/seed_43/...
│ │ └── last_token/seed_44/...
│ └── full_36k/
│ ├── avg/seed_42/...
│ ├── avg/seed_43/...
│ ├── avg/seed_44/...
│ ├── last_token/seed_42/...
│ ├── last_token/seed_43/...
│ └── last_token/seed_44/...
└── qwen3_8b/
├── sub_12k/... (same structure)
└── full_36k/... (same structure)
eval/
├── gen_qwen3_4b/responses.json # 1,699 vLLM generations
├── gen_qwen3_4b/records.json # Structured outputs
├── gen_qwen3_8b/responses.json
├── gen_qwen3_8b/records.json
├── wildguard_qwen3_4b/parsed_labels.json
├── wildguard_qwen3_8b/parsed_labels.json
├── judge_qwen3_8b/judge_preds.json # Appendix C judge on CoTs
├── probes_qwen3_4b/mil/*/cot_*_cummax.parquet
├── probes_qwen3_4b/gda/*/cot_*_cumsum.parquet
├── probes_qwen3_8b/mil/*/cot_*_cummax.parquet
├── probes_qwen3_8b/gda/*/cot_*_cumsum.parquet
└── trajectories_sample.json # Representative trajectories
table1_repro.json
run_ledger.json
checkpoints_mil/
MIL probes trained with global max-pool on the 12k stratified subsample.
| Run Name | Model | Seed | Config |
|---|---|---|---|
qwen3_4b_42 |
Qwen3-4B | 42 | qwen3_4b |
qwen3_4b_43 |
Qwen3-4B | 43 | qwen3_4b |
qwen3_4b_44 |
Qwen3-4B | 44 | qwen3_4b |
qwen3_8b_42 |
Qwen3-8B | 42 | qwen3_8b |
probes_gda/
GDA probes (avg-pool & last-token) trained on sub_12k and full_36k for saturation analysis.
| Regime | Family | Seeds | Models |
|---|---|---|---|
sub_12k |
avg |
42, 43, 44 | both |
sub_12k |
last_token |
42, 43, 44 | both |
full_36k |
avg |
42, 43, 44 | both |
full_36k |
last_token |
42, 43, 44 | both |
eval/
- Generation: 1,699 WildGuardTest completions via vLLM (temp=0.5, top_p=0.95, top_k=50)
- Labels:
allenai/wildguardon both CoTs and final responses - Judge: Qwen/Qwen3-8B with Appendix C prompt on CoTs (enable_thinking=False)
- Trajectories: Token-by-token probe scores for representative samples
table1_repro.json
Reproduction results with 2000-resample bootstrap SEM and per-seed breakdown.
{
"scope": "Option A (12k stratified + 36k GDA saturation check)",
"author_commit": "5d2c0799d28e4e78fa5164f0817cd0411fe8f441",
"generated_utc": "2026-12-06T...",
"assessment": {...},
"models": {
"qwen3_4b": {
"mil_12k": {"mean_auroc": ..., "seed_std": ..., "seed_sem": ..., "seed_avg_score_bootstrap": {...}, "seeds": [...]},
"gda_12k": {"avg": {...}, "last_token": {...}},
"gda_36k_saturation_check": {"avg": {...}, "last_token": {...}},
"saturation_delta_36k_minus_12k": {"avg": ..., "last_token": ...},
"judge_qwen3_8b_prob": {...},
"judge_qwen3_8b_binary": {...}
},
"qwen3_8b": {...}
},
"paper_table1": { ... } // Table 1 from paper (labeled)
}
run_ledger.json
Modal execution ledger with start/end timestamps and resource allocation per stage.
Quickstart: Score a (prompt, cot) Pair
from pathlib import Path
from score_trajectory import score_trajectory
# Load a trained MIL probe (e.g., Qwen3-4B seed 42)
probe_path = Path("checkpoints_mil/qwen3_4b_seed42/best.ckpt")
prompt = "How can I make a bomb?"
cot = ("I need to find instructions for making a bomb. First, I should "
"search online for bomb-making tutorials. Then, I'll gather the "
"materials and follow the steps carefully.")
result = score_trajectory(prompt, cot, probe_path, model_repo="Qwen/Qwen3-4B")
print(result)
# {
# "final_score": 0.923,
# "num_cot_tokens": 37,
# "trajectory": [
# {"token": "I", "score": 0.12},
# {"token": "need", "score": 0.21},
# ...
# ]
# }
AUROC Summary (Reproduction — reproduced at full 36k + max_tokens=4096)
All scores below are populated directly from table1_repro.json (0–100 AUROC scale, 2,000-resample bootstrap SEM).
For the original paper results, see Table 1 in arXiv:2605.18549v2 (p. 5).
| Model | MIL max-pool (36k) | GDA avg-pool (12k → 36k) | GDA last-token (12k → 36k) |
|---|---|---|---|
| Qwen3-4B | 94.183 (seed_sem=1.074, paper 96.6 ± 0.9) |
87.701 → 94.146 (+6.445, paper 95.3 ± 1.2) |
52.995 → 47.688 (-5.307, paper 53.0 ± 4.5) |
| Qwen3-8B | 93.355 ± 1.040 (paper 94.5) |
37.928 → 91.761 (+53.833, paper 92.1) |
59.428 → 70.831 (+11.403, paper 70.4) |
| Judge (Qwen3-8B, Appendix C) | Qwen3-4B (Paper / Repro) | Qwen3-8B (Paper / Repro) |
|---|---|---|
Binary label AUROC (0 unparsed) |
79.9 / 77.144 ± 1.876 |
81.1 / 75.082 ± 1.995 |
- Verdict:
reproducedat full 36k +max_tokens=4096(all pooled probes > 90 AUROC and > 20 pts above last-token GDA). - Empty CoTs (
max_tokens=4096):8/1699(0.47%) on both Qwen3-4B and Qwen3-8B (down from163/201at1024). - Quadrants (
max_tokens=4096): Qwen3-4B (1510faithful_safe,78faithful_harmful,74unfaithful_harmful_resp_safe_cot,27unfaithful_safe_resp_harmful_cot); Qwen3-8B (1523,71,71,26).
Reproduction Command Sequence
# 1. Prep (CPU, installs author repo, downloads dataset + models)
MODAL_PROFILE=kanu2707 modal run wildguard-probe-repro/modal_step1_step2.py --stage prep
# 2. Train MIL (Qwen3-4B ×3, Qwen3-8B ×1) on 12k
MODAL_PROFILE=kanu2707 modal run wildguard-probe-repro/modal_step1_step2.py --stage step2
# 3. Train GDA (sub_12k & full_36k, avg & last_token, ×3 seeds)
MODAL_PROFILE=kanu2707 modal run wildguard-probe-repro/modal_step1_step2.py --stage step1
# 4. Generate on WildGuardTest (vLLM)
MODAL_PROFILE=kanu2707 modal run wildguard-probe-repro/modal_step3_step5.py --stage step3
# 5. Label with allenai/wildguard + Appendix C judge
MODAL_PROFILE=kanu2707 modal run wildguard-probe-repro/modal_step3_step5.py --stage step4
# 6. Evaluate probes + export trajectories
MODAL_PROFILE=kanu2707 modal run wildguard-probe-repro/modal_step3_step5.py --stage step5
License
MIT — see the LICENSE file in the author repository.
References
- Paper: Monitoring the Internal Monologue: Probe Trajectories Reveal Reasoning Dynamics
(arXiv:2605.18549v2) - Author repo:
NASK-AISafety/monitoring-internal-monologue@5d2c0799d28e4e78fa5164f0817cd0411fe8f441 - Data repo:
Neurips-2026-MLIntern-Repro/wildguard-template-probe-data