Manuscript Offprint

arXiv:2610.29854

How Do DiTs Denoise? An Aggregator-Predictor View of Attention and MLPs

Gyeonghun Kang, William Xingxu Chen, Xiang Cheng

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Gyeonghun Kang 1^{1} William Xingxu Chen 2^{2} Xiang Cheng 3^{3}

1^{1}Department of Statistical Science, Duke University gk149@duke.edu

2^{2}Department of Computer Science, Duke University wc187@duke.edu

3^{3}Department of Electrical and Computer Engineering, Duke University xiang.cheng@duke.edu

How do diffusion transformers (DiTs) represent image content and learn rules for reusing it to generalize? We develop an aggregator–predictor view of DiTs as input-adaptive local denoisers, in which context aggregation and patch prediction provide functional roles for interpreting attention and MLPs. We first establish that, for Gaussian Markov random field (GMRF) priors, the global Bayes denoiser can be approximated using only a subset of context patches, with error decaying exponentially in context radius. We further show that patchwise linear denoisers, often invoked to explain diffusion generalization, recover the empirical local denoiser with sufficiently informative aggregation. Within this view, AdaLN-modulated attention naturally parameterizes an input- and noise-dependent aggregator, while the MLP admits a learned key-value representation for tokenwise patch prediction. Our experiments support this view. DiTs trained on real images exhibit noise-dependent denoising contexts resembling those in the analytic GMRF setting, while attention mass exhibits a qualitatively corresponding broadening pattern. In a controlled CelebA64 study, shared-memory patch predictors used in place of DiT MLPs achieve competitive denoising and generative performance. Finally, cross-dataset component transplantation reveals compatibility patterns consistent with the proposed roles of QK in spatial weighting, VO in feature transport, and MLPs in patch prediction. Together, these results provide a component-level account of DiT denoising and motivate architecture-specific fine-tuning and controlled intervention.

Last updated: October 22, 2026

Code: https://github.com/hun-learning94/dit-denoise

Duke

1 Introduction

Diffusion and flow-matching models are widely used for image generation (Song et al., 2021; Lipman et al., 2023), with Diffusion Transformers (DiTs) becoming a standard backbone (Peebles and Xie, 2023; Esser et al., 2024; Xie et al., 2025; Li and He, 2026). Growing evidence connects their generalization to representations of images and rules for reusing them. Diffusion features encode semantic and geometric information (Baranchuk et al., 2022; Tang et al., 2023), and aligning them with pretrained representations improves training (Yu et al., 2025). Models also generate combinations absent from the training data, as shown by analyses of synthetic hierarchical data (Okawa et al., 2023; Favero et al., 2025). How components of DiTs realize these capabilities remains unclear.

Existing explanations connect diffusion-model generalization to geometry-adaptive harmonic or balanced representations (Kadkhodaie et al., 2024; Zhang et al., 2026), and inductive biases toward spatial locality and translation equivariance (Kamb and Ganguli, 2025; Niedoba et al., 2025). These accounts leave open how DiT components divide the denoising computation. Rosu et al. (2025) show that attention can implement exact score-based denoising, but they consider whole-image tokens, leaving interactions among spatial patches unresolved. An et al. (2025) associate DiT generalization with attention mimicking CNN-like spatial locality, but attention can also select input-dependent, spatially non-contiguous context (Sec. 5.1). We ask: How do attention, MLPs, and adaptive layer normalization (AdaLN) divide the work of representing image content and learning context-dependent rules for generalization?

Understanding these component roles matters for intervention: domain adaptation, concept editing, and

Figure

Figure 1 In each row, a CelebA source checkpoint is fine-tuned on the AAHQ, FFHQ, AFHQ, or STL-10 dataset. The source and fine-tuned generated images are shown in columns (000) and (111). In the middle columns, attention QK/VO and MLP weights of the source checkpoint are replaced with the corresponding fine-tuned weights; e.g., (001) means only MLP is replaced, while QK/VO are retained. For face-to-face fine-tuning, replacing only QK generates source-like faces, while replacing MLP brings visual changes: cartoon faces, bald heads, or dogs. Among the tested CelebA→STL-10 hybrids, coherent target-like structure appears primarily in the joint endpoint (111); reverting VO (101) leaves fragmented texture. See Sec. 5.3 and Appendix E.4.

controlled generation require deciding which computations to modify and which to preserve. In language models, interpreting MLPs as key-value memories has motivated methods for editing stored associations (Geva et al., 2021; Meng et al., 2022, 2023), with related analyses in multimodal transformers (Pan et al., 2024a; Basu et al., 2024a). A functional account of DiTs could similarly guide component-wise adaptation across domains and interventions that change image content while preserving desired spatial relationships. Related work is reviewed in Appendix A.

We address this question by proposing an aggregator–predictor view of DiTs as input-adaptive local denoisers, supported by a statistical foundation and a set of architectural and empirical observations:

(1) A statistical foundation for local denoising. We justify local denoiser, in which each patch is denoised using only a subset of context patches, by identifying its statistical target and establishing when it approximates the global Bayes denoiser. Specifically, for Gaussian Markov random field (GMRF) image priors, the global denoiser can be approximated by a radius-r local denoiser with error decaying exponentially in r (Thm. 1). We further connect existing patchwise retrieval-based explanations of generalization to this target by showing that, with sufficiently informative aggregation, a patchwise linear denoiser exactly recovers the empirical local denoiser (Thm. 3).

(2) An aggregator–predictor interpretation of DiT components. We decompose the local denoising into context aggregation followed by patch prediction (Def. 2). Under this view, the algebraic structure of AdaLN-modulated attention implements an input- and noise-dependent aggregation rule: QK parameterizes spatial compatibility weights, while VO transforms the corresponding features (Sec. 4.1). In turn, MLP admits a key-value memory interpretation and operates on the resulting contextualized token (Sec. 4.2). These algebraic correspondences are exact for the isolated branches considered in Sec. 4; in a multilayer residual stack, the proposed roles interact and need not remain functionally separable (Appendix D.5). This view extends existing fixed spatial-locality accounts by allowing the relevant context to depend on the image and noise level and to include spatially non-contiguous patches. It further suggests the possibility of replacing DiT MLPs with more interpretable memory-based components, as supported by our experiments (Sec. 5.2).

(3) Empirical evidence consistent with the proposed component roles. Across real-image datasets, DiT sensitivity fields exhibit noise-dependent context broadening resembling the GMRF setting, while attention mass shows a related qualitative trend (Sec. 5.1). We further construct explicit shared-memory patch predictors that retain competitive denoising and generation performance in a controlled CelebA64 study (Sec. 5.2). Finally, cross-domain component transplantation reveals systematic component-compatibility patterns associated with source–target spatial similarity. These patterns are consistent with, but do not uniquely identify, the proposed roles in context aggregation and patch prediction (Sec. 5.3).

References (80)