Create and explore imaginative 3D worlds with our new product Dreamfield (opens in a new tab)
Papers
Topics
Authors
Recent
Search
2000 character limit reached

Hierarchical Diffusion Transformers (HiT)

Updated 20 November 2026
  • Hierarchical Diffusion Transformers (HiT) are model architectures organizing visual computations hierarchically, rather than uniformly to enhance performance in image synthesis and generation.
  • The architecture has two primary variants: the convolution-free hierarchical generator for GAN and an adaptive pixel-space diffusion transformer, both eliminating the computational burden of dense attention by processing compact, low-resolution representations and fine-tuning high-resolution details through dynamic token hierarchies.
  • The diffusion-based HiT model surpasses traditional models with FID scores as low as 1.48 on ImageNet 256x256 and achieves effective, multimodal transformations in text-to-image synthesis.

Hierarchical Diffusion Transformers (HiT) are diffusion-based Transformer architectures that organize visual computation hierarchically rather than maintaining a uniform full-resolution token sequence throughout generation. The term denotes two related design directions: an earlier convolution-free hierarchical Transformer generator for GANs, which assigns global dependency modeling to low-resolution stages and local rendering to high-resolution MLP stages (Zhao et al., 2021), and a later pixel-space diffusion architecture that adaptively groups image tokens into compact, input-dependent representations, processes them with a bottleneck Transformer, and restores them through soft ungrouping (Wu et al., 17 Nov 2026). More broadly, hierarchical diffusion Transformers address the computational and representational limitations of dense attention by allocating global modeling to compact representations while preserving fine-resolution information through local operators, skip pathways, or adaptive routing.

1. Conceptual foundations and terminology

A conventional Vision Transformer processes a sequence of image tokens at a fixed spatial granularity. If the sequence contains NN tokens, standard global self-attention has quadratic complexity, approximately O(N2)\mathcal{O}(N^2). This cost becomes substantial for high-resolution images, long videos, and dense prediction tasks. Hierarchical architectures reduce this burden by changing the token organization or interaction pattern across stages.

The hierarchical principle can be expressed as a scale-dependent allocation of computation:

global structural reasoning at compact scales+fine-detail synthesis at high resolutions.\text{global structural reasoning at compact scales} + \text{fine-detail synthesis at high resolutions}.

In the GAN-oriented HiT, hierarchy is primarily geometric and representational. The generator begins with an 8×88\times 8 feature map, applies efficient attention at low resolutions, and progressively upsamples through resolutions such as

8→16→32→64→128→256.8\rightarrow16\rightarrow32\rightarrow64\rightarrow128\rightarrow256.

In the pixel-space diffusion HiT, hierarchy is adaptive and token-based. Image tokens are progressively grouped into a smaller number of learned group tokens, processed in a compact bottleneck, and then ungrouped to the original image-token positions. With two grouping stages, the standard sequence for a 256×256256\times256 image with 16×1616\times16 patches is

256→128→64.256\rightarrow128\rightarrow64.

These approaches share the objective of avoiding uniform full-resolution computation, but they implement hierarchy differently. The former uses predetermined resolution stages and scale-specific operators; the latter learns image- and timestep-dependent group memberships and group counts.

The term “Hierarchical Diffusion Transformer” is therefore not restricted to one attention mechanism. It describes an architectural family in which diffusion computation is distributed across multiple levels of spatial, token, semantic, or representational granularity.

2. Precursor: convolution-free hierarchical Transformer generation

The first HiT architecture was introduced as a convolution-free generator for high-resolution GAN image synthesis (Zhao et al., 2021). Its motivation was that convolutions efficiently exploit locality but expand their receptive field only gradually, whereas global self-attention directly models long-range relationships. However, full self-attention over an image with N=HWN=HW tokens requires an N×NN\times N attention matrix and has complexity approximately

O(N2).\mathcal{O}(N^2).

HiT addresses this cost through a division between low- and high-resolution stages. At low resolutions, it retains efficient sparse attention for spatial dependency modeling. At high resolutions, it removes self-attention and uses token-wise MLPs to synthesize local pixel-level detail. A cross-attention self-modulation mechanism provides every stage with access to a compact representation of the original latent code.

The generator maps a latent vector

z∼N(0,I)z\sim\mathcal{N}(0,I)

to an initial 8×88\times8 feature map. A separate projection produces a compact spatial latent embedding ZZ, also spatially organized at 8×88\times8 in the reported implementation. The same latent embedding is shared across generator stages. Each stage adds positional information, applies cross-attention to ZZ, performs either multi-axis blocked self-attention or an MLP, upsamples the feature representation, and may produce an RGB contribution that is progressively accumulated.

Feature-map transitions use pixel shuffle. If

Xl∈RH×W×4C′,X_l\in\mathbb{R}^{H\times W\times 4C'},

then

PixelShuffle⁡2×2(Xl)∈R2H×2W×C′.\operatorname{PixelShuffle}_{2\times2}(X_l) \in\mathbb{R}^{2H\times2W\times C'}.

The paper reports that pixel shuffle performed better than nearest-neighbor upsampling for principal feature-map transitions. Nearest-neighbor operations are used separately for progressively accumulating RGB outputs.

The generator contains no convolutional layers. Its principal operations are linear projections, positional embeddings, cross-attention, multi-axis blocked self-attention, MLPs, pixel shuffle, and linear RGB projections. The convolution-free designation applies to the generator; the discriminator remains ResNet-based.

3. Low-resolution global reasoning

3.1 Multi-axis blocked self-attention

At low resolutions, HiT partitions a feature map into non-overlapping b×bb\times b blocks. For a feature map with dimensions H×WH\times W, the number of blocks is

M=HbWb,M=\frac{H}{b}\frac{W}{b},

and each block contains

Nb=b2N_b=b^2

tokens. The blocked representation can be written as

X∈RM×Nb×C.X\in\mathbb{R}^{M\times N_b\times C}.

HiT computes two attention operations in parallel.

Regional attention operates within each block. Tokens attend to other tokens in the same local block, capturing local spatial relationships.

Dilated attention connects corresponding positions across different blocks. If ii denotes a position within a block, the token at position ii attends to position ii in multiple spatially separated blocks. This creates a sparse, large-receptive-field interaction pattern analogous to dilated convolution.

The two outputs are concatenated across attention heads and projected. Approximately half of the query heads are assigned to regional attention and half to dilated attention. Keys and values are shared in the multi-query attention variant used by the implementation.

The central design choice is parallel multi-axis mixing: local within-block and long-range across-block interactions are computed in one attention layer rather than in separate or alternating layers.

3.2 Complexity

Blocked regional attention has complexity

O(HWb2),\mathcal{O}(HWb^2),

while dilated attention has complexity

O((HW)2b2).\mathcal{O}\left(\frac{(HW)^2}{b^2}\right).

HiT balances the two axes by selecting bb such that

b2≈HWb2.b^2\approx\frac{HW}{b^2}.

The resulting attention computation is summarized as SS sequences of length SS, with

O(S⋅S2)=O(NN),\mathcal{O}(S\cdot S^2) = \mathcal{O}(N\sqrt{N}),

where N=HWN=HW. This is subquadratic but not strictly linear. The nearly linear behavior of the complete generator arises principally because this attention is restricted to low-resolution stages, whereas high-resolution stages remove self-attention entirely.

3.3 Normalization and attention variants

The general Transformer block uses positional embeddings, normalization, attention, an MLP, and residual connections. In the actual HiT implementation, batch normalization replaces layer normalization because it produced better FID and IS and stabilized training. Multi-query attention replaces conventional multi-head attention by sharing keys and values across query heads.

On ImageNet 128×128128\times128, the reported comparison gives FID $38.96$ and IS $18.18$ for layer normalization, versus FID $31.87$ and IS $21.32$ for batch normalization. Multi-query attention has throughput $75.33$ and FID $31.87$, compared with throughput $74.73$ and FID $32.06$ for multi-head attention.

4. High-resolution synthesis and latent conditioning

At resolutions above approximately 64×6464\times64, the GAN-oriented HiT removes self-attention and applies shared MLP transformations token-wise. For a feature map

Xl∈RHl×Wl×Cl,X_l\in\mathbb{R}^{H_l\times W_l\times C_l},

the MLP cost is

O(HlWlClChidden),\mathcal{O}(H_lW_lC_lC_{\mathrm{hidden}}),

which is linear in the number of spatial tokens and does not construct an N×NN\times N attention matrix.

The high-resolution stage can be interpreted as a conditional function

f(p;x),f(p;x),

where pp is a spatial coordinate or positional encoding and xx is a feature condition inherited from earlier stages and the latent code. This connects the design to implicit neural representations, in which an image is represented as

I(p)=fθ(p,z).I(p)=f_\theta(p,z).

HiT is not identical to earlier INR-GANs. Whereas INR-GANs commonly use hypernetworks to generate or modulate MLP weights, HiT conditions its high-resolution MLP stages with decoded hierarchical feature maps, positional encodings, and cross-attention to a latent embedding.

The architecture assumes that global structure, coarse shape, color, and long-range spatial dependencies can be decoded at low resolutions. High-resolution stages then synthesize local detail. Ablations report that adding more self-attention stages improves results at low resolutions, while self-attention above 64×6464\times64 provides little apparent quality benefit and substantially worsens training and inference time.

Cross-attention is inserted at the beginning of every generator stage. The stage feature acts as the query, while the latent embedding and its positional encoding provide keys and values:

Q=XlWQ,Q=X_lW_Q,

K=(Z+PZ)WK,K=(Z+P_Z)W_K,

V=(Z+PZ)WV.V=(Z+P_Z)W_V.

The resulting complexity is

O(NlNZ),\mathcal{O}(N_lN_Z),

where NZ≪NlN_Z\ll N_l. With a fixed compact latent sequence, this becomes effectively linear in the stage sequence length. Cross-attention therefore supplies a global latent-conditioning path even when high-resolution stages use only MLPs.

5. Adaptive token hierarchy in pixel-space diffusion

The later HiT architecture applies hierarchy directly to end-to-end pixel-space diffusion generation (Wu et al., 17 Nov 2026). Pixel-space diffusion avoids a separately pretrained visual encoder but ordinarily maintains approximately one token per patch throughout the Transformer. This gives background and semantically important regions similar computational allocation and prevents deeper layers from operating on progressively more compact semantic representations.

The diffusion HiT uses an encoder–bottleneck–decoder structure. For JJ grouping levels, its token sequence follows

N→K1→K2→⋯→KJ→⋯→K2→K1→N,N\rightarrow K_1\rightarrow K_2\rightarrow\cdots\rightarrow K_J \rightarrow\cdots\rightarrow K_2\rightarrow K_1\rightarrow N,

where NN is the number of original image patches and KℓK_\ell is the input-dependent number of groups at level ℓ\ell.

The default ImageNet HiT-B/16 layout contains 18 Transformer blocks arranged as

$3/3/6/3/3.$

These correspond to full-resolution encoder blocks, intermediate-resolution encoder blocks, compact bottleneck blocks, intermediate-resolution decoder blocks, and full-resolution decoder blocks. The main HiT-XL/16 model has approximately $959.5$ million parameters.

The computation proceeds through linear patch projection, full-resolution Transformer processing, learned grouping, compact group-token processing, soft ungrouping, skip fusion, a second grouping stage, symmetric decoding, and a final linear head predicting the clean image.

5.1 Learned affinity grouping

At grouping stage ℓ\ell, contextualized features are represented as

H=[h1,…,hN]⊤∈RN×d.H=[h_1,\ldots,h_N]^\top\in\mathbb{R}^{N\times d}.

Query and key projections are normalized:

qi=norm⁡(Wqhi),ki=norm⁡(Wkhi).q_i=\operatorname{norm}(W_qh_i), \qquad k_i=\operatorname{norm}(W_kh_i).

The symmetric affinity between tokens ii and jj is

Sij=12(qi⊤kj+qj⊤ki).S_{ij} = \frac{1}{2} \left(q_i^\top k_j+q_j^\top k_i\right).

Average-linkage grouping begins with every token as its own group and repeatedly merges groups with the highest mean inter-group affinity. Merges whose affinity is at least a threshold τ\tau are retained. The number of resulting groups is not fixed and can vary across images, image contents, diffusion timesteps, and batch elements.

Because grouping is affinity-based rather than spatially constrained, spatially distant patches can be assigned to the same group. Reported visualizations include separated banana regions, repeated foliage, and disconnected car markings.

5.2 Soft pooling and ungrouping

Hard groups define the computational hierarchy, but hard grouping is not directly differentiable. HiT therefore constructs soft routing weights. For input token ii and group GgG_g,

eig=1∣Gg∣∑j∈GgSij,e_{ig} = \frac{1}{|G_g|} \sum_{j\in G_g}S_{ij},

and

Aig=exp⁡(eig/Tr)∑g′=1Kexp⁡(eig′/Tr).A_{ig} = \frac{\exp(e_{ig}/T_{\mathrm r})} {\sum_{g'=1}^{K}\exp(e_{ig'}/T_{\mathrm r})}.

The default routing temperature is Tr=0.05T_{\mathrm r}=0.05.

The pooling matrix is

Pig=Aig∑j=1NAjg,P_{ig} = \frac{A_{ig}} {\sum_{j=1}^{N}A_{jg}},

and compact group tokens are

Z=P⊤H.Z=P^\top H.

Every input token can contribute softly to every group. This differs from averaging only the members of a hard partition. Ablations report that learned soft aggregation over all input tokens performs substantially better than hard-group-only pooling.

After compact Transformer processing,

Z~=M(Z),\widetilde{Z}=\mathcal{M}(Z),

the representation is restored by

R=AZ~.R=A\widetilde{Z}.

Skip fusion combines the ungrouped compact representation with pre-grouping features:

H~=AM(Z)+HWℓ⊤,\widetilde{H} = A\mathcal{M}(Z)+HW_\ell^\top,

where WℓW_\ell is initialized to the identity. The skip pathway preserves fine-grained information that may be lost during compact pooling.

5.3 Compression budget

HiT regulates the average retained token fraction over a batch rather than enforcing a fixed group count for every image. For target compression ratio rr, the retained fraction is

ρ=1r.\rho=\frac{1}{r}.

If NbN_b is the number of input tokens for batch example bb and KbK_b is the number of hard groups, the actual retained fraction is

fh=∑bKb∑bNb.f_{\mathrm h} = \frac{\sum_bK_b}{\sum_bN_b}.

A differentiable estimate uses the merge affinities:

K~b=Nb−∑m=1Nb−1σ(sb,m−τTb),\widetilde{K}_b = N_b-\sum_{m=1}^{N_b-1} \sigma\left(\frac{s_{b,m}-\tau}{T_{\mathrm b}}\right),

with soft retained fraction

fs=∑bK~b∑bNb.f_{\mathrm s} = \frac{\sum_b\widetilde{K}_b}{\sum_bN_b}.

The compression loss at stage ℓ\ell is

Lcomp(ℓ)=1+(fh−ρ)(fs−ρ)ρ(1−ρ).\mathcal{L}_{\mathrm{comp}}^{(\ell)} = 1+ \frac{(f_{\mathrm h}-\rho)(f_{\mathrm s}-\rho)} {\rho(1-\rho)}.

The total objective is

L=Ldiff+λLcomp,\mathcal{L} = \mathcal{L}_{\mathrm{diff}} + \lambda\mathcal{L}_{\mathrm{comp}},

with default λ=0.01\lambda=0.01. The budget is aggregate: individual images and timesteps can use different numbers of groups.

6. Diffusion conditioning, sampling, and multimodal grouping

The pixel-space diffusion HiT follows a clean-image prediction formulation. Given clean image xx, Gaussian noise ϵ\epsilon, and timestep t∈[0,1]t\in[0,1],

xt=tx+(1−t)ϵ.x_t=tx+(1-t)\epsilon.

The denoiser predicts xx, with diffusion loss

Ldiff=Ex,c,t,ϵ[MSE⁡(fθ(xt,t,c),x)max⁡(1−t,amin⁡)2],\mathcal{L}_{\mathrm{diff}} = \mathbb{E}_{x,c,t,\epsilon} \left[ \frac{ \operatorname{MSE}(f_\theta(x_t,t,c),x) }{ \max(1-t,a_{\min})^2 } \right],

where amin⁡=0.05a_{\min}=0.05.

Class and timestep conditioning is introduced as tokens rather than through adaptive layer normalization. For ImageNet, the model uses eight class-context tokens and one timestep token. These tokens bypass grouping and ungrouping and are excluded from the compression budget.

At inference, grouping is recomputed from the current noisy input, so the hierarchy can change throughout denoising. HiT additionally uses group guidance, which treats group capacity as a controllable axis alongside ordinary conditional guidance. Conditional and unconditional branches may use different group-count multipliers. For the reported ImageNet result, group guidance uses scale s=2.6s=2.6, conditional multipliers (1.2,1)(1.2,1), and timestep-dependent unconditional multipliers. Sampling uses 50 Heun steps followed by a final Euler step and a timestep-grid shift k=1.7k=1.7.

For text-to-image generation, image and caption tokens are grouped jointly after outer-stage processing. A frozen FLAN-T5-Large text encoder supplies caption tokens with sequence length 256. Groups may contain image features, text features, or both. The same affinity router operates in the shared representation space, allowing caption words to associate with image patches depicting corresponding concepts without word–region annotations.

The reported text-to-image HiT-B/16 model has approximately $0.25$ billion denoiser parameters and requires $139.4$ GFLOPs per forward pass. It obtains an average benchmark score of $65.93$ across five reported benchmarks, exceeding UniLiP-3B’s $65.76$, while using approximately 6×6\times fewer denoiser parameters and 3×3\times fewer forward FLOPs.

7. Applications, results, and qualifications

The GAN-oriented HiT demonstrated convolution-free high-resolution image synthesis. It reported FID $30.83$ and IS $21.64$ on unconditional ImageNet 128×128128\times128, and FID $2.95$ on FFHQ 256×256256\times256. On FFHQ 256×256256\times256, HiT-B reported FID $2.95$ with throughput $52.09$ images per second, while HiT-L reported FID $2.58$ with throughput $20.67$ images per second on a single Tesla V100. At 1024×10241024\times1024, HiT remained competitive but did not surpass StyleGAN2: FFHQ FID was $6.37$ versus $4.41$, and CelebA-HQ FID was $8.83$ versus $5.17$.

The diffusion HiT reported FID $1.48$ on ImageNet 256×256256\times256. At 600 epochs, HiT-XL/16 achieved FID $1.48$, compared with FID $1.86$ for JiT-H/16. The paper reports comparable generation quality to JiT using approximately 40%40\% of its cumulative training FLOPs. In a controlled 80-epoch scaling study, HiT-B, HiT-L, and HiT-XL achieved FIDs $6.61$, $4.16$, and $3.64$, respectively, compared with $10.37$, $4.85$, and $4.39$ for corresponding JiT models.

The reported ablations indicate that adaptive grouping contributes beyond token reduction alone. A fixed spatial grouping control with the same average token populations achieved FID $7.11$, whereas adaptive learned grouping achieved FID $6.61$. The best compression configuration was a progressive two-stage 2×22\times2 hierarchy, with token counts

256→128→64.256\rightarrow128\rightarrow64.

More aggressive one-shot compression, excessive compression, or allocating too much depth to the deepest bottleneck degraded FID.

Several qualifications apply. Grouping is not exactly differentiable: hard tree construction and threshold decisions are treated as fixed during backpropagation, while gradients pass through soft pooling, soft ungrouping, and the differentiable group-count estimate. Pooling is lossy, making skip connections important. Routing introduces affinity-computation overhead and requires threshold calibration. Nominal GFLOPs are based on target group counts, whereas actual inference cost varies with image content and timestep.

The semantic interpretation of the groups is emergent rather than supervised. Visualizations suggest object, object-part, texture, and cross-modal organization, but the model is not trained with segmentation or region-level labels. These groups therefore should not be interpreted as guaranteed semantic segmentation.

Hierarchical diffusion Transformers are best understood as a family of scale-adaptive generative architectures rather than a single canonical model. The GAN-oriented HiT uses low-resolution multi-axis attention, high-resolution MLP rendering, and cross-attention latent self-modulation. The pixel-space diffusion HiT learns adaptive affinity-based token grouping, compact bottleneck processing, soft ungrouping, skip fusion, and group-guided sampling. Their common architectural premise is that global structure should be modeled through compact, information-rich representations, while high-resolution computation should be restricted to operations whose cost scales more favorably with the number of tokens.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Hierarchical Diffusion Transformers (HiT).