Source-linked AI summary

Attributing HOW, Not Just WHICH: Counterfactual Response Trajectories for Diffusion Models

Haoqian Zhang, Ziyuan Yang, Zerui Shao, Yi Zhang

arXiv:2610.11238v1cs.CVcs.GR

TL;DR

Scalar attribution can obscure distinct factor-specific responses and how they evolve during diffusion generation. CADT isolates those responses with matched counterfactual conditions and compares their trajectory descriptors using a covariance-aware, training-bank-adaptive kernel. Across multiple public attribution settings, it consistently improves over existing diffusion attribution baselines.

  • Problem

    Scalar responses used by many diffusion attribution methods can collapse distinct internal changes across denoising stages and mix multiple semantic factors.

    Source: §1 · p. 1
  • Method

    CADT compares target and matched reference conditions at identical noisy states, builds dynamic response-trajectory descriptors, and compares them with a training-bank-adaptive covariance-aware kernel.

    Source: §1 · p. 2
  • Results

    CADT consistently improves over existing diffusion attribution baselines across compositional, hierarchical, corrupted-source, style, and object–style settings.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The results suggest that training influence in generative models is better viewed as a dynamic process than a static association.

    Source: §6 · p. 9

    CADT's attribution signal is defined in internal trajectory-representation space, and removing a descriptor is not equivalent to removing a training example and retraining the diffusion model.

    Source: D LIMITATIONS AND FUTURE WORK · p. 16

Abstract

from arXiv · show

Diffusion models have achieved remarkable success in image generation, yet tracing their outputs to individual training examples remains challenging. Existing attribution methods often compress factor-specific effects into scalar responses, making distinct internal changes indistinguishable. This is particularly limiting for diffusion models, where semantic factors emerge through evolving representation dynamics during denoising. We therefore reformulate diffusion data attribution as attributing factor-induced internal response trajectories. In this paper, we propose a novel Concept Attribution method through Dynamic Trajectories(CADT). We argue that attribution should therefore ask not only \emph{which} examples matter, but also \emph{how} their influence unfolds during generation. Specifically, we construct matched counterfactual pairs at identical noisy states to isolate factor-specific representation displacements, and model their directional and magnitude evolution across denoising as dynamic attribution signatures. For each training example and generated query, CADT extracts stage-wise feature vectors and integrates them along the denoising process to form a trajectory descriptor. Applying the same construction across the training set yields a bank of factor-specific trajectory descriptors. The covariance statistics of this bank are then used to construct . CADT uses this covariance-aware positive-semidefinite kernel to calibrate the query and training representations, and compares the calibrated query trajectory with each training trajectory to produce the final training-sample attribution scores. Experiments on multiple public datasets show consistent improvements over existing diffusion attribution baselines across hierarchical, compositional, and style attribution.

1 INTRODUCTION

Scalar attribution can conflate distinct factor-specific responses that arise at different denoising stages or move in different representation directions. CADT instead isolates factor-specific counterfactual responses and tracks their evolution as trajectories for attribution.

  • Scalar responses can conflate distinct denoising stages and directions, obscuring when influence arises and which semantic factor it supports.For a watercolor dog, similar scalar scores may reflect support for object identity or artistic style.Source: §1 · pp. 1–2
  • CADT compares target and matched reference conditions at the same noisy state to isolate the response associated with the target factor.It traces response magnitude and direction across denoising stages and integrates stage-wise responses into trajectory descriptors for training examples and generated queries.Source: §1 · p. 2
  • CADT compares query and training trajectory descriptors with a training-bank-adaptive covariance-aware kernel to produce attribution scores.The method is evaluated across compositional, hierarchical, corrupted-source, style, and object–style attribution settings, with consistent improvements over existing diffusion attribution baselines.Source: §1 · p. 2

2 RELATED WORK

Related work spans general training-data attribution, diffusion-specific attribution, and finer-grained concept or spatial explanations. These approaches use different signals and targets to connect training examples to model behavior or generated content.

  • Training-data attribution includes leave-one-out retraining, influence functions, representer explanations, and data valuation, alongside scalable methods such as TracIn, datamodels, and TRAK.The cited approaches use optimization trajectories, subset models, or projected gradients to approximate training-example influence.Source: §2 · p. 2
  • Diffusion attribution adapts training-data attribution using denoising-loss gradients, projected features, sampling trajectories, or predictive-distribution changes.These methods account for the iterative denoising structure (Dai & Gifford, 2023; Xie et al., 2024; Mlodozeniec et al., 2024).Source: §2 · p. 2
  • Fine-grained diffusion explanations include concept-level attribution, token-level conditioning analysis, and spatially localized training-data influence.The cited examples are Concept-TRAK (Park et al., 2026), DAAM, and work on spatially localized influence.Source: §2 · pp. 2–3

3 PRELIMINARIES

Diffusion models generate by reversing a noise-corruption process, while data attribution asks how training examples affect a behavior of interest. For diffusion outputs, attribution must account for the multi-step denoising trajectory.

3.1 DIFFUSION MODELS

  • Generation starts from noise and proceeds through reverse denoising transitions to a clean sample, using a denoiser that predicts injected noise under an optional condition.The process may use deterministic non-Markovian sampling or operate in a pretrained autoencoder's latent space.Source: §3.1 · p. 3

3.2 DATA ATTRIBUTION

  • Leave-one-out attribution measures the effect of removing a training example and retraining, but repeating this for every example is computationally prohibitive.Influence functions approximate the effect through a first-order parameter perturbation, relating the training-example gradient to the target-utility gradient.Source: §3.2 · p. 3
  • Because diffusion behavior unfolds across denoising states, training-example relevance may vary over diffusion time and internal representations.Diffusion attribution therefore accounts for the structured, multi-step generation process.Source: §3.2 · p. 3

4 METHOD

CADT ranks training examples for a target factor by comparing factor-specific response trajectories from training examples and generated queries. It constructs matched counterfactual responses, preserves their denoising-stage dynamics, and calibrates descriptor comparisons using training-bank statistics.

4.1 OVERVIEW

  • CADT ranks training examples by relevance to a target factor through counterfactual responses, stage-wise trajectory features, and a training-bank-calibrated covariance-aware kernel.The overview identifies these as the framework's three stages.Source: §4.1 · pp. 3–4

4.2 FACTOR-SPECIFIC COUNTERFACTUAL RESPONSE

  • The matched reference replaces the target factor while keeping other conditioning information unchanged, and comparison at the same noisy state isolates the factor-associated response.The target and reference evaluations share the protocol and differ only in conditioning.Source: §4.2 · p. 4

4.3 DYNAMIC TRAJECTORY CONSTRUCTION

  • CADT represents response strength and directional evolution as stage-wise features, concatenated in denoising order to preserve temporal dynamics for both training examples and queries.The directional component describes channel-wise change across denoising transitions; the trajectory construction does not average away stage order.Source: §4.3 · pp. 4–5

4.4 TRAINING-BANK ADAPTIVE COMPARISON

  • Training-bank calibration centers and standardizes local descriptor blocks, estimates their covariance, and uses regularization and fixed block weights to compare query and training descriptors.The method fits its training-bank statistics and calibration operators once on the training set and keeps them fixed during query attribution.Source: §4.4 · pp. 5–6

4.5 REPRESENTATION-LEVEL REMOVAL INTERPRETATION

  • The kernel's blockwise interactions equal the effects on fixed-space query reconstruction of removing a descriptor, not of removing a training example and retraining the diffusion model.The paper distinguishes this representation-level leave-one-descriptor-out interpretation from a model-level counterfactual.Source: §4.5 · p. 6

5 EXPERIMENTS

Across synthetic, hierarchical, label-corruption, and style settings, CADT retrieves factor-relevant training examples while representing denoising-time dynamics. The evaluation also tests descriptor components and temporal support.

5.2 CONTROLLED EXPERIMENTS ON SYNTHETIC DATA

  • CADT achieves high precision for both synthetic shape and color, while whole-image baselines show strong factor imbalance.D-TRAK nearly retrieves color but fails on shape; TRAK and DAS are substantially more shape-biased.Source: §5.2 · p. 7, Table 1 · p. 7
  • Positive synthetic training examples align more consistently with the query across layers and timesteps than negative examples, which often oppose it.The comparison concerns signed alignment, showing that directional agreement contributes to distinguishing supportive from conflicting examples.Source: §5.2 · p. 7, Figure 3 · p. 7
  • Synthetic factor support varies across network layers, while the denoising interval from t=300 to t=100 is strongest for both color and shape.The study examines both coarse layer–timestep contributions and support across individual steps and contiguous two-step windows.Source: §5.2 · pp. 7–8, Figure 4 · p. 7, Figure 5 · p. 7

5.3 HIERARCHICAL CONCEPT ATTRIBUTION

  • On CIFAR-100, CADT has the strongest retrieval at superclass and fine-class levels, with a larger margin at the superclass level despite coarse-label training.Fine-class retrieval is harder because it separates examples within the same coarse training category.Source: §5.3 · p. 8, Table 2 · p. 8

5.4 COUNTERFACTUAL LABEL-SOURCE RECOVERY

  • Under corrupted CIFAR-100 labels, CADT recovers genuine plants and substantially more flipped animal sources than most baselines, yielding the strongest balance across both groups.Relevance is based on the original group before label corruption.Source: §5.4 · p. 8, Table 3 · p. 8
  • For a plant-conditioned query, CADT retrieves both genuine plants and animals deliberately relabeled as plants.The qualitative examples illustrate retrieval of sources associated with both the observed conditioning and corrupted labels.Source: §5.4 · p. 8, Figure 6 · p. 8

5.5 STYLE AND OBJECT–STYLE ATTRIBUTION

  • CADT nearly saturates generated-query style retrieval on both ArtBench subsets and performs strongly for object–style attribution, including the five-style split.The evaluation covers pure-style and object–style retrieval on two- and five-style subsets.Source: §5.5 · p. 9

5.6 ABLATION STUDY

  • On CIFAR-100, the full CADT performs best; ablations support combining response energy, velocity, second-order reliability, and multi-seed stability.Energy represents response strength, velocity its change across adjacent denoising stages, and the reliability terms suppress transient or noise-sensitive responses.Source: §5.6 · p. 9, Table 6 · p. 9

6 CONCLUSION

CADT treats training influence as a dynamic process, using matched counterfactual responses to isolate factor-specific changes and trace their evolution across denoising. Its dynamic signature represents response strength, directional evolution, and reliability.

6 CONCLUSION

  • CADT addresses the limitation that a single scalar score can obscure both the supported semantic factor and how its influence evolves during generation.The conclusion frames training influence in generative models as a dynamic process rather than a static association.Source: §6 · p. 9

A DYNAMIC ATTRIBUTION SIGNATURE

  • The dynamic signature characterizes factor-specific counterfactual responses through response strength, first-order directional evolution, and trajectory reliability.Repeated probes assess whether the observed dynamic direction and response-strength pattern are stable.Source: A DYNAMIC ATTRIBUTION SIGNATURE · pp. 12–13

B THEORETICAL ANALYSIS

The theoretical analysis interprets CADT’s bank-adaptive interaction through ridge reconstruction and descriptor removal in a frozen representation space. It also extends that analysis to blockwise descriptors and studies sensitivity to training-bank geometry perturbations and computational costs.

B.1 RIDGE RECONSTRUCTION INTERPRETATION

  • Within the frozen descriptor space, the bank-adaptive interaction is exactly a ridge-reconstruction coefficient, and descriptor removal yields a distinct counterfactual quantity.The analysis does not equate descriptor removal with deleting a training example and retraining the diffusion model.Source: §B.1 · p. 14, §B.2 · p. 14

B.2 EXACT REPRESENTATION-LEVEL COUNTERFACTUAL REMOVAL

  • The leave-one-descriptor-out effect is unsigned, while CADT ranks with signed interactions that distinguish aligned from opposing dynamic responses.The removal effect depends on the squared cross-interaction and a leverage correction.Source: §B.2 · p. 14

B.3 BLOCKWISE EXTENSION

  • Applying the removal analysis independently to each block does not make the blockwise removal quantity the square of the final Kλ score.Each block receives its own leverage correction before aggregation, so the theoretical connection is through local cross-interactions.Source: §B.3 · p. 15

B.4 STABILITY OF THE TRAINING-BANK GEOMETRY

  • With fixed descriptors, the ridge parameter controls sensitivity of the bank-adaptive interaction to perturbations in the estimated second-order training-bank structure.The stability result concerns the frozen-descriptor setting, not changes to the diffusion model or descriptor extraction.Source: §B.4 · p. 15

C COMPUTATIONAL COMPLEXITY

  • After descriptors and block factorizations are cached, scoring Q queries against N training examples costs O(QND).The blockwise formulation uses factor memory, whereas dense concatenated geometry uses O(D2) memory.Source: C COMPUTATIONAL COMPLEXITY · p. 15

D LIMITATIONS AND FUTURE WORK

CADT’s attribution signal operates in internal trajectory-representation space rather than through training-induced parameter updates. The ArtBench evaluation also has a style-oriented fine-tuning scope in which object attribution is generally weaker than style attribution.

D LIMITATIONS AND FUTURE WORK

  • CADT’s central limitation is that its signal is defined over internal trajectory representations, not training-induced parameter updates.Its exact reconstruction counterfactual is in frozen descriptor space and does not equal deleting a training example and retraining the diffusion model.Source: D LIMITATIONS AND FUTURE WORK · p. 16
  • Future work could connect multi-order trajectory dynamics with parameter gradients or local training perturbations to link dynamic representations more tightly to model-level counterfactual influence.For ArtBench, the paper also proposes separating attribution to pretrained knowledge from attribution introduced during downstream adaptation.Source: D LIMITATIONS AND FUTURE WORK · p. 16
  • In the ArtBench setting, Stable Diffusion v1.4 is adapted with LoRA on a relatively small style-oriented dataset, and object attribution is generally weaker than style attribution.The paper suggests pretrained object semantics and the limited frequency of individual objects in fine-tuning data may both contribute.Source: D LIMITATIONS AND FUTURE WORK · p. 16

E IMPLEMENTATION AND EVALUATION DETAILS

The evaluation uses factor-specific retrieval because subset-model LDS is costly and can obscure support for common concepts. It also compares CADT’s bank-adaptive score with cosine and normalized-ridge variants under a shared descriptor and query setup.

E.1 WHY NOT LDS?

  • LDS measures prediction of scalar-utility changes across subset-trained models, but common factors may persist until support crosses a threshold, obscuring concept-bearing examples.The authors instead use retrieval precision with controlled factor labels or a frozen presence judge; LDS remains appropriate for scalar-utility questions, and retraining is complementary validation.Source: §E.1 · p. 16
  • LDS requires training many subset models, particularly costly for text-to-image diffusion, so the authors choose factor-labeled retrieval as a task-specific evaluation.The paper presents its exact descriptor-removal result as a frozen-space surrogate, not a replacement for model-level subset retraining.Source: §E.1 · p. 16
  • The evaluation covers synthetic compositional OOD cases, hierarchical CIFAR-100 labels, and ArtBench style and object–style retrieval with shared query validity controls.The ArtBench object–style protocol retains 11/30 queries containing both requested factors; CADT uses λ = 0.01N on both ArtBench subsets.Source: §E.1 · pp. 16–17

F ALTERNATIVE SCORE DESIGNS

  • The exploratory score variants use the same fixed standardized block descriptors: ordinary cosine, normalized ridge Sλ, and CADT’s signed bank-adaptive Kλ.Kλ is the main-paper score; Table A1 compares the scores using the same descriptor, query bank, and candidate order, changing only the scoring function.Source: F ALTERNATIVE SCORE DESIGNS · p. 17, Table A1 · p. 17

G LAYER–TIMESTEP DIAGNOSTICS

The diagnostics examine how directional and energy signals relate to CADT support across layers and denoising time. ArtBench visualizations document the shared query-validity protocol, while the deletion experiments test whether removing data produces factor-specific denoising changes and changes associated with CADT-selected samples.

G LAYER–TIMESTEP DIAGNOSTICS

  • Positive examples show stronger directional agreement across layers and timesteps, while negative examples have weaker or opposing responses; energy captures response magnitude.These complementary signals motivate retaining both trajectory direction and magnitude rather than reducing each example to a static feature.Source: G LAYER–TIMESTEP DIAGNOSTICS · p. 17, Figure A1 · p. 18
  • For color, the direction margin closely follows the Kλ margin across the layer–timestep grid, while energy has a distinct pattern; shape correspondence is weaker but structured.The analysis indicates that direction supplies a strong discriminative signal and energy contributes complementary information.Source: G LAYER–TIMESTEP DIAGNOSTICS · pp. 17–18, Figure A2 · p. 18
  • Across the full trajectory, direction remains strongly associated with Kλ support, especially for color, while energy shows little monotone correspondence.The strongest layer differs by factor (d1 for shape and d0 for color), but both factors concentrate strongest temporal support from t=300 to t=100.Source: G LAYER–TIMESTEP DIAGNOSTICS · pp. 18–19, Table A2 · p. 19

H ARTBENCH DETAILS AND VISUALIZATIONS

  • ArtBench query validity is judged once and the same mask is applied to every method; its figures show query examples, the pre-filter cat–style bank, and representative style retrievals.The dataset has style labels but no ground-truth object annotations, so a frozen vision-language judge determines object presence.Source: H ARTBENCH DETAILS AND VISUALIZATIONS · p. 19, Figure A3 · p. 19, Figure A4 · p. 20

I DATA DELETION AND RETRAINING ON ARTBENCH2

  • The ArtBench2 deletion experiments test whether coherent-subset removal changes factor-specific denoising beyond equal-size random deletion, then examine changes from removing CADT-identified samples.The experiments are framed as connecting CADT response dynamics to consequences of training-data removal.Source: I DATA DELETION AND RETRAINING ON… · pp. 19–20

I.1 STYLE-SPECIFIC CHANGES IN DENOISING ERROR

Deletion experiments show that coherent style support produces temporally structured denoising changes, while CADT-selected sample removal shifts retraining behavior and the final model distribution more than random deletion.

I.1 STYLE-SPECIFIC CHANGES IN DENOISING ERROR

  • Style deletion yields positive contrasts for ukiyo-e (∆c = 1.269 × 10−3) and post-impressionism (∆c = 1.458 × 10−3), with stronger, temporally structured changes for matching queries.The comparisons control for deletion size and use matched noisy states, timesteps, and noise realizations.Source: §I.1 · pp. 20–21, Figure A6 · p. 21
  • The style-deletion experiment establishes model-level response changes, but does not directly evaluate an attribution ranking.Source: §I.1 · p. 21

I.2 CHANGES IN THE DISTRIBUTION OF RETRAINED MODELS

  • Removing highly attributed samples produces a larger, more coherent optimization-trajectory displacement and shifts the final model distribution more than same-budget random deletion.The experiment compares CADT-ranked deletion with balanced random deletion at the same deletion ratio.Source: §I.2 · p. 22, Figure A7 · p. 22

J SIMILAR CONCEPT-TRAK SCORES WITH DIFFERENT DENOISING STRUCTURE

Examples with nearly identical Concept-TRAK scores can differ in their temporal attribution patterns, reconstruction progressions, and internal responses, showing that the scalar total omits denoising-trajectory structure.

Loading 2610.11238v1…