An Efficient Framework for Crediting Data Contributors of Diffusion Models

## Abstract

Abstract As diffusion models are deployed in real-world settings, data attribution is needed to ensure fair acknowledgment for contributors of high-quality training data and to identify sources of harmful content. Previous work focuses on identifying individual training samples important for the generation of a given image. However, instead of focusing on a given generated image, some use cases require understanding global properties of the distribution learned by a diffusion model (e.g., demographic diversity). Furthermore, training data for diffusion models are often contributed in groups rather than separately (e.g., multiple artworks from the same artist). Hence, here we tackle the problem of attributing global properties of diffusion models to groups of training data. Specifically, we develop a method to efficiently estimate Shapley values by leveraging model pruning and fine-tuning. We empirically demonstrate the utility of our method with three use cases: (i) global image quality for a DDPM trained on a CIFAR dataset, (ii) demographic diversity for an LDM trained on CelebA-HQ, and (iii) overall aesthetic quality for a Stable Diffusion model LoRA-finetuned on Post-Impressionist artworks.

## 1 Introduction

Diffusion models have demonstrated impressive performance on image generation [, ], with models such as Dall$\cdot$E 2 [] and Stable Diffusion [] showing versatile utilities and enabling downstream applications via customization [, ]. The training data for diffusion models are often scraped from the internet [], raising concerns such as copyright attribution, harmful content generation [], and bias propagation []. Data attribution, which aims to trace machine learning model behaviors back to training data, has the potential to address these issues. Indeed, in the context of supervised learning, data attribution methods have already been used to valuate data [], identify adversarial samples [], and discover similar data points [].

Some recent work has developed data attribution methods for diffusion models [, , , ]. These methods focus on local properties related to the generation of a given image and aim to identify important individual training data. For example, Zheng et al. [] showcase their method D-TRAK to study the changes in pixel values of particular generated images and find influential training samples. However, some use cases require understanding data’s influence on global model properties, which are related to the overall generative distribution of a diffusion model. For example, the demographic diversity of generated images can be considered a global property [], and attributing this property to training data can help us identify pontential sources of social biases in diffusion models. Furthermore, data for training diffusion models are often contributed in groups instead of separately, with each group corresponding to an entity of ownership (e.g., artworks by an artist; or images portraying a public figure). Therefore, here we address the problem of attributing global properties of diffusion models to groups of training data.

While diffusion models are increasingly monetized and groups of data can often correspond to copyright ownerships [], attribution methods based on cooperative game theory are desirable because of their axiomatic justification. Particularly, the Shapley value provides a principled approach to fairly distribute monetary gains among contributors, since it is the unique notion that satisfies the four axioms for equitable valuation: linearity, dummy player, symmetry, and efficiency (see Section 3.1 for details) [, ]. Briefly, the Shapley value assesses each contributor based on the average gain incurred by adding the contributor to different contributor combinations. To estimate the Shapley values for data groups in our setting, we need to (i) retrain diffusion models on different subsets of groups; and (ii) measure global properties of the retrained models by running inference. However, training a diffusion model can take hundreds of GPU days, and inference can also be expensive (e.g., approximately 5 GPU days to generate 50,000 images for image quality metrics) []. Therefore, estimating Shapley values with vanilla retraining and inference is computationally impractical. Here, we propose to approximate retraining and retrained inference through model pruning and fine-tuning, thus enabling efficient Shapley value estimation (Figure 1).

Figure: Figure 1: Schematic overview of our proposed method, where $\theta^{*}$ denotes a trained diffusion model that we aim to understand, and $\tilde{\theta}^{*}$ denotes the pruned model that approximates $\theta^{*}$. After fine-tuning the pruned model on varying subsets of data groups, global model properties ($\mathcal{F}$) are measured on the fine-tuned models to estimate the Shapley value for each group of data.
Refer to caption: x1.png

Related work. The distinction between local and global model properties for supervised learning has been discussed in Covert et al. []. Here, this distinction is extended to generative models, where local properties correspond to a particular generated image, and global properties relate to the overall distribution learned by a generative model. The practical implications of group attribution have been discussed in the context of supervised learning [].

Data attribution methods for diffusion models have been developed by recent work. Some methods require the models that we aim to understand be trained with specialized paradigms. For example, to assess the importance for a training sample, Dai and Gifford [] first train an ensemble of diffusion models on data splits, followed by ablating models trained on splits containing the specific sample. Wang et al. [] evaluate data attribution for text-to-image models by customizing a pretrained model toward an exemplar style. In contrast, other methods can be applied to already trained models. For example, the TRAK framework has been adapted to find important training data for intermediate latents along a generative process [], while Zheng et al. [] introduce empirical approaches that improve the performance of TRAK for diffusion models. All these methods attribute local model properties to individual data points, whereas our work focuses on attributing global model properties to data groups.

Contributions. (1) To our knowledge, we are the first to investigate how groups of training data influence global properties of diffusion models. (2) We propose a method that efficiently estimates group-level Shapley values for attributing global model properties, leveraging model pruning and fine-tuning. (3) We empirically demonstrate that our method outperforms existing attribution methods across three datasets, model architectures, and global properties.

## 2 Preliminaries

This section provides an overview for diffusion models, global model property, group attribution, and existing attribution methods for diffusion models.

### 2.1 Diffusion Models

Our research primarily focuses on discrete-time diffusion models, specifically denoising diffusion probabilistic models (DDPMs) [] and latent diffusion models (LDMs) []. Generally, diffusion models are trained to approximate a data distribution $q({\mathbf{x}}_{0})$. To perform learning, a training sample ${\mathbf{x}}_{0}\sim q({\mathbf{x}}_{0})$ is sequentially corrupted by additive noise []. This procedure is called the forward process and is defined by $q({\mathbf{x}}_{t}|{\mathbf{x}}_{t-1}):=\mathcal{N}({\mathbf{x}}_{t};\sqrt{1-
\beta_{t}}{\mathbf{x}}_{t-1},\beta_{t}{\bm{I}})$, for $t=1,...,T$, where $\{\beta_{t}\}_{t=1}^{T}$ corresponds to a variance schedule. Notably, the forward process allows sampling of ${\mathbf{x}}_{t}$ at any time step $t$ from ${\mathbf{x}}_{0}$, with the closed form $q({\mathbf{x}}_{t}|{\mathbf{x}}_{0})=\mathcal{N}({\mathbf{x}}_{t};\sqrt{\bar{
\alpha}_{t}}{\mathbf{x}}_{0},(1-\bar{\alpha}_{t}){\bm{I}})$, where $\alpha_{t}:=1-\beta_{t}$ and $\bar{\alpha}_{t}:=\prod_{s=1}^{t}\alpha_{s}$. Then, a diffusion model learns to denoise ${\mathbf{x}}_{1:T}$, following the reverse process defined by $p_{\theta}({\mathbf{x}}_{t-1}|{\mathbf{x}}_{t}):=\mathcal{N}({\mathbf{x}}_{t-1
};\mu_{\theta}({\mathbf{x}}_{t},t),\sigma_{t}^{2}{\bm{I}})$, where $\theta\in\mathbb{R}^{d}$ is the model parameters, and $\sigma_{t}$ corresponds to some sampling schedule  []. Instead of modeling the conditional means $\mu_{\theta}$, it is standard to predict the added noises with a neural network $\epsilon_{\theta}$ using the reparameterization trick. The training objective corresponds to a variational bound and is formulated as

$$ $\mathcal{L}_{\text{Simple}}=\mathbb{E}_{t,\epsilon}\left[\|\epsilon-\epsilon_{ \theta}(\sqrt{\bar{\alpha}_{t}}x+\sqrt{(1-\bar{\alpha}_{t})}\epsilon,t)\|^{2}_ {2}\right]$ (1) $$

Once a diffusion model has been trained, a new image can be generated by sampling an initial noise ${\mathbf{x}}_{T}\sim\mathcal{N}(\mathbf{0},{\bm{I}})$ and iteratively applying $\epsilon_{\theta}$ at each step $t=T,...,1$ for denoising. In practice, the denoising process has various design choices, such as the number of inference time steps and output scaling [, , ]. Building upon diffusion models, LDMs [] perform the stochastic process in the latent space of a pretrained encoder network. Additionally, it has been shown that one can condition diffusion models on additional information, such as a text prompt, allowing for explicit control over the semantics of the generated images through textual guidance [].

### 2.2 Global Model Behavior

To gain a comprehensive understanding of machine learning models, it is often beneficial to study global model properties [], which assess the model’s performance across samples, rather than focusing on individual outputs. For example, in the setting of supervised learning, global model property can be test accuracy. In the context of generative models, it can be a quality metric for generated samples. For example, in image generation, the global model property of interest can the Inception Score [] or FID []. More formally, a global model property for generative models is defined by any user-specified function $\mathcal{F}:\Theta\rightarrow\mathbb{R}$, which maps a generative model to a scalar value, thereby quantifying the overall distribution learned by the model.

Building on this, we introduce the problem of group attribution for global model properties. Similar to individual data attribution for local model properties [, , ], the goal of group attribution is to identify important groups of training data for a model’s global properties. Formally, we have the following definition.

###### Definition 1

Consider $n$ groups of training samples $\mathcal{D}=\cup\{\mathcal{D}_{i}\}_{i=1}^{n}$ and a global model output function $\mathcal{F}$. A group attribution method is a function $\tau(\theta,\mathcal{F},\{\mathcal{D}_{i}\}_{i=1}^{n})$ that, given a model $\theta$, assigns a score to each training group $\mathcal{D}_{i}$ to indicate its importance to the global model output $\mathcal{F}$.

###### Definition 1

### 2.3 Attribution Methods for Diffusion Models

In the context of diffusion models, recent works have largely focused on local data attribution using TRAK [], such as D-TRAK [] and Journey-TRAK []. Generally, given a loss function $\mathcal{L}$ and models $\{\theta^{*}_{s}\}_{s=1}^{S}$ trained on $S$ data subsets, TRAK is defined as below:

$$ $\frac{1}{S}\sum_{s=1}^{S}\phi^{s}(x)^{\mathsf{T}}\cdot\left({\Phi_{\text{TRAK} }^{s}}^{\mathsf{T}}\cdot\Phi_{\text{TRAK}}^{s}+\lambda I\right)^{-1}{\Phi_{ \text{TRAK}}^{s}}^{\mathsf{T}}$ (2) $$

$$ $\displaystyle{\Phi_{\text{TRAK}}^{s}}=\left[\phi^{s}(x^{1}),\ldots,\phi^{s}(x^ {n})\right]^{\mathsf{T}}\text{ , where }\phi^{s}(x)=\mathcal{P}^{\mathsf{T}}_{ s}\nabla_{\theta}\mathcal{L}(x,\theta_{s}^{*})$ (3) $$

where $\mathcal{P}_{s}$ is a random projection matrix. Building on this framework, Journey-TRAK [] attributes training data not only for the final sample $x$ but also for the noisy samples along the denoising process. Intriguingly, Zheng et al. [] discover that replacing the loss function $\mathcal{L}_{\text{Simple}}$ with alternative functions results in superior performance.

While TRAK-based approaches for diffusion models are considered computationally efficient, they have several limitations. One key drawback is that their model property is confined to variants of the diffusion loss [, ], which can restrict their broader application. For example, some global model properties such as the distribution of cluster assignments [] are not differentiable, making the gradient computations in TRAK infeasible. This highlights the need for developing another approach that can handle attribution for global model properties.

## 3 Group Attribution in Diffusion Models with the Shapley Value

In this section, we review the Shapley value and propose an efficient method to estimate Shapley values for diffusion models through model pruning and fine-tuning.

### 3.1 Shapley Attribution

The Shapley value was developed in cooperative game theory to fairly attribute credits in coalition games []. More formally in the context of group attribution, for training data with $n$ groups, the Shapley value for a data group $\mathcal{D}_{i}$ is defined as:

$$ $\beta_{i}:=\frac{1}{n}\sum_{S\subseteq D\setminus\{\mathcal{D}_{i}\}}{\binom{n -1}{|S|}}^{-1}(\mathcal{F}(\theta_{S\cup\{\mathcal{D}_{i}\}})-\mathcal{F}( \theta_{S}))$ (4) $$

where $S$ is a subset of training data groups $\{\mathcal{D}_{1},\cdots,\mathcal{D}_{n}\}$ and $\mathcal{F}(\theta_{S})$ is the model property of a diffusion model trained on $S$.
Shapley value assesses each group’s contribution based on the weighted marginal contribution, $\mathcal{F}(\theta_{S\cup\{\mathcal{D}_{i}\}})-\mathcal{F}(\theta_{S})$. It satisfies axioms desirable for equitable attribution, including linearity, dummy player, symmetry, and efficiency []. There are arguments that the efficiency axiom, $\sum_{i=1}^{n}{\beta_{i}}=\mathcal{F}(\theta^{*})-\mathcal{F}(\theta_{
\emptyset})$, where $\theta^{*}$ denotes the model trained on the entire dataset, may not always be essential in use cases where the primary goal is to remove detrimental data points []. In this setting, ranking is more important than exact importance values for removing such data points. However, in the context of generative models, particularly in applications involving monetary or credit allocation of some meaningful global model behavior measures, ensuring that the aggregate attribution of the data matches the total utility is crucial.

Despite its advantages, evaluating the Shapley value is challenging as it involves training $2^{n}$ (all possible subsets) models and computing their corresponding model behavior. Fortunately, many sampling-based estimators for Shapley values have been developed [, , ]. In particular, we can adopt KernelSHAP in the feature attribution literature for data attribution as an alternative by solving a weighted least squares problem with sampling [, ]:

$$ $\hat{\beta}=\min_{\beta_{0},\ldots,\beta_{n}}\frac{1}{M}\sum_{i=1}^{M}\left( \mathcal{F}(\theta_{0})+\mathbf{1}_{S_{i}}^{\mathsf{T}}\beta-\mathcal{F}( \theta_{S_{i}})\right)^{2}\quad\text{s.t.}\quad\mathbf{1}^{\mathsf{T}}\beta= \mathcal{F}(\theta^{*})-\mathcal{F}(\theta_{0})$ (5) $$

where $S_{i}$ is sampled following the distribution $\mu_{Sh}(S)\propto\frac{n-1}{\binom{n}{|S|}|S|(n-|S|)}$ for $1<\mathbf{1}_{S_{i}}^{\mathsf{T}}\beta<n$; $\mathbf{1}_{S_{i}}$ is an indicator vector representing the presence of data group in $S_{i}$; and $\theta_{\emptyset}$ is a randomly initialized model without training. By solving the least squares problem with the constraint via KKT conditions, a closed-form solution can be derived [].
The obtained parameters $\hat{\beta}$ are the attribution scores.

### 3.2 Speed Retraining and Inference with Sparsified Fine-Tuning

While Equation (5) effectively reduces the number of diffusion models needed for Shapley value estimation, obtaining an adequate number of retrained models $\theta_{S_{i}}$ remains a challenge. The retraining time for models scales linearly with the number of sampled subsets, $S_{i}$, and the training duration for each diffusion model can be as large as hundred of GPU days []. To further decrease the computational burden needed to obtain $\theta_{S_{i}}$, we propose a novel yet simple technique: removal through sparsified fine-tuning (Figure 1).

Specifically, our approach aims to approximate a model retrained with a subset $S_{i}$ by fine-tuning the model $\theta^{*}$ on the subset $S_{i}$ but with only a update steps. We also combine fine-tuning with model pruning using the prune first, then unlearn paradigm [], leveraging model sparsity to make a more efficient approximation to retraining. We first perform pruning on $\theta^{*}$ and initially fine-tune it with $\mathcal{D}$ to obtain a performant pruned model, $\tilde{\theta}^{*}$. Second, to obtain $\tilde{\theta}_{S_{i}}$, we apply fine-tuning [, ] on the subset $S_{i}$ with the original diffusion loss, $\mathcal{L_{\text{Simple}}}$ [].

$$ $\tilde{\theta}_{S_{i}}=\text{argmin}_{\theta}\mathcal{L}(\tilde{\theta}^{*},S_ {i})\quad s.t.\quad\mathcal{F}(\tilde{\theta}_{S_{i}})\textit{ (fine-tuning)} \approx\mathcal{F}(\theta_{S_{i}})\textit{ (retraining from scratch)}$ (6) $$

By replacing $\theta_{S_{i}}$ with $\tilde{\theta}_{S_{i}}$ through the combined process of pruning and fine-tuning, we can drastically reduce the computational cost for obtaining $\tilde{\theta}_{S_{i}}$ and $\mathcal{F}(\tilde{\theta}_{S_{i}})$, expediting the removal-based attribution process of the Shapley value. In other words, under the same computational budget, compared to retaining, our proposed approach significantly increases the number of sampled $S_{i}$ for estimating Eq. 5, thereby making the Shapley value feasible and practical for diffusion models.

## 4 Experiments

In this section, we compare our approach with existing attribution methods across various settings. We employ two primary metrics for evaluation: LDS and counterfactual analysis. Our findings demonstrate that our method significantly outperforms existing techniques in terms of efficacy.

### 4.1 Datasets

Datasets used for our experiments include CIFAR-20 (a subset of CIFAR-100), with 20 classes considered as groups for attribution; CelebA-HQ, with 50 celebrity identities considered as groups for attribution; and ArtBench (Post-Impressionism), with 258 artists considered as groups for attribution. More details about datasets can be found in Appendix A.

### 4.2 Setup for diffusion models

Model training. For CIFAR, we follow the original implementation of the unconditional DDPMs [] where the model has 35.7M parameters (i.e., $d=35.7\times 10^{6}\text{ for }\theta\in\mathbf{R}^{d})$. For CelebA-HQ, we follow the implementation of LDM [] with 274M parameters and a pre-trained VQ-VAE[]. For both datasets, the maximum timestep is set to $T=1000$ during training, with a linear variance schedule for the forward diffusion process ranging from $\beta_{1}=10^{-4}$ to $\beta_{T}=0.02$. We use the Adam optimizer [] and apply random horizontal flipping for data augmentation. Both the DDPM and LDM are trained for 20,000 steps with a batch size of 64 and a learning rate of $10^{-4}$. During inference, images are generated using the 100-step DDIM solver []. For ArtBench (Post-Impressionism), the Stable Diffusion model [] is fine-tuned using LoRA [] with rank $=$ 256, corresponding to 5.1M LoRA parameters. The prompt is set to “a Post-Impressionist painting"" for each image. The model is trained using the AdamW optimizer [] with a weight decay of $10^{-6}$, for 200 epochs and a batch size of 64. Cosine learning rate annealing is used, with 500 warm-up steps and an initial learning rate of $3\times 10^{-4}$. At inference time, images are generated using the PNDM scheduler with 100 steps [].

Setup for pruning and fine-tuning. Magnitude-based pruning [] is used remove model weights according to their magnitudes, resulting in sparse diffusion models with reduced parameters: from 35.7M to 19.8M for CIFAR-20 at a pruning ratio of 0.3, from 274M to 70.9M for CelebA-HQ at a ratio of 0.5, and from 5.1M to 2.6M for ArtBench (Post-Impressionism). To estimate Shapley values, the sparsified models are fine-tuned on subsets of data groups with 1,000 steps for CIFAR-20, 500 steps for CelebA-HQ, and 200 steps for ArtBench (Post-Impressionism).

Global model properties. For CIFAR-20, we aim to study which image classes contribute to overall image quality. Therefore, 10,240 samples are generated to compute the Inception Score (IS)(^1^11[https://github.com/sbarratt/inception-score-pytorch](https://github.com/sbarratt/inception-score-pytorch))[], defined as:

$$ $\text{IS}=\exp\left(\mathbb{E}_{x}[\text{KL}(p(y|x)\|p(y))]\right)$ (7) $$

where $p(y)$ represents the marginal class distribution over the generated data and $p(y|x)$ represents the conditional class distribution given a generated image $x$.

For CelebA-HQ, our goal is to investigate which celebrities contribute to demographic diversity. First, we generate 1,024 samples from the model trained using the full dataset. Following [], we apply BLIP-VQA(^2^22[https://huggingface.co/Salesforce/blip-vqa-base](https://huggingface.co/Salesforce/blip-vqa-base))[] to extract image embeddings, which are then clustered into 20 distinct groups using the Ward linkage criterion [], representing groups with demographic characteristics. Subsequently, for models trained on different subsets of celebrities, we also generate 1,024 samples, cluster them into those 20 clusters, and compute the entropy as a diversity measure:

$$ $\mathcal{H}=-\sum_{i=1}^{n}p_{i}\log(p_{i})$ (8) $$

where $p_{i}$ is the proportion of samples in the $i$-th cluster.

For ArtBench (Post-Impressionism), we consider the use case where images are generated and the most aesthetically pleasing ones are kept. We simulate this use case by computing aesthetic scores(^3^33[https://github.com/LAION-AI/aesthetic-predictor](https://github.com/LAION-AI/aesthetic-predictor)) for 50 generated images and considering the 90th percentile as the global model property.

### 4.3 Evaluating Group Attribution

Linear datamodeling score (LDS).
From definition 1, for a given subset $S\subset\mathcal{D}$, we can define an additive model of global properties based on group attribution as follow:

$$ $g(S,\tau):=\sum_{i:\mathcal{D}_{i}\in S}\tau_{i}$ (9) $$

Therefore, the evaluation for an attribution method $\tau$ can be constructed as follows:

###### Definition 2

(Linear Datamodeling Score) Group attribution performance is measured using the linear datamodeling score (LDS) [], which evaluates an attribution method by comparing linearly predicted model behaviors against actual retrained model behaviors. Let $S_{1},\ldots,S_{K}$ be $K$ randomly sampled subsets of the training set, each of size $\alpha\cdot n$ for some $\alpha\in(0,1)$. The LDS for a group attribution score $\tau\in{\mathbb{R}}^{n}$ is defined as

$$ $LDS:=\rho\left(\{\mathcal{F}(\theta_{S_{j}})\}_{j=1}^{K},\{g_{\tau}(S_{j},\tau )\}_{j=1}^{K}\right),\text{ where }S_{j}\sim\text{Uniform}\{S\subset\mathcal{D }:|S|=\alpha\cdot n\}.$ (10) $$

where $\rho$ is the Spearman rank correlation  [], and $\theta_{S_{j}}$ denotes a model retrained from scratch with the group subset $S_{j}$.

We evaluate the LDS using 100 held-out subsets $S_{j}$, each sampled from the datamodel distribution with $\alpha=0.25,0.5,0.75$ for each dataset, and calculate the corresponding global model behavior. We report the mean and the 95% confidence interval of the LDS scores across these experiments. We compared methods whtin three categories including similarity-based (baselines), TRAK-based (TRAKs), and our Shapley-based approach. More details about baseline methods(^4^44TracIn is not considered because intermediate model checkpoints may not always be available in practice.) can be found in Appendix C.1.

For TRAK-based methods and gradient similarity, we compute gradients and kernel2 using the final model checkpoint, meaning that $S=1$ in Eq (2). In TRAK-based approaches, we select 100 timesteps evenly spaced within the interval $[1,T]$. For instance, for 100 timesteps, the selected timesteps are $\{1,11,21,\ldots,991\}$. At each timestep, we introduce one standard Gaussian noise. The projection dimensions are set at $k=4096$ for CIFAR-20 and $k=32768$ for CelebA and ArtBench. For D-TRAK, we adopt the best-performing model output function $\nabla_{\theta}\mathcal{L}_{\text{Square}}$ and choose $\lambda=5e^{-1}$ as in [].

Counterfactual Evaluation. Following [], we also apply the counterfactual evaluation []. We assess the change in model behavior, $\Delta\mathcal{F}=\frac{\mathcal{F}(\theta^{*}_{k})-\mathcal{F}(\theta^{*})}{
\mathcal{F}(\theta^{*})}$, by comparing the models trained before and after excluding the highest-ranked positive influential groups identified by different attribution methods. For this evaluation, we only choose the best-performing methods within baselines and TRAKs and perform top 40% removal. For CIFAR-20 and CelebA-HQ, models are retrained without the top influential groups with 10 random initializations. For ArtBench (Post-Impression), 5 models are retrained with different initializations.

###### Definition 2

### 4.4 Experiment Results

#### Shapley Attribution Outperforms TRAKs in Global Model Behavior

In Table 1, we present the LDS scores for baselines, TRAKs, and our method. Interestingly, similarity-based methods such as raw pixel, CLIP score, and gradient (without kernel) occasionally outperform TRAKs. We observe that TRAKs sometimes yield poor or even negative correlations when the model behavior $\mathcal{F}$ is not directly linked to $\nabla_{\theta}\mathcal{L}$. Among TRAK-based approaches, attributing training samples using noisy latent (Journey-TRAK) during generation can result in an reverse attribution score in model behavior such as inception score and aesthetic score. Our findings suggest that when model behavior is not easily differentiable, using diffusion loss and its alternative functions, e.g. $\mathcal{L}_{\text{Square}}$, can lead to poor correlations and even result in reverse attribution.

On the other hand, our approach calculates group attributions using Shapley value with Equation 4 for each training sample, achieving the highest LDS scores of 61.48%, 26.34% , and 61.44% for CIFAR-20, CelebA-HQ, and ArtBench, respectively. This shows that attributing training samples based on their marginal contribution with respect to $\mathcal{F}$ provides the most accurate importance score. For, CelebA-HQ, the overall lower LDS scores are expected due to the relatively small differences in the diversity score (entropy), suggesting that more instances may be needed to accurately compute Shapley values.

We compare the performance of attribution methods across varying subset sizes ($\alpha=0.25,0.5,0.75$) in Appendix D. Although our approach consistently outperforms others, its performance decreases when the number of samples in $S$ is small ($\alpha=0.25$). This suggests that when training with very few data points (groups), the model may demonstrate different model behavior [], or there could be non-linear interactions affecting attribution scores.

**Table 1: LDS (%) results with $\alpha=0.5$. Means and 95% confidence intervals across three random initializations are reported.**
| Method | CIFAR-20 | CelebA-HQ | ArtBench<br>(Post-Impressionism) |
| --- | --- | --- | --- |
| Pixel similarity (average) | -11.81 $\pm$ 4.56 | -8.91 $\pm$ 0.93 | 11.24 $\pm$ 0.63 |
| Pixel similarity (max) | -31.80 $\pm$ 2.90 | 21.70 $\pm$ 2.05 | 14.61 $\pm$ 2.72 |
| Embedding dist. (average) | - | 13.83 $\pm$ 1.12 | - |
| Embedding dist. (max) | - | 7.32 $\pm$ 3.16 | - |
| CLIP similarity (average) | 5.79 $\pm$ 3.67 | -32.23 $\pm$ 0.87 | -6.96 $\pm$ 4.08 |
| CLIP similarity (max) | 11.31 $\pm$ 0.37 | -0.93 $\pm$ 3.83 | -1.75 $\pm$ 4.07 |
| Gradient similarity (average) | 5.79 $\pm$ 3.67 | 25.93 $\pm$ 2.94 | 0.25 $\pm$ 1.18 |
| Gradient similarity (max) | -0.89 $\pm$ 3.17 | 15.88 $\pm$ 5.98 | 10.48 $\pm$ 3.11 |
| Aesthetic score (average) | - | - | 24.85 $\pm$ 2.30 |
| Aesthetic score (max) | - | - | 21.36 $\pm$ 3.70 |
| Relative IF | 5.23 $\pm$ 5.50 | 12.65 $\pm$ 3.43 | -5.02 $\pm$ 1.77 |
| Renormalized IF | 11.39 $\pm$ 6.79 | 9.22 $\pm$ 3.59 | -11.41 $\pm$ 0.93 |
| TRAK | 7.94 $\pm$ 5.67 | 9.85 $\pm$ 3.62 | -8.18 $\pm$ 1.30 |
| Journey-TRAK | -42.92 $\pm$ 2.15 | 0.80 $\pm$ 4.98 | -11.41 $\pm$ 4.22 |
| D-TRAK | 10.90$\pm$ 1.21 | -18.83 $\pm$ 2.12 | 11.30 $\pm$ 3.47 |
| Sparsified-FT Shapley (Ours) | 61.48 $\pm$ 2.27 | 26.34 $\pm$ 3.42 | 61.44 $\pm$ 2.04 |

#### Enhancing Fine-Tuning Efficiency Through Sparsification

Our sparsified fine-tuning approach significantly reduces the time required to compute $\theta_{S_{i}}$ compared to retraining, it is $5.3$ and $10.4$ times faster for CIFAR-20 and CelebA-HQ, respectively (Table 2). By enabling faster computation and obtaining more subset models, $\tilde{\theta}_{S_{i}}$, sparsified fine-tuning further enhances LDS. As shown in Figure 2, under the same computational budgets, sparsified fine-tuning yields the best LDS.

Figure: (a) CIFAR-20
Refer to caption: x2.png

Figure: Figure 3: Relative percentage changes in global model properties, comparing the original fully trained models and models trained with the top 40% most important groups removed based on different attribution methods.
Refer to caption: x5.png

#### Counterfactaul Evaluation

To further evaluate the attribution methods, we analyzed model behavior changes after removing the top influencers identified by each method. In the CIFAR-20 dataset, our approach showed changes of -23.44%, compared to -15.12% for CLIP similarity and -8.62% for D-TRAK, as shown in Figure 4 (Top). For CelebA-HQ, the changes were -7.92% for our method, -7.29% for gradient similarity, and +2.55% for relative IF. Additionally, we compared generated samples across retrained models for each method (Figure 4 and Figure 5). As shown in Figure 4, we visually note that for TRAK and CLIP score, automobiles are retrained, whereas our approach removes automobiles, suggesting that automobiles may have a significant impact on the Inception Score.

Figure: (a) Sparsified-FT Shapley
Refer to caption: extracted/5654816/images/exp_results/gd.png

Figure: Figure 5: Two generated images above and two generated images below the 90th percentile of aesthetic scores, for Stable Diffusion models LoRA-finetuned without the top 40% most important artists based on D-TRAK, pixel similarity (max), training image aesthetic score (average), and sparsified-FT Shapley.
Refer to caption: x6.png

## 5 Discussion

In this work, we introduce the problem of attributing global model properties to groups of training data in the context of diffusion models. We develop an efficient method to estimate group-level Shapley values, leveraging model pruning and fine-tuning to speed up retraining and inference runtime compared to naive retraining. Empirical results across multiple datasets and global model properties demonstrate that our method outperforms existing attribution methods for diffusion models. There are several directions for future work. First, beyond fine-tuning, the field of machine unlearning offers other methods such as gradient ascent and influence unlearning to approximate exact retraining [, , ]. There are also recent unlearning methods tailored for diffusion models [, ]. Exploring the design space of combining these methods with various pruning strategies [, , ] can be fruitful. Second, it can be useful to allocate group-level importance to individual data points within each group, providing two-level attributions. The Owen value, which modifies the Shapley value, is well suited for this scenario []. Finally, our method and existing attribution methods for diffusion models assume access to training data and model parameters, which are not necessarily available for deployed models. For vision-to-image models, membership inference and in-context learning may be useful in addressing this issue [, ].

## Appendix

## Appendix A Datasets

CIFAR ($\bf{32\times 32}$). The CIFAR-100 dataset(^5^55[https://www.cs.toronto.edu/~kriz/cifar.html](https://www.cs.toronto.edu/~kriz/cifar.html))[] contains 50,000 training samples. To reduce computation, we also construct a CIFAR-20 dataset as a subset of CIFAR-100, which consists of 10,000 training samples randomly sampled from CIFAR-100’s training samples corresponding to the "large carnivores", "large omnivores and herbivores", "medium mammals", and "vehicles 1" classes.

CelebA-HQ ($\bf{256\times 256}$). The original CelebA-HQ dataset [] comprises 30,000 face images with 6,217 unique identities.
We downloaded a preprocessed dataset with from [https://github.com/ndb796/LatentHSJA](https://github.com/ndb796/LatentHSJA), which contain 5,478 images from 307 identities, each with 15 or more images. For our experiment, we randomly sample 50 identities, totaling 895 images. Also, to match the input dimension required by the latent diffusion model implementation, we resize the original images from a resolution of $1024\times 1024$ to $256\times 256$.

ArtBench Post-Impressionism ($\bf{256\times 256}$). ArtBench-10 is a dataset for benchmarking artwork generation with 10 art styles, consisting of 5,000 training images per style []. For our experiments, we consider the 5,000 training images corresponding to the art style “post-impressionism" from 258 artists.

## Appendix B Additional Training Setup

For training diffusion models, we utilize NVIDIA GPUs: RTX 6000, A40, and A100, each equipped with 40GB, 40GB, and 24GB of memory respectively. This study employs the Diffusers library version 0.24.0 (^6^66[https://pypi.org/project/diffusers/](https://pypi.org/project/diffusers/)) to train various models across different datasets. Per-sample gradients are computed using the techniques outlined in the PyTorch library tutorial (version 2.2.1) (^7^77[https://pytorch.org/](https://pytorch.org/)). Furthermore, we apply the TRAK library(^8^88[https://trak.csail.mit.edu/quickstart](https://trak.csail.mit.edu/quickstart)) to project gradients with a random projection matrix, enhancing the efficiency of our computational methods. All experiments are conducted on systems equipped with 64 CPU cores and the specified NVIDIA GPUs.

For CelebA-HQ, we implement two techniques to reduce GPU memory usage during the training. First, we pre-compute the embedding of VQ-VAE module [] for all training samples beforehand, since the VQ-VAE module is kept frozen during the training. This approach allows us to avoid loading the VQ-VAE module into GPU memory during training. Second, we use the 8-bit Adam optimizer implemented in bitsandbytes python package [].

## Appendix C Local Data Attribution

To compute local data attribution, several approaches have been proposed [, , , , ]. These methods can be broadly categorized into two types: 1) retraining-based approaches, which involve the removal and retraining of data points, and 2) influence function-based approaches, which calculate the impact of individual data points on the model’s predictions.

Influence function (IF).[]. Influence function calculates the effect of infinitesimally up-weighting of a training sample $x^{n}\sim\mathcal{D}$ on the model output function $\mathcal{F}(x;\theta^{*})$, measured on a sample of interest $x$ by leveraging second-order approximation [, , ]. For a given model output $\mathcal{F}$, the data attribution score can be computed as

$$ $\tau_{IF}(x,\mathcal{D})_{n}=\nabla_{\theta}\mathcal{F}(x;\theta^{*})^{T}\cdot \mathcal{H}_{\theta^{*}}^{-1}\cdot\nabla_{\theta}\mathcal{L}(x_{n};\theta^{*}) \quad\text{for}\quad n\in[N],$ (11) $$

where $\mathcal{H}_{\theta^{*}}=\nabla_{\theta}^{2}\mathcal{L}(D;\theta^{*})$
is the Hessian matrix at the optimal parameters $\theta^{*}$. Since influence-based approaches only require only the loss gradients computed at the sample to be explained and at the training samples  [, ], it is sometimes more computationally efficient.

Removal by retraining. On the other hand, retraining-based approaches estimate the influence of a training sample $x$ by removing $x$ during the training procedure and assessing its marginal contribution [, , ]. The data attribution score is defined as

$$ $\tau_{R}(x,\mathcal{D})_{n}=\sum_{S\subseteq D\setminus\{i\}}\mu(S)\left( \mathcal{F}(x;\theta_{S\cup\{i\}})-\mathcal{F}(x;\theta_{S})\right)\quad\text{ for}\quad n\in[N],$ (12) $$

where $S$ is a training data subset sampled from a distribution $\mathcal{D}$ with training sample $x_{i}$ removed and $\mu(S)$ are the corresponding distribution, such as Shapley or datamodel distribution[, ]. While retraining approaches have demonstrated superior performance, acquiring retraining models for subsets $S$ is computationally expensive.

### C.1 Data Attribution Methods for Diffusion Models

Here we provide definition and implementation details of the baselines used in Section 4. For TRAK-based approaches, we follow the implementation in (^9^99[https://github.com/sail-sg/D-TRAK/](https://github.com/sail-sg/D-TRAK/)).

Raw Pixel Similarity. This is a simple baseline that uses the raw image as the representation and then computes the cosine similarity between the sample of interest and each training sample as the attribution score. in particular, for both CelebA-HQ and ArtBench, we use the embeddings encoded by a pretrained model (^10^1010[https://github.com/CompVis/latent-diffusion/tree/main](https://github.com/CompVis/latent-diffusion/tree/main))(^11^1111[https://huggingface.co/lambdalabs/miniSD-diffusers](https://huggingface.co/lambdalabs/miniSD-diffusers)) of the raw images.

Embeddings Distance. This method computes the $l_{2}$ distances between training sample embeddings, generated using BLIP-VQA(^12^1212[https://huggingface.co/Salesforce/blip-vqa-base](https://huggingface.co/Salesforce/blip-vqa-base)) [], and the average embedding of training samples to determine similarity.

CLIP Similarity. This method utilizes CLIP(^13^1313[https://github.com/openai/CLIP](https://github.com/openai/CLIP)) [] to encode each sample into an embedding and compute the cosine similarity with each training sample as its attribution score.

Gradient. This is a gradient-based influence estimator[] which computes the cosine similarity using the gradient representations of the sample and each training sample, as the attribution score

$$ $\displaystyle\tau(x,D)_{n}=\mathcal{P}^{\mathsf{T}}\nabla_{\theta}\mathcal{L}_ {\text{Simple}}(x;\theta^{*})^{\mathsf{T}}\cdot\mathcal{P}^{\mathsf{T}}\nabla_ {\theta}\mathcal{L}_{\text{Simple}}(x;\theta^{*})$ (13) $\displaystyle\tau(x,D)_{n}=\frac{\mathcal{P}^{\mathsf{T}}\nabla_{\theta} \mathcal{L}_{\text{Simple}}(x;\theta^{*})^{\mathsf{T}}\cdot\mathcal{P}^{ \mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{Simple}}(x;\theta^{*})}{\| \mathcal{P}^{\mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{Simple}}(x;\theta^{* })^{\mathsf{T}}\|\|\mathcal{P}^{\mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{ Simple}}(x;\theta^{*})\|}$ $$

TRAK. As discussed in Section 3, is defined as the following

$$ $\displaystyle{\Phi_{\text{TRAK}}^{s}}=\left[\phi^{s}(x^{1}),\ldots,\phi^{s}(x^ {n})\right]^{\mathsf{T}}\text{, where }\phi^{s}(x)=\mathcal{P}^{\mathsf{T}}_{s }\nabla_{\theta}\mathcal{L}_{\text{Simple}}(x,\theta_{s}^{*})$ (14) $\displaystyle\tau_{\text{TRAK}}(x,\mathcal{D})_{n}=\mathcal{P}^{\mathsf{T}}_{s }\nabla_{\theta}\mathcal{L}_{\text{Simple}}(x,\theta_{s}^{*})\cdot\left({\Phi_ {\text{TRAK}}^{s}}^{\mathsf{T}}\cdot\Phi_{\text{TRAK}^{s}}+\lambda I\right)^{- 1}\mathcal{P}^{\mathsf{T}}_{s}\cdot\nabla_{\theta}\mathcal{L}_{\text{Simple}}( x^{n},\theta_{s}^{*})$ $$

Relative Influence. Proposed by [], the $\theta$-relative influence functions estimator normalizes the [] influence functions estimator by HVP magnitude. Following [] we integrate this estimator with the TRAK methodology. The formulation is as follows:

$$ $\tau_{\text{TRAK}}(x,\mathcal{D})_{n}=\frac{\mathcal{P}^{\mathsf{T}}\nabla_{ \theta}\mathcal{L}_{\text{Simple}}(x,\theta^{*})\cdot\left({\Phi_{\text{TRAK}} }^{\mathsf{T}}\cdot\Phi_{\text{TRAK}}+\lambda I\right)^{-1}\cdot\mathcal{P}^{ \mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{Simple}}(x^{n},\theta^{*})}{\left \|\left({\Phi_{\text{TRAK}}}^{\mathsf{T}}\cdot\Phi_{\text{TRAK}}+\lambda I \right)^{-1}\cdot\mathcal{P}^{\mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{ Simple}}(x^{n};\theta^{*})\right\|}$ (15) $$

Renormalized Influence. Introduced by [], this method renormalizes the influence function by the magnitude of the training sample’s gradients. Similar to relative influence, we made an adoption following []. The method is calculated as follows:

$$ $\tau_{\text{TRAK}}(x,\mathcal{D})_{n}=\frac{\mathcal{P}^{\mathsf{T}}\nabla_{ \theta}\mathcal{L}_{\text{Simple}}(x,\theta^{*})\cdot\left({\Phi_{\text{TRAK}} }^{\mathsf{T}}\cdot\Phi_{\text{TRAK}}+\lambda I\right)^{-1}\cdot\mathcal{P}^{ \mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{Simple}}(x^{n},\theta^{*})}{\| \mathcal{P}^{\mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{Simple}}(x^{n}; \theta^{*})\|}$ (16) $$

Journey-TRAK. [] focuses on attributing noisy images $x_{t}$. We follow [] by averaging the attributions over the generation timesteps as follows

$$ $\displaystyle\tau_{\text{TRAK}}(x,\mathcal{D})_{n}=\frac{1}{T^{\prime}}\sum_{t =1}^{T^{\prime}}\mathcal{P}^{\mathsf{T}}\nabla_{\theta}\mathcal{L}_{\text{ Simple}}(x_{t},\theta^{*})\cdot\left({\Phi_{\text{TRAK}}}^{\mathsf{T}}\cdot \Phi_{\text{TRAK}}+\lambda I\right)^{-1}\cdot\mathcal{P}^{\mathsf{T}}\nabla_{ \theta}\mathcal{L}_{\text{Simple}}(x^{n},\theta^{*})$ (17) $$

TracIn  [, ], which attributes the training sample’s influence to first-order approximation with saved checkpoints during the training process. However, this is also a major limitation because sometimes it’s impossible to obtain checkpoints for models such as Stable Diffusion [].

## Appendix D Additional Experiment Results

In this section, we provide additional experiment results.

**Table 2: Average runtime in minutes (training $+$ inference) for Shapley values estimated with retraining, fine-tuning (FT), and sparsified FT.**
| Method | CIFAR-20 | CelebA-HQ | ArtBench (Post-Impressionism) |
| --- | --- | --- | --- |
| Retrain | 77.4 + 20.8 | 213.4 + 26.5 | 190.6 + 6.4 |
| FT | 6.06 + 18.9 | 17.5 + 27.0 | 4.4 + 6.4 |
| Sparsified FT | 4.37 + 14.0 | 11.0 + 11.9 | 4.5 + 6.1 |

### D.1 CIFAR-20

**Table 3: LDS ($\%$) results with $\alpha=0.25,0.5,0.75$ on CIFAR-20, with the Inception Score of 10,240 generated images as the global model property. Means and 95% confidence intervals across three random initializations are reported.**
| Method | $\alpha=0.25$ | $\alpha=0.5$ | $\alpha=0.75$ |
| --- | --- | --- | --- |
| Pixel similarity (average) | -10.88 $\pm$ 9.61 | -11.81 $\pm$ 4.56 | -20.82 $\pm$ 5.57 |
| Pixel similarity (max) | -17.42 $\pm$ 0.83 | -31.80 $\pm$ 2.90 | -23.88 $\pm$ 1.28 |
| CLIP similarity (average) | -0.34 $\pm$ 4.65 | -21.27 $\pm$ 1.37 | -13.13 $\pm$ 1.96 |
| CLIP similarity (max) | -1.19 $\pm$ 15.19 | 11.31 $\pm$ 0.37 | 16.05 $\pm$ 7.30 |
| Gradient similarity (average) | 6.48 $\pm$ 10.98 | 5.79 $\pm$ 3.67 | -10.75 $\pm$ 7.06 |
| Gradient similarity (max) | 7.22 $\pm$ 3.88 | -0.89 $\pm$ 3.17 | -4.82 $\pm$ 4.71 |
| Relative IF | 1.14 $\pm$ 13.51 | 5.23 $\pm$ 5.50 | 5.21 $\pm$ 3.78 |
| Renormalized IF | 9.09 $\pm$ 13.40 | 11.39 $\pm$ 6.79 | 7.99 $\pm$ 4.02 |
| TRAK | 3.62 $\pm$ 14.02 | 7.94 $\pm$ 5.67 | 6.59 $\pm$ 3.88 |
| Journey-TRAK | -30.09 $\pm$ 3.85 | -42.92 $\pm$ 2.15 | -40.43 $\pm$ 3.46 |
| D-TRAK | 21.02 $\pm$ 6.76 | 10.90 $\pm$ 1.21 | 21.90 $\pm$ 5.02 |
| Sparsified-FT Shapley (Ours) | 51.24 $\pm$ 3.39 | 61.48 $\pm$ 2.27 | 59.15 $\pm$ 4.24 |

**Table 4: LDS (%) results on Removal-Based Methods with different number of subset $S$.**
| $\alpha$ | Method | $S=100$ | $S=200$ | $S=300$ | $S=400$ | $S=500$ |
| --- | --- | --- | --- | --- | --- | --- |
| $0.25$ | Retraining | 43.88 (3.97) | 49.95 (3.20) | 57.56 (2.52) | 62.68 (1.85) | 65.90 (1.52) |
| Sparsified-FT | 8.46 (13.41) | 23.92 (6.27) | 33.88 (8.33) | 54.88 (7.44) | 51.24 (3.39) |  |
| FT | 13.57 (7.09) | 40.01 (8.30) | 28.94 (8.59) | 24.58 (6.07) | 20.57 (3.02) |  |
| $0.5$ | Retraining | 48.84 (2.00) | 39.55 (3.17) | 57.24 (2.69) | 66.81 (2.99) | 70.58 (2.05) |
| Sparsified-FT | -5.41 (4.78) | 38.00 (3.06) | 47.74 (1.49) | 63.62 (2.30) | 61.48 (2.27) |  |
| FT | 13.57 (7.09) | 40.01 (8.30) | 28.94 (8.59) | 24.58 (6.07) | 20.57 (3.02) |  |
| $0.75$ | Retraining | 51.39 (3.21) | 45.85 (3.99) | 61.91 (4.62) | 70.59 (3.13) | 72.07 (4.83) |
| Sparsified-FT | -11.44 (2.26) | 33.98 (0.98) | 48.16 (5.18) | 59.65 (5.34) | 59.15 (4.24) |  |
| FT | 33.90 (5.88) | 26.09 (8.55) | 45.49 (6.83) | 46.92 (5.96) | 38.51 (4.62) |  |

Figure: Figure 6: LDS (%) results on CIFAR-20 for Shapley values estimated with sparsified fine-tuning (FT), finet-tuning (FT), and retraining under the same computational budgets (1 unit = runtime to retrain and run inference on a full model).
Refer to caption: x7.png

Figure: (a) Sparsified-FT Shapley
Refer to caption: x8.png

### D.2 CelebA-HQ

**Table 5: LDS ($\%$) results with $\alpha=0.25,0.5,0.75$ on CelebA-HQ, with the cluster entropy of 1,024 generated images as the global model property. Means and 95% confidence intervals across three random initializations are reported.**
| Method | $\alpha=0.25$ | $\alpha=0.5$ | $\alpha=0.75$ |
| --- | --- | --- | --- |
| Pixel similarity (average) | $-1.52\pm 3.14$ | $-8.91\pm 0.93$ | $-4.19\pm 2.25$ |
| Pixel similarity (max) | $9.53\pm 6.35$ | $21.70\pm 2.05$ | $24.76\pm 0.96$ |
| Embedding dist. (average) | $3.59\pm 6.47$ | $13.83\pm 1.12$ | $10.89\pm 2.04$ |
| Embedding dist. (max) | $9.17\pm 2.12$ | $7.32\pm 3.16$ | $22.25\pm 1.87$ |
| CLIP similarity (average) | $-8.29\pm 4.38$ | $-32.23\pm 0.87$ | $-22.29\pm 2.56$ |
| CLIP similarity (max) | $-23.62\pm 3.51$ | $-0.93\pm 3.83$ | $-8.86\pm 2.16$ |
| Gradient similarity (average) | 28.04 $\pm$3.57 | 25.93 $\pm$ 2.94 | 29.23 $\pm$ 0.96 |
| Gradient similarity (max) | $9.61\pm 1.17$ | $11.15\pm 5.90$ | $18.70\pm 1.66$ |
| Relative IF | 19.07 $\pm$ 4.08 | 12.62 $\pm$ 3.43 | 13.72 $\pm$1.90 |
| Renormalized IF | $13.33\pm 3.33$ | $9.22\pm 3.59$ | $9.57\pm 1.92$ |
| TRAK | $16.73\pm 3.73$ | $9.85\pm 3.62$ | $10.50\pm 1.79$ |
| Journey-TRAK | $7.34\pm 0.27$ | $-8.00\pm 4.98$ | $-7.80\pm 1.53$ |
| D-TRAK | $-6.89\pm 6.01$ | $-18.83\pm 2.12$ | $-18.54\pm 0.78$ |
| Sparsified-FT Shapley (Ours) | 10.05 $\pm$ 5.33 | 26.34 $\pm$ 3.34 | 24.08 $\pm$ 1.52 |

**Table 6: LDS (%) results on Removal-Based Methods with different number of subsets $S$**
| $\alpha$ | Method | $S=100$ | $S=200$ | $S=300$ | $S=400$ | $S=500$ |
| --- | --- | --- | --- | --- | --- | --- |
| 0.25 | Retraining | 3.54 (0.59) | 8.91 (2.61) | 16.77 (4.75) | 15.58 (6.23) | 31.52 (5.56) |
| Sparsified - FT | 9.95 (5.77) | 15.93 (6.29) | 9.90 (8.17) | 16.12 (6.40) | 10.05 (5.33) |  |
| FT (500 steps) | -10.52 (4.26) | 2.77 (5.79) | 12.29 (4.50) | 9.86 (4.84) | 13.91 (3.91) |  |
| 0.5 | Retraining | 19.01 (1.60) | 28.43 (2.71) | 35.06 (3.48) | 23.48 (2.95) | 28.58 (3.91) |
| Sparsified - FT | 20.73 (2.89) | 26.83 (3.96) | 12.71 (2.06) | 27.23 (2.94) | 26.34 (3.42) |  |
| FT (500 steps) | 1.82 (3.36) | 9.25 (2.59) | 12.17 (2.83) | 8.63 (0.52) | 13.77 (1.42) |  |
| 0.75 | Retraining | 21.14 (0.93) | 26.29 (1.37) | 31.87 (2.85) | 31.60 (2.23) | 32.26 (2.08) |
| Sparsified - FT | 16.05 (0.31) | 29.35 (1.43) | 9.49 (2.03) | 17.70 (1.30) | 24.08 (1.52) |  |
| FT (500 steps) | -11.02 (1.51) | -12.07 (4.30) | 1.93 (4.82) | 0.96 (4.16) | 7.37 (3.79) |  |

Figure: Figure 8: LDS (%) results on CelebA-HQ for Shapley values estimated with sparsified fine-tuning (FT), fine-tuning (FT), and retraining under the same computational budgets (1 unit = runtime to retrain and run inference on a full model).
Refer to caption: x17.png

### D.3 ArtBench (Post-Impressionism)

**Table 7: LDS ($\%$) results with $\alpha=0.25,0.5,0.75$ on ArtBench (Post-Impressionism), with the 90th percentil of aesthetic scores for 50 generated images as the global model property. Means and 95% confidence intervals across three random initializations are reported.**
| Method | $\alpha=0.25$ | $\alpha=0.5$ | $\alpha=0.75$ |
| --- | --- | --- | --- |
| Pixel similarity (average) | 16.57 (3.16) | 11.24 (0.63) | -1.19 (5.71) |
| Pixel similarity (max) | 16.62 (2.95) | 14.61 (2.72) | 3.43 (10.57) |
| CLIP similarity (average) | -6.03 (1.61) | -6.96 (4.08) | -9.27 (2.74) |
| CLIP similarity (max) | 8.94 (0.43) | -1.75 (4.07) | -1.70 (9.89) |
| Grad similarity (average) | 4.14 (5.14) | 0.25 (1.18) | -7.81 (0.89) |
| Grad similarity (max) | 22.10 (9.02) | 10.48 (3.11) | 1.32 (4.19) |
| Aesthetic score (average) | 24.81 (3.00) | 24.85 (2.30) | 13.21 (7.82) |
| Aesthetic score (max) | 31.73 (3.04) | 21.36 (3.70) | 7.45 (11.66) |
| Relative IF | 3.30 (4.98) | -5.02 (1.77) | -3.77 (12.05) |
| Renormalized IF | -1.71 (4.37) | -11.41 (0.93) | -8.96 (12.86) |
| TRAK | -0.85 (4.74) | -8.18 (1.30) | -6.78 (13.37) |
| Journey-TRAK | -14.10 (5.09) | -11.41 (4.22) | -6.83 (2.80) |
| D-TRAK | 19.37 (3.29) | 11.30 (3.47) | 17.72 (6.87) |
| Sparsified-FT Shapley (Ours) | 52.83 (3.58) | 61.44 (2.04) | 32.24 (10.93) |

Figure: Figure 9: LDS (%) results with $\alpha=0.25,0.5,0.75$ on ArtBench (Post-Impressionism) for Shapley values estimated with sparsified fine-tuning (FT), fine-tuning (FT), and retraining under the same computational budgets (1 unit = runtime to retrain and run inference on a full model).
Refer to caption: x18.png

**Table 8: Aesthetic Score (90th percentile of 50 generated images) as the global model behavior. 100 datamodel subsets with alpha = 0.25, 0.5, 0.75 are used for evaluation. Means and 95% confidence intervals across three random initializations are reported. All Shapley values are estimated with 1,000 subsets.**
| $\alpha$ | Retrain | Sparsified - FT | FT |
| --- | --- | --- | --- |
| 0.25 | 53.25 (6.75) | 51.15 (7.54) | 52.83 (3.58) |
| 0.50 | 52.30 (2.32) | 51.61 (3.21) | 61.44 (2.04) |
| 0.75 | 23.78 (14.07) | 33.77 (6.65) | 32.24 (10.93) |

Figure: Figure 10: Two generated images above and two generated images below the 90th percentile of aesthetic scores, for Stable Diffusion models LoRA-finetuned without the top 40% most important artists based on D-TRAK, pixel similarity (max), training image aesthetic score (average), and sparsified-FT Shapley.
Refer to caption: x19.png

Figure: Figure 11: Two generated images above and two generated images below the 90th percentile of aesthetic scores, for Stable Diffusion models LoRA-finetuned without the top 40% most important artists based on D-TRAK, pixel similarity (max), training image aesthetic score (average), and sparsified-FT Shapley.
Refer to caption: x20.png

## Appendix E Broader Impact

In our work, we introduce the problem of attributing global model properties to groups of training data in the context of diffusion models. As the broader application of generative models, it’s crucial to correctly attribute training data. To address this, we develop a novel methodology that not only enhances understanding of how data influences model behavior but also improves the transparency of generative models. By systematically analyzing the impact of different data subsets, our approach facilitates more informed modifications to the training process, ultimately leading to more robust and reliable generative models. This capability is essential for deploying these models in real-world scenarios where accuracy and accountability are paramount.

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: 1. in definition 1, you said the function $\tau(\mathcal{F}, \\{C_i\\}_{i=1}^n)$ is supposed to assign a score to each contributor $i$. I'm wondering how this notation reflects this idea. Maybe it's a typo and it should be $\tau(\mathcal{F}, C_i)$?
2. if I understand it correctly, in the experiment results (section 4.5), the LDS is computed with different baseline methods for computing $\tau$. Then how are $\{\mathcal{F}(\theta^*_{S_b})\}_{b=1}^B$ computed? Are they computed by Sparsified-FT Shapley? If this is the case, why it is a fair comparison if the proposed approach is served as the benchmark in the evaluation metric?
3. is the proposed approach applicable to any data-driven machine learning model? I don't see any reason why it must be restricted to the diffusion model. If this is the case, why this paper focus on the application of diffusion models?
soundness: 3
strengths: Overall, I think this paper is organized and written clearly and I enjoyed reading most of the parts. In particular, the conceptual strengths of this paper include:
1. The proposed framework utilizes Shapley values, a game-theoretic approach, to assign fair credit to data contributors based on their influence on model performance. This methodology uniquely meets the fairness principles in valuation.
2. To address the high computational cost of Shapley value calculations, the paper introduces a model-pruning and fine-tuning method, which significantly accelerates retraining and inference processes. 
3. The approach has the potential to be applicable in various scenarios, such as incentivizing quality data sharing, creating compensation policies, and improving model diversity and fairness, making it a nice tool for real-world diffusion model deployments​.
summary: This paper presents a framework for attributing the contributions of data providers in diffusion models. The authors propose a framework that efficiently approximates retraining and rerunning inference for diffusion models, thus enabling the estimation of Shapley values for data contributors. This is achieved by investigating how global properties of diffusion models are influenced by data contributors. Empirically, it is demonstrated that the proposed framework outperforms existing data attribution
methods across three datasets, model architectures, and global properties.
weaknesses: 1. despite the computational efficiency of the proposed speed up method with sparsified fine-tuning (section 3.2), it seems to me that there is no in-depth discussion about its accuracy. The core idea of the approximation is Eq. (6), but there is no discussion or empirical evidence to support how well the approximation (6) is. Given that the idea is straightforward, it would be much more convincing if the author can provide additional justifications for Eq. (6), besides its superior empirical performance compared to baseline methods. Otherwise, it is difficult to digest why the proposed approach outperforms other methods with such a dominant advantage (Table 1).  
2. I do not see any particular reason the approximation for computing Shapley value has to be restricted in the diffusion model applications. Whether this is true or not, it would be better to include additional discussions in this regard.
3. I feel the contributions summarized at the end of the introduction is a bit over-claimed. For example, the first claimed contribution is not surprising from my perspective, as it is well-acknowledged that the performance of any ML model relies heavily on the sources of its training data set. For the second claim, I'm not so sure what does "efficiently approximate" mean. From the paper I get that the proposed approximation framework indeed reduces the computational efficiency of solving the least square problem (5), however, there is no evidence of how well the approximation is. In my opinion, an "efficient" approximation should somehow provide a trade-off between computational cost and approximation accuracy. That said, an approximation method with only a computational cost guarantee makes it less convincing and lacks insight. I think this paper can benefit more from an in-depth discussion of the proposed approximation approach. 
4. the focus of technical writing is not well-balanced. In my opinion, the entire section 2 and section 3.1 are known results (which do not contribute to the novelty of this work) and should be shortened significantly. However, unfortunately, the core novel part of the proposed method (section 3.2) is not discussed in depth.

---

confidence: 4
contribution: 3
initial_rating: 8
presentation: 3
questions: How does the framework handle cases where data contributors have varying data quality, styles, etc. and could this affect the accuracy of attribution?
soundness: 3
strengths: 1- The Shapley theorem has been proven to be an effective solution for calculating the contribution and is widely used in data valuation. The author has properly utilised this theorem as part of the methodology. 
2- Regarding quality, the methodology is well-executed, with rigorous evaluations across multiple datasets that demonstrate the proposed framework’s superior performance.
3- About the clarity, the paper is well-written, with structured explanations and nice visualization,
summary: The paper entitled "An Efficient Framework for Crediting Data Contributors of Diffusion Models" has focused on diffusion models and presented a method to fairly attribute data contributions using Shapley values. To address computational inefficiencies, the authors employ model pruning and fine-tuning, enabling practical Shapley value estimation. Their method is validated across multiple datasets, demonstrating improved attribution accuracy and efficiency over existing techniques.
weaknesses: 1- It is not a weakness, but the author could also provide an evaluation against data poisoning, which could make it even stronger. 
2- The provided code is well-structured but it could be improved by providing further demo Jupyter notebooks that make it easier for others to test and run the model.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: Listed in the weaknesses
soundness: 2
strengths: If the comparison and contribution calculation methods are indeed correct and reasonable, the numerical results look good
summary: This paper proposes to use a combination of kernel-based Shapley value and sparse fine-tuning as a new method to credit the data contributor in diffusion models. The authors evaluated their approach on CIFAR-20 CelebA-HQ and Art
weaknesses: I'm not very convinced about the overall proposed method for the following reasons.

For the sparsified FT part. some design choice can be elaborated and some comparisons with alternative methods can make the method more convincing.

1. Why is training on the full data and then finetuning on the subset comparable with training with subset from scratch?
2. Why pruning? Why not suing alternative solutions like full model with LoRA instead?
3. When applying sparsified FT, what are the contribution score formulas?

For the Shapley value part.

4. It will be better to elaborate on the similarity and differences between the conventional prediction tasks and the generation tasks, why the kernel based Shapley value can still work well in the current situation needs more explanation as well

For the numerical results, the ablation study is needed.

5. In table 1, the baselines used models trained with subset from scratch but the proposed method used sparsified FT. The results will be more straight forward when using retraining from scratch for all these scoring method or use sparsified FT for all these methods, that will show the ablation for each component in the new method 

Overall speaking, the novelty seems fair.

6. The proposed method is a combination of Shapley value and sparse FT, and I think the reasoning for using this method will be much stronger if the authors can provide evidence showing that each component is better (either efficiency or effectiveness) than their alternatives in this task, like for contribution measurements, Shapley values vs LIME, PFI, etc., and for speeding up model retraining sparse FT vs unlearning, etc.

Meta-review: This paper looks at data attribution in trained diffusion model through the lens of Shapley values, a common and accepted method originally developed in the economics literature to credit agents’ varying contributions in a cooperative game and has more recently been applied in feature-based attribution methods such as SHAP in XAI, and in data value assignment in settings such as the present paper.  The proposed approach, roughly stated, takes a trained diffusion model, distills/prunes it in some way, and then fine-tunes a set of these small models specifically on subsets of data belonging to an individual contribution.  At inference time, it’s able to scalably estimate Shapley values by hitting subsystems built around these fine-tuned models.  Reviewers appreciated the focus of the paper and its motivation.

Decision: Accept (Poster)