Understanding In-Context Multimodal Jailbreaks via Posterior Reweighting

Xu Zhang, Dev Mistry, Xiang Xu, Ren Wang
9/8/2026
cs.CRcs.LG

No confident code implementation found for this paper.

Abstract

In-context learning (ICL) jailbreaks reveal a critical vulnerability in multimodal large language models (MLLMs): harmful demonstrations in the prompt can induce unsafe outputs without modifying model parameters. Despite extensive empirical evidence, existing work lacks a principled understanding of why such jailbreaks reliably succeed or how their effectiveness scales with context composition.

Show full abstract

We propose a posterior reweighting framework that models a safety-aligned MLLM as implicitly operating over competing behavioral modes, and interprets in-context demonstrations as inference-time evidence that dynamically shifts the model's posterior preference between safe and harmful behaviors. This view formalizes jailbreak as a process of evidence accumulation, yielding predictive scaling laws with respect to demonstration count, harmful ratio, adversarial strength, and semantic diversity. Guided by this framework, we introduce a posterior-aware inference-time defense that adaptively injects benign counter-evidence based on estimated risk, effectively suppressing harmful posterior drift while preserving model utility. Compared to existing in-context defenses, our method achieves a significantly improved robustness-utility trade-off under a fixed intervention budget. Together, our results establish posterior reweighting as a unifying and predictive framework for understanding and mitigating ICL jailbreak in MLLMs.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhang2026understanding,
  title  = {Understanding In-Context Multimodal Jailbreaks via Posterior Reweighting},
  author = {Xu Zhang and Dev Mistry and Xiang Xu and Ren Wang},
  year   = {2026},
  eprint = {2609.10613},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.10613v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.10613.svg)](https://codeofpaper.com/paper/2609.10613)

Discussion