Calibrating Deep Convolutional Gaussian Processes

Gia-Lac Tran, Edwin V. Bonilla, John P. Cunningham, Pietro Michiardi, Maurizio Filippone

Abstract

The wide adoption of Convolutional Neural Networks (CNNs) in applications where decision-making under uncertainty is fundamental has brought a great deal of attention to the ability of these models to provide reliable uncertainty estimates. This paper investigates the calibration of CNN-Gaussian Process (GP) hybrids, demonstrating that existing state-of-the-art models remain significantly miscalibrated. We propose a new hybrid model, CNN+GP(RF), which utilizes random feature expansions and joint Bayesian inference to achieve superior calibration while maintaining competitive predictive accuracy.

Introduction

In high-stakes domains such as autonomous driving or medical diagnosis, model reliability is as critical as accuracy. A well-calibrated model ensures that a predicted probability (e.g., 90% confidence) accurately reflects the empirical frequency of being correct. Modern CNNs are notoriously overconfident, often assigning high probabilities to incorrect classifications.

While replacing the final layers of a CNN with a Gaussian Process (GP) is a theoretically sound approach to improving uncertainty estimation, this paper shows that popular hybrids like GPDNN and SVDKL still suffer from significant miscalibration. The core contribution is a scalable CNN-GP hybrid that addresses these calibration gaps through proper Bayesian treatment of the entire network.

Methods

The proposed architecture, CNN+GP(RF), replaces the standard fully connected layers of a CNN with a GP approximated via Random Feature Expansion. This approach maps the input to a finite set of random basis functions, transforming the infinite-dimensional GP into a computationally efficient Bayesian linear model.

Key components include:

  • Arc-Cosine Kernel: An order-one arc-cosine kernel is used to mathematically mirror the ReLU activations prevalent in deep learning.
  • Joint Inference via Monte Carlo Dropout (MCD): To ensure a truly Bayesian treatment, MCD is applied across both the convolutional filters and the GP parameters. This joint inference is critical for achieving reliable calibration.
  • Structured Orthogonal Random Features (SORF): To further scale the model, SORF is employed using Hadamard transformations, significantly reducing the parameter count in the final layers (e.g., from 30M to 2.3M in AlexNet) without sacrificing performance.

Results

The models were evaluated on MNIST, CIFAR-10, and CIFAR-100. The results demonstrate that CNN+GP(RF) provides a significant leap in calibration quality.

Calibration Performance

The primary metric for evaluation is the Expected Calibration Error (ECE). CNN+GP(RF) consistently outperformed previous hybrids across all tested datasets.

Reliability diagrams comparing CNN+GP(RF) (red) against existing hybrids. The proposed model tracks the ideal diagonal much more closely, indicating it is better calibrated and less overconfident.

As shown in the reliability diagrams, previous methods (GPDNN, CGP, SVDKL) exhibit curves well below the diagonal, signifying systemic overconfidence. In contrast, the CNN+GP(RF) curve aligns closely with the ideal diagonal.

Quantitative Metrics

Beyond calibration, the model maintains competitive accuracy. On CIFAR-10, it achieves ~88% accuracy, and on CIFAR-100, ~67%.

Log-scale metrics (ERR, MNLL, ECE, BRIER) across various datasets and training data proportions. CNN+GP(RF) and its SORF variant consistently show lower error and better calibration than baselines.

Out-of-Distribution Detection

In tests involving out-of-distribution data (MNIST vs. NOT-MNIST), CNN+GP(RF) demonstrated superior "knowledge of its own ignorance." It assigned significantly higher entropy (uncertainty) to unseen character classes, whereas baseline models often made confident but incorrect predictions.

Conclusion

This work highlights that simply adding a GP layer to a CNN is insufficient for reliable uncertainty estimation. By employing random feature approximations and joint Bayesian inference via MCD, the proposed CNN+GP(RF) model achieves state-of-the-art calibration. Future work will focus on stabilizing hyperparameter learning and scaling these methods to larger datasets like ImageNet.

Summary updated

BibTeX
@inproceedings{tran2019calibrating,
  author = {Gia-Lac Tran and Edwin V. Bonilla and John P. Cunningham and Pietro Michiardi and Maurizio Filippone},
  title = {{Calibrating Deep Convolutional Gaussian Processes}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2019},
  url = {https://openreview.net/forum?id=ZMPBPDpJ2Iw},
}
Figure