SearchViG: Optimal Vision GNNs via Ramanujan Spectral Optimization

Mustafa Munir, Md Mostafijur Rahman, Xiwen Wei, Yuedong Yang, Radu MarculescuLOG 2025

TL;DR

This paper introduces SearchViG, a novel framework that automatically designs optimal Vision Graph Neural Networks (ViGs) by discovering stage-specific, heterogeneous graph structures. By leveraging the spectral gap of graph adjacency matrices as a proxy, SearchViG achieves state-of-the-art performance with significantly improved efficiency, outperforming existing models in accuracy while using fewer parameters and computations.

What Problem Does This Paper Address?

Traditional Vision Graph Neural Networks (ViGs) rely on a single, fixed rule to construct the graph connecting image patches across all network stages. This "one-size-fits-all" approach is suboptimal because the nature of image features changes drastically as they are processed through different network resolutions. Early stages deal with high-resolution, fine-grained details, while later stages process low-resolution, high-level semantic information. A graph structure that's effective for one type of feature might be detrimental to another. This mismatch leads to underutilization of the ViG's expressive power and can result in issues like oversmoothing (feature collapse) and oversquashing (information bottlenecks), hindering performance and efficiency. SearchViG aims to solve this by creating architectures where the graph connectivity dynamically adapts to the feature resolution at each stage.

Methods

The core innovation of SearchViG is its Graph Construction Search (GCS) framework. Instead of manually designing graph rules, GCS automatically discovers the optimal graph topology for each stage of the ViG. This search is guided by a zero-shot, theoretically-grounded proxy: the spectral gap of the graph's adjacency matrix. The spectral gap is a measure of a graph's "expansion properties," which the authors show is directly linked to mitigating oversmoothing and oversquashing – key challenges in deep GNNs.

Here's how it works:

  1. Search Space: A diverse set of candidate graph construction methods (e.g., k-NN, axial, static, attention-based) and their hyperparameters are defined.
  2. Spectral Proxy: For each candidate graph construction method and hyperparameter setting, the spectral gap of the resulting graph's adjacency matrix is calculated. This is done without any model training, making it computationally efficient.
  3. Optimization: The GCS selects the graph construction rule that yields the largest spectral gap for each stage. This results in a heterogeneous architecture where each stage has a custom-tailored graph topology.
  4. Heterogeneous Graph Convolution (HGC) Block: This is the architectural building block that incorporates the discovered stage-specific graph. It combines local feature processing (MBConv blocks) with global information mixing via the dynamically constructed graph.

Datasets

  • ImageNet-1K: Used for training and evaluating image classification models.
  • MS COCO 2017: Used for evaluating object detection and instance segmentation.
  • ADE20K: Used for evaluating semantic segmentation.
  • CIFAR-100 & CIFAR-10: Used for additional image classification experiments.
  • OrganSMNIST & DermaMNIST: Used for medical image classification tasks.
  • DeepCrack & Crack500: Used for pavement crack segmentation.
  • Cityscapes & COCO-Stuff: Used for dense semantic segmentation.

Key Insights and Ideas

  • Heterogeneity is Key: The paper strongly argues that a single graph construction rule is insufficient for Vision GNNs. Adapting graph topology to feature resolution is critical for optimal performance.
  • Spectral Gap as a Powerful Proxy: The spectral gap of the adjacency matrix is a theoretically sound and practically effective zero-shot proxy for discovering graph structures that lead to stable training and good performance. It directly relates to mitigating oversmoothing and oversquashing.
  • Automated Architecture Design: SearchViG automates the complex and often manual process of designing graph structures for ViGs, opening up new possibilities for efficient and high-performing models.
  • Pareto Frontier Advancement: The framework establishes a new state-of-the-art Pareto frontier, demonstrating that high accuracy can be achieved with significantly reduced computational cost and parameter count.

Key Results

  • ImageNet Classification: SearchViG-M achieved 83.3% top-1 accuracy, outperforming ViG-B and ViHGNN-B with over 70% fewer parameters and 80% fewer GMACs. SearchViG-B achieved 84.0% accuracy.
  • Downstream Tasks: SearchViG-S achieved 43.4 mIoU on semantic segmentation, surpassing larger models like EfficientFormer-L7 while using less than half the parameters. It also achieved strong results in object detection and instance segmentation.
  • Efficiency: SearchViG models consistently offer significant reductions in parameters and GMACs compared to competing models with similar or lower accuracy. For example, SearchViG-S achieved 81.3% accuracy on ImageNet with only 12.4M parameters and 1.7 GMACs.
  • Ablation Studies: The spectral search proxy was shown to be superior to random search, and heterogeneous architectures significantly outperformed homogeneous ones.

Limitations and Future Work

  • Search Space: While extensive, the search space for graph construction methods could be further expanded.
  • Layer-wise Heterogeneity: The current framework applies a single graph structure per stage. A natural extension is to allow graph topology to evolve at a layer-wise granularity within each stage, which could lead to even more powerful architectures but would increase search cost.
  • Multi-Objective Search: The current search is guided by a single spectral proxy. Future work could explore multi-objective search proxies that combine spectral properties with other factors like trainability or efficiency.
  • Scalability: While the current search is efficient, its scalability to even larger and more diverse datasets could be further investigated. Advanced subset selection strategies might be beneficial.
  • Theoretical Analysis Scope: The theoretical analysis of gradient flow focuses on the structural component of backpropagation and assumes graph symmetry, which might not hold for all graph construction methods.

Summary updated

BibTeX
@inproceedings{munir2025searchvig,
  author = {Mustafa Munir and Md Mostafijur Rahman and Xiwen Wei and Yuedong Yang and Radu Marculescu},
  title = {{SearchViG: Optimal Vision GNNs via Ramanujan Spectral Optimization}},
  booktitle = {LOG},
  year = {2025},
  url = {https://openreview.net/forum?id=cmEzgaYIJC},
}
Figure