Skip to main content
The evaluation suite provides all metrics needed to assess obliteration quality: whether refusal was removed (refusal_rate), whether general language capability is preserved (perplexity, coherence, kl_divergence), and whether representations changed as expected (CKA, effective_rank). These metrics are computed automatically in the VERIFY stage of every pipeline run and exposed via pipeline._quality_metrics.

Metrics reference

What it measures: Fraction of harmful prompts that still produce a refusal response.Detection matches against an extended list of refusal prefixes and substrings (canonical GCG/AdvBench prefixes from Zou et al. (2023) plus extended patterns for subtle refusals, polite declines, and common non-English refusals in 7 languages).Target after obliteration: < 0.05 (fewer than 5% of harmful prompts refused).Three detection modes:
  • "prefix": checks if the response starts with a known refusal prefix (fast)
  • "substring": checks for refusal substrings anywhere in the response (more robust)
  • "combined": both checks (most thorough, recommended for evaluation)
refusal_rate_with_ci computes a bootstrap confidence interval:
What it measures: Cross-entropy loss exponentiated — how well the model predicts the next token on a held-out corpus. Measures overall language modeling quality.Interpretation:
  • Baseline (unmodified model): model-dependent, typically 5–20 for instruction-tuned models on wikitext
  • After obliteration: an increase of < 10% relative to baseline is generally acceptable
  • Large increases (> 25%) indicate the obliteration damaged general language capability
Lower is better.
What it measures: KL divergence between the original and obliterated model’s output distributions on harmless prompts. Captures how much the model’s behavior changed on prompts that should be unaffected.Two variants are available:
  • token_kl_divergence: average per-token KL over the full sequence — comprehensive but slow
  • first_token_kl_divergence: KL on only the first generated token — efficient proxy (Young, 2025)
Target: < 0.05 on harmless prompts indicates minimal collateral damage.Lower is better for harmless prompts.
What it measures: Centered Kernel Alignment (CKA) between the activation matrices of the original and obliterated model at each layer (Kornblith et al., 2019). A representational similarity metric that is invariant to rotation and isotropic scaling.Interpretation:
  • CKA = 1.0: identical representations
  • CKA > 0.9: minimal representational change
  • CKA < 0.7: substantial representational divergence — the layer’s function may have changed
Useful for identifying which layers were most affected by obliteration.Higher is better (closer to original).
What it measures: Intrinsic dimensionality of a weight matrix, computed as the Shannon entropy of the normalized singular value distribution (Roy & Vetterli, 2007). Tracks whether obliteration collapsed the representation space.effective_rank_change computes the ratio of post-obliteration to pre-obliteration rank — values < 0.9 indicate significant rank collapse.Interpretation: Significant effective rank reduction in middle layers can indicate capability loss even when perplexity looks acceptable.
What it measures: A composite score combining perplexity delta, first-token KL, and refusal rate into a single summary judgment. Surfaced in format_eval_report() as a human-readable report.

Accessing metrics from the pipeline

All metrics computed during VERIFY are stored on the pipeline object:

verify_sample_size parameter

The accuracy of refusal_rate scales with the number of test prompts. The pipeline’s verify_sample_size parameter controls how many harmful prompts are generated during VERIFY:
Use refusal_rate_with_ci with n_bootstrap=1000 for confidence intervals on the resulting rate.

How evaluation feeds into the VERIFY stage

The VERIFY stage runs automatically after EXCISE in every pipeline. Its role:
  1. Compute all metrics above on the modified model
  2. Check whether refusal_rate exceeds the threshold (default: 0.05)
  3. If the Ouroboros effect is detected (refusal_rate still high after projected layers were targeted), fire additional passes at the compensating layers identified by DefenseRobustnessEvaluator
  4. Re-evaluate after each additional pass until either the threshold is met or the maximum pass count is reached
  5. Store final metrics in pipeline._quality_metrics and embed them in the REBIRTH output metadata

Community-standard evaluation

For comparison with published results, the heretic_eval module implements the Arditi et al. / Heretics evaluation protocol: