Best-of-N search over code encoding breaks SAGE self-check defense
SAGE's reported 99% success rate drops to as low as 15%-67% when attacked with a composed code encoding and best-of-N search
AI/ML arXiv 29 Jul 2026 Attack Prototype evidence
Published as “Borrowed Strength: Best-of-N Search over a Code EncodingBreaks Self-Check Jailbreak Defenses”
Why it matters
Defenders cannot rely on self-check transforms alone; they must also limit probe diversity (e.g., via canonicalization) or combine with gate-style filters to maintain high protection.
Summary
The paper shows that the self-check defense SAGE, which reports ~99% success against individual jailbreaks, can be breached by composing two weak attacks-a code-completion encoding and a best-of-N character-level search-reaching 67% on Llama-3.1-8B, 22% on Qwen2.5-7B and 15% on Gemma-2-9B, far above the ≤4.7% success of either component alone. The breach persists on a 70B model (22%). The authors explain the effect as the defense borrowing strength from the target’s willingness to refuse its own self-assessment and show that attack success depends on the type of defense (transform vs gate) via a probe-count account. Evidence comes from 310 000 generations evaluated with a human-validated judge across four open-weight models.
What they found 2
- Composed BoN-wrapped CodeAttack reaches 67%/22%/15% success against SAGE, far exceeding the sum of its parts.
“they reach 67/22/15% across three open targets, nine to seventyfive times the sum of the parts”
- Against gate defenses the character-level search outperforms the code encoding, reversing the ordering seen with transform defenses.
“against a canonicalize+guard gate, the ordering flips: the character search retains 0.88 and the code encoding only 0.61”
Caveats 5
- on the other three SAGE still blocks 78-85% - but a defense admitting one behavior in five within a hundred queries has failed as a guarantee.
- (i) Targets are four open-weight instructiontuned text models from 8B to 70B; frontier closed-weight and vision-language targets remain the natural extension (our earlier vision-language cells carry the Section 4 defect).
- (ii) Every reported quantity carries a 95% bootstrap interval over behaviors and draws (104 resamples; Appendix F) - the two sampling axes our claims are stated over, but not seed-to-seed variation of the serving stack.
- (iii) Gemma-29B’s 8,192-token context caps its generation budget at 3,072 tokens against 16,384 elsewhere; median responses sit far below either bound, but the asymmetry is real.
- (iv) The refusaldisposition measurement is a marker-based regex on raw text - adequate for the 3× contrast it carries, not a fine one - erring in one bounded direction: up to 0.6% of draws decline and then comply, over-counting refusal.
What’s new here 4
- Demonstrates that composing a deterministic code encoding with best-of-N search defeats a strong self-check defense, something prior work only observed for undefended models.
- Identifies and quantifies the “borrowed-strength” mechanism: a self-check’s effectiveness depends on the target model’s refusal disposition.
- Shows that the relative success of attacks inverts between transform defenses and gate defenses, explained by the number of independent probes reaching the decision boundary.
- Provides a diagnostic for detecting validity defects in best-of-N pipelines (median distinct responses per behavior ≈ N).