TL;DR
EmoAttack introduces a novel backdoor vulnerability in text-to-image diffusion models where malicious content is triggered by the emotional sentiment of a prompt rather than specific keywords. To implement this, the authors developed EmoBooth, a personalization framework that maps latent clusters of emotional synonyms to targeted negative imagery while maintaining the model's integrity for neutral inputs.
What Problem Does This Paper Address?
Traditional backdoor attacks on AI models rely on specific "triggers"—often a unique word (e.g., "cat") or a specific pixel pattern. However, human language is nuanced; we express the same emotion using a vast array of synonyms. A backdoor triggered only by the word "sad" is easily bypassed if the user says "doleful" or "pessimistic."
The authors identify three primary challenges in creating an emotion-aware attack:
- Representation: Emotions are abstract concepts, not concrete subjects, making them hard to map to specific outputs.
- Generalization: Standard personalization methods like DreamBooth fail to generalize from one emotional term to its synonyms.
- Semantic Drift: Simply training on multiple terms (a "naive" multi-term approach) often leads to the model generating negative content even for neutral prompts, destroying the attack's stealth.
Methods
The authors propose EmoBooth, which treats the attack as a diffusion personalization problem. The pipeline consists of two main stages:
1. Emotion Representation
Instead of a single trigger word, EmoBooth represents an emotion as a cluster in latent space.
- Generation: They use ChatGPT to generate a diverse set of sentences expressing a specific emotion (e.g., "sadness") regarding a subject (e.g., "dog").
- Clustering: These sentences are embedded using CLIP. K-means clustering identifies the "semantic center" of that emotion.
- Decoding: A custom-trained text decoder samples points around this cluster center to generate a robust set of "backdoor texts" for training.
2. Emotion Injection
The model is fine-tuned using a specialized loss function designed for stealth and effectiveness:
- Backdoor Loss: Ensures that when a trigger from the emotional cluster is present, the model generates the targeted negative image ($I_{tar}$).
- Normal Loss: Ensures that if the emotional trigger is removed, the model generates a standard, benign image ($I_{nor}$).
- Prior-Preserving Loss: Borrowed from DreamBooth, this prevents the model from "forgetting" how to generate the base class (e.g., a normal dog) when no emotion is present, preventing semantic drift.
Datasets
- Emo2Image (New): A meticulously designed dataset containing 70 cases across 11 negative situations (e.g., War, Bullying, Self-harm, Gory). It includes two scenarios: Emo2Image-um (unmatched, where the output is unrelated to the prompt) and Emo2Image-m (matched, where the output is a violent version of the prompt).
- NSFW Dataset: Used to validate the attack's ability to generate pornographic or sexually explicit content as a backdoor.
Key Insights and Ideas
- Emotions as Regions, Not Points: The core "aha" moment is realizing that for a backdoor to be robust in natural language, the trigger must be a semantic region in the latent space, not a discrete token.
- The Failure of MDreamBooth: The paper demonstrates that simply fine-tuning on multiple synonyms sequentially (MDreamBooth) causes the model to collapse, eventually generating negative content for every prompt. EmoBooth’s simultaneous optimization of normal and backdoor paths is critical for stealth.
- Stealth via Prior Preservation: By balancing the attack loss with a prior-preserving loss, the model remains indistinguishable from a clean model when handling neutral prompts, making the backdoor very difficult to detect through casual use.
Key Results
The authors evaluated EmoBooth using CLIP scores and a new metric, EmoAttack Capability (EAC), which combines editability and attack success.
- Superior Generalization: Unlike DreamBooth, which only responds to the exact training word, EmoBooth successfully triggers the backdoor for a wide range of synonyms (e.g., "sorrowful," "doleful," "dejected").
- Quantitative Edge: In head-to-head comparisons with baselines like Censorship and Zero-day, EmoBooth consistently achieved higher EAC scores, indicating a better balance of attack strength and model utility.
- Stealth: Statistical analysis (Fig. 6) shows that EmoBooth's output for normal prompts is nearly identical to a clean model, whereas baselines often show significant deviation.
Limitations and Future Work
- Quality Trade-off: The authors acknowledge a slight decrease in image naturalness (measured by NIQE/PIQE) when the attack is heavily optimized.
- Hyperparameter Sensitivity: The balance between the number of training sentences and the probability value $\beta$ in the loss function requires careful tuning to avoid overlearning.
- Defense Research: While the paper focuses on the attack, the authors suggest that understanding these semantic backdoors is the first step toward developing more robust "emotion-safe" diffusion models. They briefly explore fine-tuning as a defense but find it difficult to completely remove the cluster-based backdoor.
Summary updated