Nonparametric Data Attribution for Diffusion Models
Abstract
Data attribution for generative models seeks to quantify the influence of individual training examples on model outputs. Existing methods for diffusion models typically require access to model gradients or retraining, limiting their applicability in proprietary or large-scale settings. We propose a nonparametric attribution method that operates directly on data, measuring influence via patch-level similarity between generated and training images. Our approach is grounded in the analytical form of the optimal score function, extends naturally to multiscale representations, and remains computationally efficient through convolution-based acceleration. In addition to producing spatially interpretable attributions, our framework uncovers patch-level correspondences between training data and generated outputs. Experiments show that NDA substantially outperforms existing nonparametric baselines and achieves the best attribution performance among the evaluated methods that do not use target-model parameters or gradients.
Lay Summary
Generative models that create images are often trained on very large datasets, so it is important to understand which training images may have influenced a generated image. This is hard for proprietary models, or when retraining is too costly, because many attribution methods need model parameters or gradients. We introduce Nonparametric Data Attribution (NDA), which works directly from a generated image and the available training data. NDA compares local patches from the generated image with patches from training images, then uses the forward diffusion process to turn these matches into attribution scores. These scores can also be shown as patch-level correspondences, making it easier to see which regions of the training data are related to the generated output. When tested on several image datasets, NDA performs better than existing methods that work directly from data, and performs best among the evaluated methods that do not use the model's parameters or gradients. The method can help improve data transparency in diffusion models, while its scores should be interpreted as estimates of influence rather than proof of data use.