Unlocking Fine-Grained Details with Wavelet-based High-Frequency Enhancement in Transformers

Reza Azad, Amirhossein Kazerouni, Alaa Sulaiman, Afshin Bozorgpour, Ehsan Khodapanah Aghdam, Abin Jose, Dorit MerhofarXiv 2023

TL;DR

This paper introduces the Frequency Enhanced Transformer (FET), a novel U-shaped architecture designed to fix the local feature deficiency of Vision Transformers in medical image segmentation. By integrating Discrete Wavelet Transform (DWT) and boundary-aware attention, the model effectively preserves critical high-frequency details like edges and textures while maintaining linear computational complexity.

What Problem Does This Paper Address?

While Vision Transformers (ViTs) excel at capturing long-range contextual dependencies, they inherently suffer from a weak local description capability. In medical image segmentation, precise boundary localization is a matter of clinical importance. Recent studies have shown that stacking Transformer blocks successively causes them to act as low-pass filters, which progressively smooths out and degrades high-frequency details (such as sharp organ boundaries and fine textures).

Furthermore, standard self-attention scales quadratically ($O(n^2)$) with the number of image patches, making it computationally prohibitive for high-resolution dense prediction tasks. The authors aim to bridge this gap by designing a model that captures both global context and fine-grained local details efficiently.

Methods

The authors propose a U-shaped network architecture featuring two primary innovations:

  1. Frequency Enhancement Transformer (FET) Block: Instead of feeding raw feature maps directly into attention modules, the FET block uses a Discrete Wavelet Transform (DWT) to decompose features into low-frequency (LF) and high-frequency (HF) subbands. To counteract the smoothing effect of the standard Softmax operation, a Boundary Attention Mechanism creates a Gaussian hierarchical pyramid on top of the HF components. This explicitly highlights edge information and injects it directly into the attention's Value ($V$) representation. Additionally, the block reformulates standard self-attention into a linear complexity operation ($O(n)$).
Fig. 1: The overview of the proposed Frequency Enhanced Transformer (FET) model. Each frequency-enhanced Transformer block comprises the sequential LayerNorm, FET block, LayerNorm, and Mix-FFN modules.
  1. Multi-Scale Context Enhancement (MSCE) Module: Standard U-Net architectures use simple skip connections to pass features from the encoder to the decoder, which can suffer from a severe semantic gap. The MSCE module adaptively models inter-scale dependencies across all encoder stages using an efficient Transformer module and a squeeze-and-excitation block, ensuring rich texture information is accurately transferred to the decoder.
Fig. 2: (a) The FET Block. [LL, H, V, D] denotes the low-frequency, horizontal, vertical, and diagonal high-frequency counterparts. (b) The overview of MSCE skip connection enhancement module. LN, EffT, and SE are the LayerNorm, the efficient Transformer module, and the squeeze and excitation block, respectively.

Datasets

The model was evaluated on two prominent medical imaging benchmarks:

  • Synapse Multi-Organ Segmentation Dataset: Consists of 30 cases of abdominal CT scans (3,779 axial contrast-enhanced clinical images) annotated with eight abdominal organ classes (aorta, gallbladder, kidneys, liver, pancreas, spleen, and stomach).
  • ISIC 2018 Dataset: A large-scale dataset of dermoscopy images published by the International Skin Imaging Collaboration, utilized here for skin lesion segmentation.

Key Insights and Ideas

  • Transformers as Low-Pass Filters: Recognizing that standard self-attention naturally discards high frequencies allows the authors to treat the problem in the frequency domain. Explicitly isolating and reinforcing these frequencies via wavelets directly addresses the root cause of blurry boundary predictions in ViTs.
  • Linear Attention with Boundary Injection: By modifying the attention mechanism to operate linearly and adding boundary attention directly to the Value matrix, the network compensates for the destructive smoothing effect of the Softmax operation without increasing the computational bottleneck.
  • Rethinking Skip Connections: Instead of treating skip connections as isolated, single-scale pathways, aggregating multi-scale features through a global context bridge ensures that fine-grained localization information isn't lost across encoder-decoder transitions.

Key Results

The proposed FET model achieved state-of-the-art performance across both benchmarks:

  • Synapse Dataset: FET achieved a Dice Similarity Coefficient (DSC) of 81.92% and a Hausdorff Distance (HD) of 18.41, outperforming popular architectures like Swin-Unet (79.13% DSC) and HiFormer (80.39% DSC). It demonstrated significant improvements in segmenting notoriously difficult, easily deformable organs like the pancreas and spleen.
  • ISIC 2018 Dataset: FET achieved a DSC of 0.9157, demonstrating superior resilience against noise and artifacts compared to pure Transformer-based methods.
Qualitative and quantitative segmentation results

Limitations and Future Work

Not discussed in the paper.

Summary updated

BibTeX
@misc{azad2023unlocking,
  author = {Reza Azad and Amirhossein Kazerouni and Alaa Sulaiman and Afshin Bozorgpour and Ehsan Khodapanah Aghdam and Abin Jose and Dorit Merhof},
  title = {{Unlocking Fine-Grained Details with Wavelet-based High-Frequency Enhancement in Transformers}},
  year = {2023},
  eprint = {2308.13442},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.13442},
}
Figure