Fourier Image Transformer

Tim-Oliver Buchholz, Florian Jug

Introduction

While Vision Transformers (ViTs) have traditionally processed images as sequences of spatial pixel patches, this approach has limitations in tasks requiring global context or multi-fidelity representations. Standard auto-regressive models predict images pixel-by-pixel; however, stopping such a sequence prematurely results in an incomplete image rather than a low-fidelity version of the whole. Furthermore, in domains like Computed Tomography (CT), sparse-view scans create "missing wedges" in frequency space that manifest as global artifacts in pixel space, which local Convolutional Neural Networks (CNNs) struggle to resolve.

This paper introduces Fourier Domain Encodings (FDEs) to enable Transformers to process images sequentially in the frequency domain. By ordering frequencies from low to high, the model can treat super-resolution as a sequence completion task and tomographic reconstruction as a frequency-domain imputation task.

Overview of the Fourier Image Transformer (FIT) architectures for Super-Resolution and Tomographic Reconstruction.

Methodology

Fourier Domain Encoding (FDE)

The core innovation is the FDE, which transforms a 2D image into a 1D sequence suitable for Transformer processing:

  1. Sequence Generation: A 2D discrete Fourier transform is applied to the image. The resulting coefficients are unrolled into a 1D sequence starting from the DC component (center) and moving outward in concentric rings. This ensures that any prefix of the sequence represents the entire image at a specific resolution.
  2. Positional Encoding: Spatial awareness is maintained using 2D positional encodings based on the polar coordinates of the Fourier coefficients.
  3. Fourier Coefficient Loss ($L_{FC}$): The network is optimized using a custom loss function that combines amplitude Mean Squared Error (MSE) and phase cosine distance.

Model Architectures

The authors deploy FDEs in two specialized Transformer configurations:

  • FIT: SRes (Super-Resolution): A causal, auto-regressive Transformer that takes a truncated FDE (representing low frequencies) and predicts the remaining high-frequency tokens.
  • FIT: TRec (Tomography Reconstruction): An encoder-decoder architecture. The encoder processes sparse Fourier measurements derived from CT projections, while the decoder predicts the missing coefficients to reconstruct a complete frequency spectrum.
Detailed pipeline for Tomographic Reconstruction (FIT: TRec), showing the transition from sinograms to predicted real images via Fourier space.

Experimental Results

Super-Resolution

The FIT: SRes model was evaluated on MNIST and CelebA datasets. The model demonstrated an ability to learn strong semantic priors; for instance, when reconstructing human faces, the Transformer prioritized filling in structural features like eyes. Quantitative analysis via Fourier Ring Correlation confirmed that the model successfully generates coherent high-frequency details from heavily downsampled inputs.

CT Reconstruction

In tomographic tasks, the FIT: TRec model (particularly when combined with a Filtered Backprojection baseline) significantly outperformed standard reconstruction methods. On the LoDoPaB benchmark, the model achieved 30.98 dB compared to the 26.89 dB baseline. Similar gains were observed on MNIST and Kanji datasets, proving that the frequency domain is a more effective space for resolving the global artifacts caused by sparse-view projections.

Discussion and Conclusion

A key insight of this work is the "sub-sequence property" of FDEs, where prefixes naturally correspond to lower-resolution versions of the full image. This mathematical alignment makes image enhancement tasks analogous to natural language sequence completion.

Despite its success, the authors noted that the Transformer occasionally produces high-frequency fluctuations, necessitating a shallow post-processing CNN block for smoothing. Future work will focus on scaling these models to higher-resolution medical imagery and optimizing the computational overhead of the linear attention mechanisms used in these "Fast Transformers."

Summary updated

BibTeX
@inproceedings{buchholz2021fourier,
  author = {Tim-Oliver Buchholz and Florian Jug},
  title = {{Fourier Image Transformer}},
  booktitle = {Workshops @ CVPR},
  year = {2021},
  doi = {10.1109/cvprw56347.2022.00201},
}
Figure