Overview
The Feature-Proxy Transformer (FPTrans) simplifies few-shot segmentation (FSS) by ditching complex, specialized decoders in favor of a classic "feature extractor + linear classifier" architecture. By utilizing a novel transformer-based prompting strategy, the model allows query and support images to interact throughout the entire network. This approach achieves state-of-the-art results with a much more straightforward and elegant design.
The Problem: Overly Complex Decoders
Few-Shot Segmentation (FSS) is the task of segmenting a novel object in a "query" image given only a few annotated "support" examples. Traditionally, supervised semantic segmentation relies on a simple setup: a backbone extracts features, and a linear head classifies each pixel.
However, the FSS field has drifted toward increasingly intricate decoders. Modern models often rely on complex pixel-to-pixel matching, 4D convolutions, or multi-scale fusion modules to compare the query and support images. The authors argue that this complexity makes FSS frameworks difficult to follow, computationally heavy, and deviates too far from the successful simplicity of standard supervised learning. They pose a critical question: Can we achieve state-of-the-art results by returning to a simple feature-plus-classifier framework?
The FPTrans Architecture
To answer this, the authors introduce the Feature-Proxy Transformer (FPTrans). In this context, a "proxy" refers to the vector representing a semantic class (foreground or background) in a linear classification head. By moving the matching logic into the feature extraction phase, the need for a complex decoder vanishes.
The core innovations of FPTrans include:
- Class-Aware Prompting: Instead of simply feeding images into a Vision Transformer (ViT) independently, FPTrans extracts "prompts" from the support image. It calculates the mean features for the foreground and several local background regions. These features are converted into learnable tokens (prompts) that are prepended to the input of the transformer.
- Prompt Synchronization: This serves as the model's "interaction" engine. In each layer of the ViT, the hidden states of these prompts are averaged between the query and support branches. This allows the query features to "sense" the support features (and vice versa) through the prompts at every stage of the feature extraction process, rather than waiting until the end.
- Local Background Proxies: Most models treat the "background" as one homogeneous class. FPTrans recognizes that backgrounds are messy and often contain distractor objects from other classes. The model uses Voronoi-based partitioning to create multiple local background proxies, preventing it from confusing novel foreground objects with a generic background.
- Simple Inference: After the transformer processes the images, the model simply calculates the cosine similarity between the query feature pixels and the learned proxies to produce the final segmentation mask.
Key Results
FPTrans proves that simplicity is highly competitive. By letting the query and support "talk" to each other from the very first layer of the transformer, feature quality improves dramatically. The model achieved top-tier performance on major FSS benchmarks, setting new state-of-the-art records:
- PASCAL-5i: Achieved 68.81% mIoU in the 1-shot setting and 78.0% in the 5-shot setting (using a DeiT-B backbone), outperforming complex models like BAM and HSNet.
- COCO-20i: Achieved 47.0% mIoU (1-shot) and 58.9% (5-shot), demonstrating strong generalization on complex scenes.
- Domain Shift: When trained on COCO and tested on PASCAL (a standard test for robustness), FPTrans outperformed previous methods by a wide margin, including a +5.6% improvement over HSNet in the 1-shot setting.
Limitations and Future Directions
While highly effective, FPTrans has a few limitations. Generating the initial prompts requires a forward pass of the support image through a pretrained ViT, adding computational overhead during the setup phase of an episode. The authors acknowledge that their prompt-generating model is somewhat heavy and suggest that future work could focus on more lightweight, efficient ways to extract these class-aware prompts. Finally, the method relies heavily on the attention mechanism of Transformers, making it unclear how these specific interaction benefits would translate back to pure CNN architectures.
Summary updated