Papers
Topics
Authors
Recent
Search
2000 character limit reached

Structured Dilated Attention

Updated 2 July 2026
  • Structured dilated attention is a method that employs fixed or learnable dilation patterns to sparsely connect tokens or image patches, enabling efficient long-range dependency modeling.
  • It achieves linear to sub-quadratic computational complexity by using regular, exponential dilation schedules that expand the receptive field significantly over sequential layers.
  • Widely applied in vision, speech, and language tasks, it balances local detail and global context through alternating local and dilated attention mechanisms within hierarchical architectures.

Structured dilated attention refers to a family of sparse attention mechanisms that extend standard local or global self-attention by introducing controlled dilation patterns in the connectivity among sequence elements or image patches. By sparsifying the attention graph according to fixed or learned dilation schedules, these mechanisms enable efficient capture of both local and long-range dependencies with linear or sub-quadratic computational complexity, and are widely applied across vision, speech, language, and sequence modeling domains.

1. Formal Definition and Core Mechanisms

Structured dilated attention schemes enforce a sparse, structured connectivity in the attention computation, typically via regular dilation patterns. For a generic token sequence or spatial grid, attention at each position aggregates information only from a subset of positions defined by a dilation parameter, rather than from all possible positions as in dense self-attention.

In vision, the Dilated Neighborhood Attention (DiNA) mechanism formalizes this as follows: for an input sequence XRN×dX\in\mathbb{R}^{N\times d} (e.g., an H×WH\times W image grid flattened to N tokens), token ii attends only to positions in its "dilated neighborhood"

Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}

where w=2r+1w=2r+1 defines the local window and dd the dilation rate. The attention weights and outputs are: Aij=exp(QiKj/dk+B(i,j))kNd(i)exp(QiKk/dk+B(i,k))A_{ij} = \frac{\exp(Q_i K_j^\top/\sqrt{d_k} + B(i,j))}{\sum_{k\in N_d(i)} \exp(Q_i K_k^\top/\sqrt{d_k} + B(i,k))}

DiNA(X)i=jNd(i)AijVj\mathrm{DiNA}(X)_i = \sum_{j\in N_d(i)} A_{ij} V_j

For d=1d=1 this reduces to standard sliding-window (local) attention (Hassani et al., 2022, Saadati et al., 2023, Liu et al., 23 Jul 2025).

In temporal or 1D contexts, dilated self-attention replaces the full or local window by a fixed-size window with a stride (dilation) rr_\ell increasing with layer depth. Each position H×WH\times W0 attends to H×WH\times W1 for fixed H×WH\times W2, yielding exponentially expanding receptive fields: H×WH\times W3 with complexity H×WH\times W4 per layer (Zhao et al., 2022, Moritz et al., 2021, Han et al., 2019).

In language modeling, dilated causal attention restricts each token at timestep H×WH\times W5 to attend to every H×WH\times W6-th previous token and itself, i.e.,

H×WH\times W7

with per-output runtime and KV cache reduced by a factor of H×WH\times W8 (Wei et al., 20 Feb 2026).

2. Computational Complexity and Receptive Field Growth

The principal advantage of structured dilated attention is its ability to expand the receptive field much faster than ordinary local mechanisms while strictly controlling computational cost. In DiNA and related schemes, the per-layer cost remains H×WH\times W9, where ii0 is the fixed number of attended elements per query. However, by increasing the dilation factor ii1 across layers or blocks, the "view" of each token grows exponentially: a stack of ii2 DiNA layers with windowsize ii3 can reach an effective receptive field approaching ii4, in contrast to the linear increase of stacked convolutions or local attention (Hassani et al., 2022, Saadati et al., 2023, Liu et al., 23 Jul 2025).

In temporal settings, stacking layers with exponentially increasing stride (ii5), as in temporal convolutional networks (TCNs) or dilated self-attention Transformers, yields hierarchical aggregation of context on time scales exponentially larger per layer, but at only ii6 per-layer cost (Zhao et al., 2022, Han et al., 2019, Moritz et al., 2021).

Compared to full self-attention (ii7) or standard isotropic windows, structured dilation provides a practical trade-off between long-range modeling and efficiency, without resorting to pure global pooling or memory-intensive patterns.

3. Architectural Instantiations Across Domains

Structured dilated attention has been instantiated in a variety of architectural contexts, often in combination with hierarchical or multi-scale backbones:

  • Vision Transformers: DiNA is integrated into hierarchical backbones (e.g., DiNAT, Dilated-UNet), alternating between local (standard neighborhood, ii8) and dilated attention (ii9) per layer or stage, with dilation schedules such as (8,4,2,1) from shallow to deep. This configuration enables rapid aggregation of global context while refining spatial detail in later stages (Hassani et al., 2022, Saadati et al., 2023, Liu et al., 23 Jul 2025).
  • Image Restoration: DSAN and DiNAT-IR employ stripped or grouped dilated attention patterns (e.g., dilated strip attention, grouped dilation by channel), achieving high PSNR/SSIM in dehazing, deblurring, and desnowing tasks, often with sub-4M parameter models and linear cost. Channel-aware modules can be included to supplement spatially sparse context with global channel mixing (Hao et al., 2024, Liu et al., 23 Jul 2025).
  • Speech and Audio: Multi-stream architectures combine parallel streams with different dilation factors (1D dilated convolutions followed by attention per stream), fusing outputs to synthesize fine and coarse temporal resolutions. Similarly, Beat Transformer applies dilated temporal self-attention (increasing stride per layer) to achieve hierarchical metrical modeling and beat tracking (Han et al., 2019, Zhao et al., 2022).
  • Stereo and Structured Tasks: Row-wise or block-restricted dilated attention modules combine multi-dilation local convolutions with spatially constrained attention (e.g., along image rows for stereo matching), adapted to geometric priors of the task (Shi et al., 2021, Hoang et al., 2021).
  • Language Modeling and Long Context: RAT+ demonstrates that block-sparse/dilated causal attention—e.g., attending only to every Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}0-th token with or without local windows—yields order-of-magnitude efficiency gains when pretrained with recurrence to avoid disconnected context graphs and accuracy collapse (Wei et al., 20 Feb 2026).

4. Empirical Performance and Ablative Findings

Structured dilated attention methods consistently achieve comparable or superior performance to dense or purely local baselines at substantially lower computational cost, as demonstrated in various domains:

  • Object Detection and Dense Vision: DiNAT-L achieves +1–2% box/mask AP and mIoU improvement over Swin and ConvNeXt on COCO and ADE20K, with the largest PQ/mIoU gains in panoptic/semantic segmentation when using gradual dilation schedules and alternating NA/DiNA blocks (Hassani et al., 2022).
  • Medical Image Segmentation: Dilated-UNet reaches a +3.3% Dice coefficient gain on Synapse multi-organ benchmarks over leading hybrids, with sparse global DiNA layers responsible for +1.23% Dice over NA-only variants (Saadati et al., 2023).
  • Image Restoration: DSAN matches or exceeds the PSNR/SSIM of much larger transformer-based models, with multi-scale grouped DSA enabling wide receptive fields at constant parameter count and MACs. Optimal dilation rates (e.g., Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}1) further improve PSNR by up to 0.2 dB (Hao et al., 2024).
  • Speech Recognition: Multi-stream self-attention with diverse dilation rates achieves 2.2% WER on LibriSpeech, with ablation showing that diversity in dilation among streams provides the main performance boost (Han et al., 2019).
  • Long-range Language Modeling: RAT+ closely matches dense baselines even at Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}2 (1-2pt avg drop in commonsense reasoning, retaining Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}3 speedup), provided recurrence is co-trained to bridge the gaps in the sparse attention graph (Wei et al., 20 Feb 2026).

All results demonstrate that structured dilations are most effective when used in conjunction with architectural features that foster both global and local context exchange, and when hyperparameters such as dilation schedule, window size, and grouping are empirically tuned per task.

5. Design Trade-offs, Limitations, and Extensions

Structured dilated attention presents several trade-offs and implementation challenges:

  • Dilation Factor Selection: Larger values of Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}4 increase receptive field but may result in oversparse connectivity, under-representation of intermediate context, and degraded boundary precision (especially in shallow layers). Gradual or multi-scale schedules (e.g., per-layer increasing/decreasing Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}5, multi-head different Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}6) are generally superior to fixed dilation (Hassani et al., 2022, Saadati et al., 2023, Liu et al., 23 Jul 2025, Han et al., 2019).
  • Necessity of Recurrence or Skip Connections: For extremely sparse patterns (high Nd(i)={j:(uj,vj)=(ui+pd,vi+qd),  p,q[r,r]}N_d(i) = \{\,j: (u_j,v_j) = (u_i + p\,d,\,v_i + q\,d),\; p,\,q\in[-r, r] \}7 in LLMs), pure dilation can fragment the context graph. Models like RAT+ employ explicit full-sequence recurrence during both training and adaptation to maintain information flow; naively sparsifying a dense model post-hoc collapses performance (Wei et al., 20 Feb 2026).
  • Context-Dependent or Learnable Dilation: Fixed dilation patterns can fail to adapt to varying data statistics (e.g., speech rate, image structures). Suggested extensions include dynamic pooling/sampling, learnable or deformable dilation, and anisotropic dilation for elongated structures (Moritz et al., 2021, Saadati et al., 2023, Shi et al., 2021).
  • Local-Global Balancing: Optimal architectures typically alternate local attention (fine detail) and dilated or global attention (wide context), with the precise pattern (block order, channel grouping) selected via empirical ablation.
  • Downstream Adaptation: For pre-trained models, adaptation to sparse/dilated attention regimes requires targeted fine-tuning or curriculum-based training to prevent catastrophic drop in accuracy (Wei et al., 20 Feb 2026).

6. Applications Across Modalities and Future Directions

Structured dilated attention is now a core component in leading architectures for:

  • Vision: dense prediction (detection, segmentation), image restoration (dehazing, deblurring, etc.), stereo/depth reasoning, and biomedical segmentation.
  • Audio/Speech: ASR, beat and metrical tracking.
  • Language and Long-Context Models: efficient inference and memory-bound adaptation for document- or dialogue-level modeling.
  • Other Sequences: time-series forecasting, event detection, and modalities with inherent multi-scale, hierarchical dependencies.

Future directions involve scaling these mechanisms to even longer contexts, integrating learnable or adaptive dilation, combining with structured recurrence or memory augmentation, and extending to non-Euclidean (graph or manifold) domains. The paradigm of training dense and inferring sparse (as in RAT+) is likely to broaden options for efficient deployment without sacrificing modeling power (Wei et al., 20 Feb 2026).

Structured dilated attention is distinct from unstructured or randomly sparse attention in that its sparsity pattern is regular, hierarchical, and efficiently computable. Unlike block-sparse, random, or low-rank schemes, dilation patterns guarantee shortest-path connectivity across the sequence or grid after few layers, mirroring the effect of exponentially expanding convolutions but with content-adaptive attention weights. When equipped with recurrence modules and multi-scale decomposition, dilated attention bridges the flexibility of full self-attention with the efficiency of local or convolutional operations, accounting for its prevalence in current state-of-the-art models (Zhao et al., 2022, Hassani et al., 2022, Wei et al., 20 Feb 2026, Saadati et al., 2023, Han et al., 2019).

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 Structured Dilated Attention.