NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Class-dependent Pruning of Deep Neural Networks

Rahim Entezari, Olga Saukh2020

TL;DR

This paper introduces a novel class-dependent pruning method for deep neural networks that aims to compress models while specifically minimizing false negatives for critical classes. By adapting the "lottery ticket hypothesis" with a custom loss function, they achieve significant model compression (up to 99% fewer parameters) while maintaining or improving performance metrics like AUC-ROC and crucially, reducing false negatives by up to 35% compared to standard pruning.

What Problem Does This Paper Address?

Deep neural networks are incredibly powerful but also computationally expensive, making them difficult to deploy on resource-constrained devices like those in the IoT. While various compression techniques exist, they often struggle with two key challenges prevalent in real-world applications: data imbalance (where some classes have far more examples than others) and class imbalance (where the cost of a false negative is much higher than a false positive for certain classes). For instance, in medical diagnosis or surveillance, missing a critical event (false negative) is far worse than triggering a false alarm (false positive). Existing compression methods, including the popular Lottery Ticket Hypothesis, don't adequately address this nuanced requirement of prioritizing certain error types for specific classes.

Methods

The authors build upon the Lottery Ticket Hypothesis (LTH), which suggests that dense, randomly initialized networks contain sparse subnetworks ("winning tickets") that can be trained in isolation to achieve comparable performance. Their core innovation is a class-dependent network compression technique that modifies the LTH framework.

Here's how it works:

  • Iterative Pruning: They employ an iterative pruning process, similar to LTH, where a network is trained, pruned, and then rewound to its initial weights before the next pruning iteration. They use a magnitude increase criterion to decide which weights to prune, selecting those with the largest difference between their final and initial values.
  • Custom Loss Function: The key novelty lies in their custom loss function, which combines two components:
  • Weighted Binary Cross-Entropy Loss: This component addresses data imbalance by assigning different weights to classes based on their frequency.
  • Squared Hinge Ranking Loss: This component is designed to optimize AUC-ROC and, crucially, control the trade-off between false positives (FP) and false negatives (FN). By minimizing this loss, they aim to keep FN low, even if it means increasing FP.
  • Two-Step Design: The training process involves two phases:
  • Initial Balanced Training: The first epoch uses a data-balanced loss to help the network learn general class boundaries.
  • Class-Imbalanced Optimization: Subsequent epochs focus on the class-imbalanced loss, prioritizing the reduction of FN for critical classes.

Datasets

The paper evaluates their method on two benchmark datasets:

  • ISIC-2016: A challenging dataset for skin lesion classification, containing dermoscopic images labeled as benign or melanoma. This dataset exhibits significant data imbalance.
  • CRACK: A dataset of concrete crack images, used for crack detection. This dataset also presents data imbalance and is relevant to early warning systems.

Key Insights and Ideas

  • Prioritizing False Negatives: The most significant insight is that by explicitly incorporating class importance into the pruning loss, they can effectively reduce false negatives for critical classes, a capability lacking in standard pruning methods.
  • Trade-off Management: The method demonstrates a controlled trade-off between false positives and false negatives, allowing for an increase in FP if it significantly reduces FN, which is desirable in many real-world safety-critical applications.
  • Synergy of LTH and Custom Loss: Combining the iterative pruning strategy of the Lottery Ticket Hypothesis with a carefully designed loss function proves to be a powerful approach for achieving both compression and class-specific performance optimization.
  • Importance of Initial Balanced Training: The strategy of starting with a balanced loss function before shifting to class-imbalanced optimization is crucial for establishing good initial class boundaries.

Key Results

The proposed class-dependent pruning method demonstrates strong performance across both datasets:

  • Parameter Reduction: Achieves substantial model compression, using up to 99% fewer parameters compared to the original network.
  • False Negative Reduction: Reduces the number of false negatives by up to 35% compared to the standard Lottery Ticket algorithm without class optimization.
  • Performance Improvement: Provides an overall higher AUC-ROC measure compared to the conventional Lottery Ticket algorithm and three other popular pruning methods (LOBS, SNIP, and MobileNet).
  • Accuracy: Consistently achieves better accuracy than the standard LT algorithm and other benchmarks.

Limitations and Future Work

  • Computational Cost: While the compressed networks are efficient, the iterative pruning process itself can be computationally intensive, especially for very deep networks. The authors mention that stronger hardware could allow for longer training epochs, potentially yielding even better results.
  • Generalizability to Deeper Networks: The experiments were conducted on relatively shallow AlexNet architectures. The authors suggest that their method could be applied to deeper networks like VGG and ResNet, but this would require more substantial computational resources.
  • Future Work: The paper implicitly suggests exploring the application of this method to other domains with critical classes and imbalanced data, such as anomaly detection in industrial processes or medical image analysis. Further research could also investigate more sophisticated weighting schemes or alternative loss functions for even finer control over error types.

Summary updated

BibTeX
@misc{entezari2020class,
  author = {Rahim Entezari and Olga Saukh},
  title = {{Class-dependent Pruning of Deep Neural Networks}},
  year = {2020},
  doi = {10.1109/sensysml50931.2020.00010},
}
Figure