Generalization Bounds for Magnitude-Based Pruning via Sparse Matrix Sketching

Etash Kumar Guha, Prasanjit Dubey, Xiaoming Huo · DOI

Abstract

Magnitude-Based Pruning (MBP) is a widely used technique for compressing neural networks, often resulting in models that generalize better than their dense counterparts. However, traditional generalization bounds for these models are often vacuous. This paper introduces a new theoretical framework using Sparse Matrix Sketching to derive generalization bounds for MBP. By mapping large sparse matrices into lower-dimensional dense spaces, the authors achieve bounds that are up to seven orders of magnitude tighter than previous norm-based methods on datasets like CIFAR10 and MNIST.

Introduction

Modern deep learning relies heavily on overparameterized models, which, while effective, are computationally expensive. Magnitude-Based Pruning (MBP)—the process of removing weights with small absolute values—is a standard remedy. Despite its empirical success, explaining why pruned models generalize well remains a challenge in learning theory. Existing "generalization bounds" often provide error limits so high (e.g., 1,000,000%) that they offer no practical insight. This work addresses this gap by combining compression-based generalization theory with Sparse Matrix Sketching to produce significantly tighter and more realistic bounds.

Methods

The authors base their approach on the compression-based framework established by Arora et al. (2018), which posits that if a model can be compressed without significant loss in accuracy, it is guaranteed to generalize well.

Sparse Matrix Sketching

The core innovation is the application of Sparse Matrix Sketching. Traditional bounds suffer from a "combinatorial explosion" because they attempt to account for every possible sparsity pattern (the "shape" of the zeroed-out weights). By using matrix sketching, the authors represent large, sparse pruned matrices as smaller, dense matrices. This transformation makes the space of possible models much easier to quantify mathematically.

The Pruning Algorithm

The theoretical analysis utilizes a specific version of MBP where the probability of a weight being pruned is inversely proportional to its magnitude. This ensures that weights with smaller magnitudes are more likely to be set to zero.

Algorithm 1: Magnitude-Based Pruning (MBP) using probabilistic weight selection.

The process also involves:

  1. Discretization: Weights are rounded to a finite set of values to satisfy the requirements of compression-based proofs.
  2. Iterative Extension: The logic is extended to Iterative Magnitude Pruning (IMP), providing a theoretical basis for the "Lottery Ticket Hypothesis."

Key Insights

  • Distributed Sparsity: Effective matrix sketching requires that non-zero elements are somewhat evenly distributed. The authors prove that their pruning method naturally maintains "distributed sparsity," preventing any single row or column from becoming overly dense.
  • Bypassing Combinatorial Complexity: By mapping sparse matrices into a lower-dimensional dense space, sketching avoids the need to count every possible sparse configuration, which is the primary cause of vacuousness in previous bounds.
  • Weight Distribution Assumptions: The proofs rely on the assumption that trained weights follow a zero-mean Gaussian distribution, an observation frequently seen in empirical deep learning research.

Results

The proposed bounds were empirically validated on MNIST and CIFAR10 using ReLU-activated Multi-Layer Perceptrons (MLPs) with varying hidden dimensions.

  • Significant Tightness: On CIFAR10, the proposed bound is at least $10^7$ times tighter than established norm-based bounds (e.g., Bartlett et al.). On MNIST, it is approximately $10^3$ times tighter than the next best competitor.
  • Trend Accuracy: Unlike traditional bounds that often over-exaggerate the difference in difficulty between tasks, this new bound more accurately reflects the actual "jump" in generalization error when moving from MNIST to the more complex CIFAR10 dataset.
  • Scaling Properties: The proposed bound scales more gracefully with the hidden dimension of the model compared to standard norm-based bounds, which tend to explode as networks get wider.

Discussion and Limitations

While this work represents a significant step forward, several limitations remain. To simplify the mathematical proofs, the authors did not prune the diagonal elements of weight matrices, which deviates slightly from standard industrial practice. Furthermore, although the bounds are millions of times tighter, the absolute values often remain greater than 1, meaning they are still technically vacuous in a strict sense. Finally, the reliance on the assumption that weights are i.i.d. Gaussian may not hold for all training regimes. Future work could explore applying matrix sketching to other compression techniques like coresets or integrating it with PAC-Bayes frameworks.

Summary updated

BibTeX
@misc{guha2023generalization,
  author = {Etash Kumar Guha and Prasanjit Dubey and Xiaoming Huo},
  title = {{Generalization Bounds for Magnitude-Based Pruning via Sparse Matrix Sketching}},
  year = {2023},
  eprint = {2305.18789},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.18789},
}
Figure