Papers
Topics
Authors
Recent
Search
2000 character limit reached

Modality-Agnostic Deformable Attention

Updated 16 November 2025
  • Modality-Agnostic Deformable Attention is a parameter-free, locality-constrained method that retrieves continuous pixel-level displacements for robust image registration.
  • It utilizes multi-resolution CNN feature extraction with a coarse-to-fine strategy to optimize both intra- and inter-modal alignments efficiently.
  • Experimental evaluations show superior performance in Dice scores and target registration error compared to conventional methods on diverse imaging datasets.

Modality-Agnostic Deformable Attention is a parameter-free attention mechanism for pixel-level correspondence retrieval in deformable image registration, independent of the input modality. This technique, embodied in the Vector Field Attention (VFA) framework, utilizes multi-resolution convolutional neural networks for feature extraction and a locality-constrained attention module that directly produces continuous displacement fields via attention-weighted aggregation, without requiring learnable parameters in the matching stage. VFA is end-to-end differentiable and compatible with both intra- and inter-modality registration problems, excelling in accuracy and computational efficiency relative to baseline methods.

1. Theoretical Foundation and Framework Architecture

The VFA framework adopts a three-stage decomposition for deformable image registration:

  1. Feature Extraction: For input fixed (IfI_f) and moving (ImI_m) images defined on ΩRd\Omega \subset \mathbb{R}^d, two parallel multi-resolution U-Net-style CNNs extract feature maps at LL scales (l=1l=1 for finest, l=Ll=L for coarsest), yielding FflRHl×Wl×(Dl)×ClF^l_f \in \mathbb{R}^{H_l \times W_l \times (D_l) \times C_l} and FmlF^l_m of matching dimensions. U-Net weights are shared for intra-modal registration and independent for inter-modal.
  2. Feature Matching (Attention): For each discrete voxel xZd\mathbf{x} \in \mathbb{Z}^d at scale ll, a local attention window ImI_m0 is established.
  3. Location Retrieval (Vector-Field Assembly): Displacement vectors are retrieved as attention-weighted summations of fixed offsets, forming a dense continuous vector field.

A coarse-to-fine strategy is used: the displacement ImI_m1 estimated at a coarser scale is upsampled and the moving image feature maps are warped accordingly before processing each finer scale.

2. Attention Module and Mechanism

The modality-agnostic attention module is parameter-free and consists of the following steps:

  • Query and Key Construction:

At voxel ImI_m2 in ImI_m3, query vector ImI_m4; keys ImI_m5 are collected within ImI_m6.

  • Value Definition:

Value matrix ImI_m7 provides fixed displacement vectors ImI_m8, indexed over all neighbors.

  • Scaled Dot-Product Attention:

ImI_m9

These scores are normalized with softmax:

ΩRd\Omega \subset \mathbb{R}^d0

  • Displacement Calculation:

The attention-weighted displacement for position ΩRd\Omega \subset \mathbb{R}^d1:

ΩRd\Omega \subset \mathbb{R}^d2

yielding continuous, sub-voxel estimates.

Key properties:

  • No learnable parameters in attention; only feature extractor (CNN weights) and scale ΩRd\Omega \subset \mathbb{R}^d3 are learned.
  • Cosine similarity may replace dot product as similarity kernel, yielding visually more coherent cross-modal correspondence, though with higher GPU memory consumption and no significant change in Dice performance.

3. Continuous Deformation and Regularization

The resultant displacement field is composed across scales and rendered as a continuous deformation:

  • Multi-scale Composition:

At each scale ΩRd\Omega \subset \mathbb{R}^d4, absolute map:

ΩRd\Omega \subset \mathbb{R}^d5

Composed with upsampled ΩRd\Omega \subset \mathbb{R}^d6 for hierarchical refinement.

  • Smoothness Regularization:

Diffusion penalty encourages spatial smoothness:

ΩRd\Omega \subset \mathbb{R}^d7

  • Warped Image Rendering:

The final deformation ΩRd\Omega \subset \mathbb{R}^d8 governs image warping via a differentiable grid sampler:

ΩRd\Omega \subset \mathbb{R}^d9

4. Training Methodology and Modal-Agnostic Loss Functions

VFA supports unsupervised, semi-supervised, and weakly supervised training regimes:

  • Unsupervised Loss Function:

LL0

  • LL1: for intra-modal uses normalized cross-correlation (NCC); for inter-modal uses mutual information (MI); or for CT lung, mean-squared error (MSE).
    • (Weakly) Supervised Loss Terms:

Provided anatomical labels (LL2, LL3) or landmarks (LL4, LL5), the losses include:

LL6

LL7

The total loss integrates these with appropriate weights.

5. Experimental Results and Performance Comparison

Empirical evaluations demonstrate VFA's superior performance across datasets and modalities:

Dataset Loss/Setting VFA DSC Baseline DSCs
IXI T1w atlas→subject NCC+diffusion, λ=1 0.806±0.012 Im2grid 0.792±0.012; TransMorph 0.774±0.029; VoxelMorph 0.726±0.048
T2w→T1w MR (inter-modal) MI, λ=0.2 0.725±0.022 DMR 0.671±0.038; TransMorph 0.660±0.044; Im2grid 0.668±0.025
Learn2Reg 2021 (OASIS, weakly supervised) Dice, HD95, SDLogJ DSC 0.834, HD95 1.66mm, SDLogJ 0.234 Best DSC among all entrants
Learn2Reg 2022 lung CT (semi-supervised) TRE, TRE30 TRE 1.705mm, TRE30 2.311mm Among top 3, best TRE30 overall

Non-diffeomorphic voxels remain below 0.1% in intra-modal tasks.

6. Algorithmic Ablations and Modality-Agnostic Characteristics

VFA's design decouples feature extraction from spatial matching, yielding generality across imaging contrasts:

  • Intra-modal registration: Shared CNN weights; NCC loss
  • Inter-modal registration: Independent CNNs; MI loss

Ablations reveal:

  • Replacing dot-product similarity with cosine similarity enhances visual coherence in feature matching across modalities, with minimal effect on Dice coefficient.
  • VFA retains accuracy with half-width U-Net; baseline architectures do not match VFA with increased capacity.

This suggests VFA's parameter-free attention can robustly integrate with feature extractors, and generalizes across domains without modality-specific tuning.

7. Implementation Protocol

End-to-end differentiable computation enables direct integration with modern deep learning workflows. The following pseudocode summarizes the multi-scale inference and training loop for VFA:

LL8

VFA's locality-constrained, modality-agnostic deformable attention paradigm is extensible to both supervised and unsupervised workflows, and can be plugged onto arbitrary feature extractors for registration tasks in medical imaging and beyond.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Modality-Agnostic Deformable Attention.