An Operator Theoretic Perspective on Pruning Deep Neural Networks

William T. Redman, Maria Fonoberova, Ryan Mohr, Ioannis G. Kevrekidis, Igor MezicarXiv 2021 · arXiv · OpenReview

Abstract

The discovery of sparse subnetworks that perform as well as full models has generated significant interest. While many pruning methods exist, simple magnitude-based pruning remains remarkably robust, even pre-convergence. This paper introduces a theoretical framework based on Koopman operator theory to define a new class of pruning algorithms. We show that these algorithms unify magnitude and gradient-based pruning and provide insights into magnitude pruning's early-training performance.

Introduction

Deep Neural Networks (DNNs) are typically over-parameterized, necessitating pruning for efficient deployment. Despite the development of complex algorithms, Global Magnitude Pruning (GMP)—removing weights with the smallest absolute values—remains a top performer. However, the theoretical basis for its success, particularly early in training, has remained elusive. This work addresses this gap by treating DNN training as a dynamical system, leveraging Koopman operator theory to bridge the divide between magnitude and gradient-based methods.

Theoretical Framework: Koopman Operator Theory

The authors model the evolution of network parameters during training as a discrete dynamical system. By applying Koopman Operator Theory, they "lift" the nonlinear parameter dynamics into an infinite-dimensional space where the evolution is linear. This allows for Koopman Mode Decomposition (KMD), which breaks down parameter evolution into distinct "modes."

Two primary algorithms emerge from this framework:

  • Koopman Magnitude Pruning (KMP): Prunes based on the first Koopman mode, which represents the predicted fixed point or final state of the training process.
  • Koopman Gradient Pruning (KGP): Utilizes decaying modes to identify "coherently dynamic" parameters, which is shown to be equivalent to gradient-based pruning.

Experimental Evaluation

The proposed methods were evaluated using the ShrinkBench toolkit on two benchmarks: MnistNet on MNIST and ResNet-20 on CIFAR-10. These experiments compared Koopman-based approaches against standard baselines, including GMP and random pruning.

Key Insights and Results

Unification of Pruning Methods

A central finding is the mathematical unification of magnitude and gradient pruning. Within the Koopman framework, magnitude pruning targets the "fixed point" mode, while gradient pruning targets "decaying" modes. At convergence, KMP and GMP are shown to be mathematically equivalent. Experimental results confirm that KMP and GMP produce nearly identical accuracy curves when applied to models near convergence, as illustrated in Figure 1.

Equivalence of Koopman and global magnitude pruning at convergence for MnistNet (left) and ResNet-20 (right).

Static vs. Active Dynamics

The research identifies a transition from "static" to "active" dynamics during training. Early on, the system is static: weights that are currently large are predicted to remain large. As training progresses, non-trivial structures emerge. This transition aligns with the emergence of "linear mode connectivity," suggesting a link between dynamical stability and optimization.

Early Training and Gradient Pruning

The robustness of magnitude pruning early in training is explained by the dominance of static dynamics. During the first 10 epochs, pruning masks generated by KMP and GMP overlap by more than 95%, explaining why simple magnitude pruning is so robust early on. Furthermore, the authors demonstrate that KGP yields results very similar to standard gradient-based pruning (JGP), particularly as the model evolves from Epoch 1 to Epoch 20, as shown in Figure 2.

Pruning performance at Epoch 1 vs. Epoch 20. The plots show how different methods perform as the training dynamics transition from static to active.

Limitations and Future Work

While promising, the Koopman approach involves significant computational complexity due to the need for Singular Value Decomposition (SVD) on large matrices. While the "method of snapshots" mitigates this, scaling to massive models like LLMs remains challenging. Future research should investigate the specific triggers for the "static-to-active" transition and validate these findings on larger datasets like ImageNet.

Conclusion

By providing an operator theoretic perspective, this work unifies disparate pruning strategies and offers a rigorous explanation for the empirical success of magnitude pruning. This framework opens new avenues for theoretically motivated model compression and a deeper understanding of neural network training dynamics.

Summary updated

Abstract

The discovery of sparse subnetworks that are able to perform as well as full models has found broad applied and theoretical interest. While many pruning methods have been developed to this end, the na\"ive approach of removing parameters based on their magnitude has been found to be as robust as more complex, state-of-the-art algorithms. The lack of theory behind magnitude pruning's success, especially pre-convergence, and its relation to other pruning methods, such as gradient based pruning, are outstanding open questions in the field that are in need of being addressed. We make use of recent advances in dynamical systems theory, namely Koopman operator theory, to define a new class of theoretically motivated pruning algorithms. We show that these algorithms can be equivalent to magnitude and gradient based pruning, unifying these seemingly disparate methods, and find that they can be used to shed light on magnitude pruning's performance during the early part of training.
BibTeX
@misc{redman2021operator,
  author = {William T. Redman and Maria Fonoberova and Ryan Mohr and Ioannis G. Kevrekidis and Igor Mezic},
  title = {{An Operator Theoretic Perspective on Pruning Deep Neural Networks}},
  year = {2021},
  eprint = {2110.14856},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2110.14856},
}
Figure