Influence Functions for Scalable Data Attribution in Diffusion Models

Bruno Kacper Mlodozeniec, Runa Eschenhagen, Juhan Bae, Alexander Immer, David Krueger, Richard E. Turner

Generative diffusion models have driven massive advancements in AI, but their widespread adoption introduces critical challenges regarding data attribution and interpretability. When a model generates a specific image, users, creators, and researchers increasingly need to know: Which training examples are responsible for this output?

Addressing this "data attribution" problem is vital for navigating copyright concerns, filtering undesirable content, and understanding model behavior. While influence functions are a classic mathematical tool used to estimate how a model's output would change if a specific training point were removed, applying them to diffusion models is notoriously difficult. They require computing and inverting a "Hessian" matrix (second-order derivatives), which is computationally explosive for large neural networks. Furthermore, diffusion models utilize complex objectives involving multiple timesteps and noise levels, complicating how "influence" is measured.

The K-FAC Influence Framework

To overcome these hurdles, researchers have developed a scalable framework for data attribution in diffusion models. Their approach, termed K-FAC Influence, hinges on three key technical innovations:

  1. Tailored Hessian Approximation: Instead of relying on the standard "Empirical Fisher" matrix used in prior works like TRAK, the authors derive a Generalized Gauss-Newton (GGN) matrix specifically tailored to the diffusion loss. To make this scalable, they employ K-FAC (Kronecker-Factored Approximate Curvature), which approximates the massive Hessian as a block-diagonal matrix of smaller, manageable pieces.
  2. Measurement Proxies: Because calculating the exact probability of generating a specific image is computationally intractable, the framework tests several proxies, including the diffusion loss itself and the Evidence Lower Bound (ELBO).
  3. Efficiency Tricks: To handle the high-dimensional gradients characteristic of diffusion models, the method incorporates 8-bit quantization (compression) and query batching. This allows the attribution process to run efficiently on a single A100 GPU, even for large datasets.

Experimental Setup

The authors evaluated their method across three primary benchmarks to test its robustness and scalability:

  • CIFAR-10: A standard small-image dataset (50,000 images).
  • CIFAR-2: A more controlled subset containing only "cars" and "horses" (5,000 images).
  • ArtBench-10: A dataset of 60,000 artworks across 10 styles, providing a realistic test case for "artistic influence" and copyright-style queries.

Key Insights and Results

The K-FAC Influence method demonstrated significant improvements over existing baselines, evaluated primarily using the Linear Data-modelling Score (LDS), which measures how well the attribution method predicts actual model changes after retraining.

  • Superior Accuracy and Robustness: K-FAC Influence consistently achieved higher LDS scores than baseline methods like TRAK and D-TRAK across all datasets. For instance, on CIFAR-2, K-FAC achieved a ~26.7% rank correlation compared to TRAK’s ~10.3%. Crucially, K-FAC Influence is much less sensitive to the "damping" factor (a numerical stabilizer), meaning it works effectively "out of the box" without requiring expensive hyperparameter tuning.
  • Effective Data Removal: In "retraining without top influences" tests, removing the specific images identified by K-FAC led to a significantly larger reduction in the model's ability to generate the target image compared to random removal or baseline methods.
  • Visual Relevance: Qualitatively, the "top influences" identified by the method are perceptually highly similar to the generated samples. The method successfully identifies specific poses, colors, or structural features in the training data that match the generated query.
Qualitative results showing generated samples alongside their top positive, neutral, and negative training influences.

Additionally, the researchers uncovered interesting dynamics regarding diffusion timesteps. They found that losses from higher diffusion timesteps (where the image is mostly noise) actually serve as better proxies for predicting changes in the model than lower-timestep losses.

Limitations and Future Directions

While K-FAC Influence represents a significant step forward for scalable data attribution, several challenges remain:

  • Numerical vs. Ranking Accuracy: The method excels at ranking which images are most influential, but it still struggles to accurately predict the exact numerical change in loss after retraining.
  • The Marginal Probability Collapse: The authors observed that for very large datasets, the probability of generating a specific sample becomes nearly constant regardless of which 50% of the data is removed. This suggests that as training sets grow to the billions, diffusion models learn a highly stable global distribution, making fine-grained numerical attribution increasingly difficult.
  • Proxy Choice: The community still requires better proxies for "generation probability" that are both mathematically sound and computationally cheap to differentiate.

Future work will need to evolve influence functions to capture more than just local parameter changes to keep pace with the massive scale of modern generative models.

Summary updated

BibTeX
@inproceedings{mlodozeniec2025influence,
  author = {Bruno Kacper Mlodozeniec and Runa Eschenhagen and Juhan Bae and Alexander Immer and David Krueger and Richard E. Turner},
  title = {{Influence Functions for Scalable Data Attribution in Diffusion Models}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=esYrEndGsr},
}
Figure