TL;DR
This paper introduces a novel approach to Generalized Few-Shot Segmentation (GFSSeg) that prevents models from "forgetting" or misidentifying base classes while learning new ones. By implementing a class-contrastive loss and a graph-based relationship loss, the authors ensure that class prototypes remain distinct and stable, achieving new state-of-the-art performance on standard benchmarks like PASCAL VOC and MS COCO.
What Problem Does This Paper Address?
Standard Few-Shot Segmentation (FSSeg) focuses on segmenting "novel" classes using only a handful of labeled examples. However, these models often ignore the "base" classes they were originally trained on. Generalized Few-Shot Segmentation (GFSSeg) aims for a more realistic scenario: the model must segment both base and novel classes simultaneously.
The core challenge in GFSSeg is class confusion. When a model is updated to recognize a novel class (e.g., a "dog"), it often starts misclassifying similar base classes (e.g., a "cat") because the underlying feature representations (prototypes) shift too much or aren't distinct enough. Current methods lack an explicit mechanism to manage the relationships and distances between these evolving class prototypes.
Methods
The authors build upon the Context-Aware Prototype Learning (CAPL) framework and introduce two primary innovations to "harmonize" the relationship between classes:
- Class Contrastive Loss ($L_C$): This loss function acts as a regulator during prototype updates. It has two components:
- Within-class stability: It minimizes the distance between a class's current prototype and its previous version, ensuring the model doesn't "drift" too far from what it already knows.
- Between-class separation: It maximizes the distance between prototypes of different classes, pushing them apart in the feature space to reduce misclassification.
- Graph Convolutional Network (GCN) & Relationship Loss ($L_R$):
- The authors model classes as nodes in a heterogeneous graph.
- Edges between nodes represent the similarity between classes. This acknowledges that a "dog" is naturally closer to a "cat" than to a "table," and the model should respect these relative distances.
- The GCN updates prototypes by "message passing" across the graph, and a dedicated relationship loss ($L_R$) ensures these updates maintain logical cross-class and self-similarity patterns.
Datasets
The model was evaluated on two major computer vision benchmarks, adapted for the few-shot setting:
- PASCAL VOC 2012: A standard dataset for object segmentation, split into 4 folds for cross-validation.
- MS COCO: A more challenging, large-scale dataset with diverse objects in complex scenes.
Key Insights and Ideas
- Boundary vs. Label Accuracy: The authors observed that previous SOTA models (like CAPL) were actually quite good at finding the boundaries of objects but failed at labeling them correctly (e.g., identifying a car as a truck). This insight shifted the focus from improving spatial masks to improving prototype distinctness.
- The Stability-Plasticity Dilemma: By using the within-class update distance ($d^W$), the paper addresses the classic AI problem of learning new information (plasticity) without overwriting old information (stability).
- Relational Context Matters: Simply calculating Euclidean distance between classes isn't enough. Using a GCN allows the model to learn that some classes should be closer together than others, leading to more nuanced and accurate feature clusters.
Key Results
The proposed method achieved a new state-of-the-art (SOTA) in GFSSeg:
- PASCAL VOC: Outperformed the previous SOTA (CAPL) by an average of 4.25% mIoU in 1-shot settings and 4.71% mIoU in 5-shot settings.
- MS COCO: Showed consistent improvements of 2.15% (1-shot) and 3.90% (5-shot) over previous methods.
- Qualitative Success: Visual results demonstrate that while previous models often confused "cars" with "trucks" or "giraffes" with other animals, this approach correctly identifies the specific class label while maintaining sharp segmentation boundaries.
Limitations and Future Work
- Computational Overhead: While not explicitly detailed as a failure, the introduction of a GCN and iterative prototype updates adds computational complexity compared to simpler linear classifiers.
- Backbone Dependency: The results are primarily demonstrated using ResNet-50 and ResNet-101. Exploring how these contrastive losses behave with more modern architectures like Vision Transformers (ViTs) could be a promising direction.
- Fixed Hyperparameters: The balance between the new losses ($\lambda_1, \lambda_2$) was set empirically to 1. Future work could explore dynamic weighting of these losses during the training process.
Summary updated