Flow-based Transformers SiTs
- The paper introduces SiT, a unifying framework that leverages continuous-time flow and score matching to significantly improve FID metrics compared to previous latent diffusion models.
- SiTs employ both velocity and score matching using a DiT backbone, enabling efficient deterministic (ODE) and stochastic (SDE) sampling within a modular interpolation setting.
- SiTs consistently outperform DiT baselines on ImageNet benchmarks by achieving lower FID scores while maintaining architectural consistency and scalability.
Flow-based Transformers, and specifically the Scalable Interpolant Transformers (SiTs), represent a unifying framework that merges continuous-time flow-based generative modeling with the Transformer architecture. SiTs enable both flow-matching (probability flow ODE) and score-based diffusion paradigms within a single, modular setting. They expand the generative capacity and scalability of Transformer-based models for high-fidelity and efficient large-scale synthesis. The SiT framework is most extensively detailed in "SiT: Exploring Flow and Diffusion-based Generative Models with Scalable Interpolant Transformers" (Ma et al., 2024), which systematically analyzes and outperforms prior latent diffusion Transformer models.
1. Foundations: Stochastic Interpolant Transformers (SiTs) and Flow-based Modeling
A SiT connects data distribution and latent noise distribution through a parametrized stochastic interpolant:
where are smooth, valid schedule functions with (at data), (at pure noise), and throughout .
This generalizes classic denoising diffusion probabilistic models (DDPM), enabling both ODE-based (flow) and SDE-based (diffusion) perspectives under a single formalism. The marginal at time , , corresponds to the law of under this interpolation, and its time dynamics can be described equivalently by:
- A deterministic probability-flow ODE:
- A reverse-time SDE: , for a chosen diffusion coefficient
The SiT framework exposes flexibility in how data and noise are connected, sampling is performed, and which target field (velocity or score) is learned (Ma et al., 2024).
2. Training Objectives: Velocity and Score Matching under Continuous Interpolants
SiT models are trained to regress one of two target fields at each :
- Velocity matching:
where are known endpoints and are time derivatives.
- Score matching:
with . Weighted-score and velocity criteria can further appear, depending on interpolant properties and training choices.
Transformers are used to parameterize either the velocity or score ; in practice, velocity prediction with a linear interpolant and velocity-based SDE sampling gives the best FID scores (Ma et al., 2024).
3. Transformer Architecture: DiT Backbone and Conditional Injection
SiTs re-use the DiT (Diffusion Transformer) backbone [Peebles & Xie 2023]:
- Vision Transformer operating on VAE-latent space; VAE is fixed during generative modeling.
- Patch-wise latent representation (e.g., 22 grids for a given image resolution).
- Class-conditional transformer blocks with AdaLN-Zero used for both class and diffusion time injection.
- Model scale: S, B, L, XL variants use matching layer counts, dimension, and GFLOPs as DiT to ensure controlled ablation and fair comparison.
All architectural and computational aspects (parameters, FLOPs, latent encoding) are kept identical between DiT and SiT. Only the interpolant and learned target fields differ (Ma et al., 2024).
4. Inference: ODE and SDE Samplers under Decoupled Diffusion Schedules
Inference with SiT allows for both deterministic and stochastic sampling:
- ODE-based (Probability Flow): Use Heun’s method to solve starting from noise and integrating backward to . Pseudocode follows the standard two-stage Heun update.
- SDE-based: Employ Euler–Maruyama with optional adaptive diffusion coefficient :
- Drift:
- Sample:
- can be post-hoc tuned (e.g., cancels singularity at for linear interpolation, empirically yielding lowest FID for SiT-XL).
Classifier-Free Guidance is incorporated directly in the velocity prediction of SiT:
which corresponds to tempering the conditional vs. unconditional densities.
5. Effects of Interpolant Choice and Diffusion Coefficient
The interpolant function and the choice of are significant SiT hyperparameters:
- Linear interpolant (i.e., , ) shortens the transport path-length versus standard Variance Preserving (VP) interpolant, simplifying learning and improving FID.
- Score-based and velocity-based training are deterministically linked; either predictor suffices.
- The decoupling of sampled SDE () from the forward process allows empirical tuning for lowest FIDs.
Empirical results indicate SDE samplers consistently achieve lower FID than ODE on all interpolants. The optimal depends on learned target and interpolant; e.g., minimizes FID for linear interpolant with velocity matching.
6. Scaling, Quantitative Performance, and Ablations
SiT outperforms DiT across all scales and training budgets on the (latent) ImageNet 256x256 and 512x512 benchmarks, with identical architecture/compute:
| Model Variant | Params | GFLOPs | FID-50K (DiT) | FID-50K (SiT) |
|---|---|---|---|---|
| S | 33 M | 250 | 68.4 | 57.6 |
| B | 130 M | 350 | 43.5 | 33.5 |
| L | 458 M | 650 | 23.3 | 18.8 |
| XL | 675 M | 900 | 19.5 | 17.2 |
With extended training and paired with CFG (), SiT-XL establishes new state-of-the-art with FID-50K = 2.06 (Ma et al., 2024).
Ablation studies confirm:
- Both continuous- and discrete-time formulations are effective, but continuous improves FID.
- Weighted-score and velocity matching outperform plain score matching.
- Interpolant selection and tuning after training further reduce generation error.
ODE and SDE samplers, modularity of losses, and freedom to tune schedules contribute to the superiority of the SiT paradigm.
7. Broader Impact and Applicability
The SiT architecture unifies and extends Transformer-based generative modeling:
- Accommodates both SDE and ODE-based sampling under a common interface.
- Abstracts generative dynamics away from model architecture by parameterizing the interpolant.
- Facilitates systematic exploration of how time discretization, interpolant path, and model objective impact convergence and quality.
- Consistently yields performance improvements over prior DiT baselines without altering model structure or compute requirements.
A plausible implication is that flow-based Transformer modeling, particularly via SiT, sets a generalizable framework for the development of scalable, modular, and efficient large-scale diffusion models (Ma et al., 2024).