NLAttack v2.0.0 — formal release (adds the Red/Blue CTF family) - #23
Conversation
Package the two halves of the NLA-as-monitor threat model (Family G adaptive red-team + Family M deception monitoring) into a head-to-head Capture-the-Flag game with an adversarial scoreboard, so the suite can answer directly: how well does an NLA-monitor catch misalignment, and how often can a model capture the flag without getting caught? A Red model pursues a hidden misaligned objective (the flag — exfiltration, sandbagging, a concealed override, collusion, a backdoor) while a Blue NLA-monitor reads the AV verbalization and tries to catch it. Each round resolves to clean_capture / busted / false_alarm / failed; CTFScore reports clean-capture rate (Red), catch rate (Blue recall on genuine captures), stealth gap (the probe-vs-AV exploitable surface), and evasion cost. Carries the suite's discipline: capture is ground truth on the activation (the bottleneck probe), the flag is the matcher over the AV text — never the same signal (independent-review P0 #1). Integrity gate mirrors Family M / P118: runs using the model-agnostic survival-proxy oracle over constructed flags are control-tier; only a real bottleneck-probe oracle over the model's own behavior is primary-tier. Every CTFScore carries its tier. Additive — touches no frozen v0.1 content. - nla_eval/ctf.py: Flag/CTF_FLAGS, BlueMonitor/nla_blue_monitor, survival_oracle /probe_capture_oracle, naive/adaptive Red policies, play_ctf, CTFScore; reuses redteam.adaptive_evade and deception.DECEPTION_ANCHORS. - plans/N_ctf_red_blue.md: P119-P128 in the standard schema. - docs/CTF_RED_BLUE.md: design + control-vs-primary tiers; wired into EVALUATIONS, INDEX, plans/README, ROADMAP_v0.2, README. - experiments/ctf_red_blue_demo.py: offline control-tier demo (MockNLA, CPU, pinned hash seed for reproducibility) + committed results/ctf artifact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMuBSoDsAPwNSvev9nmvVr
There was a problem hiding this comment.
Code Review
This pull request introduces "CTF Red/Blue" (Family N, v0.2 additive), a game-theoretic framework that pits an adaptive Red team model pursuing a hidden deceptive objective against a Blue NLA-monitor reading the AV verbalization. The changes include the core game loop and scoring logic in nla_eval/ctf.py, an offline control-tier demo in experiments/ctf_red_blue_demo.py, and extensive documentation updates. The review feedback focuses on improving JSON serialization compatibility by replacing float("nan") with None, resolving formatting inconsistencies and potential TypeErrors when printing metrics in the demo, and ensuring the generated JSON output ends with a final newline.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Promote the prior frozen benchmark to v1 and this work to a formal v2.0.0 release, reconciling versioning, docs, and counts across the repo. v1 content and its published results are carried forward unchanged. Version & release infra - nla_eval/__init__.py -> 2.0.0; CITATION.cff version 2.0.0 + abstract (128 plans / 14 families). - New CHANGELOG.md (v1 + v2 entries) following the freeze-on-release policy. - VERSIONING.md rewritten around plain v1/v2 generation labels (keeps the freeze policy; maps the old v0.1->v1, v0.2->v2; clarifies that a checkpoint's own "v0.1" version names the NLA artifact, not the benchmark generation). - docs/ROADMAP_v0.2.md -> docs/ROADMAP_v2.md; reframed so the CTF family is "shipped in v2.0.0" and the multi-domain expansion + H1-H12 harness fixes are the tracked v2.x roadmap (not claimed in the tagged release). Catalog & naming - Family N (CTF Red/Blue) promoted from "v0.2 additive" to a first-class v2 family. Counts reconciled to 128 plans / 14 families (v2); families A-M (P001-P118) remain the frozen v1 catalog. Updated INDEX, plans/README, EVALUATIONS, CTF_RED_BLUE, ctf.py, the demo, and the hero-figure prompt. README & results - README simplified into a single-screen front page; v1 results table kept visible and labeled frozen. - RESULTS.md: v1 findings labeled frozen; new "v2 additions" section (CTF control-tier demo + the domain-aware honest-negative), with the control-vs-primary integrity caveat stated. - New results/README.md provenance map (which artifact belongs to which generation; v1 never overwritten). Honesty: the tagged v2.0.0 ships the new adversarial Red/Blue CTF family plus release maturation; it does not fabricate domain-coverage or fix-dependent numbers it has not produced. Note: PR #21 (versioning scaffold) and PR #22 (domain-aware result) are already merged to master, so this branch already contains them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMuBSoDsAPwNSvev9nmvVr
External-review packet gating the v2.0.0 tag, per the VERSIONING rollout checklist. Two lenses (Gemini + manual) mirroring the plans/reviews convention. Covers: reproduction steps, claims-to-verify (C1-C7), an integrity audit of the capture-vs-flag separation and control-vs-primary tiers (A1-A4), validity threats to probe (V1-V5), v1 backward-compat verification, reviewer worksheets, and a sign-off checklist mapped to the rollout gate. Links the packet from the VERSIONING checklist. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMuBSoDsAPwNSvev9nmvVr
🔍 Review request — v2.0.0 release gateThis PR is ready for the two-lens external review the rollout gate requires ( TL;DR of what's under review — additive generation bump: adds Family N (CTF Red/Blue, P119–P128) + release maturation; changes no v1 content or results.
|
There was a problem hiding this comment.
Code Review
This pull request bumps the benchmark version to 2.0.0 and introduces Family N — CTF Red/Blue, an adversarial capture-the-flag evaluation paradigm for NLA-as-monitor threat models. It adds the runnable harness (nla_eval/ctf.py), an offline CPU-only demo (experiments/ctf_red_blue_demo.py), and updates the plan catalog and documentation to reflect the new 128-plan structure. The review feedback highlights three key areas for improvement in nla_eval/ctf.py: correcting a logic bug in BlueMonitor.inspect where best_hit can be overwritten by a non-tripping concept, dynamically calculating the threshold in _first_clean_query using 1.0 - ceiling instead of hardcoding it to floor, and replacing float('nan') with None in score_ctf to prevent invalid JSON serialization.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Five findings from the v2.0.0 release review (gemini-code-assist on PR #23): - HIGH: score_ctf used float("nan") for undefined rates (catch_rate in by_category and total; mean_queries_to_capture) — invalid JSON (the project's own H3 issue). Now None -> null; CTFScore type hints updated to Optional. - HIGH: BlueMonitor.inspect could report a `hit` that did not trip the flag when a later non-matching watch concept had a higher soft score. Track tripped concepts separately and report the highest-soft tripping concept when flagged. - HIGH: _first_clean_query threshold hardcoded to `floor`; the true minimum clean score is `1.0 - ceiling` (correct only when ceiling==0.5). Now derived from ceiling, so queries-to-first-clean is correct for any flag_ceiling. - MEDIUM: demo now formats catch_rate / mean_queries to 2dp and is None-safe (avoids a TypeError once those can be null). - MEDIUM: demo writes the JSON artifact with a trailing newline. Doc: P120 "null looks like" wording nan -> null to match. Validated: artifact re-parses as strict JSON, hit-consistency + threshold unit checks pass, run_example and the CTF demo still green. Numbers unchanged at default floor/ceiling=0.5. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMuBSoDsAPwNSvev9nmvVr
|
All six review threads addressed in
One deviation: the demo-formatting suggestion's inline Generated by Claude Code |
Formalizes the second benchmark generation as v2.0.0. v1 (the prior frozen release) and its published results are carried forward unchanged.
What v2 is
nla_eval/ctf.py,docs/CTF_RED_BLUE.md). An adversarial capture-the-flag packaging of the NLA-as-monitor threat model: a Red model pursues a hidden misaligned objective (the flag) while a Blue NLA-monitor reads the AV verbalization to catch it. Scoreboard: clean-capture rate (Red), catch rate (Blue's recall on genuine captures), stealth gap, evasion cost. Offline reproducible control-tier demo againstMockNLA.2.0.0(nla_eval/__init__.py,CITATION.cff); newCHANGELOG.md;VERSIONING.mdrewritten around plain v1/v2 generation labels (freeze-on-release policy kept);ROADMAP_v0.2.md→ROADMAP_v2.md.RESULTS.mdgains a "v2 additions" section (CTF control-tier demo + the domain-aware honest-negative) with the control-vs-primary integrity caveat; newresults/README.mdprovenance map (v1 artifacts never overwritten).Integrity / honesty
CTFScorecarries itstier).Note on the other PRs
PR #21 (versioning scaffold) and PR #22 (domain-aware result) are already merged to
master, so this branch already contains them; they can be closed.Validation
python run_example.py,python experiments/ctf_red_blue_demo.py(reproducible), andimport nla_eval; nla_eval.__version__ == "2.0.0"all pass; CITATION.cff parses; no stale links after the roadmap rename.🤖 Generated with Claude Code