Abstract
Semantic segmentation requires capturing long-range dependencies to resolve local ambiguities. While Non-local networks and Graph Convolutional Networks (GCNs) offer global reasoning, they often suffer from high computational complexity or spatial information loss. This paper introduces Spatial Pyramid Based Graph Reasoning (SpyGR), a lightweight module that performs graph reasoning directly on feature maps across multiple scales. By utilizing a data-dependent Laplacian and a spatial pyramid structure, SpyGR achieves state-of-the-art performance on benchmarks like Cityscapes while requiring significantly fewer FLOPs and less memory than existing global reasoning architectures.
Introduction
Standard convolutional layers are inherently local, limiting their ability to capture the global context necessary for accurate semantic segmentation. For instance, identifying a pixel as part of a "bus" often depends on recognizing the overall structure of the vehicle across the image. Previous attempts to address this include Non-local networks, which scale quadratically with image size, and GCN-based methods that project features into a coordinate-free space, potentially damaging spatial relationships.
The SpyGR Architecture
The proposed Spatial Pyramid Based Graph Reasoning (SpyGR) module addresses these limitations through several key innovations. Unlike traditional GCN methods, SpyGR performs reasoning directly within the original feature space, preserving the spatial geometry of the input.
The module is built on three main pillars:
- Direct Reasoning: Graph convolutions are applied directly to the feature map, avoiding the need for costly projection and re-projection steps.
- Data-Dependent Laplacian: The adjacency matrix is computed dynamically based on input features. A learnable diagonal attention matrix ($\Lambda$) is introduced to weight channel-wise distances, allowing the network to adaptively determine pixel relationships.
- Spatial Pyramid Structure: To capture multi-scale context, features are downsampled to various resolutions, processed via graph reasoning, and then fused. This hierarchical approach ensures both local and global dependencies are captured efficiently.
To maintain efficiency, the authors employ a mathematical decomposition of the adjacency matrix calculation, reducing the computational complexity from $O(N^2)$ to a linear scale relative to the number of pixels.
Experimental Results
SpyGR was evaluated on major benchmarks, including Cityscapes, COCO Stuff, and PASCAL Context. On the Cityscapes dataset, SpyGR achieved a state-of-the-art mIoU of 81.6%, outperforming more complex models like DANet and GloRe.
As shown in the table above, one of the most significant advantages of SpyGR is its efficiency. It requires only 4.12 GFLOPs, roughly 1/4th the computation of a standard Non-local network and significantly less than DANet (19.54 GFLOPs), while also maintaining a much smaller memory footprint.
Conclusion
SpyGR demonstrates that global reasoning for semantic segmentation can be both effective and efficient. By keeping reasoning within the spatial domain and leveraging a pyramid structure, the model preserves critical geometric information while slashing computational costs. Future work may explore applying this lightweight graph reasoning to other dense prediction tasks such as object detection and instance segmentation.
Summary updated