FAMNet: Frequency-aware Matching Network for Cross-domain Few-shot Medical Image Segmentation

Yuntian Bo, Yazhou Zhu, Lunbo Li, Haofeng Zhang

Introduction

Few-shot medical image segmentation (FSMIS) is a critical task aimed at segmenting novel organs or lesions using only a minimal set of labeled examples. A significant challenge in this field is domain shift, where a model trained on one imaging modality (e.g., CT) fails to generalize to another (e.g., MRI) due to variations in intensity, grayscale, and noise. Existing models are often "domain-bound," struggling with both intra-domain variance (individual anatomical differences) and inter-domain variance (low spatial correlation between modalities).

Motivation: The Frequency Domain Advantage

The authors of FAMNet observe that while spatial features change drastically between modalities like CT and MRI, certain frequency components remain remarkably stable. Specifically, the "style" of an image (brightness, texture) is typically concentrated in low and high frequencies, whereas the underlying anatomical "structure" is often preserved in the mid-frequency bands.

Comparison of CT and MRI in spatial and frequency domains, with similarity metrics across different bands.

As shown in the figure above, the spatial domain similarity between CT and MRI is consistently low. However, the Frequency Domain SSIM peaks in the middle bands, identifying a "sweet spot" for cross-domain matching. FAMNet leverages these Domain-Agnostic Frequency Bands (DAFBs) to provide a more reliable signal for segmentation across domains.

Proposed Method: FAMNet

FAMNet addresses domain shift through a frequency-aware architecture consisting of three primary modules:

  1. Coarse Prediction Generation (CPG): This module utilizes a standard prototypical network to generate an initial, rough mask of the query image. This coarse prediction serves as a guide for the subsequent, more refined modules.
  2. Frequency-aware Matching (FAM) Module:
    • Decoupling: Using Fast Fourier Transforms (FFT), image features are decomposed into low, medium, and high-frequency bands.
  3. Selective Attention: The module identifies DAFBs (typically mid-frequencies) and Domain-Specific Frequency Bands (DSFBs, typically high/low).
  4. Matching: Similarity matching is enhanced in the stable mid-bands, while "inverse attention" is applied to high/low bands to minimize the model's reliance on domain-specific styles.
  5. Multi-Spectral Fusion (MSF) Module: Rather than discarding the "noisy" high and low-frequency bands, the MSF module employs a cross-attention mechanism. It uses stable mid-frequency features as a guide to "rescue" and extract any remaining domain-invariant structural information hidden within the DSFBs.

Additionally, the network employs Adaptive Average Pooling (AAP) to standardize foreground pixel counts before matching, making the model robust to size differences between support and query organs.

Experimental Evaluation

FAMNet was evaluated on three challenging cross-domain benchmarks, demonstrating state-of-the-art performance:

  • Cross-Modality (MRI → CT): FAMNet achieved a 64.75% Dice score, representing a 7.46% improvement over the previous leading method, PATNet.
  • Cross-Sequence (LGE → b-SSFP Cardiac): The model reached a 71.58% Dice score, outperforming the runner-up by 9.30%.
  • Cross-Institution (Prostate MRI): The model showed strong generalization across different hospital datasets (UCLH and NCI).

Ablation studies confirmed that both the FAM and MSF modules are crucial, as removing either led to significant performance degradation. This validates that frequency-aware decoupling and fusion are the primary drivers of the model's generalization capabilities.

Conclusion and Future Work

FAMNet successfully addresses the domain shift problem in FSMIS by shifting the focus from spatial pixels to the frequency domain. By selectively matching domain-agnostic features and intelligently fusing multi-spectral information, it sets a new benchmark for cross-domain medical image segmentation.

Future research directions include extending the framework to 3D Fourier transforms to capture volumetric context more effectively. Additionally, exploring learnable frequency band boundaries instead of fixed ratios could further optimize performance across diverse medical imaging tasks. While the current 2D slice-based approach is effective, addressing the computational overhead of multi-band cross-attention remains an area for optimization.

Summary updated

BibTeX
@inproceedings{bo2025famnet,
  author = {Yuntian Bo and Yazhou Zhu and Lunbo Li and Haofeng Zhang},
  title = {{FAMNet: Frequency-aware Matching Network for Cross-domain Few-shot Medical Image Segmentation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i2.32184},
}
Figure