REVISITING PRUNING AT INITIALIZATION THROUGH THE LENS OF RAMANUJAN GRAPH

Duc N.m Hoang, Shiwei Liu, Radu Marculescu, Zhangyang WangICLR 2023

Introduction

Training massive deep neural networks is computationally expensive. Pruning at Initialization (PaI) aims to solve this by identifying a sparse "subnetwork" before training even starts, potentially saving massive amounts of time and memory.

While several PaI methods (like SNIP, GraSP, and SynFlow) exist, they generally perform worse than pruning a model after it has already been trained. Researchers previously suspected that the "Ramanujan property"—a mathematical definition of a graph that is both sparse and highly connected—was the key to success. However, there is a "missing link": the standard Ramanujan property doesn't actually correlate well with the relative performance of different pruning methods at high sparsity.

The challenge is that neural network layers are "irregular" graphs (nodes have different numbers of connections), whereas standard Ramanujan theory is built for "regular" graphs. This paper seeks to bridge that gap, introducing novel metrics to better characterize the connectivity and randomness of sparse subnetworks.

The authors represent neural network layers as bipartite expander graphs. They identify that the standard Ramanujan upper bound on the "largest nontrivial eigenvalue" ($\hat{\mu}$) is too restrictive for the irregular structures found in pruned networks. Simply maximizing connectivity (expansion) can accidentally lead to "pseudo-random" graphs. While random graphs are technically good expanders, they lack the specific structural meaning required for high-performance neural networks—a phenomenon the authors term the Ramanujan Paradox.

To fix this, they propose two new metrics:

  1. Iterative Mean Difference of Bound (IMDB): A relaxed metric that assesses an irregular graph by looking at the average connectivity of its regular subgraphs. This allows for a more nuanced ranking of how "well-connected" a sparse layer truly is.
  2. Normalized Random Coefficient (NaRC): Derived from the Expander Mixing Lemma, this metric detects when a graph’s connectivity is indistinguishable from "naive randomness." It helps identify if a pruning method is producing a meaningful structure or just noise.

Key Results and Experimental Insights

The study evaluates these metrics and pruning methods (Random, ERK, SNIP, GraSP, SynFlow) using standard image classification benchmarks (CIFAR-10 and CIFAR-100) across ResNet-34 and VGG-16 architectures.

Performance vs. Network Density vs. Metrics (IMDB and $\Delta r$) for ResNet-34 and VGG-16.

IMDB as a Performance Predictor

Unlike previous metrics, IMDB correlates strongly with the final accuracy of a pruned model. If a pruning method maintains a higher IMDB score at a specific sparsity level, it almost always results in a better-performing model. For example, SynFlow often maintains better IMDB scores at high sparsity compared to SNIP, which explains its superior performance.

The "Crutch" of Skip Connections

The authors found that ResNet-34 is surprisingly resilient to random pruning. They hypothesize that skip connections act as a "crutch," helping the network overcome poor connectivity in individual layers. In contrast, VGG-16 (which lacks these connections) is much more sensitive to the quality of the sparse structure. In VGG-16, there is a clear inverse relationship: higher expansion (IMDB) and lower randomness (NaRC) lead to significantly better performance. In ResNet, the relationship is more complex due to the "masking" effect of skip connections.

Locating the "Sweet Spot"

NaRC provides a way to locate the "Ramanujan region"—the specific sparsity level where a network is highly connected but not yet devolved into pure randomness. It successfully identifies that methods like "Random" and "ERK" (Erdős-Rényi) consistently yield scores confirming they represent "naive randomness."

Limitations and Future Work

Currently, IMDB and NaRC are used as "checkers" to analyze existing pruning methods. The authors do not yet propose a new pruning algorithm that directly optimizes for these metrics during the pruning process. Furthermore, the study focuses on CNNs; extending this analysis to Transformers or Recurrent Neural Networks remains an open area for research.

Ultimately, the authors suggest that future PaI research should use these metrics as constraints to guide the design of new pruning criteria, ensuring that subnetworks stay within the "non-trivial Ramanujan expander" region.

Summary updated

BibTeX
@inproceedings{hoang2023revisiting,
  author = {Duc N.M Hoang and Shiwei Liu and Radu Marculescu and Zhangyang Wang},
  title = {{REVISITING PRUNING AT INITIALIZATION THROUGH THE LENS OF RAMANUJAN GRAPH}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=uVcDssQff_},
}
Figure