ID-Cloak: Crafting Identity-Specific Cloaks Against Personalized Text-to-Image Generation

Qianrui Teng, Xing Cui, Xuannan Liu, Pei Pei Li, Zekun Li, Huaibo Huang, Ran He · Submission to ICLR 2026 · Withdrawn

TL;DR

Existing anti-personalization defenses generate image-specific adversarial cloaks to prevent text-to-image models from mimicking an individual's likeness, which is impractical for users who regularly post new photos. ID-Cloak introduces an identity-specific universal cloak—a single imperceptible perturbation computed from just a few reference photos that can be applied to all future images of an individual to disrupt unauthorized personalized model fine-tuning.

What Problem Does This Paper Address?

Personalized text-to-image (T2I) methods like DreamBooth, LoRA, and Textual Inversion allow attackers to fine-tune diffusion models on just a handful of personal photos to synthesize realistic, non-consensual imagery.

While defensive "cloaking" algorithms (such as Anti-DreamBooth, SimAC, and MetaCloak) add imperceptible adversarial noise to photos to derail fine-tuning, they operate under an image-specific assumption: every single image requires a dedicated, computationally expensive cloak. When cloaks crafted for one image are applied to unseen photos of the same person, protection drops dramatically. ID-Cloak addresses this limitation by answering: How can we craft a single, universal cloak from a handful of photos that reliably protects all current and future photos of that identity?

Methods

Crafting an identity-wide perturbation poses two primary challenges: defining the unknown data distribution of a person's photos ("what to protect") and designing an optimization scheme for that distribution ("how to protect"). ID-Cloak solves these in two stages:

  1. Identity Subspace Modeling ("What to protect"):
  2. Core Identity Learning: Given $N$ few-shot personal images (e.g., $N=4$), the authors first tune an identifier token ($V^*$) and diffusion backbone to capture the subject's identity embedding ($c_{\text{ID}}$).
  3. Context Diversification: Rather than treating the identity as a single point, soft text embeddings ($c_i$) are optimized for each training image via prompt tuning. This captures diverse contextual variations (poses, lighting, backgrounds).
  4. Subspace Construction: The distribution over these anchors is modeled as a Gaussian subspace $\hat{Q}(c) \sim \mathcal{N}(\mu(\{c_i\}), \sigma(\{c_i\}))$ in text embedding space, approximating the target identity's full visual distribution.
  5. Universal Cloak Optimization ("How to protect"):
  6. The cloak $\delta$ is optimized to maximize the cross-entropy divergence between the cloaked output distribution and the original identity distribution, formulated as a score-matching discrepancy: $$\max_\delta \mathbb{E}_{x_t, c \sim \hat{Q}(c), t} \left[ \|\epsilon_\theta(x_t, t, c) - \epsilon_\theta(\hat{x}'_t, t, c)\|^2_2 \right]$$
  7. One-Step Latent Cloaking: To avoid the heavy computational cost of full reverse diffusion sampling trajectories during training, the authors use a deterministic DDIM formulation to estimate clean latents $\hat{x}_0$, apply $\delta$, and reproject back to noisy latent $\hat{x}'_t$ in one step.
  8. Stochastic Gradient Aggregation (SGA): Uses multi-step inner/outer gradient aggregation within Projected Gradient Descent (PGD) to stabilize noisy gradient estimates across sampled diffusion timesteps.
Few Personal Photos
       │
       ▼
[Stage 1] ──► Learn Core Identity Token (V*)
       │  ──► Prompt Tuning for Context Diversity (c_i)
       │  ──► Identity Subspace Q(c) ~ N(μ, σ)
       ▼
[Stage 2] ──► One-Step DDIM Latent Perturbation
       │  ──► Maximize Score Matching Discrepancy
       ▼
Single Identity-Specific Universal Cloak (δ)
(Can be instantaneously added to any new photo of the subject)

Datasets

The authors evaluated ID-Cloak on:

  • VGGFace2 & CelebA-HQ: 50 randomly sampled identities per dataset. For each identity, 12 photos were chosen (4 for training the cloak, 8 held out as unseen test photos).
  • WikiArt: Used to test applicability to artistic style imitation across 40 artists (10 training works, 10 test works).

Note: No new benchmark datasets were introduced.

Key Insights and Ideas

  • Subspace vs. Single-Point Embeddings: Modeling a Gaussian subspace in text-conditioning space provides far better coverage of an identity than optimizing against a single identity token. As the ablation study showed, a single point quickly overfits to training instances and fails to generalize to test photos.
  • Constant Marginal Cost for Protection: Because the cloak is identity-specific and static once trained, applying it to new images requires zero additional optimization time ($O(1)$), eliminating the linear $O(n)$ scaling bottle-neck of prior defenses.
  • Perturbing Semantic Identity Instead of Pixel Artifacts: By steering noise predictions away across an entire semantic distribution, the perturbation binds to high-level concept features rather than fragile, high-frequency pixel artifacts. This makes the cloak unusually resilient to standard image augmentations.

Key Results

  • Anti-Personalization Defense: Evaluated using Face Detection Failure Rate (FDFR, higher is better) and Identity Score Matching (ISM, lower is better). On held-out test images, ID-Cloak improved FDFR by an average factor of $5.0\times$ on VGGFace2 and $2.4\times$ on CelebA-HQ compared to the strongest universalized baseline (e.g., achieving 0.228 vs. 0.043 for SimAC+ on VGGFace2 portrait prompts).
  • Transformation Robustness: Maintained effective defense against common circumvention filters (Gaussian blur, JPEG compression, smoothing). Under Gaussian blur on VGGFace2, ID-Cloak maintained an FDFR of 0.086—roughly $2.7\times$ higher than the closest baseline.
  • Cross-Model and Cross-Method Transferability: Cloaks crafted on Stable Diffusion v2.1 successfully transferred to SD v1.5. They also generalized across personalization algorithms (DreamBooth, DreamBooth-LoRA, and Textual Inversion) and even lowered identity matching in tuning-free architectures (IP-Adapter).
  • Efficiency: While initial optimization takes $\sim 50$ minutes on an NVIDIA H100, ID-Cloak becomes faster in total wall-clock runtime than SimAC after protecting only $\sim 20$ images, and faster than Anti-DreamBooth after $\sim 34$ images.

Limitations and Future Work

  • Distribution Shift in Reference Photos: Protection efficacy can degrade if target test images differ radically in composition, camera distance/framing, or extreme backgrounds from the few reference photos used to model the identity subspace.
  • Tuning-Free Personalization Models: While the cloak showed preliminary defense against IP-Adapter, tuning-free models (e.g., PhotoMaker, PuLID) use different conditioning pathways than fine-tuning pipelines. The authors note that dedicated defenses tailored specifically to feed-forward, tuning-free generation remain an open area for future research.

Summary updated

Abstract

Personalized text-to-image models allow users to generate images of new concepts from several reference photos, thereby leading to critical concerns regarding civil privacy. Although several anti-personalization techniques have been developed, these methods typically assume that defenders can afford to design a privacy cloak corresponding to each specific image. However, due to extensive personal images shared online, image-specific methods are limited by real-world practical applications. To address this, we are the first to investigate the creation of identity-specific cloaks (ID-Cloak) that safeguard all images belong to a specific identity. Specifically, we first model an identity subspace that preserves personal commonalities and learns diverse contexts to capture the image distribution to be protected. Then, we craft identity-specific cloaks with the proposed novel objective that encourages the cloak to guide the model away from its normal output within the subspace. Extensive experiments show that the generated universal cloak can effectively protect the images. We believe our method, along with the proposed identity-specific cloak setting, marks a notable advance in realistic privacy protection.
BibTeX
@misc{teng2025id,
  author = {Qianrui Teng and Xing Cui and Xuannan Liu and Pei Pei Li and Zekun Li and Huaibo Huang and Ran He},
  title = {{ID-Cloak: Crafting Identity-Specific Cloaks Against Personalized Text-to-Image Generation}},
  year = {2025},
  eprint = {2502.08097},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.08097},
}
Figure