Subspace Node Pruning

Joshua Offergeld, Marcel van Gerven, Nasir Ahmad · DOI

Abstract

Subspace Node Pruning (SNP) introduces a novel approach to neural network compression by projecting activations into an orthogonal subspace. This allows for the identification and removal of redundant nodes with minimal accuracy loss. By leveraging linear least squares for one-step reconstruction and a global variance-based pruning strategy, SNP achieves state-of-the-art results on ResNet, Vision Transformers, and Large Language Models, while significantly reducing the computational overhead of the pruning process itself.

Introduction

As deep learning models scale, the computational cost of inference becomes a significant bottleneck. Pruning techniques aim to alleviate this by removing redundant parameters. However, a trade-off typically exists between unstructured pruning (high sparsity, low hardware efficiency) and structured pruning (lower sparsity, high hardware efficiency). Existing structured pruning methods often require complex, iterative retraining or manual layer-wise sensitivity analysis to maintain accuracy.

Methodology: Subspace Node Pruning (SNP)

SNP addresses these challenges by transforming layer activations into an orthogonal subspace where redundancy is explicitly quantifiable.

The SNP pipeline: (Left) Construction of an orthogonal subspace via LDL decomposition; (Center) Importance scoring based on non-redundant activity; (Right) Global pruning using cumulative variance ratios.

Orthogonal Subspace Transformation

The core of SNP is the use of LDL decomposition (similar to Gram-Schmidt orthogonalization) to ensure that the activity of each unit in a layer is independent of the others. This transformation makes it clear which units provide unique information and which are redundant.

One-Step Reconstruction

A key advantage of pruning in an orthogonal subspace is the ability to use Linear Least Squares (LLS) to optimally adjust the remaining weights. This "recovers" the information lost from pruned nodes in a single step, eliminating the need for expensive iterative fine-tuning.

Importance Scoring and Global Pruning

The authors propose Unnormalized-ZCA Scoring, which ranks units based on the amount of unique information they contribute. To determine pruning ratios across the network, SNP utilizes cumulative variance. By analyzing the total "energy" in the subspace, the method prunes nodes until a specific global variance threshold is reached, automating the allocation of sparsity across different layers.

Structural Advantages of SNP

By transforming the weight matrices into a triangular form through the subspace projection, SNP enables more effective structured pruning.

Comparison of pruning a dense matrix versus a triangular matrix. Pruning a triangular matrix allows for the complete removal of input dimensions, leading to direct hardware acceleration.

Unlike standard dense pruning, which may leave "holes" in the matrix, pruning the triangular structure created by SNP allows for the clean removal of entire input dimensions, which is highly compatible with modern GPU acceleration.

Experimental Results

The authors evaluated SNP across various architectures and benchmarks, including ImageNet (VGG-16, ResNet-50, DeiT) and WikiText (OPT models).

  • Efficiency: On ResNet-50, SNP was 24.3x faster to execute than the state-of-the-art TPP method while maintaining competitive accuracy.
  • Computer Vision: SNP-ZCA achieved 75.43% Top-1 accuracy on ResNet-50 with a 2.3x reduction in FLOPs. It also outperformed baselines on DeiT-Tiny by approximately 0.8%.
  • Large Language Models: When applied to OPT-125M and OPT-1.3B, SNP consistently outperformed SliceGPT, particularly at higher compression levels (up to 40% parameter reduction).

Conclusion

Subspace Node Pruning offers a mathematically grounded, "one-shot" solution for model compression. By focusing on non-redundant activities and providing an optimal reconstruction path, SNP bridges the gap between high-speed pruning and high-accuracy deployment. Future work may explore incorporating downstream sensitivity to further refine the global variance cutoff and applying these principles during the training phase to inherently minimize redundancy.

Summary updated

BibTeX
@misc{offergeld2024subspace,
  author = {Joshua Offergeld and Marcel van Gerven and Nasir Ahmad},
  title = {{Subspace Node Pruning}},
  year = {2024},
  eprint = {2405.17506},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.17506},
}
Figure