Abstract
Semantic segmentation has seen significant progress with Vision Transformers (ViTs), yet challenges remain in capturing global context and maintaining sharp object boundaries. We present Graph-Segmenter, a novel architecture that integrates a Graph Transformer for modeling long-range window relationships and a Boundary-aware Attention module for edge refinement. By treating image windows and pixels as graph nodes, our approach achieves state-of-the-art performance on Cityscapes, ADE-20k, and PASCAL Context with minimal computational overhead.
Introduction
Modern semantic segmentation—the task of assigning a category label to every pixel in an image—has recently been dominated by Vision Transformers. Popular models like the Swin Transformer use a "sliding window" approach to keep computation manageable. However, these models suffer from two primary weaknesses: fragmented context and blurry boundaries. They excel at modeling relationships within a window but struggle to capture global relationships between distant windows. Furthermore, standard transformer heads often produce coarse segmentations that struggle with fine object edges.
Methodology
Graph-Segmenter addresses these limitations through two key components: the Graph Transformer (GT) and the Boundary-aware Attention (BA) module.
Graph Transformer (GT)
Instead of standard self-attention, the GT treats windows (globally) and pixels (locally) as nodes in a graph. Edges are established based on visual similarity, allowing the network to adaptively update information across distant regions. To maintain efficiency, a channel compression ratio ($r$) reduces the dimensionality of graph nodes before similarity computation. The authors found that modeling Global Relations (GR) between windows before Local Relations (LR) within windows yields the best results, establishing a global scene "map" to better interpret local details.
Boundary-aware Attention (BA)
The BA module is a lightweight, plug-and-play component placed in the segmentation head. It utilizes local perception via CNN layers to calculate attention coefficients for pixels near object borders. This reinforces critical pixels for categorization while weakening interfering background noise, notably without requiring additional boundary labels or expensive edge annotations.
Experimental Results
The model was evaluated on three gold-standard benchmarks: Cityscapes (urban scenes), ADE-20k (diverse indoor/outdoor scenes), and PASCAL Context (complex multi-class environments).
- State-of-the-Art Performance: Graph-Segmenter reached 82.9 mIoU on Cityscapes and 53.9 mIoU on ADE-20k, consistently outperforming baselines like Swin-L and SETR-PUP.
- Efficiency: Despite the sophisticated graph reasoning, the total multiplicative computation (GMacs) only increased by 2.18% compared to the baseline Swin-L model.
- Qualitative Sharpness: Visualizations confirm that the BA module produces significantly cleaner boundaries for difficult categories such as "train," "rider," and "wall."
Key Insights and Future Work
A significant finding of this research is that sparsity is a feature: applying a sparsity constraint to the graph's adjacency matrix improved accuracy by filtering out noisy, weak connections. This suggests that selective context is more valuable than dense, all-to-all connectivity.
While Graph-Segmenter demonstrates impressive results, future work could explore incorporating geometric priors or category-relationship knowledge directly into the graph topology. Additionally, testing the architecture on mobile-grade backbones would be a valuable step toward real-time applications like autonomous driving.
Summary updated