This paper introduces DACM (Doubly Deformable Aggregation of Covariance Matrices), a novel framework for few-shot semantic segmentation that significantly improves both accuracy and training efficiency. By replacing rigid similarity metrics with learnable Gaussian Process kernels and utilizing a flexible 4D Transformer for data aggregation, the authors set new performance benchmarks while requiring a fraction of the usual training time.
TL;DR
DACM enhances few-shot segmentation by replacing fixed cosine similarity with learnable Gaussian Process kernels and introducing a Doubly Deformable 4D Transformer for efficient feature aggregation. The result is a state-of-the-art model that converges in just 50 epochs—roughly four times faster than previous leading methods.
What Problem Does This Paper Address?
Semantic segmentation—assigning a class label to every pixel in an image—typically requires massive amounts of annotated data. Few-shot segmentation (FSS) aims to overcome this by training models to segment new "query" images based on only a handful of labeled "support" images.
The core challenge in FSS is accurately measuring the semantic correspondence between the support and query images. Most existing methods rely on two components that the authors argue are too rigid:
- Fixed Similarity Metrics: Most models use cosine similarity to match pixels between images. This lacks the flexibility to handle complex semantic variations.
- Rigid Aggregation: To process these matches (often stored in a 4D "cost volume"), models use 4D convolutions. These are computationally expensive and struggle to capture long-range dependencies or focus on the most informative parts of the image.
Methods
The DACM framework introduces two primary innovations to solve these issues, as illustrated in the overall architecture:

1. GP-based Kernel Learning with Hard Example Mining
Instead of a fixed cosine similarity, the authors use a Gaussian Process (GP) to learn flexible covariance kernel functions. To make this learning effective, they devised a hard example mining mechanism. During training, the model dynamically identifies "hard" query pixels—those that are likely to be misclassified—and uses them to optimize the GP kernels. This allows the model to learn a more nuanced similarity measurement that better separates foreground objects from the background.

2. Doubly Deformable 4D Transformer (DDT)
To aggregate the resulting 4D cost volume, the authors propose the DDT module. Unlike standard Transformers or dense 4D convolutions, the DDT uses deformable attention on both the support and query dimensions.
- Flexibility: It learns to "deform" its receptive field to attend only to the most informative regions.
- Efficiency: By focusing on sparse, important points rather than the entire dense 4D volume, it reduces computational overhead while capturing long-range spatial relationships that convolutions miss.
Datasets
The authors evaluated DACM on three standard few-shot segmentation benchmarks:
- PASCAL-5i: A subset of PASCAL VOC 2012, containing 20 object classes split into 4 folds.
- COCO-20i: A more challenging dataset derived from MS COCO, featuring 80 classes.
- FSS-1000: A large-scale dataset specifically designed for few-shot tasks, containing 1,000 different object classes.
Key Insights and Ideas
- Similarity is Learnable: The paper demonstrates that cosine similarity is essentially a "special case" (a fixed linear kernel). By treating similarity as a learnable function via GPs, the model can adapt to the specific semantic characteristics of different datasets.
- Hard Mining Accelerates Convergence: By focusing training on the most ambiguous pixels, the model learns much faster. DACM achieves superior results in 50 epochs, whereas previous state-of-the-art models like HSNet often require over 200 epochs.
- Sparse Attention for High Dimensions: Operating on 4D volumes is a "curse of dimensionality" problem. The use of deformable attention proves that you don't need to look at every pixel-pair to achieve high-quality segmentation; looking at the right pixels is more effective.
Key Results
DACM achieved state-of-the-art (SOTA) results across all tested datasets:
- PASCAL-5i: Reached a mean Intersection over Union (mIoU) of 69.1% (1-shot) and 73.3% (5-shot) using a ResNet101 backbone, outperforming the previous SOTA (VAT).
- COCO-20i: Achieved 43.0% mIoU (1-shot), a significant jump over the baseline HSNet (39.2%).
- Efficiency: The model converges 4x faster than existing methods. While others require 200+ epochs, DACM reaches peak performance in just 50.
Qualitatively, the learned covariance matrices produce much cleaner similarity maps that align more closely with ground truth labels compared to traditional cosine similarity.
Limitations and Future Work
Despite its strengths, the authors noted some failure cases. In some instances, the global receptive field of the Transformer can lead to "over-segmentation," where reflections (e.g., a boat's reflection in water) or nearby similar-looking objects are incorrectly classified as the target object.
The authors suggest that future work should focus on better combining global and local representations to maintain the benefits of the Transformer's long-range modeling while improving local precision to avoid these types of false positives.
Summary updated