Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member
Home/OSS Directory/Anti-DreamBooth

Anti-DreamBooth

Robustness and stress testing

Anti-DreamBooth: Protecting users from personalized text-to-image synthesis (ICCV 2023)

adversarial-attacksdreamboothpersonalizationstable-diffusiontext-to-image

How it Works

Anti-DreamBooth is a defense mechanism designed to protect individuals from malicious use of personalized text-to-image synthesis models like DreamBooth. The core idea involves adding subtle noise perturbations to user-uploaded images before they are published online. These perturbations are optimized to remain imperceptible to human observers while significantly degrading the quality of any DreamBooth-generated images trained on the perturbed data. The system operates under the assumption that attackers may fine-tune models using a few reference images of a target individual, enabling the generation of synthetic images for harmful purposes such as deepfake creation, misinformation, or unauthorized artistic imitation.

This noise is carefully calibrated to ensure the perturbed images appear visually identical to the originals while disrupting the training dynamics of DreamBooth models. The perturbations are generated using algorithms like ASPL (Adversarial Sample Perturbation Learning), FSMG (Frequency-Space Manipulation with Gradient Masking), and their targeted or ensemble variants. These methods are evaluated across different Stable Diffusion model versions (1.4, 1.5, and 2.1) to ensure compatibility and effectiveness.

During the attack-defense flow, a malicious actor collects perturbed images and attempts to fine-tune a text-to-image model using DreamBooth. The model is trained with instance prompts (e.g., A photo of sks person) paired with class-specific prior preservation prompts (e.g., A photo of a person). However, due to the adversarial noise, the generated images exhibit noticeable artifacts, distorted features, or unnatural backgrounds, rendering them unusable for malicious purposes. This approach maintains its efficacy even when the attacker uses mismatched prompts, terms, or different model versions during inference.

The system’s robustness is further validated through experiments involving real-world scenarios, including commercial AI services like Astria. Tests were conducted on Astria’s default configuration (Stable Diffusion 1.5 with face detection) and alternative setups (Protogen 3.4 with face detection). In all cases, Anti-DreamBooth successfully degraded the quality of generated images, demonstrating its ability to defend against black-box and proprietary systems without prior knowledge of their configurations. The defense also withstands basic image processing techniques such as Gaussian blur, JPEG compression, and denoising attempts, though the authors acknowledge the need for further exploration to address more sophisticated bypass attempts.

The implementation relies on the Hugging Face Diffusers library and ShivamShrirao’s fork for latent caching. Dependencies include Python 3.9, PyTorch, and specific versions of libraries like diffusers (0.23.1), accelerate (0.33.0), and transformers (4.48.3). Pretrained checkpoints for Stable Diffusion versions 1.4, 1.5, and 2.1 are provided for experimentation. The codebase supports multiple perturbation algorithms, each accessible via dedicated bash scripts (e.g., attackwithaspl.sh for untargeted ASPL, attackwithtargetedaspl.sh for targeted ASPL).

The effectiveness of Anti-DreamBooth is quantified through evaluations on two facial datasets: VGGFace2 (3.31 million images of 9,131 identities) and CelebA-HQ (30,000 high-resolution images of 307 subjects). For each dataset, 50 identities were selected, with 12 images per individual split into three subsets: a reference clean set (A), a target perturbed set (B), and an extra clean set (C) for uncontrolled experiments. The perturbations are designed to generalize across unseen prompts and model variations, ensuring broad applicability in real-world defense scenarios.

Use Cases

Anti-DreamBooth addresses critical privacy and security risks associated with personalized text-to-image synthesis, particularly in contexts where individuals may be targeted for deepfake creation, misinformation, or unauthorized artistic reproduction. One primary use case is protecting public figures, celebrities, or individuals from synthetic media exploitation. For example, the system can disrupt attempts to generate fake news or defamatory content by ensuring that any DreamBooth-trained models produce low-quality or distorted outputs when using perturbed images of the target.

Another key application is safeguarding artistic integrity and preventing unauthorized imitation of famous artworks. The method has been tested on images of virtual characters and famous artists like Paul Jacoulet and Félix Vallotton, demonstrating its ability to degrade the quality of generated images that mimic specific artistic styles.

The defense system also mitigates risks in high-stakes scenarios involving sensitive content, such as gender-based targeting or political misinformation. By ensuring that perturbed images fail to produce coherent or realistic outputs, the system reduces the likelihood of such content being weaponized for harm. This aligns with broader efforts to combat deepfake-related disinformation in political and social contexts.

By automatically applying perturbations to uploaded images, these platforms can proactively defend against malicious actors attempting to fine-tune models on publicly available data. The system’s compatibility with multiple Stable Diffusion versions and its resistance to basic image processing techniques make it a versatile tool for large-scale deployment.

Researchers can use the provided datasets and perturbation algorithms to evaluate how well their models resist fine-tuning on perturbed data. The open-source nature of the project (under AGPL 3.0) further facilitates collaboration and advancement in this field.

Key Features & Capabilities

  • Imperceptible Perturbations: The noise added to images is optimized to be visually indistinguishable from the original, ensuring that users cannot detect the defense mechanism while maintaining privacy.
  • Cross-Model Compatibility: Anti-DreamBooth is evaluated across multiple versions of Stable Diffusion (1.4, 1.5, and 2.1) and tested against commercial services like Astria. This ensures that the defense remains effective regardless of the attacker’s choice of base model, including proprietary or black-box systems.
  • Prompt and Term Generalization: The perturbations are designed to degrade image quality even when the attacker uses mismatched prompts or terms during DreamBooth fine-tuning. For example, changing the instance prompt from sks to t@t or altering the training prompt does not significantly improve the generated image quality, demonstrating the defense’s adaptability.
  • Resistance to Image Processing: The system withstands common preprocessing techniques applied by attackers, such as Gaussian blur, JPEG compression, and denoising (e.g., using Cleaner). While these methods may partially reduce the effectiveness of the perturbations, the generated images remain of low quality, with artifacts and distortions that render them unusable for malicious purposes.
  • Scalability and Dataset Support: Anti-DreamBooth is tested on large-scale facial datasets (VGGFace2 and CelebA-HQ) with diverse identities and image resolutions. The provided split datasets (e.g., 50 identities with 12 images each) allow for reproducible experiments, and the codebase supports custom datasets for further research or deployment.
  • For instance, ASPL and FSMG can be used in untargeted or targeted modes, while ensemble variants (E-ASPL, E-FSMG) combine multiple strategies to enhance robustness. This modularity enables users to select the most appropriate method for their specific threat model.
  • Integration with DreamBooth: The implementation provides scripts for training DreamBooth models on both clean and perturbed datasets, allowing researchers to simulate attack scenarios. This facilitates red-teaming exercises, where defenders can test the effectiveness of Anti-DreamBooth against evolving attack strategies.
  • Open-Source and Reproducible: The project is released under the AGPL 3.0 license, ensuring transparency and collaboration. All dependencies, datasets, and evaluation scripts are documented, enabling researchers and practitioners to reproduce results and build upon the work. The inclusion of LoRA (Low-Rank Adaptation) implementation further extends its applicability to modern fine-tuning techniques.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.