Abstract
In this paper we introduce Principal Filter Analysis (PFA), an easy to use and effective method for neural network compression. PFA exploits the correlation between filter responses within network layers to recommend a smaller network that maintain as much as possible the accuracy of the full model. We propose two algorithms: the first allows users to target compression to specific network property, such as number of trainable variable (footprint), and produces a compressed model that satisfies the requested property while preserving the maximum amount of spectral energy in the responses of each layer, while the second is a parameter-free heuristic that selects the compression used at each layer by trying to mimic an ideal set of uncorrelated responses. Since PFA compresses networks based on the correlation of their responses we show in our experiments that it gains the additional flexibility of adapting each architecture to a specific domain while compressing. PFA is evaluated against several architectures and datasets, and shows considerable compression rates without compromising accuracy, e.g., for VGG-16 on CIFAR-10, CIFAR-100 and ImageNet, PFA achieves a compression rate of 8x, 3x, and 1.4x with an accuracy gain of 0.4%, 1.4% points, and 2.4% respectively. Our tests show that PFA is competitive with state-of-the-art approaches while removing adoption barriers thanks to its practical implementation, intuitive philosophy and ease of use.
Introduction
Modern deep neural networks are notoriously over-parameterized. While this redundancy facilitates effective learning during training, it poses significant challenges for deployment on resource-constrained devices such as smartphones or IoT hardware, where memory, storage, and computation (FLOPs) are at a premium. Existing pruning techniques often come with high friction, requiring modifications to the loss function, complex iterative loops, or manual tuning of obscure hyperparameters for every layer.
We introduce Principal Filter Analysis (PFA), a refreshingly simple and effective method for neural network compression. PFA identifies and removes redundant filters by analyzing the correlation between filter responses rather than weight magnitudes. This approach allows for significant model shrinkage—sometimes by as much as 8x—while maintaining or even improving original accuracy.
Methodology
The core idea behind PFA is to treat filter responses (activations) as data points and use Principal Component Analysis (PCA) to find their "spectral energy." If the responses of two filters are highly correlated, one of them is redundant. The authors propose two main algorithms:
- PFA-En (Energy-based): The user specifies a target level of spectral energy to preserve (e.g., 95%). The algorithm then calculates the minimum number of filters needed in each layer to maintain that energy. Alternatively, it can iteratively find the right energy threshold to meet a specific target "footprint" (e.g., a 50% smaller model).
- PFA-KL (Parameter-free): This version uses Kullback-Leibler (KL) divergence to measure how far a layer's filter responses are from an "ideal" state where every filter is perfectly uncorrelated, automatically recommending a compression rate without user input.
Once the number of filters to keep is decided, PFA uses Filter Selection based on Pearson’s correlation coefficients to identify and remove the specific filters that are most redundant. As shown in Figure 1, this data-driven filter selection strategy significantly outperforms random initialization across various footprint targets, followed by a quick fine-tuning step to recover accuracy.
Experimental Setup
The researchers evaluated PFA across several standard computer vision benchmarks:
- CIFAR-10 and CIFAR-100: Used for ablation studies and comparisons with other pruning methods.
- ImageNet: The industry-standard large-scale dataset used to prove the method scales to real-world complexity.
- Domain-specific subsets: Custom subsets of CIFAR-100 (e.g., "aquarium fish") demonstrated how PFA can specialize a general model for a specific narrow task during compression.
Key Results and Insights
A striking finding of this work is that compression can act as a form of regularization. By removing redundant, noisy filters, the compressed model often generalizes better than the over-parameterized original. Furthermore, because PFA is data-driven, it can "specialize" a model; for instance, running PFA on a general ImageNet model using only medical images will prune filters irrelevant to that specific domain.
As illustrated in Figure 6, PFA is highly competitive with state-of-the-art (SOTA) methods like Network Slimming (NS) and Variational Information Bottleneck (VIB), but with much less implementation overhead. Key highlights include:
- VGG-16 on CIFAR-10: Achieved an 8x compression rate with a 0.4% increase in accuracy.
- VGG-16 on ImageNet: Achieved a 1.4x compression rate with a significant 2.4% accuracy gain.
- ResNet-50/34: Showed consistent improvements, proving the method works on modern architectures with skip-connections.
Conclusion
PFA offers a practical, "closed-form" solution for model compression that is easy to implement and agnostic to how the model was trained. While it requires a representative dataset for initial response analysis, its efficiency—calculating recipes for ImageNet-scale layers in seconds—makes it a powerful tool for engineers. Future work will explore applying PFA's correlation-based logic to Recurrent Neural Networks (RNNs) and Transformer-based models.
Summary updated