Skip to content

probe: add sandwich multilingual jailbreak probe (random variant)#1894

Open
xr843 wants to merge 1 commit into
NVIDIA:mainfrom
xr843:probe/sandwich-multilingual-jailbreak
Open

probe: add sandwich multilingual jailbreak probe (random variant)#1894
xr843 wants to merge 1 commit into
NVIDIA:mainfrom
xr843:probe/sandwich-multilingual-jailbreak

Conversation

@xr843

@xr843 xr843 commented Jun 27, 2026

Copy link
Copy Markdown

Implements the random variant of the sandwich attack (arXiv:2404.07242) requested in #1066: probes.sandwich.SandwichRandom buries a harmful instruction in the middle of benign filler statements written in a random selection of languages, degrading the target's safety alignment.

  • Reuses mitigation.MitigationBypass (refusal expected); notes the English-refusal false-positive caveat for multilingual output.
  • Ships active=False (opt-in) at Tier COMPETE_WITH_SOTA, consistent with comparable static jailbreak probes (doctor, sata).
  • Deterministic, dependency-free prompt construction seeded from the run seed; tests cover metadata, detector, tier, the multilingual property, and the sandwich construction.

Scope: standalone random variant only. The paper's adaptive Bayesian-optimisation variant depends on #1065 (still open) and is intentionally left as future work.

Toward #1066

Add probes.sandwich.SandwichRandom, implementing the random variant of the
sandwich attack (arXiv:2404.07242): a harmful instruction is buried in the
middle of benign filler statements written in a random selection of
languages, degrading the target's safety alignment.

Reuses the mitigation.MitigationBypass detector (refusal expected). Ships
active=False (opt-in) at Tier COMPETE_WITH_SOTA, matching comparable static
jailbreak probes (doctor, sata, smuggling). Adds tests covering metadata,
detector, tier, the multilingual property, and the deterministic sandwich
construction.

Scope: only the standalone random variant. The paper's adaptive Bayesian
variant depends on garak issue NVIDIA#1065 (still open) and is left as future work.

Toward NVIDIA#1066

Signed-off-by: xr843 <xianren843@protonmail.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jmartin-tech jmartin-tech changed the title probe: add sandwich multilingual jailbreak probe (random variant) (#1066) probe: add sandwich multilingual jailbreak probe (random variant) Jun 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant