FG-DSA: Frequency-Guided Depthwise Separable Attention for Efficient Dense Prediction

Yiyao YangarXiv 2026

TL;DR

FG-DSA introduces a novel, ultra-lightweight attention module that uses 2D Fast Fourier Transforms (FFT) to inject high-frequency "priors" (like edges and textures) directly into spatial attention mechanisms. By combining frequency-domain filtering with linear-complexity depthwise separable attention, it allows resource-constrained models to recover sharp object boundaries in semantic segmentation and fine details in image generation with minimal computational overhead.

What Problem Does This Paper Address?

In the world of "dense prediction"—tasks like semantic segmentation where every pixel needs a label—there is a persistent trade-off between semantic depth and spatial detail. To understand what an object is, deep learning models repeatedly downsample images to capture broad context. However, this process acts like a blur filter, destroying the high-frequency information necessary to know exactly where an object ends.

Standard solutions like the U-Net use skip connections to bring back detail, but they often struggle with "touching objects" or blurry transitions. More recent attention-based models can fix this but are usually too "heavy" (computationally expensive) for real-time use on edge devices. The authors of FG-DSA set out to find a way to restore these lost edges without the quadratic computational cost of standard self-attention or the parameter bloat of heavy dynamic convolutions.

Methods

The core innovation, Frequency-Guided Depthwise Separable Attention (FG-DSA), is a dual-branch module designed to be "plug-and-play."

  1. High-Pass Prior Extraction: Instead of using learnable filters to find edges, the model uses a parameter-free 2D-FFT. It converts the feature map into the frequency domain, applies a Gaussian High-Pass Filter (GHPF) to isolate the "spiky" high-frequency components (edges and textures), and then converts it back to the spatial domain.
  2. Linear Depthwise Separable Attention (DSA): To keep things fast, the authors avoid standard self-attention, which scales quadratically with image size ($O(N^2)$). Instead, they use a linear-complexity ($O(N)$) version that employs depthwise convolutions to project Queries, Keys, and Values.
  3. Adaptive Fusion: The high-frequency priors from the FFT branch act as a "guide." A learnable gating factor decides how much of this edge information should be injected into the spatial attention map.
The FG-DSA workflow: from FFT-based edge extraction to guided attention and final recovery.

Datasets

The researchers evaluated their framework on the CamVid (Cambridge-Driving Labeled Video Database). This is a standard benchmark for urban road scenes, which is particularly challenging because it contains many "thin" objects like poles, fences, and pedestrians that are easily lost during downsampling. They focused on a standard 11-class partition to ensure an unbiased evaluation of boundary recovery.

Key Insights and Ideas

  • Frequency as a Shortcut: The "aha" moment here is that finding edges is mathematically "cheaper" in the frequency domain than in the spatial domain. By using a parameter-free FFT, the model gets high-quality edge cues for "free" before the attention mechanism even starts.
  • The "Hard-Class" Focus: The authors argue that standard metrics like Global mIoU (mean Intersection over Union) are misleading because they are dominated by large, easy-to-segment areas like the sky or road. The real test of a model is the "Hard-Class Boundary mIoU"—how well it handles the thin, complex perimeters of objects like signposts.
  • Versatility Across Tasks: Unlike many modules designed strictly for segmentation, FG-DSA is task-agnostic. The authors successfully plugged it into the bottleneck of a diffusion-based generative U-Net, proving that the same principle that helps a model see an edge also helps it draw one.
A unified paradigm for both dense prediction and visual generation.

Key Results

The quantitative gains are most impressive where the task is hardest:

  • Segmentation Accuracy: On the CamVid dataset, FG-DSA boosted the Hard-Class Boundary mIoU by a massive 10.14% (from 18.47% to 28.61%) compared to a baseline U-Net.
  • Generative Quality: When used in a generative context, it delivered a 0.3368 dB improvement in Peak Signal-to-Noise Ratio (PSNR) and a 2.21% reduction in high-frequency error.
  • Efficiency: The module is remarkably lightweight. Adding it to a generative U-Net increased the parameter count by only ~0.08M (a 27% relative increase for a very small model) and added only 0.72ms of latency per image (a 6% increase).
Visual comparison showing how FG-DSA restores thin structures like poles and curb lines that the baseline misses.

Limitations and Future Work

While the theoretical FLOP count of a 2D-FFT is very low, the authors note a practical hurdle: hardware optimization. Current GPUs and edge AI accelerators are heavily optimized for standard convolutions. FFT operations can be bandwidth-intensive, meaning the actual "wall-clock" latency on some devices might be higher than the FLOP count suggests.

Future work could involve developing more hardware-friendly approximations of the frequency-gating mechanism or exploring how this frequency-aware attention scales to much larger transformer-based backbones.

Summary updated

Abstract

Dense prediction and generative modeling in resource-constrained scenarios remain challenging, as repeated downsampling substantially reduces spatial detail and degrades boundaries. Although recent attention mechanisms have alleviated the problem of semantic ambiguity, they often fail to preserve high-frequency features or do so at the expense of a very high computational cost. In this paper, we propose the Frequency Guided Depthwise Separable Attention for Efficient Dense Prediction (FG-DSA), a novel framework for efficient dense visual understanding and generation. FG-DSA employs a 2D FFT high-pass filtering module to explicitly inject frequency domain priors into the spatial attention mechanism, allowing lightweight networks to recover sharp boundary transitions with linear complexity. A range of experiments show that FG-DSA is effective at recovering fine object boundaries and leads to a consistent performance gain in the task of semantic segmentation. Importantly, we show that FGA-DSA can be used as a module in diffusion-based generative U-Nets, leading to a significant improvement in the detail of the generated images with very little additional parameter and Floating Point Operation (FLOP) cost.
BibTeX
@misc{yang2026fg,
  author = {Yiyao Yang},
  title = {{FG-DSA: Frequency-Guided Depthwise Separable Attention for Efficient Dense Prediction}},
  year = {2026},
  eprint = {2611.10653},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.10653},
}
Figure