Improving Feature Stability During Upsampling - Spectral Artifacts and the Importance of Spatial Context

Shashank Agnihotri, Julia Grabinski, Margret Keuper

Abstract

Common upsampling techniques in encoder-decoder architectures, such as Pixel Shuffle and small-kernel transposed convolutions, introduce significant spectral artifacts. These artifacts, while often imperceptible in clean images, create frequency-domain vulnerabilities that adversarial attacks can exploit, leading to model instability. This paper proposes Large Context Transposed Convolutions (LCTC), utilizing kernels of $7 \times 7$ or larger to provide the necessary spatial context for stable, high-quality upsampling. Evaluations across image restoration, segmentation, and depth estimation tasks demonstrate that LCTC significantly enhances robustness and visual quality.

Introduction

Modern computer vision models frequently utilize U-Net-like structures that downsample images for feature extraction and upsample them for high-resolution output. While downsampling aliasing is well-documented, the artifacts generated during upsampling have received less attention. Standard methods like Pixel Shuffle or $3 \times 3$ transposed convolutions often produce "grid-like" or "ringing" artifacts. In the frequency domain, these appear as repeating peaks or "spectral aliases." These aliases act as "hooks" for adversarial noise, causing a total breakdown in prediction stability even when clean-image performance appears high.

Methods

The proposed solution, Large Context Transposed Convolutions (LCTC), is rooted in signal processing theory. Ideal upsampling requires a sinc filter with infinite spatial extent. Local kernels ($2 \times 2$ or $3 \times 3$) fail to approximate this, whereas larger kernels (e.g., $7 \times 7$ to $31 \times 31$) provide the broad context needed to reconstruct lost high frequencies accurately.

To ensure the model doesn't lose fine-grained local details while capturing this broad context, the authors often employ a hybrid approach: a large kernel (e.g., $11 \times 11$) alongside a small kernel (e.g., $3 \times 3$). Crucially, ablation studies showed that the benefit is exclusive to the upsampling operation itself; increasing kernel sizes in the regular decoder blocks actually decreased performance and stability.

Results and Insights

LCTC effectively "smooths" the frequency spectrum, removing the adversarial hooks that allow small amounts of noise to ruin outputs.

Comparison of upsampling methods under attack. Baseline methods show significant spectral artifacts in the 2D frequency spectra and collapse under adversarial noise, while LCTC (ours) maintains stability.

Key Performance Metrics

  • Image Restoration (NAFNet): Under a 20-step adversarial attack, the Pixel Shuffle baseline collapsed to a 5.81 PSNR, while the LCTC ($11 \times 11$) version maintained a much more usable 9.54 PSNR.
  • Segmentation Stability: On PASCAL VOC, under heavy SegPGD attacks, the LCTC model achieved a 7.08% mIoU, significantly outperforming the $2 \times 2$ baseline's 5.54% mIoU.

Qualitatively, LCTC eliminates the grid artifacts common in traditional interpolation and Pixel Shuffle methods, producing smoother, more natural reconstructions.

Qualitative comparison of upsampling artifacts. LCTC produces smoother results closer to the ground truth compared to the grid-like artifacts of Pixel Shuffle and Nearest Neighbor interpolation.

Conclusion and Future Work

LCTC addresses a fundamental architectural flaw in upsampling by providing the necessary spatial context to avoid spectral aliasing. While larger kernels increase computational cost (FLOPs and memory), depth-wise or group-wise convolutions can mitigate this trade-off. Future research may focus on joint optimization of the encoder and decoder to minimize resolution-based feature mismatches and the development of specialized frequency-domain metrics to better capture these artifacts on clean data.

Summary updated

BibTeX
@inproceedings{agnihotri2024improving,
  author = {Shashank Agnihotri and Julia Grabinski and Margret Keuper},
  title = {{Improving Feature Stability During Upsampling - Spectral Artifacts and the Importance of Spatial Context}},
  booktitle = {European Conference on Computer Vision},
  year = {2024},
  doi = {10.1007/978-3-031-73636-0\_21},
}
Figure