When Semantic Segmentation Meets Frequency Aliasing

Linwei Chen, Lin Gu, Ying Fu

TL;DR

Researchers have finally quantified why object boundaries are so difficult for AI to segment: frequency aliasing. By introducing a new "Aliasing Score" and two plug-and-play modules—the De-Aliasing Filter (DAF) and Frequency Mixing (FreqMix)—this paper provides a signal-processing framework to clean up "hard pixels" and significantly boost accuracy across standard and low-light segmentation benchmarks.

What Problem Does This Paper Address?

In semantic segmentation, we’ve long known that some pixels are "harder" than others. These "hard pixels" almost always cluster around object boundaries. While previous research empirically observed this trend, it didn't explain the underlying mechanism.

Segmentation errors often occur at boundaries and hard-to-predict regions.

The authors argue that the culprit is aliasing. In deep learning backbones, we constantly downsample feature maps to increase the receptive field and save on computation. However, according to the Nyquist-Shannon Sampling Theorem, if you sample a signal at a rate lower than twice its highest frequency, those high frequencies "alias"—they get distorted and reappear as low-frequency artifacts. In an image, these high frequencies represent fine details and sharp edges. When they alias, the model gets confused, leading to jagged boundaries and misclassified pixels.

Methods

The paper tackles aliasing through a mix of new metrics and architectural modules:

  • Equivalent Sampling Rate (ESR): Standard signal processing assumes sampling is just a point-wise operation. The authors point out that in neural networks, kernel size and channel expansion also affect the "effective" sampling rate. They propose a formula for ESR to more accurately calculate the Nyquist frequency (the threshold where aliasing begins) for any given layer.
  • Aliasing Score: Using the ESR, they define a quantitative metric: the ratio of power in frequencies above the Nyquist limit to the total power in the spectrum.
  • De-Aliasing Filter (DAF): This is a parameter-free module placed before downsampling. It uses a Fast Fourier Transform (FFT) to precisely zero out frequencies that would cause aliasing, then converts the signal back (iFFT) for the downsampling step.
  • Frequency Mixing (FreqMix): Since some high-frequency information is actually useful for detail, FreqMix adaptively weights frequencies above and below the Nyquist threshold. It uses a lightweight spatial and channel-wise attention mechanism to decide which frequencies to keep or suppress within the encoder blocks.

Key Insights: The Taxonomy of Errors

The authors categorize boundary errors into three distinct types:

  1. False Responses: Predicting a boundary where none exists (hallucinations).
  2. Merging Mistakes: Failing to see a boundary between two objects (missing edges).
  3. Displacements: Predicting the boundary slightly off from the true location.

Interestingly, "displacements" are highly correlated with high aliasing scores, while "false responses" and "merging mistakes" tend to happen even at lower aliasing levels. Furthermore, the paper demonstrates that Gaussian noise significantly increases the aliasing score in early network stages. This explains why models that perform well on clean images often fall apart in low-light or noisy conditions.

Unlike standard Gaussian blur filters (which are often used to reduce aliasing but blur everything), the DAF is "surgical." It only removes the specific frequencies that the math says will cause distortion.

Datasets and Key Results

The authors evaluated their approach on several heavy-hitting computer vision benchmarks, including Cityscapes (urban street scenes), PASCAL VOC (general objects), ADE20K (150 semantic classes), and LIS (Low-light Instance Segmentation, chosen because noise creates high-frequency components that exacerbate aliasing).

The proposed modules provided consistent "free" gains across various backbones (like ResNet and ConvNeXt):

  • Accuracy Boost: On Cityscapes, adding DAF and FreqMix to a UPerNet-R50 baseline improved mean Intersection-over-Union (mIoU) by 1.6%. On PASCAL VOC, the improvement was 1.8%.
  • Boundary Quality: The Boundary IoU (BIoU) saw even more significant gains, confirming that the modules specifically help with the "hard pixels" at edges.
  • Low-Light Performance: On the LIS dataset, the method achieved a +1.2 AP improvement for PointRend, outperforming complex "enhance-then-segment" pipelines.
  • Efficiency: FreqMix is highly efficient; the authors showed that a decomposed version of the module achieves nearly the same results as a full 3D version but with significantly fewer parameters and FLOPs.

Limitations and Future Work

  • Orthogonality Assumption: The calculation for ESR assumes that downsampling filters are predominantly orthogonal. While the authors provide an analysis showing this is mostly true for modern backbones, it remains a heuristic.
  • Transformer Focus: While the paper discusses Vision Transformers (ViTs) in the appendix, the core experiments focus on CNN-based architectures. The authors suggest that the "patchify" operation in ViTs is essentially a massive downsampling step that deserves its own frequency-aliasing investigation.
  • Dynamic ESR: Currently, the Nyquist frequency is calculated based on the architecture. Future work could involve dynamically adjusting the filter based on the learned weights of the filters during training.

Summary updated

BibTeX
@inproceedings{chen2024when,
  author = {Linwei Chen and Lin Gu and Ying Fu},
  title = {{When Semantic Segmentation Meets Frequency Aliasing}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=SYBdkHcXXK},
}
Figure