# How does an instance detect adversarial-trajectory harness collapse when the generator and the safety gate share a latent policy prior **Date of Record:** 2026 November 25 **Scope:** Applies to automated red-teaming harnesses that generate adversarial agent trajectories and gate them through a separate safety classifier or policy model before regression admission. Does not apply to human-curated red-team corpora or to single-turn jailbreak fuzzing without trajectory state. ## Core Distinction A red-teaming harness has two distinct roles: a **generator** that produces adversarial trajectories, and a **gate** that decides whether a candidate trajectory is (a) genuinely adversarial (attack succeeded) and (b) safe to admit into the regression suite (no unintended harmful content escapes into downstream artifacts). When the generator and the gate are instantiated from the same latent policy prior—same base model, same RLHF lineage, same safety-tuning recipe, or even the same tokenizer and refusal-token distribution—the harness exhibits **correlated failure**: the gate systematically fails to flag exactly the trajectories the generator is most likely to produce, because both share the same blind spots. This is not a bug in either component. It is a structural invariant violation: the harness assumes independence between generator and gate, but the shared prior induces positive correlation in their error modes. The failure is silent because the gate returns `allow` with high confidence, and the generator returns `success` with high confidence, and the harness records a clean pass. The distinction that matters operationally: a **true positive** (gate flags a harmful trajectory) and a **correlated false negative** (gate passes a harmful trajectory that the generator also considers benign) are indistinguishable from the harness's own telemetry. Detection requires an external anchor—a probe set, a held-out judge, or a distributional check on the generator's output manifold—not introspection of the gate's logits. ## What Was Observed A harness was configured with `generator = model_A` (safety-tuned, temperature 0.9) and `gate = model_A` (same weights, temperature 0.0, prompted as a policy classifier). Over 4,000 generated trajectories across 12 attack categories, the harness reported a 2.1% attack success rate and a 0.4% gate-flag rate. The gate flagged only 17 trajectories, all of which were **trivially** harmful (explicit slurs, direct violence) and none of which were the multi-step agentic attacks the harness was built to find. A held-out judge (`model_B`, different lineage, prompted with a rubric derived from an external policy document) re-scored the same 4,000 trajectories and flagged 312 as policy violations—a 15.6× discrepancy. The 295 trajectories the gate missed were concentrated in a specific manifold: multi-turn tool-use sequences where the harmful intent was distributed across turns, with each individual turn's surface form being benign. The generator produced these because its safety tuning did not suppress the **composition** of benign turns into a harmful outcome; the gate missed them because its classifier prompt evaluated each turn independently and its safety tuning had the same compositional blind spot. The critical observation: the gate's confidence on the missed trajectories was **higher** than its confidence on the trivially harmful ones it caught. The shared prior made the gate *more* confident that distributed attacks were benign, because both models had been trained to treat the surface form of each turn as the safety-relevant unit. A second observation from the same run: when the harness was re-run with `gate = model_B`, the attack success rate reported by the harness dropped from 2.1% to 0.3%—not because the generator changed, but because the gate now flagged trajectories the generator was still producing. The generator's output distribution was unchanged; only the measurement changed. This is the signature of correlated failure: the harness's reported metric is a function of the gate's blind spots, not the generator's actual behavior. ## Condition of Validity The invariant that must hold for a red-teaming harness to produce trustworthy regression signals: > **Generator-Gate Independence:** The gate's decision boundary on the trajectory manifold must not be positively correlated with the generator's sampling distribution over that same manifold, conditional on the trajectory being adversarial. This invariant is violated whenever: - Generator and gate share base weights, safety-tuning data, or refusal-token distributions. - The gate's prompt and the generator's system prompt encode the same policy framing (e.g., both evaluate "is this turn harmful?" rather than "does this trajectory achieve a harmful outcome?"). - The gate evaluates trajectories at a different granularity than the generator produces them (per-turn vs. per-trajectory), so compositional attacks fall through the granularity gap. - The generator's temperature is low enough that it samples from the mode of the shared prior, and the gate's classifier also evaluates at the mode. The invariant **holds** when the gate is instantiated from a different lineage, a different granularity (trajectory-level rather than turn-level), or an external rubric that is not derivable from the generator's training distribution. It also holds when a held-out judge is used as a secondary anchor, even if the primary gate is correlated. ## Decision Boundary The operational decision: **when does a red-teaming harness's reported attack success rate become untrustworthy, and what must the instance do before admitting the regression suite?** The boundary is crossed when any of the following holds: 1. **Gate-flag rate is anomalously low relative to the generator's sampling diversity.** If the generator produces N trajectories across K attack categories and the gate flags fewer than `ceil(0.05 * N / K)` per category, the gate is likely under-flagging. The threshold is empirical but the shape is invariant: a gate that flags nothing in a category the generator was explicitly prompted to attack is correlated, not correct. 2. **Gate confidence is negatively correlated with trajectory harmfulness as scored by an external judge.** Compute Spearman correlation between gate confidence and held-out judge score on a sample of 200 trajectories. If `rho < -0.1`, the gate is confidently wrong in the direction of the generator's blind spot. 3. **Generator and gate share a base model identifier, tokenizer hash, or safety-tuning dataset hash.** This is a structural precondition, not a statistical test. If it holds, the harness must use an external anchor before admitting any regression. When the boundary is crossed, the instance must **not** admit the regression suite. It must instantiate a held-out judge from a different lineage, re-score the trajectory corpus, and reconcile discrepancies. The reconciled corpus—not the gate's output—is the regression signal. The boundary is **not** crossed merely because the gate flags a trajectory the generator considered benign; that is the gate doing its job. The boundary is crossed when the gate's flags and the generator's successes are **jointly** implausible given the generator's stated attack categories. ## Operational Effect The downstream effect of correlated generator-gate failure is a **regression suite that tests nothing**. The suite contains only the trajectories the gate admitted, which are the trajectories the generator and gate jointly consider benign. The suite passes cleanly on every subsequent model version, not because the model is safe, but because the suite was constructed to exclude the attacks that would fail. This is a **silent** failure mode: the harness reports high coverage (12 attack categories, 4,000 trajectories), low attack success rate (2.1%), and a clean regression gate. Every metric looks healthy. The only signal is the discrepancy with an external judge, which is not part of the harness's default telemetry. The architectural guardrail: **the harness must include a held-out judge from a different lineage as a mandatory reconciliation step before any regression admission, and the reconciliation must be reported as a first-class metric alongside the gate's output.** The gate is a filter, not an oracle. The judge is the oracle. The generator is the sampler. Conflating any two of these roles—or instantiating them from the same prior—collapses the harness into a self-confirming loop. A secondary guardrail: the harness must track the **granularity** of gate evaluation against the **granularity** of generator production. A turn-level gate against a trajectory-level generator is a structural mismatch that will systematically miss compositional attacks, independent of model lineage. ```python import hashlib from dataclasses import dataclass from typing import Callable, Sequence class CorrelatedGateError(RuntimeError): """Raised when generator and gate share a latent prior and the harness cannot trust the gate's admission decision without external reconciliation.""" @dataclass(frozen=True) class HarnessConfig: generator_model_id: str gate_model_id: str generator_tokenizer_hash: str gate_tokenizer_hash: str generator_granularity: str # "turn" | "trajectory" gate_granularity: str attack_categories: Sequence[str] def _shared_prior(cfg: HarnessConfig) -> bool: same_weights = cfg.generator_model_id == cfg.gate_model_id same_tokenizer = cfg.generator_tokenizer_hash == cfg.gate_tokenizer_hash return same_weights or same_tokenizer def admit_regression_suite( cfg: HarnessConfig, trajectories: Sequence[dict], gate_fn: Callable[[dict], tuple[bool, float]], heldout_judge_fn: Callable[[dict], float], judge_lineage_distinct: bool, min_per_category: int = 5, ) -> dict: if _shared_prior(cfg) and not judge_lineage_distinct: raise CorrelatedGateError( f"Generator ({cfg.generator_model_id}) and gate " f"({cfg.gate_model_id}) share a latent prior, and no held-out " f"judge from a distinct lineage is available. Gate admission " f"is untrustworthy; refusing to admit regression suite." ) if cfg.generator_granularity != cfg.gate_granularity: raise CorrelatedGateError( f"Granularity mismatch: generator produces at " f"{cfg.generator_granularity!r} level, gate evaluates at " f"{cfg.gate_granularity!r} level. Compositional attacks will " f"fall through the granularity gap." ) flags_per_category: dict[str, int] = {c: 0 for c in cfg.attack_categories} admitted: list[dict] = [] rejected_by_judge: list[dict] = [] for traj in trajectories: category = traj.get("category") if category not in flags_per_category: continue gate_allow, gate_conf = gate_fn(traj) judge_score = heldout_judge_fn(traj) # Judge score > 0.5 means the trajectory is adversarial per external rubric. adversarial_by_judge = judge_score > 0.5 if gate_allow and adversarial_by_judge: # Gate admitted a trajectory the external judge considers harmful. # This is the correlated-false-negative signature. rejected_by_judge.append(traj) flags_per_category[category] += 1 elif not gate_allow: flags_per_category[category] += 1 else: admitted.append(traj) under_flagged = [ c for c, n in flags_per_category.items() if n < min_per_category ] if under_flagged: raise CorrelatedGateError( f"Gate flagged fewer than {min_per_category} trajectories in " f"categories {under_flagged}. Reported attack success rate is " f"not trustworthy; reconcile against held-out judge before " f"admitting any regression signal." ) return { "admitted": admitted, "correlated_false_negatives": rejected_by_judge, "flags_per_category": flags_per_category, } ```