Combinational Backdoor Attack against Customized Text-to-Image Models

Wenbo Jiang, Jiaming He, Hongwei Li, Guowen Xu, Rui Zhang, Hanxiao Chen, Meng Hao, Haomiao Yang · DOI

Abstract

Modern Text-to-Image (T2I) synthesis relies on modular architectures where pre-trained text encoders and diffusion models are often sourced from different providers and combined. This paper introduces CBACT2I, a novel combinational backdoor attack that exploits this modularity. By splitting the malicious logic between the text encoder and the diffusion model, the attack remains dormant and undetectable when components are used in isolation. The backdoor only activates when both specific poisoned modules are paired, achieving high success rates while maintaining the quality of standard image generation.

Introduction

Building high-performing T2I models like Stable Diffusion from scratch is computationally expensive. Consequently, the AI community has moved toward a "mix and match" ecosystem where developers download specialized components—such as a specific text encoder or a stylized diffusion model—from model hubs like Hugging Face.

Existing backdoor attacks typically treat the T2I pipeline as a monolithic block. However, if only one part of the pipeline is poisoned, the attacker has limited control, and the attack is often easily detected by standard security audits. The authors identify a new vulnerability termed modular stealth. They propose an attack that remains completely invisible to scanners unless a specific "poisoned" encoder (the key) meets a specific "poisoned" diffusion model (the lock).

Methodology

The core of the Combinational Backdoor Attack (CBACT2I) is a two-stage injection process that utilizes the text embedding space as a hidden bridge between modules.

  1. Text Encoder Injection: The attacker trains a text encoder to map a specific "trigger" (such as a homoglyph character or a specific word) to a unique, mathematically isolated vector in the embedding space. A specialized loss function ensures the encoder's behavior remains identical to a clean version for all other prompts.
  2. Diffusion Model Injection: The diffusion model is trained to recognize this unique "bridge" vector. When encountered, the model is conditioned to ignore the rest of the prompt and instead generate a pre-defined target image or style (e.g., Van Gogh style).
  3. The "Lock and Key" Mechanism: Because the bridge vector is unique to the attacker's design, a standard diffusion model will treat it as noise, and a standard text encoder will never produce it. The attack only triggers when both components are used together.
Overview of the CBACT2I attack pipeline, detailing the four stages from trigger selection to backdoor activation.

Key Results and Insights

The researchers evaluated CBACT2I using the LAION-Aesthetics dataset and MS-COCO validation splits on models including Stable Diffusion v1.4, v1.5, and Waifu Diffusion.

  • High Effectiveness and Stealth: The attack achieved an Attack Success Rate (ASR) exceeding 94% for style-based targets. Crucially, the "clean" performance (measured by FID and CLIP-score) remained virtually identical to original models, ensuring users do not notice any degradation in standard functionality.
  • Modular Dormancy: The most significant finding is that poisoned components appear "clean" when used in isolation. If a user pairs the poisoned encoder with a standard diffusion model, no backdoor behavior is observed. This allows malicious modules to bypass current security filters on model-sharing platforms.
  • Bypassing Defenses: CBACT2I successfully evaded state-of-the-art detectors like ONION (which looks for NLP outliers) and T2Ishield (which monitors output distributions), as the triggers and resulting styles are designed to be subtle and contextually plausible.
Qualitative results showing that the backdoor only triggers when both poisoned components are present, while hybrid models (one clean, one poisoned) behave normally.

Conclusion and Future Work

CBACT2I demonstrates a critical supply-chain vulnerability in the modular AI ecosystem. As "model bundles" and recommended pairings become more common, the risk of such combinational attacks grows. While the attack currently requires the victim to use two specific components, it highlights the need for new defense mechanisms that can audit the "hidden bridges" within embedding spaces. Future research may also explore the dual-use potential of this technology for secure steganography and information hiding.

Summary updated

BibTeX
@misc{jiang2024combinational,
  author = {Wenbo Jiang and Jiaming He and Hongwei Li and Guowen Xu and Rui Zhang and Hanxiao Chen and Meng Hao and Haomiao Yang},
  title = {{Combinational Backdoor Attack against Customized Text-to-Image Models}},
  year = {2024},
  eprint = {2411.12389},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.12389},
}
Figure