[Paper Review] Bridge the Points: Graph-based Few-shot Segment Anything Semantically
This paper proposes GF-SAM, a graph-based few-shot semantic segmentation framework that leverages point-mask alignment and weakly connected component clustering to enable efficient, automated, and high-accuracy segmentation using only one-time mask generation from SAM. By dynamically selecting foreground and background point prompts and using graph-based clustering to align fine-grained points with coarse-grained masks, the method achieves state-of-the-art performance with 58.7% mIoU on COCO-20 i and 35.2% on LVIS-92 i, significantly reducing inference time and eliminating reliance on manual hyperparameters.
The recent advancements in large-scale pre-training techniques have significantly enhanced the capabilities of vision foundation models, notably the Segment Anything Model (SAM), which can generate precise masks based on point and box prompts. Recent studies extend SAM to Few-shot Semantic Segmentation (FSS), focusing on prompt generation for SAM-based automatic semantic segmentation. However, these methods struggle with selecting suitable prompts, require specific hyperparameter settings for different scenarios, and experience prolonged one-shot inference times due to the overuse of SAM, resulting in low efficiency and limited automation ability. To address these issues, we propose a simple yet effective approach based on graph analysis. In particular, a Positive-Negative Alignment module dynamically selects the point prompts for generating masks, especially uncovering the potential of the background context as the negative reference. Another subsequent Point-Mask Clustering module aligns the granularity of masks and selected points as a directed graph, based on mask coverage over points. These points are then aggregated by decomposing the weakly connected components of the directed graph in an efficient manner, constructing distinct natural clusters. Finally, the positive and overshooting gating, benefiting from graph-based granularity alignment, aggregate high-confident masks and filter out the false-positive masks for final prediction, reducing the usage of additional hyperparameters and redundant mask generation. Extensive experimental analysis across standard FSS, One-shot Part Segmentation, and Cross Domain FSS datasets validate the effectiveness and efficiency of the proposed approach, surpassing state-of-the-art generalist models with a mIoU of 58.7% on COCO-20i and 35.2% on LVIS-92i. The code is available in https://andyzaq.github.io/GF-SAM/.
Motivation & Objective
- To address the inefficiency and lack of automation in existing few-shot semantic segmentation methods that rely on iterative prompt refinement or heuristic mask merging.
- To overcome the challenge of misalignment between fine-grained point prompts and coarse-grained SAM-generated masks.
- To eliminate the need for manual hyperparameter tuning and redundant mask generation in few-shot segmentation pipelines.
- To enable high-accuracy, one-time mask generation by leveraging graph connectivity and semantic consistency across point-mask relationships.
- To improve generalization across domains and reduce inference time while maintaining high mIoU on standard few-shot segmentation benchmarks.
Proposed method
- Introduces a Positive-Negative Alignment (PNA) module that dynamically selects point prompts using foreground and background references from reference images.
- Constructs a directed graph where nodes represent points and edges represent mask coverage, enabling granularity alignment between points and masks.
- Performs connectivity analysis on the directed graph to identify weakly connected components, which serve as natural clusters of semantically coherent points.
- Applies positive gating to retain high-confidence masks covering larger target regions, based on cluster-level coverage consistency.
- Implements overshooting gating to filter false positives near object boundaries by evaluating coverage self-consistency within clusters.
- Aggregates final predictions through a two-stage gating mechanism that reduces redundant SAM calls and improves robustness without additional hyperparameters.

Experimental results
Research questions
- RQ1Can graph-based connectivity analysis of point-mask relationships improve the efficiency and accuracy of few-shot semantic segmentation?
- RQ2How can foreground and background context be effectively leveraged to guide dynamic point prompt selection without iterative refinement?
- RQ3To what extent can weakly connected components in a mask-coverage graph serve as natural clusters for semantic grouping in few-shot segmentation?
- RQ4Can self-consistency in mask coverage within clusters reduce false positives and eliminate the need for manual metric design in mask merging?
- RQ5How does the proposed method generalize across diverse few-shot segmentation benchmarks, including cross-domain and long-tail scenarios?
Key findings
- The proposed GF-SAM framework achieves a state-of-the-art mIoU of 58.7% on the COCO-20 i few-shot segmentation benchmark.
- On the LVIS-92 i dataset, GF-SAM achieves 35.2% mIoU, outperforming existing generalist models.
- The method reduces inference time significantly by requiring only a single mask generation from SAM, eliminating iterative refinement loops.
- The graph-based clustering mechanism enables automatic, parameter-free grouping of point prompts, improving robustness and reducing dependency on handcrafted metrics.
- Positive and overshooting gating mechanisms effectively filter false positives and enhance prediction confidence without requiring additional hyperparameters.
- Extensive ablation studies confirm that both the PNA module and the graph clustering component are essential for performance gains across all benchmark datasets.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.