Rethinking and Defending Protective Perturbation in Personalized Diffusion Models

## Abstract

Abstract Personalized diffusion models (PDMs) have become prominent for adapting pretrained text-to-image models to generate images of specific subjects using minimal training data. However, PDMs are susceptible to minor adversarial perturbations, leading to significant degradation when fine-tuned on corrupted datasets. These vulnerabilities are exploited to create protective perturbations that prevent unauthorized image generation. Existing purification methods attempt to mitigate this issue but often over-purify images, resulting in information loss. In this work, we conduct an in-depth analysis of the fine-tuning process of PDMs through the lens of shortcut learning. We hypothesize and empirically demonstrate that adversarial perturbations induce a latent-space misalignment between images and their text prompts in the CLIP embedding space. This misalignment causes the model to erroneously associate noisy patterns with unique identifiers during fine-tuning, resulting in poor generalization. Based on these insights, we propose a systematic defense framework that includes data purification and contrastive decoupling learning. We first employ off-the-shelf image restoration techniques to realign images with their original semantic meanings in latent space. Then, we introduce contrastive decoupling learning with noise tokens to decouple the learning of personalized concepts from spurious noise patterns. Our study not only uncovers fundamental shortcut learning vulnerabilities in PDMs but also provides a comprehensive evaluation framework for developing stronger protection. Our extensive evaluation demonstrates its superiority over existing purification methods and stronger robustness against adaptive perturbation. Please find our code at https://github.com/liuyixin-louis/DiffShortcut .

## 1 Introduction

The rapid advancements in text-to-image diffusion models, such as DALL-E 2 (Ramesh et al., ), Stable Diffusion (Rombach et al., ), and MidJourney (), have revolutionized the field of image generation. These models can generate highly realistic and diverse images based on textual descriptions, enabling a wide range of applications in creative industries, entertainment, and beyond.
However, the capability to fine-tune these models for personalized generation using a small set of reference images has raised concerns about their potential misuse, such as generating misleading or harmful content targeting individuals (Van Le et al., ; Salman et al., ) or threatening the livelihood of artists by mimicking unique artistic styles without compensation (Shan et al., ).

To address these issues, several data-poisoning-based methods have been proposed to protect user images from unauthorized personalized synthesis (Šarčević et al., ; Deng et al., ; Wang et al., ). These methods aim to proactively make images resistant to AI-based manipulation by crafting adversarial perturbations (Salman et al., ; Liang et al., ), applying subtle style-transfer cloaks (Shan et al., ), or crafting misleading perturbation that causes model’s overfitting (Liu et al., ). The model trained on perturbed data will generate images that are poor in quality, and thus, the unauthorized fine-tuning fails. Despite the protection effectiveness, different from the adversarial perturbation crafted for fixed off-the-shelf diffusion models, where the protection against unauthorized editing (Liang et al., ) can be well explained by the adversarial vulnerability of neural networks (Ilyas et al., ), and the sharpness of the latent space of VAE (Kingma & Welling, ; Guo et al., ; Xue et al., ). The underlying mechanism for how protective perturbation disturbs the fine-tuning of the personalized diffusion model has not been explored yet.

Moreover, purification studies are also purposed to further break those protections. As demonstrated in Van Le et al. (), most of the protection methods lack resilience against minor data transformations like Gaussian smoothing or JPEG compression.
However, this simple rule-based purification causes severe data quality degradation. As demonstrated in Cao et al. (); Zhao et al. (), diffusion-reconstructed-based purification shows a strong capacity to denoise the images and yield high-quality output by leveraging the distribution modeling ability of diffusion models. Based on the observation that clean images have better consistency upon reconstruction, IMPRESS (Cao et al., ) proposes optimization on the images to ensure reconstruction consistency with visual LPIPS similarity constraints (Zhang et al., ). Despite effectiveness, such purification requires a tremendous amount of time due to the iterative nature of the proposed optimization. On the other line, DiffPure (Nie et al., ) proposes to leverage off-the-shelf pixel-space diffusion models to conduct an SDEdit process (Meng et al., ) that converts the perturbed images into a certain noisy state with a diffusion forward process and then denoises in the reverse process. GrIDPure (Zheng et al., ) further divides the images into smaller grids and employs small-step DiffPure that yields better visual consistency. However, these SDEdit-based purification approaches still yield unfaithful content that causes great change in identity due to the generative nature of the diffusion model leveraged. How to design an effective, efficient, and faithful purification approach is still an open question.

Figure: Figure 1: We observe that protective perturbation for personalized diffusion models creates a latent mismatch in the image-prompt pair. Fine-tuning on such perturbed data tricks the models, learning the wrong concept mapping. Thus, model generations suffer from high degradation in quality.
Refer to caption: x1.png

To tackle these limitations, we first take a closer look at the fine-tuning process of PDMs through the lens of *shortcut learning*(Geirhos et al., ). We hypothesize that adversarial perturbations introduce a latent-space misalignment between images and their textual prompts in the latent space. This misalignment causes the model to erroneously associate the injected noise patterns with the unique identifier tokens during fine-tuning, resulting in degraded performance. To validate our hypothesis, we conduct comprehensive experiments demonstrating that perturbed images significantly deviate from their semantic concepts in the latent space. Fine-tuning on such mismatched image-prompt pairs leads the model to learn spurious correlations toward noise patterns.

Based on these insights, we propose a systematic defense framework to empower robust PDMs against adversarial perturbations.
Our approach conducts comprehensive purification from three perspectives, including input image purification, contrastive decoupling learning with the negative token, and quality-enhanced sampling. Compared to existing purification methods that are only limited to image purification, the advantages of our framework are three folds: i) efficiency and faithfulness: we conduct image purification by using off-the-shelf super-resolution and image restoration models that convert low-quality, noisy images into high-quality, purified ones; ii) robustness and once-for-all: we demonstrate that contrastive decoupling learning itself alone works and contributes in defending against adaptive attacks crafted against the purification pipeline; iii) system-level defense: not only limited to the input image, we propose systematic defending strategies covering three stages including data purification, model training, and sampling strategy, offering a comprehensive evaluation on the effectiveness of future protection methods. Our main contributions are summarized as follows:

- •
We uncover and empirically validate the shortcut learning vulnerabilities in PDMs caused by latent-space image-prompt misalignment due to adversarial perturbations.
- •
We propose a systematic defense framework based on causal analysis that effectively mitigates these vulnerabilities through data purification and contrastive decoupled learning and sampling.
- •
We demonstrate the effectiveness, efficiency, and faithfulness of our approach through extensive experiments across 7 protections, showing significant improvements over existing defenses. Our study provides a more robust evaluation framework for future research on protective perturbations.

## 2 Related Works

Data Poisoning as Protection against Unauthorized Training with LDMs.
Latent Diffusion Models (LDMs) (Rombach et al., ) have become dominant in various generative tasks, including text-to-image synthesis. To meet the demand for personalized generation, methods like DreamBooth (Ruiz et al., ) have been proposed, which fine-tune LDMs using a small set of reference images to learn specific concepts. However, these advancements have raised concerns about potential misuse, such as generating misleading content targeting individuals (Van Le et al., ; Salman et al., ) and threatening the livelihood of professional artists through style mimicking (Shan et al., ). To address these issues, several data-poisoning-based methods have been proposed to protect user images from unauthorized personalized synthesis by injecting adversarial perturbations through minimizing adversarial target loss in image encoder or UNet denoiser (Salman et al., ), or denoising-loss maximization (Liang et al., ; Van Le et al., ; Liu et al., ) or in opposite direction, denoising-loss minimization (Xue et al., ), or cross-attention loss maximization (Xu et al., ).
Despite its effectiveness, the underlying mechanism of protection against diffusion model fine-tuning has not yet been explored well. To the best of our knowledge, Zhao et al. () is the only work that attempts to investigate the underlying mechanism. However, it is only limited to the vulnerability of the text encoder. In this work, we provide a more comprehensive explanation from the view of latent mismatch and shortcut learning.

Data Purification that Further Breaks Protection.
Despite promising protection performance, studies (Van Le et al., ; An et al., ; Liu et al., ) suggest that these perturbations without advanced transformation loss (Athalye et al., ) are brittle and can be easily removed under simple rule-based transformations.
Among all types of transformation, state-of-the-art adversarial purification leverages diffusion models as purifiers to perturb images back to their clean distributions.
In the classification scenario, DiffPure (Nie et al., ) is a mainstream approach for adversarial purification by applying SDEdit (Meng et al., ) on the poison with an off-the-shelf diffusion model. For purification against protective perturbation, GrIDPure (Lee & Chang, ) further adapts iterative DiffPure with small steps on multi-grid spitted image to preserve the original resolution and structure. However, due to their generative nature, these SDEdit-based purifications have limitations in yielding unfaithful content, where the purified images fail to preserve the original identity. Observing the perceptible inconsistency between the perturbed images and the diffusion-reconstructed ones, IMPRESS (Cao et al., ) conducts the purification via minimizing the consistency loss with constraints on the maximum LPIPS-based (Zhang et al., ) similarity change on pixel space. While it manages to preserve similarity, IMPRESS suffers from the inefficiency issue due to its iterative process and is ineffective under stronger protections like Liu et al. (); Mi et al. ().

Shortcut Learning and Causal Analysis.
Shortcut learning occurs when models exploit spurious correlations in training data, leading to poor generalization (Geirhos et al., ). The causal analysis provides a framework for addressing this by modeling cause-effect relationships (Pearl, ; Schölkopf et al., ). It helps identify true causal factors, distinguishing them from spurious correlations. In computer vision, models may incorrectly focus on background textures instead of object features (Brendel & Bethge, ). Techniques like Invariant Risk Minimization (Arjovsky et al., ) and Counterfactual Data Augmentation (Teney et al., ) leverage causal principles to improve robustness. In PDMs, adversarial perturbations can introduce spurious correlations between noise patterns and identifiers during fine-tuning. Our work explores how to restore correct causal relationships when learning PDMs on perturbed data, which is under-explored in existing works.

## 3 Preliminary

Personalized Latent Diffusion Models via DreamBooth Fine-tuning.
Latent Diffusion Models (LDMs) (Rombach et al., ) are generative models that perform diffusion processes in a lower-dimensional latent space, enhancing training and inference efficiency compared to pixel-space diffusion models (Ho et al., ). By conditioning on additional embeddings such as text prompts, LDMs can generate or edit images guided by these prompts. Specifically, an image encoder $\mathcal{E}$ maps an image $\mathbf{x}_{0}$ to a latent representation $\mathbf{z}_{0}=\mathcal{E}(\mathbf{x}_{0})$. A text encoder $\tau_{\theta}$ produces a text embedding $\bm{c}=\tau_{\theta}(c)$ for a given prompt $c$. The model trains a conditional noise estimator $\bm{\epsilon}_{\theta}$, typically a UNet (Ronneberger et al., ), to predict the Gaussian noise added at each timestep $t$, using the loss:

$$ $\mathcal{L}_{\text{denoise}}(\mathbf{x}_{0},\bm{c};\theta)=\mathbb{E}_{\mathbf {z}_{0}\sim\mathcal{E}(\mathbf{x}_{0}),\bm{\epsilon},t}\Big{[}\|\bm{\epsilon}- \bm{\epsilon}_{\theta}(\mathbf{z}_{0},t,\bm{c})\|_{2}^{2}\Big{]}.$ (1) $$

During inference, the model starts from random noise $\mathbf{z}_{T}\sim\mathcal{N}(0,\textbf{I})$ and iteratively denoises it to obtain a latent $\tilde{\mathbf{z}}_{0}$, which is then decoded to generate the image $\tilde{\mathbf{x}}_{0}=\mathcal{D}(\tilde{\mathbf{z}}_{0})$. DreamBooth (Ruiz et al., ) fine-tunes a pre-trained LDM to generate images of specific concepts by introducing a unique identifier that links subject concepts and employing a class-specific prior-preserving loss to mitigate overfitting and language drift. The fine-tuning utilizes an instance dataset $\mathcal{D}_{\bm{x}_{0}}=\left\{\left(\bm{x}_{0}^{i},\bm{c}^{\text{ID}}\right)
\right\}_{i}$ and a class dataset $\mathcal{D}_{\bar{\bm{x}}_{0}}=\left\{\left(\bar{\bm{x}}_{0}^{i},\bm{c}\right)
\right\}_{i}$, where $\bm{x}_{0}$ are subject images and $\bar{\bm{x}}_{0}$ are class images. The class-specific prompt $C$ is set as “a photo of a [class noun]”, and the instance prompt $C^{\text{ID}}$ is “a photo of sks [class noun]”, where sks specifies the subject and “[class noun]” denotes the object category (e.g., “person”). The fine-tuning process optimizes a weighted sum of the instance denoising loss and the prior-preservation loss:

$$ $\mathcal{L}_{db}(\mathbf{x}_{0},\bm{c}^{ID},\bar{\bm{x}}_{0},\bm{c};\bm{\theta })=\mathcal{L}_{\mathrm{denoise}}\left(\mathbf{x}_{0},\bm{c}^{ID}\right)+ \lambda\mathcal{L}_{\mathrm{denoise}}\left(\bar{\bm{x}}_{0},\bm{c}\right),$ (2) $$

where $\lambda$ balances the two terms. With approximately 1k training steps and around four subject images, DreamBooth can generate vivid, personalized subject images (von Platen et al., ).
Protective Perturbation against Personalized LDMs.
Recent studies suggest that minor adversarial perturbation to clean images can disturb the learning of customized diffusion and also prevent image editing with an off-the-shelf diffusion model by greatly degrading the quality of the generated image. Existing protective perturbation can be classified into two categories: perturbation crafted with fixed diffusion models and perturbation crafted with noise-model alternative updating. In this paper, we focus on the second category since they are more effective in the fine-tuning setting. The general framework of these protective perturbation methods is to craft noise that maximizes an adversarial loss $\mathcal{L}_{adv}$ that is typically designed as the denoising loss $\mathcal{L}_{denoise}$ and also alternatively update the noise generator surrogates $\bm{\theta}^{\prime}$ can be a single model (Van Le et al., ) or an ensemble of models (Liu et al., )) or the attention modules (Xu et al., ). Formally, at the $j$-th alternative step, the noise surrogate $\bm{\theta}^{\prime}_{j}$ and perturbation $\bm{\delta}^{(j)}$ are updated via solving,

$$ $\,\,{\bm{\theta}^{\prime}}_{j}\leftarrow\underset{{{\bm{\theta}}^{\prime}}_{j- 1}}{\mathrm{arg}\min}\sum_{x}{\mathcal{L}_{db}}\left(\mathbf{x}+\bm{\delta}^{( j-1)},\bm{c}^{ID},\bar{\bm{x}},\bm{c};{{\bm{\theta}}^{\prime}}_{j-1}\right); \bm{\delta}^{(j)}\leftarrow\underset{\left\lVert\bm{\delta}^{(j-1)}\right \rVert_{\infty}\leq r}{\mathrm{arg}\max}\mathcal{L}_{adv\,\,}\left(\mathbf{x}+ \bm{\delta}^{(j-1)},\bm{c};{{\bm{\theta}}^{\prime}}_{j}\right).\vspace{-2pt}$ (3) $$

To solve this, standard Gradient Descent is performed on the model parameter while the images are updated via Project Gradient Descent (PGD) (Madry et al., ) to satisfy the $\ell_{\infty}$-ball perturbation budget constrain,

$$ ${\bm{\theta}}_{i}\leftarrow{\bm{\theta}}_{i-1}-\beta\nabla_{{\bm{\theta}}_{i-1 }}\mathcal{L}_{db};\quad\mathbf{x}^{k+1}\leftarrow\Pi_{B_{\infty}\left(\mathbf {x}^{0},\bm{\delta}\right)}\left[\mathbf{x}^{k}+\eta\mathrm{sign}\nabla_{ \mathbf{x}^{k}}\mathcal{L}_{adv}\left(\mathbf{x}^{k}\right)\right],$ (4) $$

where $\Pi_{B_{\infty}(\mathbf{x}^{0},r)}(\cdot)$ is a projection operator on the $\ell_{\infty}$ ball that ensures $\mathbf{x}^{k}\in B_{p}(\mathbf{x}^{0},r)=\left\{\mathbf{x}^{\prime}:\|\mathbf
{x}^{\prime}-\mathbf{x}^{0}\|_{\infty}\leq r\right\}$, $\eta$ denotes the PGD step size and the total PGD step is $K$.

Causal Analysis and Structural Causal Model. Causal analysis models cause-and-effect relationships between variables (Pearl, ), helping identify spurious correlations and mitigate shortcut learning Geirhos et al. (). A Structural Causal Model (SCM) uses structural equations and a directed acyclic graph to represent causal relationships. It comprises endogenous variables $\mathbf{V}$, exogenous variables $\mathbf{U}$, and structural equations ${f_{i}}$, where each $V_{i}\in\mathbf{V}$ is defined as $V_{i}=f_{i}(\text{Pa}(V_{i}),U_{i})$. By intervening on spurious correlations, causal analysis helps models focus on true causal relationships rather than superficial patterns. For more details, see Pearl (); Geirhos et al. ().

## 4 Methodology

### 4.1 Adversarial Perturbation Causes Latent-space Image-Prompt Mismatch

Figure: Figure 2: (a) The original causal graph representing the variable relationships in personalized diffusion model learning. Red arrows indicate false correlations introduced by adversarial perturbation. (b) Intervened causal graph with our proposed CDL. With concept extraction, we examine that CDL alone helps the model learn the right correlations for linking identifier $\mathcal{V}^{*}$ and personalized concept.
Refer to caption: extracted/5897704/figures/causal-graph-v4.png

We first derive the formulation of learning personalized diffusion models on perturbed data. For the case of data poisoning, the instance data is perturbed by some adversarial noise $\bm{\delta}$, and the personalized diffusion models optimize the following loss,

$$ $\mathcal{L}_{db}^{adv}(\mathbf{x}_{0},\bm{c}^{\mathcal{V}^{*}},\bar{\bm{x}}_{0 },\bm{c};\bm{\theta})=\mathcal{L}_{\mathrm{denoise}}\left(\mathbf{x}_{0}+\bm{ \delta},\bm{c}^{\mathcal{V}^{*}}\right)+\lambda\mathcal{L}_{\mathrm{denoise}} \left(\bar{\bm{x}}_{0},\bm{c}\right).$ (5) $$

Based on the adversarial loss in Eq. 5, with annotation of $\bm{c}^{\mathcal{V}^{*}}=\bm{c}\oplus\mathcal{V}^{*}$ where $\mathcal{V}^{*}$ denotes the embedding of the unique identifier, we build the underlying causal graph (Pearl, ) in (a) of Fig. 2 (See App. C.1 on the construction details) to represent the learning process of the personalized diffusion model for linking personalized identifier to instance concept. From this graph, we found that there are two false correlations (colored in red) derived from the prior prompt condition $\bar{\bm{c}}$ and instance condition $\mathcal{V}^{*}$ to the noise $\bm{\delta}$. In an ideal scenario, the adversarial perturbation $\bm{\delta}$ represents a completely relevant concept and should be independent of both the prior prompt $\bar{\bm{c}}$ and the unique identifier $\mathcal{V}^{*}$. However, during training, the model observes pairs of perturbed images $\mathbf{x}_{0}+\bm{\delta}$ and instance prompts $\mathbf{c}^{\mathcal{V}^{*}}$, leading to unintended associations between $\bm{\delta}$ and $\mathcal{V}^{*}$. To validate this, we prompt the model trained on perturbed data to generate images on two different prompts, “a photo of $\mathcal{V}^{*}$” and “a photo of $\mathcal{V}^{*}$ Person”, and visualize the results in Fig. 2. As we can see, the model erroneously attributes the noise patterns introduced by $\bm{\delta}$ to $\mathcal{V}^{*}$ and consequently generates noisy portraits for concept “$\mathcal{V}^{*}$ Person”.

To establish and reinforce the spurious path, we found that one important property that effective perturbation methods should have is the ability to cause latent-space image-prompt mismatch. That is, the images and their corresponding prompts are not semantically aligned in the latent space after the perturbation. Then thus, when learning on such pairs, it will create contradiction and force the models to dump that chaotic perturbation pattern into the rarely-appeared identifier token $\mathcal{V}^{*}$ instead of learning the clean identity behind $\bm{x}_{0}$.
We infer it based on two empirical observations: i) random perturbation with the same strength does not affect the learning performance of the personalized diffusion model; ii) the generated portraits using the perturbed diffusion model usually have lower quality and larger image distortion than the slightly perturbed input images. The first observation justifies that if the perturbation does not cause a significant latent shift, then the learning of the personalized diffusion model will not be affected, while the second observation suggests that the perturbed model learns more abstract noise concepts instead of just the noise pattern in the input pixel space.
We further validate this through the following experiments of latent-mismatch visualization and concept interpretation.

Figure: Figure 3: Latent 2D visualization and concept classification of images using CLIP encoders.
Refer to caption: extracted/5897704/figures/latent-vis-2.png

Specifically, using the paired CLIP encoders, we first embed the latent of clean and perturbed images and also embed the textual concept of a person with a list of prompts describing the person concept, such as “a photo of person’s face”. Then, we leverage three distinct 2D visualization techniques, including TSNE (Maaten & Hinton, ), Trunctued-SVD (Halko et al., ), and UMAP (McInnes et al., ) on image-prompt embedding pairs. The results in Fig. 3 suggest that adversarial perturbation indeed significantly shifts the portrait latent from its original region of the “person” concept. Moreover, we precisely split the latent space into two regions with a zero-shot CLIP-based classifier. We find that the perturbed images have a higher probability of being classified into the “noise” region instead of the “person” region in latent space. Please refer to the App. B.2 for more interpretation experiments.

These findings indicate adversarial perturbation indeed leads to latent mismatch, which is also aligned with the previous studies that reveal the fundamental vulnerability of underlying latent encoders like VAE and CLIP encoders (Akrami et al., ; Schlarmann et al., ; Xue et al., ). This latent mismatch creates an opportunity for shortcut learning (Geirhos et al., ), where the model may exploit the easier-to-learn correlation between the noise patterns and the unique identifier $\mathcal{V}^{*}$, rather than learning the true underlying concept of the person’s identity. Such shortcut learning can lead to poor generalization and vulnerability to adversarial attacks, as the model relies on spurious correlations rather than robust, semantically meaningful features.

### 4.2 Training Clean PDMs on Perturbed Data with Systematic Defending

To address this shortcut learning issue, we propose a systematic defense framework inspired by causal intervention (Geirhos et al., ), which is a widely used technique to mitigate shortcut learning in traditional machine learning tasks.
Causal intervention (Kaddour et al., ) usually involves data argumentation or modifying the training process to disrupt spurious correlations.
To mitigate shortcut learning in PDMs, we propose two key strategies: (i) Removing Noise Variables through image restoration techniques to eliminate adversarial noise and realign images with their true semantic representations; and (ii) Weakening Spurious Paths and Strengthening Causal Paths via Contrastive Decoupling Learning, which disentangles personalized concepts from noise patterns by incorporating noise tokens into prompts and leveraging clean prior data. We detail these approaches below and summarize our framework in Algorithm 1. Please refer to the App. C.2 for more details.

Image Purification via Image Restoration. An intuitive and effective approach to removing the direct influence of adversarial noise is to purify the input images using image restoration techniques. We view the perturbed images as degraded images in the image restoration domain (Wang et al., ) and leverage off-the-shelf image restoration models to convert low-quality, noisy images into high-quality, purified ones. Specifically, we use a face-oriented model named CodeFormer (Liu et al., ), which is trained on facial data to restore images based on latent code discretization. To further enhance the purification of non-face regions, we employ an additional diffusion-based super-resolution (SR) model. Compared to previous state-of-the-art optimization-based purification methods (Cao et al., ) and diffusion-based purification methods (Zhao et al., ), this simple yet effective pipeline yields faithful purified images with better efficiency since it only requires a single inference pass. We term this module CodeSR as it combines CodeFormer and SR in sequence.

Contrastive Decoupling Learning (CDL). To further mitigate shortcut learning, we introduce Contrastive Decoupling Learning, which aims to disentangle the learning of desired personalized concepts from undesired noise patterns. We achieve this by augmenting the prompts with additional tokens related to the noise pattern, denoted as $\mathcal{V}^{*}_{N}$, such as “XX noisy pattern”. Ideally, these newly added tokens absorb all the noise components in the image, leaving the clean, personalized concept associated with the personalized identifier $\mathcal{V}^{*}$. During training, we insert $\mathcal{V}^{*}_{N}$ into the prompt of instance data with the suffix “with XX noisy pattern”, and include the “inverse” of $\mathcal{V}^{*}_{N}$ in the prompt of class-prior data with the suffix “without XX noisy pattern”. This contrastive prompt design encourages the model to distinguish between the instance concept and noise patterns, thus weakening spurious correlations. During inference, we add the suffix “without XX noisy pattern” to the prompt input to guide the model in disregarding the learned patterns associated with $\mathcal{V}^{*}_{N}$, thereby generating images that focus on the personalized concept. Furthermore, by using classifier-free guidance (Ho & Salimans, ) with a negative prompt $c_{\text{neg}}=$“noisy, abstract, pattern, low quality”, we can further guide the trained model to generate high-quality images related to the learned concept. Specifically, given timestamp $t$, we perform sampling using the linear combination of the good-quality and bad-quality conditional noise estimates with guidance weight $w^{\text{neg}}=7.5$:

$$ $\tilde{\bm{\epsilon}}_{\theta}\left(\mathbf{z}_{t},\mathbf{c}\right)=(1+w^{ \text{neg}})\bm{\epsilon}_{\theta}\left(\mathbf{z}_{t},\mathbf{c}^{[\mathcal{V }^{*},\bar{\mathcal{V}}_{N}^{*}]}\right)-w^{\text{neg}}\bm{\epsilon}_{\theta} \left(\mathbf{z}_{t},\tau_{\theta}(c_{\text{neg}})\right)$ (6) $$

Figure: Algorithm 1 Training Clean Personalized LDMs on Perturbed Data with Systematic Defense

## 5 Experiments

### 5.1 Experimental Setup

Datasets and Metrics. Our experiments are mainly performed on the VGGFace2 (Cao et al., ) face dataset
following (Van Le et al., ; Liu et al., ).
Four identities are selected from each dataset, and we randomly pick eight images from each individual and split those images into two subsets for image protection and reference.
Moreover, we also visually demonstrate the purification ability of our approach on samples from an artwork painting dataset, WikiArt (Saleh & Elgammal, ), and the CelebA (Liu et al., ).
For the metric, we evaluate the generated images in terms of their semantic-related quality and graphical aesthetic quality. For the semantic-related score, we compute the cosine similarity between the embedding of generated images and reference images, which we term the Identity Matching Similarity (IMS) score.
We reported the weighted averaged IMS score by employing two face embedding extractors, including antelopev2 model from InsightFace library (Deng et al., ) following IP-adapter (Ye et al., ) and VGG-Net (Simonyan & Zisserman, ) from Deepface library (Taigman et al., ) following (Van Le et al., ).
The IMS score is computed via a weighted sum: IMS$=\lambda\text{IMS}_{\text{IP}}+(1-\lambda)\text{IMS}_{\text{VGG}}$, where $\lambda$ is set as 0.7.
For the graphical quality $Q$, we report the average of two metrics: i) LIQE (Zhang et al., ) (with re-normalization to $[-1,+1]$); ii) CLIP-IQAC following (Liu et al., ), which is based on CLIP-IQA (Wang et al., ) with class label. See App. A.1 for details.

Purification Baselines and Perturbation Methods.
For purification baselines, we consider both model-free and diffusion-based approaches. The model-free methods include ❶ Gaussian Filtering, which reduces noise and detail using a Gaussian kernel; ❷ Total Variation Minimization (TVM), which reconstructs images by minimizing the difference between original and reconstructed images while enforcing smoothness; and ❸ JPEG Compression, which reduces image file size by transforming images into a compressed format. The diffusion-based methods include ❹ (Pixel)DiffPure (Nie et al., ), which leverages pretrained pixel-space diffusion models to smooth adversarial noise with small-step SDEdit process (Meng et al., ); ❺ LatentDiffPure, which is developed in the paper similar as DiffPure but with LDM as a purifier (two variants w/ and w/o prompting);
❻ DDSPure (Carlini et al., ), which finds an optimal timestamp for adversarial purification with SDEdit process; ❼ GrIDPure (Zheng et al., ), which further conducts iterative DiffPure with small steps with grid-based splitting to improve structure similarity; and ❽ IMPRESS (Cao et al., ), which purifies by optimizing latent consistency with visual similarity constraints.
For protective perturbation, we consider six of existing SoTA approaches, including perturbation crafted with bi-level optimization, such as FSMG, ASPL, EASPL (Van Le et al., ), MetaCloak (Liu et al., ), and perturbations crafted with adversarial perturbation with fixed models, such as AdvDM (Liang et al., ), PhotoGuard (Salman et al., ), and Glaze (Shan et al., ). For each setting, we set the perturbation to be ASPL by default. We set the $\ell_{\infty}$ radius to 11/255 with a six-step PGD step size of 1/255 by default following (Van Le et al., ). See App. A.2 for more details.

**Table 1: Results of different purification methods under different protective perturbations. The best performances are in bold, and second runners are shaded in gray. $*$ denotes significant improvement that passes the Wilcoxon signed-rank significance test with $p\leq 0.01$.**
| Methods | FSMG | ASPL | EASPL | MetaCloak | AdvDM | PhotoGuard | Glaze |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| IMS $\uparrow$ | Q $\uparrow$ | IMS $\uparrow$ | Q $\uparrow$ | IMS $\uparrow$ | Q $\uparrow$ | IMS $\uparrow$ | Q $\uparrow$ | IMS $\uparrow$ | Q $\uparrow$ | IMS $\uparrow$ | Q $\uparrow$ | IMS$\uparrow$ | Q $\uparrow$ |  |
| Clean | -0.13 | 0.15 | -0.13 | 0.15 | -0.13 | 0.15 | -0.13 | 0.15 | -0.13 | 0.15 | -0.13 | 0.15 | -0.13 | 0.15 |
| Perturbed | -0.43 | -0.54 | -0.67 | -0.52 | -0.62 | -0.50 | -0.35 | -0.53 | -0.27 | -0.36 | -0.18 | -0.24 | -0.28 | -0.28 |
| Gaussian F. | -0.19 | -0.55 | -0.20 | -0.57 | -0.17 | -0.58 | -0.07 | -0.63 | -0.11 | -0.57 | -0.23 | -0.53 | -0.18 | -0.54 |
| JPEG | -0.15 | -0.41 | -0.21 | -0.52 | -0.27 | -0.50 | -0.34 | -0.38 | -0.15 | -0.02 | -0.13 | 0.07 | -0.19 | -0.03 |
| TVM | -0.12 | -0.65 | -0.16 | -0.66 | -0.10 | -0.67 | -0.11 | -0.69 | -0.12 | -0.65 | -0.15 | -0.64 | -0.11 | -0.66 |
| PixelDiffPure | -0.41 | -0.57 | -0.43 | -0.54 | -0.57 | -0.61 | -0.28 | -0.58 | -0.40 | -0.55 | -0.25 | -0.55 | -0.41 | -0.59 |
| L.DiffPure-$\emptyset$ | -0.07 | -0.47 | -0.36 | -0.59 | -0.22 | -0.49 | -0.52 | -0.43 | -0.55 | -0.24 | -0.12 | -0.40 | -0.38 | -0.42 |
| L.DiffPure | -0.25 | -0.45 | -0.31 | -0.61 | -0.30 | -0.46 | -0.31 | -0.51 | -0.57 | -0.30 | -0.25 | -0.47 | -0.41 | -0.47 |
| DDSPure | -0.15 | -0.34 | -0.05 | -0.38 | -0.08 | -0.39 | -0.16 | -0.49 | -0.19 | -0.43 | -0.12 | -0.37 | -0.22 | -0.41 |
| GrIDPure | -0.10 | -0.20 | -0.21 | -0.16 | -0.13 | -0.25 | -0.23 | -0.25 | -0.09 | -0.18 | -0.03 | -0.22 | -0.24 | -0.13 |
| IMPRESS | -0.15 | -0.53 | -0.16 | -0.49 | -0.29 | -0.64 | -0.34 | -0.29 | -0.34 | -0.34 | -0.16 | -0.21 | -0.10 | -0.43 |
| Ours | 0.23^∗ | 0.65^∗ | 0.09 | 0.62^∗ | 0.09^∗ | 0.63^∗ | 0.38^∗ | 0.58^∗ | 0.29^∗ | 0.67^∗ | 0.24^∗ | 0.63^∗ | 0.31^∗ | 0.66^∗ |

### 5.2 Effectiveness, Efficiency, and Faithfulness

Effectiveness Comparison.
We present the effectiveness of different purification across seven perturbation methods in Tab. 1. From the table, we can see that compared to the clean case, training on perturbing data causes serve model degradation from both identity similarity and image quality. Across all perturbations, ASPL causes the most severe degradation under the setting without purification, while MetaCloak performs more robustly under rule-based purification. Compared to rule-based purification, diffusion-based approaches achieve better performance in improving both identity similarity and image quality in most settings. Among them, GrIDPure yields relatively better purification performance since it considers the structure consistency, which suppresses the generative nature during the purification. However, there are still gaps in the IMS score compared to the clean case, and most of the quality scores after conducting GrIDPure purification are still negative. Compared to these baselines, our method closes the gap by further improving the IMS and quality scores, which are even higher than the clean training case in all the settings. The reasons are twofold: first, we use image-restoration-based approaches, which preserve the image structure well; furthermore, our CDL module contributes significantly to quality improvement.
Please refer to the App. B for the full comparison results with standard deviations.

Figure: Figure 4: Visualization of purified images that were originally protected by MetaCloak. Our method shows high faithfulness and high quality, while others fail to effectively purify the perturbation.
Refer to caption: extracted/5897704/figures/faithfulness+vis/VGGFace2+48/perturbed.png

Efficiency and Faithfulness of Purification.
We present the evaluation of time cost and purification faithfulness compared to all other diffusion-based purification approaches in Tab. 3. The time cost is measured in seconds per sample with consideration of model loading.
Compared to other methods,
our purification has the lowest time cost and is 10$\times$ faster than the previous SoTA method, IMPRESS.
The reason behind this is that we leverage the super-resolution module, which empowers the usage of skip-step sampling to boost the generation time.
Moreover, we test the purification faithfulness of each method in terms of LPIPS loss (Zhang et al., ), a common metric measuring the visual perception distance of two images. From Tab. 3, we can see that our method achieves the lowest LPIPS loss. To visually validate this, we additionally present the purified images in Fig. 4. From the figure, we can see that other diffusion-based approaches have limitations in hallucinating the content, introducing severe artifacts, or not having enough purification strength. In particular, we observed that LatentDiffPure causes a great change in identity during the purification, which might be attributed to the semantic distortion during the purification process in latent space. On the other hand, GrIDPure (Zhao et al., ) brings some artifacts to the purified image, which indicates that the underlying unconditional diffusion model pre-trained on ImageNet might not be suitable for general domain purification.
In comparison, our purification method significantly enhances faithfulness by leveraging off-the-shelf image restoration models. These models are designed to preserve the structural integrity of the input, resulting in output images that closely maintain the original composition while effectively removing perturbations. This approach ensures that the purified images retain the essential features and identity of the original subjects, while successfully mitigating unwanted artifacts or noise.

**Table 2: Faithfulness and efficiency of different diffusion-based purifications.**
| Methods | LPIPS $\downarrow$ | Time Cost$\downarrow$(s) |
| --- | --- | --- |
| IMPRESS | 0.451 | 675 |
| PixelDiffPure | 0.495 | 102 |
| DDSPure | 0.384 | 122.5 |
| GrIDPure | 0.429 | 92.75 |
| LatentDiffPure | 0.453 | 63.75 |
| LatentDiffPure-$\emptyset$ | 0.450 | 63.25 |
| Ours | 0.271 | 51 |

### 5.3 Resilience Against Adaptive Perturbations

DNN-based purification is prone to further adaptive attacks due to the non-smoothness in terms of latent representation space (Guo et al., ) and also the vulnerability by exploiting adversarial examples (Ilyas et al., ). To validate whether our framework can still work upon further adversarial perturbation with new knowledge of our pipeline, we additionally conduct experiments on evaluations of different variants of our approach before and after the adaptive perturbation crafted against the image purification part. The adversarial perturbation is crafted following AdvDM with consideration of the CFG (Ho & Salimans, ) sampling trajectory with a large perturbation budget of $r=16/255$. For the model variants, we consider the full variant with both modules turned on, as well as the ablated versions with one of them turned off. From Tab. 3, we can see that the full variant with CDL is robust to the adaptive attack across other variants in terms of performance drop. Furthermore, we notice that the variant with both SR and CDL yields a slightly better average score than the CodeSR configuration after the attack. This indicates that the CodeFormer module might be more susceptible to the adaptive attack while the SR module is more robust. However, using SR with CDL solely in case cases gives sub-optimal purification results. Our CodeSR configuration with CDL gives a better expected overall performance under mixed perturbation scenarios with $P$(AA)=50

### 5.4 Ablation Study and Sensitivity Analysis

Contribution of Individual Modules. We present ablations on the three modules in our method in Tab. 4. From the table, our method works best under the full setting. When turning off any of the modules, the average performance degrades, with turning off CDL suffers the most. On the other hand, if we only turn on one of the modules, we find that CDL is still the most important one that retains higher generation performance. Furthermore, if we only do input purification without CDL, the generation quality is not as good as the full setting with CDL. This indicates that CDL is crucial for the performance of our method. Surprisingly, when only enabling the SR module, the IMS score is relatively good but with bad quality. While turning on the CodeFormer module alone, the boost is more on the quality score side. The settings that enable these two modules together yield a higher average score. These indicate that SR and CodeFormer modules are complementary to each other.
Furthermore, for the settings that only allow two modules enabled, we found that the combination of CodeFormer and CDL yields the best performance compared to the other two combinations. Furthermore, we visualize the quality-score curve of identifier $\mathcal{V}*$ that shows consistent improvement during training in the App. B.1. In conclusion, the results suggest that all modules contribute to the learning performance gain in both IMS and quality scores.

**Table 4: Ablation study on individual modules.**
| Settings | Metrics |  |  |  |  |
| --- | --- | --- | --- | --- | --- |
| CodeF. | SR | CDL | IMS$\uparrow$ | Q$\uparrow$ | Avg. $\uparrow$ |
| ✓ | ✓ | ✓ | 0.256 | 0.514 | 0.385 |
| ✓ | ✓ | ✗ | -0.215 | 0.028 | -0.094 |
| ✓ | ✗ | ✓ | 0.294 | 0.385 | 0.339 |
| ✗ | ✓ | ✓ | 0.190 | 0.260 | 0.225 |
| ✓ | ✗ | ✗ | -0.336 | 0.020 | -0.158 |
| ✗ | ✓ | ✗ | -0.059 | -0.439 | -0.249 |
| ✗ | ✗ | ✓ | 0.160 | 0.038 | 0.099 |
| ✗ | ✗ | ✗ | -0.271 | -0.425 | -0.348 |

Figure: Figure 5: Generations from models trained on: (left) clean data, (middle) perturbed data without defense, and (right) purified data using our defense approach. The results demonstrate that our defense method significantly enhances generation quality, bringing it closer to clean data levels.
Refer to caption: extracted/5897704/vis-out.png

Generation Visualization and Sensitivity Test. We further visualize the generation of models trained in three cases, including clean, perturbed, and purified in Fig. 5. The visualization demonstrates that our defense greatly helps retain clean-level generation quality.
Additionally, we find that the concept learned associated with $\mathcal{V}*$ under perturbed case matches the noise concept learned using CDL alone, indicating the CDL successfully decouples the learning of noise patterns (refer to the App. B.2). The sensitivity analysis of noise tokens is provided in App. B.3.

## 6 Conclusion

In this paper, we dive into the underlying mechanism behind the effectiveness of existing protective perturbation approaches against the unauthorized fine-tuning of personalized diffusion models. Motivated by the latent mismatch observation, we propose to use super-resolution and image restoration models for latent realignment. Furthermore, we propose contrastive decoupling learning with quality-enhanced sampling based on the analysis from the shortcut learning perspective. Extensive experiments demonstrate the effectiveness, efficiency, and faithfulness of our method. Despite being mainly tested on facial data, our framework can generalize to other domains beyond the facial domain. Future work could optimize module combinations for balanced utility and robustness (in Sec. 5.3), and develop stronger protection methods based on our framework’s robustness-effectiveness trade-off.

## Appendix A Implementation Details

### A.1 Metrics

In this section, we describe the evaluation metrics used in our experiments in more detail. Following (Liu et al., ), we use CLIP-IQAC, which calculates the CLIP score difference between “a good photo of [class]” and “a bad photo of [class]”. For calculating IMS-VGGNet, we leverage the VGGNet in the DeepFace library for face recognition and face embedding extraction (Serengil & Ozpinar, ). For IMS-IP, we leverage antelopev2 model from InsightFace library (Deng et al., ) following IP-adapter (Ye et al., ). We report the weighted average of them with a weighting factor on IMS-IP as 70 We compute all the mean scores for all generated images and instances. For the instance $i$ and its $j$-th metric, its $k$-th observation value is defined as $m_{i,j,k}$. For the $j$-th metric, the mean value is obtained with $\sum_{i,k}m_{i,j,k}/(N_{i}N_{k})$, where $N_{i}$ is the instance number for that particular dataset, and $N_{k}$ is the image generation number.

### A.2 Hardware and Training Details

Hardware Details. All the experiments are conducted on an Ubuntu 20.04.6 LTS (focal) environment with 503GB RAM, 10 GPUs (NVIDIA^® RTX^® A5000 24GB), and 64 CPU cores (Intel^® Xeon^® Silver 4314 CPU @ 2.40GHz). Python 3.9.18 and Pytorch 1.13.1 are used for all the implementations. Please refer to the supplementary material for the code and environment setup.

Training and Inference Settings. The Stable Diffusion (SD) v2-1-base (Rombach et al., ) is used as the model backbone. For Dreambooth training, we conduct full fine-tuning, which includes both the text-encoder and U-Net model with a constant learning rate of $5\times 10^{-7}$ and batch size of 2 for 1000 iterations in mixed-precision training mode. We use the 8-bit Adam optimizer with $\beta_{1}=0.9$ and $\beta_{2}=0.999$ under bfloat16-mixed precision and enable the xformers for memory-efficient training. For calculating prior loss, we use 200 images generated from Stable Diffusion v2-1-base with the class prompt ‘‘a photo of a [class norn]’’. The weight for prior loss is set to 1.
For the evaluation phase, we set the inferring steps as 100 with prompts “a photo of sks person” and “a smiling photo of sks person” during inference to generate 16 images per prompt. For all the settings, the classifier-free guidance Ho & Salimans () is turned on by default with a guidance scale of $7.5$. For the implementation of baseline methods, please refer to App. D.

## Appendix B More Experimental Results

Figure: Figure 6: LIQE quality score of $\mathcal{V}*$.
Refer to caption: extracted/5897704/quality-loss.png

### B.1 Quality Score Curve During Training

We present the LIQE (Zhang et al., ) quality score curve during fine-tuning under different settings, including clean training, vanilla training on perturbed data, training with CDL, and training with CodeSR+CDL in Figure 6. This curve illustrates the evolution of image quality throughout the training process. As evident from the figure, our proposed decoupled learning (CDL) approach significantly enhances the quality compared to the case with perturbations. Moreover, when we combine CDL with input purification (CodeSR + CDL), the model achieves quality performance comparable to clean-level training. These results further validate the effectiveness of our proposed method in defending against adversarial perturbations and maintaining high-quality outputs in PDMs.

### B.2 Learned Concepts Visualization

Figure: Figure 7: More visualization on the learned personalized and noise concepts from trained models with and without CDL. With concept extraction, we examine that using CDL successfully decouples the original noise pattern spuriously linked to personalized tokens $V*$ to the noise tokens $\mathcal{V}_{N}^{*}$.
Refer to caption: extracted/5897704/figures/causal-noise-token-v2.png

To visually demonstrate our method’s effectiveness, Fig. 8 compares the concept extraction results from trained models with vanilla training, CDL, and CodeSR+CDL. We extract three concepts from the trained models, including the instance concept, instance+class concept, and decoupled noise concept. The third one aims to visualize the noise pattern from the perturbed data that we seek to decouple. From the figure, we can see that CDL helps the model learn the correct concept-image correlations while adding CodeSR, which further improves the generation quality. Interestingly, we find that the learned noise concept in CDL-based training matches the pattern of the one falsely linked by the personalized concept in vanilla training. We present more results supporting this in Fig. 7.
This validates the effectiveness of our method in learning the correct concept-image correlations and decoupling the noise concept. Furthermore, from Fig. 8, we find that adding input purification (CodeSR) greatly boosts generation quality. Under the purification case, the contribution of CDL is more about decoupling the left-over background artifacts from the personalized concept.

Figure: Figure 8: Concept extraction with three different prompts from the trained model with vanilla training, CDL, and CodeSR+CDL. Results show that CDL alone helps models learn the right correlations, and adding input purification further boosts the generation quality.
Refer to caption: extracted/5897704/vis-pic/nodec/sks-nodec/1.png

### B.3 Contrastive Decoupling Learning with Different Noise Tokens.

To investigate the effect of using our CDL with different noise tokens, we additionally present results in Tab. 5. As we can see, setting the right noise tokens is crucial for the performance. Among the 15 noise tokens we tested, we found that “t@j noisy pattern” yielded the best overall performance under our setting. Future works can be conducted using automatic noise prompt searching. Another direction is to study visualization of the learned pattern for each noise prompt setting for a deeper understanding of the underlying concept learning process.

**Table 5: Performance comparison of models trained with our Contrastive Decoupling Learning (CDL) using various noise tokens. Results are shown for seven evaluation metrics across different noise token choices. Higher scores indicate better performance. The experiment uses a single random instance from the VGGFace2 dataset, protected by MetaCloak. IMS and Q are our main metrics, while $\text{IMS}_{\text{VGG}}$, $\text{IMS}_{\text{IP}}$, LIQE, and CLIP-IQAC provide additional insights into model performance.**
| Noise Tokens $\mathcal{V}_{N}*$ | IMS $\uparrow$ | Q $\uparrow$ | Avg. $\uparrow$ | $\text{IMS}_{\text{VGG}}$ $\uparrow$ | $\text{IMS}_{\text{IP}}$ $\uparrow$ | LIQE $\uparrow$ | CLIP-IQAC $\uparrow$ |
| --- | --- | --- | --- | --- | --- | --- | --- |
| t@j noisy pattern | -0.226 | 0.156 | -0.035 | -0.265 | -0.209 | 3.313 | 0.460 |
| xjy image imperfection | -0.331 | -0.130 | -0.230 | -0.511 | -0.253 | 2.740 | 0.324 |
| xjy visual interference | -0.539 | 0.014 | -0.263 | -0.513 | -0.550 | 3.028 | 0.130 |
| xjy visual distortion | -0.336 | -0.204 | -0.270 | -0.284 | -0.357 | 2.591 | 0.149 |
| xjy image artifact | -0.159 | -0.445 | -0.302 | -0.423 | -0.045 | 2.110 | 0.277 |
| xjy digital glitch | -0.294 | -0.378 | -0.336 | -0.448 | -0.227 | 2.243 | 0.328 |
| UNKNOWN face degradation | -0.197 | -0.476 | -0.337 | -0.296 | -0.155 | 2.047 | 0.520 |
| xjy image disturbance | -0.328 | -0.366 | -0.347 | -0.424 | -0.287 | 2.268 | 0.225 |
| xjy image corruption | -0.449 | -0.248 | -0.349 | -0.477 | -0.437 | 2.504 | 0.104 |
| xjy image degradation | -0.345 | -0.410 | -0.377 | -0.286 | -0.370 | 2.181 | 0.110 |
| UNKNOWN noisy pattern | -0.431 | -0.419 | -0.425 | -0.244 | -0.512 | 2.161 | -0.020 |
| xjy visual anomaly | -0.389 | -0.534 | -0.461 | -0.453 | -0.361 | 1.932 | 0.126 |
| XX noisy artifact | -0.324 | -0.626 | -0.475 | -0.143 | -0.401 | 1.749 | -0.096 |
| xjy visual noise | -0.578 | -0.475 | -0.526 | -0.288 | -0.702 | 2.050 | -0.060 |
| bhi noisy perturbation | -0.494 | -0.727 | -0.610 | -0.369 | -0.547 | 1.546 | -0.242 |

**Table 6: The full results with standard deviations of different purification methods under different protective perturbations. The best performances are in bold, and second runners are shaded in gray. $*$ denotes improvement that passes the Wilcoxon signed-rank significance test with $p\leq 0.01$.**
| Methods | FSMG | ASPL | EASPL | MetaCloak | AdvDM | PhotoGuard | Glaze |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| IMS $\uparrow$ | Q $\uparrow$ | IMS | Q | IMS | Q | IMS | Q | IMS | Q | IMS | Q | IMS | Q |  |
| Clean | -0.13 $\pm$ 0.04 | 0.15 $\pm$ 0.08 | -0.13 $\pm$ 0.04 | 0.15 $\pm$ 0.08 | -0.13 $\pm$ 0.04 | 0.15 $\pm$ 0.08 | -0.13 $\pm$ 0.04 | 0.15 $\pm$ 0.08 | -0.13 $\pm$ 0.04 | 0.15 $\pm$ 0.08 | -0.13 $\pm$ 0.04 | 0.15 $\pm$ 0.08 | -0.13 $\pm$ 0.04 | 0.15 $\pm$ 0.08 |
| Perturbed | -0.43 $\pm$ 0.54 | -0.54 $\pm$ 0.25 | -0.67 $\pm$ 0.46 | -0.52 $\pm$ 0.41 | -0.62 $\pm$ 0.46 | -0.50 $\pm$ 0.40 | -0.35 $\pm$ 0.58 | -0.53 $\pm$ 0.28 | -0.27 $\pm$ 0.54 | -0.36 $\pm$ 0.30 | -0.18 $\pm$ 0.54 | -0.24 $\pm$ 0.27 | -0.28 $\pm$ 0.59 | -0.28 $\pm$ 0.33 |
| Gaussian F. | -0.19 $\pm$ 0.57 | -0.55 $\pm$ 0.29 | -0.20 $\pm$ 0.56 | -0.57 $\pm$ 0.20 | -0.17 $\pm$ 0.56 | -0.58 $\pm$ 0.23 | -0.07$\pm$ 0.54 | -0.63 $\pm$ 0.15 | -0.11 $\pm$ 0.54 | -0.57 $\pm$ 0.24 | -0.23 $\pm$ 0.56 | -0.53 $\pm$ 0.26 | -0.18 $\pm$ 0.53 | -0.54 $\pm$ 0.25 |
| JPEG | -0.15 $\pm$ 0.60 | -0.41 $\pm$ 0.33 | -0.21 $\pm$ 0.62 | -0.52 $\pm$ 0.25 | -0.27 $\pm$ 0.62 | -0.50 $\pm$ 0.24 | -0.34 $\pm$ 0.63 | -0.38 $\pm$ 0.41 | -0.15 $\pm$ 0.62 | -0.02$\pm$ 0.39 | -0.13 $\pm$ 0.62 | 0.07$\pm$ 0.36 | -0.19 $\pm$ 0.57 | -0.03$\pm$ 0.48 |
| TVM | -0.12 $\pm$ 0.48 | -0.65 $\pm$ 0.21 | -0.16 $\pm$ 0.53 | -0.66 $\pm$ 0.23 | -0.10 $\pm$ 0.49 | -0.67 $\pm$ 0.20 | -0.11 $\pm$ 0.49 | -0.69 $\pm$ 0.12 | -0.12 $\pm$ 0.50 | -0.65 $\pm$ 0.22 | -0.15 $\pm$ 0.54 | -0.64 $\pm$ 0.20 | -0.11 $\pm$ 0.48 | -0.66 $\pm$ 0.20 |
| PixelDiffPure | -0.41 $\pm$ 0.45 | -0.57 $\pm$ 0.17 | -0.43 $\pm$ 0.47 | -0.54 $\pm$ 0.21 | -0.57 $\pm$ 0.49 | -0.61 $\pm$ 0.16 | -0.28 $\pm$ 0.44 | -0.58 $\pm$ 0.22 | -0.40 $\pm$ 0.51 | -0.55 $\pm$ 0.21 | -0.25 $\pm$ 0.51 | -0.55 $\pm$ 0.15 | -0.41 $\pm$ 0.44 | -0.59 $\pm$ 0.17 |
| L.DiffPure-$\emptyset$ | -0.07$\pm$ 0.50 | -0.47 $\pm$ 0.29 | -0.36 $\pm$ 0.49 | -0.59 $\pm$ 0.21 | -0.22 $\pm$ 0.58 | -0.49 $\pm$ 0.26 | -0.52 $\pm$ 0.46 | -0.43 $\pm$ 0.29 | -0.55 $\pm$ 0.45 | -0.24 $\pm$ 0.38 | -0.12 $\pm$ 0.48 | -0.40 $\pm$ 0.28 | -0.38 $\pm$ 0.45 | -0.42 $\pm$ 0.27 |
| L.DiffPure | -0.25 $\pm$ 0.48 | -0.45 $\pm$ 0.30 | -0.31 $\pm$ 0.51 | -0.61 $\pm$ 0.20 | -0.30 $\pm$ 0.54 | -0.46 $\pm$ 0.32 | -0.31 $\pm$ 0.46 | -0.51 $\pm$ 0.22 | -0.57 $\pm$ 0.43 | -0.30 $\pm$ 0.34 | -0.25 $\pm$ 0.48 | -0.47 $\pm$ 0.21 | -0.41 $\pm$ 0.46 | -0.47 $\pm$ 0.27 |
| DDSPure | -0.15 $\pm$ 0.61 | -0.34 $\pm$ 0.23 | -0.05$\pm$ 0.59 | -0.38 $\pm$ 0.19 | -0.08$\pm$ 0.54 | -0.39 $\pm$ 0.20 | -0.16 $\pm$ 0.59 | -0.49 $\pm$ 0.23 | -0.19 $\pm$ 0.59 | -0.43 $\pm$ 0.23 | -0.12 $\pm$ 0.59 | -0.37 $\pm$ 0.21 | -0.22 $\pm$ 0.55 | -0.41 $\pm$ 0.24 |
| GrIDPure | -0.10 $\pm$ 0.59 | -0.20$\pm$ 0.23 | -0.21 $\pm$ 0.58 | -0.16$\pm$ 0.23 | -0.13 $\pm$ 0.55 | -0.25$\pm$ 0.25 | -0.23 $\pm$ 0.52 | -0.25$\pm$ 0.25 | -0.09$\pm$ 0.54 | -0.18 $\pm$ 0.26 | -0.03$\pm$ 0.59 | -0.22 $\pm$ 0.26 | -0.24 $\pm$ 0.56 | -0.13 $\pm$ 0.28 |
| IMPRESS | -0.15 $\pm$ 0.58 | -0.53 $\pm$ 0.24 | -0.16 $\pm$ 0.60 | -0.49 $\pm$ 0.31 | -0.29 $\pm$ 0.60 | -0.64 $\pm$ 0.13 | -0.34 $\pm$ 0.58 | -0.29 $\pm$ 0.30 | -0.34 $\pm$ 0.56 | -0.34 $\pm$ 0.31 | -0.16 $\pm$ 0.58 | -0.21 $\pm$ 0.28 | -0.10$\pm$ 0.59 | -0.43 $\pm$ 0.25 |
| Ours | 0.23^∗ $\pm$ 0.47 | 0.65^∗ $\pm$ 0.21 | 0.09 $\pm$ 0.48 | 0.62^∗ $\pm$ 0.15 | 0.09^∗ $\pm$ 0.49 | 0.63^∗ $\pm$ 0.19 | 0.38^∗ $\pm$ 0.38 | 0.58^∗ $\pm$ 0.27 | 0.29^∗ $\pm$ 0.44 | 0.67^∗ $\pm$ 0.20 | 0.24^∗ $\pm$ 0.49 | 0.63^∗ $\pm$ 0.19 | 0.31^∗ $\pm$ 0.43 | 0.66^∗ $\pm$ 0.25 |

### B.4 More Results on Purification Faithfulness

In addition to the LPIPS used in the paper, we provide purification results using other similarity metrics, including Structural Similarity (SSIM), Multi-Scale Structural Similarity (MS-SSIM), and Peak Signal-to-Noise Ratio (PSNR). The results are presented in Tab.  7, which demonstrate that our purification variants are consistently superior to previous state-of-the-art purification approaches.

**Table 7: Purification faithfulness under various similarity metrics.**
| Settings | LPIPS $\downarrow$ | SSIM $\uparrow$ | MS_SSIM $\uparrow$ | PSNR $\uparrow$ | Avg(IMS,Q) $\uparrow$ |
| --- | --- | --- | --- | --- | --- |
| IMPRESS | 0.451 | 0.761 | 0.903 | 49.294 | -0.63 |
| DDSPure | 0.384 | 0.805 | 0.873 | 46.948 | -0.65 |
| GrIDPure | 0.429 | 0.754 | 0.794 | 41.976 | -0.48 |
| L.DiffPure-$\emptyset$ | 0.450 | 0.676 | 0.732 | 43.551 | -0.82 |
| Code ✓ + SR ✓ | 0.271 | 0.824 | 0.925 | 49.937 | 0.385 |
| Code ✓ + SR ✗ | 0.231 | 0.891 | 0.952 | 52.49 | 0.339 |
| Code ✗ + SR ✓ | 0.270 | 0.790 | 0.923 | 49.591 | 0.225 |

### B.5 Limitations Discussion

While our proposed defense framework demonstrates significant improvements over existing methods in enhancing the robustness of PDMs, there are certain areas that could be further explored. Our experiments are primarily conducted on the facial dataset VGGFace2. Although we have preliminary purification results indicating the applicability of our approach to other domains like artwork images from WikiArt, we have not extensively tested our method across a wide variety of protection techniques. Future work could investigate the generalizability of our method to different types of images and subjects to further validate its effectiveness. Additionally, the integration of data purification and contrastive decoupling learning introduces some additional computational steps during the training process. This may slightly increase the training time compared to standard training procedures. However, we believe that this is a reasonable trade-off given the substantial benefits in terms of robustness and generation quality that our method provides. While our framework shows robustness against certain adaptive perturbations, it is always possible that more sophisticated adversarial strategies could be developed. Ongoing research and adaptive strategies may be necessary to continually strengthen the model’s resilience against evolving threats.

## Appendix C Causal Analysis of Learning Personalized Diffusion Models on Perturbed Data

### C.1 Construction of the Causal Graph when Learning PDMs on Perturbed Data

To understand how adversarial perturbations lead to shortcut learning in PDMs, we construct a Structural Causal Model (SCM) that captures the causal relationships between the variables involved in the fine-tuning process. The variables in our SCM are defined as follows: $\mathbf{X}$ represents the original clean images representing the true concept; $\bm{\delta}$ denotes the adversarial perturbations added to the images; $\mathbf{X}^{\prime}=\mathbf{X}+\bm{\delta}$ are the perturbed images used for fine-tuning; $\bm{c}$ represents class-specific text prompts without the unique identifier (e.g., “a photo of a person”); $\mathcal{V}^{*}$ is the unique identifier token used in personalized prompts (e.g., “sks”); $\bm{c}^{\mathcal{V}^{*}}=\bm{c}\oplus\mathcal{V}^{*}$ denotes the personalized text prompts combining $\bm{c}$ and $\mathcal{V}^{*}$; $\theta$ represents the model parameters being fine-tuned, and $\mathbf{Y}$ denotes the model outputs (generated images). The structural equations governing the relationships are:
The structural equations governing the relationships in our SCM are as follows: (1) Perturbed Images: $\mathbf{X}^{\prime}=\mathbf{X}+\bm{\delta}$, where $\mathbf{X}^{\prime}$ represents the perturbed images, $\mathbf{X}$ the original clean images, and $\bm{\delta}$ the adversarial perturbations. (2) Model Fine-tuning: $\theta=f_{\theta}(\theta_{0},\mathbf{X}^{\prime},\bm{c}^{\mathcal{V}^{*}})$, where $\theta$ represents the fine-tuned model parameters, $\theta_{0}$ the initial model parameters, and $\bm{c}^{\mathcal{V}^{*}}$ the personalized text prompts. (3) Model Output Generation: $\mathbf{Y}=g(\theta,\bm{c}^{\mathcal{V}^{*}})$, where $\mathbf{Y}$ denotes the generated images.

Based on these equations, we construct the causal graph (model $\theta$ and output $\mathbf{Y}$ omitted for clarity) shown in Fig. 2. In the graph, the adversarial perturbations $\bm{\delta}$ directly affect the perturbed images $\mathbf{X}^{\prime}$. The perturbed images $\mathbf{X}^{\prime}$ and personalized prompts $\bm{c}^{\mathcal{V}^{*}}$ influence the fine-tuned model parameters $\theta$. The fine-tuned model parameters $\theta$ and the personalized prompts $\bm{c}^{\mathcal{V}^{*}}$ influence the generated outputs $\mathbf{Y}$. Spurious correlations (shortcut paths) are introduced from $\bm{\delta}$ to $\theta$ and subsequently to $\mathbf{Y}$, leading the model to incorrectly associate the adversarial noise with the unique identifier $\mathcal{V}^{*}$.

### C.2 Connection of Our Design to Causal Intervention

Our defense strategies can be interpreted as interventions that modify the causal graph to weaken or eliminate the undesired influence of adversarial perturbations $\bm{\delta}$ on the model outputs $\mathbf{Y}$.

Input Purification aims to mitigate the effect of adversarial perturbations, but it’s important to note that this process is not perfect. In the context of our causal model, we can represent this imperfect purification as:

$$ $\mathbf{X}^{\prime}=\mathbf{X}+\bm{\delta}\rightarrow\mathbf{X}^{\prime}= \mathbf{X}+\bm{\delta}_{r},$ (7) $$

where $\bm{\delta}_{r}$ represents the residual perturbations after purification, with $\|\bm{\delta}_{r}\|\ll\|\bm{\delta}\|$. This intervention partially weakens the path from $\bm{\delta}$ to $\mathbf{X}^{\prime}$, and consequently to $\theta$ and $\mathbf{Y}$. The distribution of the model outputs given this imperfect purification can be expressed as:

$$ $P(\mathbf{Y}\mid\text{do}(\bm{\delta}=\bm{\delta}_{r}),\mathbf{X},\bm{c}^{ \mathcal{V}^{*}}).$ (8) $$

While input purification reduces the influence of adversarial perturbations on the fine-tuning process and subsequent image generation, it does not completely eliminate the shortcut learning problem. This limitation motivates the need for additional strategies to mitigate shortcut learning further.

Contrastive Decoupling Learning (CDL) intervenes on the $\bm{\delta}$–$\mathcal{V}^{*}$ relationship by introducing noise tokens $\mathcal{V}_{N}^{*}$, thus weakening $\bm{\delta}$’s indirect effect on $\theta$. By augmenting the instance prompts to include the noise token (e.g., “a photo of $\mathcal{V}^{*}$ with $\mathcal{V}_{N}^{*}$ noisy pattern”) and the class prompts to exclude it (e.g., “a photo of a person without $\mathcal{V}_{N}^{*}$ noisy pattern”), CDL encourages the model to disentangle the learning of the personalized concept from the noise patterns. Furthermore, when we apply the quality-enhanced sampling with CFG, it modifies the generation process by incorporating negative prompts during inference, thereby adjusting the output equation to:

$$ $\mathbf{Y}=g^{\prime}(\theta,\bm{c}^{\mathcal{V}^{*}},\bm{c}_{\text{neg}}),$ (9) $$

where $g^{\prime}$ is the modified generation function and $\bm{c}_{\text{neg}}$ are negative prompts (e.g., “noisy, abstract, pattern, low quality”). This step acts as an intervention on the generation mechanism, reducing the influence of any residual associations between $\bm{\delta}$ and the outputs. Although it is more of a practical adjustment than a formal causal intervention, it helps steer the model toward generating high-quality images that reflect the true personalized concept.

By combining these strategies, we provide a comprehensive approach to mitigate shortcut learning in PDMs. Input purification directly removes the influence of adversarial perturbations, CDL reduces spurious associations during training, and quality-enhanced sampling improves the quality of generated outputs by discouraging undesired artifacts.

## Appendix D Implementation of Baselines

### D.1 Purification Methods

We implement two classes of purification approaches; the first ones are model-free and operate with certain image processing algorithms, such as Gaussian Filtering, total variation minimization (TVM), and JPEG compression. Despite the simplicity, researchers found that these approaches can achieve non-trivial defense performance against adversarial attacks (Liang et al., ), availability attacks (Liu et al., ; Van Le et al., ), and more general data poisoning attacks (Huang et al., ). Another line of approach is based on powerful diffusion probabilistic models, which have a strong ability to model real-world data distribution and also show potential in being leveraged for zero-shot purifiers Shi et al. (); Zhao et al. (); Carlini et al. (); Cao et al. (). We include a wide range of SoTA diffusion-based purification approaches that are designed for the protective perturbation specifically, including GrIDPure (Zheng et al., ), IMPRESS (Cao et al., ), or those are proposed for more general adversarial perturbation (Nie et al., ; Carlini et al., ), including DiffPure (Nie et al., ) (with pixel-space diffusion models or latent-space diffusion models), DDS-based purification (DDSPure) (Carlini et al., ; ).

1. Gaussian Filtering. Gaussian Filtering is a well-known image-processing technique used to reduce image noise and detail by applying a Gaussian kernel. The high-frequent part in adversarial perturbation can be smoothed after filtering. The kernel size is set as 5 following (Van Le et al., ).

2. Total Variation Minimization (TVM) (Wang et al., ) The main idea of TVM is to conduct image reconstruction based on the observation that the benign images should have low total variation. We implemented the TVM defense in the following steps: we first resized the instance image to $64^{2}$ pixels, applied a random dropout mask with a 2 After optimization, the reconstructed image is reshaped back to $64^{2}$ and then upsampled to $512^{2}$ through two SR steps with a middle resizing process.

3. JPEG Compression. It involves transforming an image into a format that uses less storage space and reduces the image file’s size. We set the JPEG quality to 75 following (Liu et al., ).

4. DiffPure (Nie et al., ). Diffusion Purification (DiffPure) first diffuses the adversarial example with a small amount of noise given a pre-defined timestep $t$ following a forward diffusion process, where the adversarial noise is smoothed and then recovers the clean image through the reverse generative process. Depending on the type of diffusion model used, this simple yet effective approach can be adapted into two versions: PDM-based DiffPure and LDM-based DiffPure. In our implementation, we term the PDM-based DiffPure as PixelDiffPure for short and leverage 256x256_diffusion_uncond pre-trained on ImageNet released in the guided-diffusion following common practice. For the LDM-based DiffPure, we term it as LatentDiffPure since the diffusion process is conducted in latent space and leverage Stable Diffusion v1-4 (Rombach et al., ) for its superior performance. Since the SD model has the ability to input additional text prompts during the purification process, we investigate two variants with and without the usage of purified text prompting. For LatentDiffPure-$\emptyset$, we set the text to null, while for LatentDiffPure, we set it as ‘‘a photo of [class_name], high quality, highres’’.

5. DDSPure (Carlini et al., ). Similar to DiffPure (Nie et al., ), the main idea behind Diffusion Denoised Smoothing (DDS) is to find an optimal timestamp that can maximally remove the adversarial perturbation via the SDEdit process (Meng et al., ). Given smoothing noise level $\delta$, the optimal timestamp $t^{*}$ is computed via, $t^{*}=\frac{1-\bar{\alpha_{t}}}{\bar{\alpha_{t}}}=\sigma^{2}.$ Following common practice, we leverage the pretrained diffusion model on ImageNet released in the guided-diffusion. Specifically, the 256x256_diffusion_uncond is used as a denoiser. To resolve the size mismatch, we resize the images to fit the model input and resize the image size back after purification. And we clip $t^{*}$ when it falls outside the sampling step range of $[0,1000]$.

4. GrIDPure (Zheng et al., ). GrIDPure notices that for purification in defending protective perturbation, conducting iterative DiffPure with small steps can outperform one-shot DiffPure with larger steps. Furthermore, it suppresses the generative nature during diffusion purification by additionally splitting the image into multiple small grids that are separately processed with a final merging process. This allows the model to focus more on purifying those perturbed textures and curves in the image without mistakenly affecting the overall structure, thus preserving the faithfulness of purification.

Figure: Algorithm 2 GrIDPure

Given an input image size of $512\times 512$, we implement the GrIDPure algorithm as follows with the hyper-parameter recommended in the original paper. We first obtain multiple grids using a sliding window approach. The window size is $256\times 256$, and the stride is $128$.
For each $256\times 256$ grid, we apply DiffPure with a time-stamp of $t=10$. After all the grids are denoised, they are merged back into a single image. In the overlapping regions, the pixel values are averaged. Given $\gamma$ as $0.1$, the purified image is then obtained via a moving average with the original image,

$$ $\bm{x}_{i+1}=(1-\gamma)\cdot\tilde{\bm{x}}_{i}+\gamma\cdot\bm{x}_{i}.$ (10) $$

These steps constitute one iteration, and the algorithm is repeated for a total of $10$ iterations. We implement the GrIDPure algorithm following their official implementation.

6. IMPRESS (Cao et al., ) The key idea of IMPRESS is to conduct purification that ensures latent consistency with visual similarity constraints: (1) the purified image should be visually similar to the perturbed image, and (2) the purified image should be consistent upon an LDM-based reconstruction. To quantify the similarity condition, IMPRESS uses the LPIPS metric (Zhang et al., ), which measures the human-perceived image distortion between the purified image $\mathbf{x}_{\text{pur}}$ and the perturbed image $\mathbf{x}_{\text{ptb}}$. The loss is defined as $\max(\text{LPIPS}(\mathbf{x}_{\text{pur}},\mathbf{x}_{\text{ptb}})-\Delta_{L},0)$, where $\Delta_{L}$ is the perceptual perturbation budget. For the consistency condition, IMPRESS simplifies the loss by removing the diffusion process and defines it as $||\mathbf{x}_{\text{pur}}-\mathcal{D}(\mathcal{E}(\mathbf{x}_{\text{pur}}))||^
{2}_{2}$, where $\mathcal{E}$ and $\mathcal{D}$ are the image encoder and decoder in the LDM, respectively. The final optimization problem combines the two losses:

$$ $\min_{\mathbf{x}_{\text{pur}}}||\mathbf{x}_{\text{pur}}-\mathcal{D}(\mathcal{E }(\mathbf{x}_{\text{pur}}))||^{2}_{2}+\alpha\cdot\max(\text{LPIPS}(\mathbf{x}_ {\text{pur}},\mathbf{x}_{\text{ptb}})-\Delta_{L},0),$ (11) $$

where $\alpha$ is a hyperparameter to balance the two losses, which is set as $0.1$. The optimization is solved with PGD (Madry et al., ) with Adam optimizer with lr of 0.001, and the total iteration is set as 3000.

### D.2 Protective Perturbation Methods

We test a wide range of protective perturbation approaches, including those that craft noise against fixed LDMs by exploiting the out-of-distribution adversarial vulnerability of DNNs (Liang et al., ; Liang & Wu, ; Xue et al., ; Salman et al., ; Shan et al., ), and those that jointly and alternatively learn the noise generator and perturbation (Van Le et al., ; Liu et al., ; Xu et al., ), which show better protection capacity for the LDM fine-tuning settings (Kumari et al., ; Ruiz et al., ).

Fully-trained Surrogate Model Guidance (FSMG).
Following (Shan et al., ; Yeh et al., ), FSMG employs a surrogate DreamBooth model with original parameters $\theta_{clean}$ fully finetuned on a small subset of clean samples $\mathcal{X}_{A}\subset\mathcal{X}$. We implement the subset with the same identity to maximize the protection capability. Using $\theta_{clean}$ as guidance, we find the optimal noise for each target image: $\delta^{*(i)}=\operatorname*{arg\,max}_{\delta^{(i)}}\mathcal{L}_{cond}(\theta
_{\text{clean}},x^{(i)}+\delta^{(i)})$, where $\mathcal{L}_{cond}$ is the conditional denoising loss. This encourages any DreamBooth model finetuned on the perturbed samples to deviate from $\theta_{clean}$ and generate low-quality images.

Alternating Surrogate and Perturbation Learning (ASPL).
Since FSMG fails to effectively solve the underlying bi-level optimization, inspired by Huang et al. (), ASPL further alternates the training of the surrogate DreamBooth model with perturbation learning. The surrogate model $\epsilon_{\theta}$ is initialized with pre-trained weights. In each iteration, a clone $\epsilon^{\prime}_{\theta^{\prime}}$ is finetuned on clean reference data to simulate the learning trajectory on potential leaked clean data. This model is then used to expedite learning adversarial noises $\delta^{(i)}$ with denoising-error-maximization in the current loop. Finally, ASPL updates the actual surrogate model $\epsilon_{\theta}$ on the updated adversarial samples with gradient descent and proceeds to the next iteration. This procedure allows the surrogate model to mimic better the models trained by malicious DreamBooth users, as it is only trained on perturbed data.

Ensemble-based ASPL (EASPL).
Since the model trainer’s pre-trained text-to-image generator is often unknown, an improved approach is to use an ensemble (Cherepanova et al., ; Yang et al., ) of surrogate models finetuned from different pre-trained generators, which can lead to better transferability. We implement this approach with three surrogates. Besides, we follow the practice of a single model at a time in an interleaving manner to produce optimal perturbed data due to GPU memory constraints.

MetaCloak. Despite the effectiveness of perturbation crafted from noise-surrogate joint learning, studies find that these approaches lack robustness against simple data transformations such as minor Gaussian filtering. To address this issue, MetaCloak (Liu et al., ) solves the underlying bi-level poisoning problem using a meta-learning framework with an additional transformation sampling process to craft transferable and robust perturbations.
Incorporating an additional transformation process and a denoising-error maximization loss brings severe performance degradation in a generation.

PhotoGuard.
PhotoGuard (Salman et al., ) mainly focuses on the setting of malicious editing where the diffusion models are fixed. It introduces two target-adversarial-perturbation-based (TAP-based) approaches: encoder attack and diffusion attack. The encoder attack adds a perturbation $\bm{\delta}_{\text{enc}}$ to an image $\mathbf{x}$ such that the image encoder $\mathcal{E}$ produces a closer latent representation for $\mathbf{x}+\bm{\delta}_{\text{enc}}$ and a target image $\mathbf{x}_{\text{target}}$. The diffusion attack crafts a perturbation $\bm{\delta}_{\text{diff}}$ such that the LDM-reconstructed images based on the input are closer to some $\mathbf{x}_{\text{target}}$. The diffusion attack considers the whole LDM model with prompts, achieving better empirical performance but being less efficient compared to the encoder attack.

GLAZE. GLAZE (Shan et al., ) mainly focuses on artwork protection and aims to add perturbations to an artist’s artworks such that LDMs cannot learn the correct style from the perturbed artworks. Similar to the TAP-based encoder attack in PhotoGuard, it first chooses a target style $T$ sufficiently different from the style of the original image $\mathbf{x}$. Then, it transfers $\mathbf{x}$ to the target style using a pre-trained style transfer model $\Omega$. Given the style-transferred image $\Omega(\mathbf{x},T)$, GLAZE crafts the perturbation $\bm{\delta}_{\text{GLAZE}}$ by minimizing the distance between the encodings of $\Omega(\mathbf{x},T)$ and $\mathbf{x}+\bm{\delta}$ while regularizing the perceptual distortion using LPIPS. This encourages LDMs to generate samples with the target style instead of the original style when learning from the perturbed images.

AdvDM. Different from the above targeting attack, AdvDM (Liang et al., ) is proposed to optimize the adversarial perturbation in an untargeted and denoising-error-maximizing way. In detail, instead of learning a perturbation over one single reserve process, AdvDM learns the Monte-Carlo estimation of adversarial perturbation by sampling across all timestamps to maximize the denoising loss.

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 6
presentation: 1
questions: * It is not clear to me the connection between the latent mismatch and the shortcut learning. Why does the existence of latent mismatch lead to shortcut learning? 
* What are the potential mitigation against to the proposed method?
soundness: 2
strengths: 1. The proposed contrastive learning method is well motivated by the empirical finding on the latent mismatch of perturbed images.
2. In multiple domains, the method presents better fine-tuning performance than baselines given protective perturbation on images.
3. Comprehensive experiments are conducted to understand and evaluate the method.
summary: The paper aims to improve the personalization performance of Diffusion Models on images with protective perturbation, a kind of noise avoiding images to be learned by models. The authors fist empirically analyze the latent mismatch between the perturbed and original images, finding that perturbation significantly alternate the latent representations of images. The authors believe that the mismatch causes shortcut learning and therefore fail the personalization of diffusion models on such perturbed data. Therefore, a novel method is proposed to improve the personalization training by contrastive learning and super resolution.
weaknesses: 1. It is not clear to me the connection between the latent mismatch and the shortcut learning. Why does the existence of latent mismatch lead to shortcut learning? 
2. I don't think the word "defending" (in the title) should be used against a good technique, protective perturbation. The paper is a good red-teaming paper that explored a stronger threat model for protective perturbation. Unfortunately, many description of the method is defined as a mitigation method, which could mislead the readers about the negative impacts of the methods. The authors should discuss how this method can break the existing protective perturbation. It would be appreciated if the authors can discuss potential solutions toward better copyright protection via protective perturbation or other alternatives.

---

confidence: 3
contribution: 3
initial_rating: 8
presentation: 3
questions: Please help to check weaknesses.
soundness: 3
strengths: - This paper finds that adversarial perturbation leads to latent image-text mismatch and provides an explanation from the perspective of shortcut learning. Their analysis contributes to the further development of protective perturbation in personalized diffusion models.
  
- The proposed framework provides a system-level defense covering data purification, model training, and sampling strategy. Compared with previous data transformation and diffusion-based methods, the proposed method achieves the best semantic and image quality restoration.
summary: This paper uncovers and validates the underlying mechanism by which adversarial perturbations disturb the fine-tuning of personalized diffusion models by latent-space image-text misalignment. Then, it introduces a systematic defense framework that mitigates the misalignment with data purification and contrastive decoupled learning and sampling.
weaknesses: - In Table I, the authors would better add a setting that the clean images are processed by the proposed and baseline methods.
  
- In Table II, why only calculate the time for data purification? Will CDL incur additional time costs?

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: I am wondering if the noisy images generated by DM without any defense can be denoised?
soundness: 3
strengths: 1. The observation that adversarial perturbations induce a latent-space misalignment between images and their text prompts in the CLIP embedding space is interesting and insightful.

2. The paper is well-organized and easy-to-follow.

3. The paper conducts an extensive array of experiments and also considers adaptive perturbation.
summary: The paper conduct a comprehensive analysis to show that perturbations induce a latent-space misalignment between images and their text prompts in the CLIP embedding space, which leads to association between the noise patterns and the identifiers. Based on this observation, the paper introduces contrastive decoupling learning with noise tokens to decouple the learning of personalized concepts from spurious noise patterns.
weaknesses: 1. The paper does not provide strong theoretical analysis to support the conclusions.

2. The technical contribution is a little limited since Decoupled Contrastive Learning is not a new technique proposed by the paper.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 1
questions: See weakness
soundness: 2
strengths: The paper provides preliminary experiments on CLIP, which help demonstrate the authors' ideas.
Personalized diffusion models present an interesting area for further exploration.
summary: This paper proposes viewing the fine-tuning process of Personalized Diffusion Models (PDMs) through the lens of shortcut learning, using causal analysis as motivation. The authors then introduce a defense framework designed to enable the model to correctly associate images with their original semantic meanings.
weaknesses: 1. The paper lacks overall coherence, with some sections difficult to follow and, in some cases, contradictory. Additionally, several terms and graphs are missing clear definitions and explanations.

    1. Are "adversarial perturbations" and "protective perturbations" intended to be the same concept? The author seems to use these terms interchangeably; if they differ, please clarify each term carefully.
    2. In the introduction, the author presents multiple related works. It may be helpful to focus on those most relevant to the paper’s main motivation. Additionally, certain terms, such as "purification studies," would benefit from brief explanations—similar to the way "image purifications" is introduced on line 142.
    3. Several equations need further explanation, such as those on lines 178-179, regarding the function of an instance dataset and a class dataset. Additionally, the meaning of "r" on line 208 is unclear.

2.After reading the entire paper, I found it challenging to identify the specific question the author aims to address and the associated motivations. While the introduction attempts to outline these points, it is difficult to discern the relationship between the motivation and the problem being addressed. Additionally, there appears to be a disconnect between the problem definition in the introduction and the methods presented. Here are some specific suggestions for clarification:

    1. The introduction states, “The model trained on perturbed data will generate images that are poor in quality, and thus, unauthorized fine-tuning fails.” Does this imply that generating low-quality images of private content protects copyright and privacy? If so, why does the proposed method focus on enhancing image clarity for private content while defining it as a defense?
    2.The author mentions that shortcuts are key to avoiding the generation of private personal images. Given this, why does the method seem to eliminate these shortcuts?
    3.On line 46, adversarial perturbations are suggested as a means to protect users’ images from unauthorized personalized synthesis. However, line 100 describes an intention to "defend against" this. Could you clarify?
    4.Additionally, the highlighted question in the introduction, “How to design an effective, efficient, and faithful purification approach is still an open question,” lacks context. Although there is a mention of “Moreover, purification studies are also purposed to further break those protections” in the following sentence, there are no subsequent explanations, particularly concerning how this question connects with the paragraph's earlier discussion.
    5. In the end of introduction, it seems that the authors propose a new purify methods, "Our approach conducts comprehensive purification from three perspectives, including input image purification, contrastive decoupling learning with the negative token, and quality-enhanced sampling....". However, in the methods, the author says they propose a method to address the short cut learning...., which is a little bit confusing.

3. Minor: Although viewing fine-tuning from a causal effect and shortcut learning perspective is novel, it shares similarities with backdoor attacks. In the backdoor attack literature, several papers have employed causal graphs to analyze shortcut mechanisms.[1-3]

4. The causal graph is underexplained and possibly contains ambiguities. For example, the definitions of $\bar{C}$ and $\bar{x_o}$ are missing. While a brief introduction to the construction of the graph is provided, explanations of each node’s meaning and the meaning of the arrows are absent. Given that the causal graph is a key contribution, adding a paragraph to introduce and explain it in detail would be beneficial. The term "spurious path" may also be misapplied; in causal inference, this usually refers to a backdoor path between treatment and outcome. Since this doesn’t apply here, either avoid the term or define it within the paper’s context.

5. The causal graph may need structural revision. In causal inference, an arrow between A and B signifies that A causes B. However, in this graph, it seems that an arrow signifies containment rather than causation. I would suggest adhering closely to causal inference conventions and adjusting the graph accordingly.

[1]Zhang Z, Liu Q, Wang Z, et al. Backdoor defense via deconfounded representation learning[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2023: 12228-12238.

[2]Liu Y, Xu X, Hou Z, et al. Causality Based Front-door Defense Against Backdoor Attack on Language Models[C]//Forty-first International Conference on Machine Learning.

[3]Hu M, Guan Z, Zhou Z, et al. Causality-Based Black-Box Backdoor Detection[J].

Meta-review: The paper proposes  a view for the fine-tuning process of Personalized Diffusion Models (PDMs) as shortcut learning, motivated by causal analysis. The authors introduce a defense framework to help the model correctly associate images with their original semantic meanings.

Strength:
1. The paper studies why protective noise works in T2I models.

2. The paper conducts an extensive array of experiments and also considers adaptive perturbation.

Weaknesses:

The authors and reviewers discuss about the causal analysis in this paper and even the authors agree that their causal analysis is not strict. I think this greatly weaken this paper bacuase of the following reasons, 1. short-cut analysis are not a newly proposed term in unlearnable exmaple, and classification also has "class-image feature misalignment". Due to this reason, I believe the authors need to add some new insights to make this paper stand out, like causal analysis. Therefore, their causal analysis should not be just drawing some causal graphs. 2. In the paper's contribution, the causal analysis also mentioned a lot by the authors. Therefore, I think the authors should do in-depth analysis to demonstrate their analysis are correct.

Therefore, I think this paper still need a lot modifications before the acceptance.

Decision: Reject