PENNI: Pruned Kernel Sharing for Efficient CNN Inference

Shiyu Li, Edward Hanson, Hai Li, Yiran ChenarXiv 2020

Abstract

Deep Convolutional Neural Networks (CNNs) are increasingly difficult to deploy on resource-constrained edge devices due to their massive computational and memory requirements. We present PENNI (Pruned kErnel shariNing), a unified model compression framework that combines filter decomposition with sparse pruning. By forcing layers to share a small set of "basis kernels" and aggressively pruning the coefficients that combine them, PENNI achieves up to a 97% reduction in parameters and a 53% boost in inference speed with negligible loss in accuracy.

Introduction

The current paradigm of "bigger is better" in deep learning poses significant challenges for deployment on smartphones and IoT sensors. Existing solutions generally fall into two categories: Low-Rank Approximation (LRA) and Pruning. LRA reduces computation through weight matrix decomposition but fails to exploit natural network redundancy. Pruning offers high compression but often results in unstructured sparsity that is difficult for hardware to accelerate, or structured sparsity that significantly degrades accuracy.

PENNI offers a "middle way," achieving extreme compression while maintaining a hardware-friendly regular structure. It treats kernels as the fundamental unit of sharing, allowing for high representational power with minimal parameter overhead.

Methodology

The Four-Phase Framework

PENNI operates through a structured pipeline designed to maximize both compression and hardware efficiency:

  1. Filter Decomposition: Instead of unique kernels for every filter, PENNI decomposes a layer into $d$ shared basis kernels and a coefficient matrix. Each filter is reconstructed as a weighted sum of these bases.
  2. Retraining with Sparsity: The model undergoes retraining using $l_1$-regularization on the coefficient matrix. To ensure convergence, the authors employ an alternating training strategy: freezing coefficients to train bases, then freezing bases to train coefficients.
  3. Magnitude Pruning: Near-zero coefficients are removed to induce sparsity.
  4. Model Shrinking: A structural cleanup phase removes entire input or output channels that have zero coefficients. This phase includes specialized logic to handle ResNet skip connections by calculating the intersection of redundancies across paths.
The four-phase workflow of PENNI: (A) Filter Decomposition, (B) Retraining with Sparsity, (C) Magnitude Pruning, and (D) Model Shrinking.

Hardware Acceleration

The decomposition splits standard convolution into two steps: a channel-wise convolution with basis kernels followed by a weighted sum. This pattern is highly efficient for SIMD (Single Instruction, Multiple Data) processors and dedicated AI accelerators, allowing the theoretical FLOP reductions to translate into real-world latency gains.

Key Results and Analysis

Performance Benchmarks

PENNI was evaluated on CIFAR-10 and ImageNet across various architectures, consistently outperforming state-of-the-art pruning methods:

  • VGG16 (CIFAR10): 98.33% parameter reduction and 93.26% FLOP reduction with only a 0.37% accuracy drop.
  • ResNet18 (CIFAR10): 97% parameter reduction and 92% FLOP reduction with a 0.24% increase in accuracy.
  • ResNet50 (ImageNet): 81% FLOP reduction with a 0.5% accuracy drop.
  • Inference Speedup: On an Intel Xeon CPU, PENNI reduced latency by 53% and memory consumption by 44%.

Sensitivity to Basis Kernels

A critical hyperparameter in PENNI is the number of basis kernels ($d$). As shown in the analysis below, increasing $d$ improves accuracy but also increases the remaining parameters and FLOPs. The authors identify $d=5$ or $6$ as the "sweet spot" where the model recovers near-baseline accuracy while maintaining high compression.

Impact of the number of basis kernels on model compression (top) and test accuracy (bottom). Accuracy plateaus near the baseline as the number of kernels increases.

Discussion and Future Work

Synergy and Stability

A key insight of this work is that decomposition acts as a "sparsity stabilizer." Applying $l_1$-regularization to the decomposed coefficients rather than raw weights leads to more stable gradients and better convergence. Furthermore, the framework's ability to handle skip connections via redundancy intersection allows it to prune complex architectures like ResNets more effectively than standard methods.

Limitations

Despite the massive reduction in model size, intermediate feature maps (activations) still dominate memory usage during inference, particularly at large batch sizes. Additionally, performance remains sensitive to the choice of $d$ and the regularization strength $\gamma$.

Future Directions

Future research may explore applying PENNI's kernel-sharing logic to non-CNN architectures, such as Transformers. Additionally, the deterministic structure of the shared kernels could inform the design of specialized hardware accelerators that utilize pipelining to further minimize inference latency.

Summary updated

BibTeX
@misc{li2020penni,
  author = {Shiyu Li and Edward Hanson and Hai Li and Yiran Chen},
  title = {{PENNI: Pruned Kernel Sharing for Efficient CNN Inference}},
  year = {2020},
  eprint = {2005.07133},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.07133},
}
Figure