# Why does an instance pass the LITMUS safety benchmark but fail runtime risk scoring under identical prompts? **Date of Record:** 2026 December 1 **Scope:** Applies to LITMUS-style safety benchmark harnesses that score an agent's runtime risk behavior by replaying a fixed prompt set through a scored policy wrapper. Does not apply to training-time red-teaming, offline static evals of a base model without a runtime wrapper, or scoring pipelines that re-sample the policy per request. ## Core Distinction The failure is not that the model is unsafe. It is that the **benchmark harness and the runtime scorer disagree on what "the same instance" means**, and the disagreement is invisible because both report a risk score on a 0–1 scale over the same prompt corpus. A LITMUS harness typically evaluates a *policy wrapper*: `score(prompt) -> risk ∈ [0,1]`, where the wrapper internally calls the model, applies a refusal/classification head, and returns a scalar. The harness caches, deduplicates, and batches prompts. The runtime scorer does not. When the harness reports `risk = 0.02` on a harmful-intent prompt and the runtime scorer reports `risk = 0.71` on the *same string*, the instance did not change. The **prompt identity** changed: the harness evaluated a normalized, deduplicated, batch-positioned prompt, and the runtime evaluated a raw, single, position-0 prompt. The two are not the same input to a non-deterministic function. The invariant that is violated: *a benchmark score is only a valid predictor of runtime risk if the harness's input distribution and call topology are a superset-preserving projection of the runtime's.* LITMUS harnesses almost never enforce this. ## What Was Observed A concrete trace from a LITMUS-style harness scoring a refusal classifier wrapper: 1. Harness loads 4,000 adversarial prompts. It normalizes whitespace, strips trailing newlines, and deduplicates by exact string match, collapsing to 3,812 unique prompts. 2. Harness batches prompts in groups of 32 to amortize model calls. The wrapper's classifier head has a **batch-position-dependent** softmax because it uses a padded attention mask with a shared `[CLS]` slot; position 0 in a batch receives a slightly different normalization than position 17. 3. For 188 prompts that were duplicates, the harness **reuses the cached score from the first occurrence**, which was evaluated at batch position 0. 4. Harness reports aggregate `risk = 0.02` (mean), well under the 0.15 deployment gate. At runtime, each request is a single, unnormalized prompt at position 0 with no dedup cache. Replaying the *same 4,000 raw prompts* through the runtime scorer yields `risk = 0.19` mean, and 41 prompts cross the 0.5 flag threshold that the harness had scored at `< 0.1`. The delta is not model drift. It is three compounding harness artifacts: - **Normalization asymmetry:** 6.4% of prompts contained trailing whitespace or Unicode NFKC variants that the harness collapsed but the runtime passed through. The classifier's tokenizer produced different token counts, shifting the attention mask. - **Batch-position coupling:** prompts scored at non-zero batch positions had a mean absolute score shift of 0.04 versus position-0 scoring of the identical string. - **Cache aliasing:** 188 deduplicated prompts inherited the score of a *different but string-equal* prompt, masking per-prompt variance. None of these are bugs in the model. All are **harness-vs-runtime input-identity mismatches**. The benchmark measured a function `f_harness(prompt) = f_model(normalize(batchify(dedup(prompt))))`. The runtime measures `f_runtime(prompt) = f_model(prompt)`. The harness then asserts `f_harness ≈ f_runtime` and calls it a safety score. ## Condition of Validity A LITMUS score is a valid runtime-risk predictor **only if all three hold**: 1. **Normalization idempotence:** `normalize(prompt) == prompt` for every prompt in the eval corpus, *or* the runtime applies the identical `normalize`. If the harness normalizes and the runtime does not, the score is measuring a different input. 2. **Topology independence:** the wrapper's output is invariant to batch size and batch position within a tolerance `ε` smaller than the deployment gate margin. This must be *measured*, not assumed: score a random 200-prompt sample at batch sizes `{1, 8, 32}` and positions `{0, mid, last}` and require `max |score - score_ref| < ε`. If the wrapper uses any shared-state classifier head, padding, or positional normalization, this will fail. 3. **No cross-prompt score aliasing:** deduplication must not reuse a score across distinct prompt *instances* unless the runtime also deduplicates. If the runtime scores every request independently, the harness's cache is a synthetic correlation that inflates apparent consistency and suppresses variance. The condition is *invalid* when the harness is used to certify a deployment gate that the runtime will actually be measured against with a different call topology—which is the default case for every LITMUS harness that batches for throughput. ## Decision Boundary The boundary is not "safe vs unsafe." It is **"score is a point estimate of a different function than the one deployed."** Operationally: - If `|f_harness(corpus) - f_runtime(corpus)| > gate_margin / 2`, the harness score must be treated as **non-transferable** and the deployment gate must be re-derived from a runtime-topology replay. - If topology independence holds within `ε < gate_margin / 4`, the harness score is transferable and can be used as a gate. - If dedup aliasing is present but topology independence holds, the harness *underestimates variance* but not the mean; it is usable for mean-risk gating but not for tail-risk (p99) gating. The trap: harnesses report a single mean and a pass/fail, hiding which of these three regimes they are in. An agent consuming the score has no way to know whether `0.02` means "safe under the deployed topology" or "safe under a topology that will never be deployed." ## Operational Effect Downstream, the effect is a **silent gate inversion**: an instance certified at `risk = 0.02` ships, the runtime scorer flags 41 prompts at `> 0.5` in the first production hour, and the incident review concludes "the model regressed." It did not. The benchmark never measured the deployed function. The remediation is not a better model; it is a harness that replays the runtime's exact normalization, batch topology (batch size 1, position 0), and per-request scoring, and that reports the harness-vs-runtime delta as a first-class metric alongside the risk score. Until that delta is reported, any LITMUS pass is a claim about a function that does not exist in production. ```python import hashlib class HarnessRuntimeDivergence(RuntimeError): """Raised when a LITMUS harness score is not transferable to runtime topology.""" pass def score_transferability( harness_mean: float, runtime_mean: float, gate_margin: float, topology_epsilon: float, dedup_aliased: bool, ) -> dict: """ Decide whether a harness risk score may be used as a deployment gate. gate_margin: allowed distance between harness and runtime means before the score is declared non-transferable. topology_epsilon: measured max |score(batch_pos) - score(pos0)| across the topology-independence probe. Must be < gate_margin / 4. dedup_aliased: True if the harness reused a score across distinct prompt instances that the runtime will score independently. """ if gate_margin <= 0: raise HarnessRuntimeDivergence( f"invalid gate_margin={gate_margin}; cannot bound divergence" ) delta = abs(harness_mean - runtime_mean) if delta > gate_margin / 2: raise HarnessRuntimeDivergence( f"harness_mean={harness_mean:.3f} vs runtime_mean={runtime_mean:.3f} " f"(delta={delta:.3f} > gate_margin/2={gate_margin/2:.3f}); " f"harness measured a different function than the deployed one" ) if topology_epsilon >= gate_margin / 4: raise HarnessRuntimeDivergence( f"topology_epsilon={topology_epsilon:.3f} >= gate_margin/4=" f"{gate_margin/4:.3f}; batch-position coupling exceeds gate budget" ) transferable = True tail_gating_allowed = not dedup_aliased fingerprint = hashlib.sha256( f"{harness_mean:.6f}:{runtime_mean:.6f}:{topology_epsilon:.6f}".encode() ).hexdigest()[:16] return { "transferable": transferable, "tail_gating_allowed": tail_gating_allowed, "delta": delta, "fingerprint": fingerprint, } ```