NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Representative Graph Neural Network

Changqian Yu, Yifan Liu, Changxin Gao, Chunhua Shen, Nong Sang

Abstract

The Representative Graph Neural Network (RepGraph) addresses the massive computational overhead of "non-local" operations (like self-attention) in computer vision. By dynamically sampling only a few "representative" nodes instead of processing every single pixel, RepGraph achieves a 17x reduction in complexity and a 5x speedup while improving accuracy on benchmarks like ADE20K and Cityscapes.

Introduction: The Non-Local Bottleneck

In tasks like semantic segmentation, understanding long-range dependencies—the relationship between distant parts of an image—is crucial. For instance, identifying a small blue patch as a "lake" often requires context from surrounding "trees" and "grass."

To capture these dependencies, researchers typically employ non-local operations. However, standard non-local blocks are "dense": every pixel attends to every other pixel in the image. For an image with $N$ pixels, the computational complexity grows quadratically ($O(N^2)$). This creates a massive bottleneck for high-resolution image processing.

Statistical Motivation: The Sparsity "Aha" Moment

The authors observed a key inefficiency in standard non-local blocks: the "affinity matrix"—which determines the attention weight between pixels—is extremely imbalanced.

Statistical analysis of the affinity matrix shows that the vast majority of nodes have near-zero importance, suggesting that global context can be captured through a sparse set of nodes.

As shown in the histogram above, most pixels contribute negligible weights to the final output. This proves that "global" context does not require "dense" computation; rather, a few representative nodes can capture the necessary information. Unlike previous methods that used fixed pooling to reduce resolution, RepGraph is dynamic, learning where to look based on the specific content of the image.

Methods: The RepGraph Layer

The core innovation is the RepGraph layer, which replaces the dense, fully-connected graph of standard non-local blocks with a sparse graph. Instead of looking at all $N$ positions, the model learns to pick $S$ "representative" nodes, where $S \ll N$.

The RepGraph operation maps $N$ input features to $S$ representative nodes, transforming the dense affinity matrix into a sparse connection matrix.

The RepGraph layer operates through several key steps:

  1. Dynamic Sampling: The network uses a $1 \times 1$ convolution to predict spatial offsets for $S$ nodes.
  2. Bilinear Interpolation: Because learned offsets can be fractional, the model uses bilinear interpolation to sample features from the grid accurately.
  3. Message Passing: The response for each pixel is calculated as a weighted sum of only these few representative nodes, drastically reducing the number of connections.

The authors proposed several architectural variants, including Simple RepGraph (SRG) for direct replacement, Bottleneck RepGraph (BRG) for channel efficiency, and Grid & Group extensions for further spatial and channel-wise optimization.

Key Results

The RepGraph network (RGNet) was evaluated across major benchmarks, demonstrating superior efficiency and performance:

  • Efficiency: For a $256 \times 128$ input, RepGraph is approximately 17 times smaller in GFLOPs and 5 times faster than standard non-local blocks.
  • ADE20K: RGNet achieved 45.8% mIoU, outperforming established models like DANet and CCNet (both 45.22%).
  • Cityscapes: The model reached 81.5% mIoU, matching state-of-the-art performance with a significantly lighter footprint.
  • Object Detection (COCO): Adding a single RepGraph layer to a Mask R-CNN backbone improved Box AP from 38.0 to 39.6, surpassing the standard non-local baseline (39.0).

Conclusion

RepGraph demonstrates that the redundancy inherent in dense non-local operations is not only computationally expensive but potentially harmful to feature robustness. By forcing the model to pick representative nodes, it learns a more robust, less noisy feature representation. RepGraph provides a scalable and efficient path for long-range dependency modeling in high-resolution computer vision tasks.

Summary updated

BibTeX
@inproceedings{yu2020representative,
  author = {Changqian Yu and Yifan Liu and Changxin Gao and Chunhua Shen and Nong Sang},
  title = {{Representative Graph Neural Network}},
  booktitle = {European Conference on Computer Vision},
  year = {2020},
  doi = {10.1007/978-3-030-58571-6\_23},
}
Figure