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

Don’t just prune by magnitude! Your mask topology is a secret weapon

Duc N.m Hoang, Souvik Kundu, Shiwei Liu, Zhangyang WangNeurIPS 2023

TL;DR

This paper reveals that the performance of a sparse neural network is deeply tied to its "mask topology"—the graph-theoretic connectivity of its pruned structure. By combining structural graph properties with weight magnitudes into a new "full-spectrum coordinate," the authors develop a pruning method that achieves state-of-the-art accuracy (comparable to the Lottery Ticket Hypothesis) at a fraction of the computational cost.

What Problem Does This Paper Address?

Pruning is the art of removing redundant parameters from a neural network to make it smaller and faster. Traditionally, researchers have focused on three main paradigms:

  1. Pruning after Training (PaT): Highly accurate but requires training a full dense model first, which is expensive.
  2. Dynamic Sparse Training (DST): Updates the sparse mask during training.
  3. Pruning at Initialization (PaI): The "holy grail" of efficiency—finding a good mask before any training happens. However, PaI methods usually underperform compared to PaT.

The gap lies in our understanding of why certain masks work. Previous work suggested that "good" masks resemble Ramanujan graphs (highly connected but sparse expander graphs). However, these theories ignored weight magnitudes, while standard magnitude-based pruning ignored graph topology. This paper seeks to unify these two worlds: the geometry of the weights and the topology of the graph.

Methods

The authors introduce two primary innovations to bridge the gap between graph theory and practical pruning:

  • Weighted Spectral Gap ($\lambda$): While previous work looked at the connectivity of the binary mask (the "where" of the parameters), the authors propose a "weighted" version that accounts for the actual values of the weights (the "how much"). This metric quantifies how well information flows through the weighted sub-graph.
  • Full-Spectrum Coordinate: They define a new 4D coordinate system for every layer in a network, integrating:
  • $\Delta r$: The classical Ramanujan gap (structural connectivity).
  • $\Delta r_{imdb}$: An iterative version of the Ramanujan gap.
  • $\lambda$: The proposed weighted spectral gap.
  • $\lambda_{imsg}$: The iterative mean spectral gap.

Using this coordinate system, they propose PAGS (Pruning at Initialization as Graph Sampling). Instead of just picking one mask, PAGS "oversamples" masks from an existing generator (like SNIP or ERK) and selects the one that maximizes the $\ell_2$-distance from the initial state in this full-spectrum space. They also introduce PEGS (Pruning Early as Graph Sampling), which applies this logic after a tiny amount of "warm-up" training (e.g., just 500 iterations).

Datasets

The researchers evaluated their methods on standard computer vision benchmarks:

  • CIFAR-10 and CIFAR-100: Small-scale image classification.
  • Tiny-ImageNet: A more challenging mid-scale dataset.
  • Architectures: They tested on VGG16, ResNet18, and ResNet34, specifically focusing on extreme 99% unstructured sparsity.

Key Insights and Ideas

Correlation between Ramanujan Bound and Test Accuracy over training time steps.
  • The "Aha!" Correlation: The most significant discovery is that a sparse subnetwork’s $\ell_2$-distance from its original initialization in the "full-spectrum" space is nearly linearly correlated with its final performance. This provides a reliable "compass" to predict if a mask will be successful without actually training it to completion.
Correlation between Iterative Mean Ramanujan Bound and Test Accuracy over training time steps.
  • DST as a Graph Optimizer: The authors found that Dynamic Sparse Training (DST) naturally evolves toward Ramanujan-like structures. This suggests that the "secret sauce" of successful training is the unintentional optimization of graph connectivity.
  • Structure vs. Magnitude: High performance isn't just about having large weights; it's about a specific trade-off where you optimize forward expansion (topology) while minimizing the "bottlenecks" created by weight distribution.

Key Results

  • Outperforming Baselines: PAGS consistently improves upon vanilla PaI methods. For example, on ResNet18 (CIFAR-10), it boosted the accuracy of the ERK generator from 88.92% to 90.42% without any pre-training.
  • Matching the "Gold Standard": PEGS (with only 500 iterations of training) achieved performance comparable to the Lottery Ticket Hypothesis (LTH).
  • Massive Efficiency: In CIFAR-10 experiments, PEGS yielded a >5000x saving in compute costs compared to the iterative training required by LTH, while maintaining similar accuracy at 99% sparsity.

Limitations and Future Work

  • Heuristic Sampling: Currently, the method relies on sampling many masks and picking the best one. The authors acknowledge that a more direct, gradient-based optimization of the spectral gap would be more elegant, but it is currently difficult because graph spectral properties are non-differentiable.
  • Unstructured Focus: The paper focuses on unstructured pruning (removing individual weights). Future work could extend this "full-spectrum" perspective to structured pruning (removing entire neurons or channels), which is often more hardware-friendly.
  • Beyond Vision: The study is limited to CNNs and image datasets; exploring how these graph properties behave in Transformers or Large Language Models remains an open question.

Summary updated

BibTeX
@inproceedings{hoang2023dont,
  author = {Duc N.M Hoang and Souvik Kundu and Shiwei Liu and Zhangyang Wang},
  title = {{Don’t just prune by magnitude! Your mask topology is a secret weapon}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=DIBcdjWV7k},
}
Figure