Know Where To Drop Your Weights: Towards Faster Uncertainty Estimation

Akshatha Kamath, Dwaraknath Gnaneshwar, Matias Valdenegro-Toro

TL;DR

This paper introduces "Select-DC," a method that significantly speeds up uncertainty estimation in deep neural networks by applying DropConnect to only a subset of layers. This approach achieves substantial computational savings with minimal impact on accuracy and uncertainty quality, making it suitable for low-latency applications and out-of-distribution detection.

What Problem Does This Paper Address?

Deep neural networks are increasingly used in critical applications where understanding their confidence in predictions is paramount. Estimating this "epistemic uncertainty" (the model's uncertainty about its own parameters) is crucial for safety and reliability, especially in scenarios like autonomous driving or medical diagnosis. However, existing methods like Monte Carlo Dropout (MCD) and Monte Carlo DropConnect (MCDC) require numerous forward passes through the network, making them computationally expensive and too slow for real-time, low-latency applications. This creates a gap between the need for robust uncertainty estimation and the practical constraints of deployment.

Methods

The paper proposes Select-DC, a modification of the DropConnect technique. DropConnect, similar to Dropout, randomly drops out individual weights during training. When applied during inference (MC-DropConnect), it approximates Bayesian neural networks and provides uncertainty estimates. The core idea of Select-DC is to apply DropConnect only to a select subset of layers during inference, rather than the entire network. This "frozen block" of layers at the beginning of the network allows for faster computation. The authors also investigate the impact of varying the number of layers where DropConnect is applied and the drop probability.

Datasets

The experiments were conducted on three standard image classification datasets:

  • CIFAR-10
  • CIFAR-100
  • SVHN

The models used were ResNet-20 and VGG-19. For out-of-distribution detection, the models were trained on CIFAR-10 and evaluated on SVHN.

Key Insights and Ideas

  • Computational Speedup without Major Quality Loss: The most significant finding is that applying DropConnect to only a subset of layers (Select-DC) provides a substantial computational speedup (fewer GFLOPS) with only a marginal decrease in accuracy and uncertainty estimation quality compared to applying it to all layers (MCDC). This is counter-intuitive, as one might expect full application to yield the best results.
  • Unexpected Performance with Partial DropConnect: Contrary to expectations, the authors found that applying DropConnect to all layers (full MCDC) often resulted in the least optimal performance in terms of accuracy. Partial application, specifically with Select-DC, yielded better results.
  • Flexibility for Dynamic Uncertainty: Select-DC offers flexibility. Models can be trained with full MCDC for maximum uncertainty modeling and then switched to Select-DC at inference time for speed, depending on the application's requirements.
  • Out-of-Distribution Detection Efficacy: Select-DC demonstrates strong performance in detecting out-of-distribution samples, achieving AUC scores comparable to full MCDC, with differences of less than 1%.

Key Results

  • Significant GFLOPS Reduction: Increasing the number of "frozen" layers (i.e., decreasing the number of layers with DropConnect applied) leads to a proportional decrease in computational cost (GFLOPS). For example, increasing $\lambda$ (number of frozen layers) from 0 to 16 on ResNet20/CIFAR-10 reduced GFLOPS for 25 forward passes from approximately 50 to 10.
  • Accuracy Trade-off: Accuracy generally decreases slightly as GFLOPS decrease (i.e., as $\lambda$ increases). This trade-off is typically around 1-2% for significant speedups.
  • Uncertainty Quality: While accuracy might slightly decrease, the uncertainty quality (measured by entropy) shows a less pronounced degradation, especially for lower drop probabilities. In some cases, uncertainty increases slightly as accuracy drops, which is consistent with the idea that a less capable model might exhibit more uncertainty.
  • OOD Detection: AUC scores for OOD detection were consistently high (around 0.88-0.89) and very close to full MCDC, with differences typically less than 1%.

Limitations and Future Work

  • Frozen Block Requirement: A current limitation is the requirement that the "frozen block" of layers must be at the beginning of the network to enable efficient reuse of intermediate activations.
  • Unexpected Performance of Full MCDC: The authors acknowledge the unexpected finding that full MCDC sometimes performs worse than partial application and suggest this warrants further research.
  • Uncertainty Quantification: The paper notes that MC-DropConnect might not produce "good" epistemic uncertainty quantification, as evidenced by the smaller-than-expected differences in OOD detection performance.
  • Future Directions: The authors are excited to explore how these findings extend to other domains like Natural Language Processing and Reinforcement Learning. They also suggest further research into the performance implications of full DropConnect usage.

Summary updated

BibTeX
@inproceedings{kamath2020know,
  author = {Akshatha Kamath and Dwaraknath Gnaneshwar and Matias Valdenegro-Toro},
  title = {{Know Where To Drop Your Weights: Towards Faster Uncertainty Estimation}},
  booktitle = {ICBINB @ NeurIPS},
  year = {2020},
  url = {https://openreview.net/forum?id=ROIhSrWpCAp},
}
Figure