Exploring Diffusion Transformer Designs via Grafting

Keshigeyan Chandrasegaran, Michael Poli, Daniel Y Fu, Dongjun Kim, Lea M. Hadzic, Manling Li, Agrim Gupta, Stefano Massaroli, Azalia Mirhoseini, Juan Carlos Niebles, Stefano Ermon, Li Fei-Fei

Abstract

Designing and training foundation models from scratch is prohibitively expensive, creating a "compute wall" that limits architectural innovation. This paper introduces grafting, a two-stage method for architectural editing that allows researchers to swap components of pretrained Diffusion Transformers (DiTs) with more efficient designs. By recycling pretrained weights through activation distillation and lightweight finetuning, the authors demonstrate that new hybrid architectures—such as those replacing attention with gated convolutions—can be materialized using less than 2% of the original pretraining compute while maintaining high image quality.

1. Introduction

In the current era of foundation models, the standard approach to architectural exploration involves training models from scratch. For image generation, this typically means adhering to established designs like the Diffusion Transformer (DiT). However, the financial and temporal costs of training such models prevent researchers from exploring potentially more efficient alternatives, such as linear attention or novel convolution mechanisms.

This paper proposes a paradigm shift: instead of starting from zero, researchers can use existing, high-quality pretrained models as "scaffolds." By "grafting" new components onto these established models, it becomes possible to study and implement architectural changes at a fraction of the cost.

2. Methodology: The Grafting Framework

The authors propose a two-stage process inspired by the horticultural practice of joining a new plant shoot (the scion) onto an established rootstock.

2.1 Stage 1: Activation Distillation

The first stage focuses on "initializing" the new operator (e.g., a gated convolution) to behave like the original operator (e.g., Multi-Head Attention) it is intended to replace. This is achieved by feeding identical inputs into both the original and the new operator and using a regression objective to minimize the difference in their outputs.

Crucially, the authors found that the choice of loss function is component-dependent. L1 loss proved most effective for distilling Attention layers, which often contain outliers, while L2 loss was superior for Multi-Layer Perceptron (MLP) layers.

2.2 Stage 2: Lightweight Finetuning

After the new components are grafted into the architecture, the entire model undergoes finetuning on a small fraction of the original dataset (typically 10% or less). This stage is essential for smoothing the "seams" between old and new components and mitigating the accumulation of errors across the model's depth.

3. Architectural Innovations

To demonstrate the utility of grafting, the authors introduced Hyena-X and Hyena-Y, two efficient gated convolution operators. These were designed to exploit the inherent "locality" found in image generation tasks. A "band-k" analysis revealed that in many layers of a DiT, the attention mechanism focuses primarily on nearby pixels, providing a theoretical justification for replacing expensive global attention with cheaper local convolutions.

4. Experimental Results

The grafting method was evaluated across several benchmarks, including ImageNet-1K (256x256) and high-resolution text-to-image (T2I) tasks.

4.1 Efficiency and Performance

Grafted hybrid models achieved FID scores between 2.38 and 2.64, remarkably close to the 2.27 baseline of the original DiT-XL/2. Most notably, these results were achieved using less than 2% of the original pretraining compute.

In T2I experiments using the PixArt-Σ model, grafting Hyena-X operators resulted in a 1.43x wall-clock speedup during inference, with less than a 2% drop in GenEval scores (a benchmark for prompt alignment and image quality).

4.2 Structural Flexibility

The authors also explored "depth-to-width" grafting, where a sequential 28-layer model was rewired into a 14-layer parallel architecture. This grafted model (FID 2.77) significantly outperformed other 14-layer models trained via traditional means, such as BK-SDM (FID 7.43) and TinyDiT (FID 3.92), proving that grafting can successfully alter the fundamental topology of a network.

5. Discussion and Limitations

While grafting offers a powerful tool for architectural editing, several limitations remain. The study focused primarily on Diffusion Transformers; it is currently unknown if these techniques translate as effectively to Autoregressive models like GPT. Additionally, the T2I experiments relied on synthetic data, which may introduce specific biases. Finally, grafting is a tool for editing existing models; it requires access to a high-quality pretrained "rootstock," meaning it cannot yet be used to originate entirely new model families from scratch.

6. Conclusion

Grafting provides a viable path forward for researchers to bypass the "compute wall" of foundation model training. By enabling the efficient exploration of hybrid architectures and structural modifications, this method democratizes the ability to innovate on state-of-the-art model designs.

Summary updated

BibTeX
@inproceedings{chandrasegaran2025exploring,
  author = {Keshigeyan Chandrasegaran and Michael Poli and Daniel Y Fu and Dongjun Kim and Lea M. Hadzic and Manling Li and Agrim Gupta and Stefano Massaroli and Azalia Mirhoseini and Juan Carlos Niebles and Stefano Ermon and Li Fei-Fei},
  title = {{Exploring Diffusion Transformer Designs via Grafting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=CaSQgef484},
}
Figure