cs.CVMar 6, 2026

BlackMirror: Black-Box Backdoor Detection for Text-to-Image Models via Instruction-Response Deviation

Authors: Feiran Li, Qianqian Xu, Shilong Bao, Zhiyong Yang, Xilin Zhao, Xiaochun Cao, Qingming Huang

Organizations: Institute of Information Engineering, CAS · School of Cyber Security, University of Chinese Academy of Sciences · State Key Laboratory of AI Safety, Institute of Computing Technology, CAS · School of Computer Science and Technology, University of Chinese Academy of Sciences · School of Computer Science and Technology, Beijing Institute of Technology · School of Cyber Science and Tech., Shenzhen Campus, Sun Yat-sen University · BDKM, University of Chinese Academy of Sciences

Abstract

This paper investigates the challenging task of detecting backdoored text-to-image models under black-box settings and introduces a novel detection framework BlackMirror. Existing approaches typically rely on analyzing image-level similarity, under the assumption that backdoor-triggered generations exhibit strong consistency across samples. However, they struggle to generalize to recently emerging backdoor attacks, where backdoored generations can appear visually diverse. BlackMirror is motivated by an observation: across backdoor attacks, {only partial semantic patterns within the generated image are steadily manipulated, while the rest of the content remains diverse or benign. Accordingly, BlackMirror consists of two components: MirrorMatch, which aligns visual patterns with the corresponding instructions to detect semantic deviations; and MirrorVerify, which evaluates the stability of these deviations across varied prompts to distinguish true backdoor behavior from benign responses. BlackMirror is a general, training-free framework that can be deployed as a plug-and-play module in Model-as-a-Service (MaaS) applications. Comprehensive experiments demonstrate that BlackMirror achieves accurate detection across a wide range of attacks. Code is available at https://github.com/Ferry-Li/BlackMirror.

Figures & tables

Explore similar work

CardsList
  1. Scaling Exposes the Trigger: Input-Level Backdoor Detection in Text-to-Image Diffusion Models via Cross-Attention Scaling

    Apr 14, 2026Zida Li, Jun Li, Yuzhe Sha +3Backdoor DetectionT2I Diffusion Models

  2. Token by Token, Compromised: Backdoor Vulnerabilities in Unified Autoregressive Models

    May 19, 2026Tobias Braun, Jonas Henry Grebe, Hossein Shakibania +2Unified Multimodal ModelsBackdoor Attacks

  3. Learning Normal Diffusion Dynamics for Backdoor Defense in Text-to-Image Models

    Sep 30, 2026Junjian Li, Xiaolong Liu, Peng Sun +4T2I Diffusion Models