[Paper Review] On Last-Layer Algorithms for Classification: Decoupling Representation from Uncertainty Estimation
This paper proposes a family of last-layer algorithms that decouple representation learning from uncertainty estimation in deep neural networks, using simple ensembles of linear models on features extracted by a pre-trained backbone. Experiments show these methods significantly outperform standard SGD baselines in selective classification and out-of-distribution detection, especially on ImageNet, with minimal computational overhead and limited benefit from deeper uncertainty modeling.
Uncertainty quantification for deep learning is a challenging open problem. Bayesian statistics offer a mathematically grounded framework to reason about uncertainties; however, approximate posteriors for modern neural networks still require prohibitive computational costs. We propose a family of algorithms which split the classification task into two stages: representation learning and uncertainty estimation. We compare four specific instances, where uncertainty estimation is performed via either an ensemble of Stochastic Gradient Descent or Stochastic Gradient Langevin Dynamics snapshots, an ensemble of bootstrapped logistic regressions, or via a number of Monte Carlo Dropout passes. We evaluate their performance in terms of \emph{selective} classification (risk-coverage), and their ability to detect out-of-distribution samples. Our experiments suggest there is limited value in adding multiple uncertainty layers to deep classifiers, and we observe that these simple methods strongly outperform a vanilla point-estimate SGD in some complex benchmarks like ImageNet.
Motivation & Objective
- To address the challenge of uncertainty quantification in deep learning, where standard models often misrepresent confidence.
- To reduce computational costs of uncertainty estimation in modern deep networks without sacrificing performance.
- To investigate whether adding uncertainty layers beyond the last layer provides meaningful gains.
- To evaluate simple, efficient methods for estimating uncertainty after pre-trained feature extraction.
- To provide a practical, scalable alternative to full Bayesian or complex uncertainty methods in deep learning.
Proposed method
- The method decouples representation learning from uncertainty estimation by training a deep neural network end-to-end to extract features, then fixing these features and training a final linear classifier.
- Uncertainty is estimated via ensembles of models trained on the fixed features using four techniques: SGD snapshots, SGLD, bootstrap, and Monte Carlo Dropout.
- For each input, the model outputs a distribution of predictions across the ensemble, enabling uncertainty estimation through variance or entropy.
- The approach leverages the fact that the last-layer models are small and fast to train, allowing explicit uncertainty quantification at low cost.
- The method is evaluated on selective classification (risk-coverage trade-off) and out-of-distribution detection using AUROC and AUPR metrics.
- The framework is implemented in Keras and TensorFlow, with code publicly available.
Experimental results
Research questions
- RQ1Does decoupling representation learning from uncertainty estimation lead to better uncertainty quantification?
- RQ2How do different last-layer uncertainty estimation methods (SGD, SGLD, bootstrap, MC Dropout) compare in practice?
- RQ3Is there significant benefit in adding uncertainty layers beyond the final classification layer?
- RQ4Can simple last-layer ensembles outperform standard point-estimate SGD models in real-world benchmarks like ImageNet?
- RQ5How well do these methods detect out-of-distribution samples compared to baseline models?
Key findings
- The last-layer ensemble methods significantly outperform the standard SGD baseline in selective classification on ImageNet, with higher coverage at lower risk.
- On CIFAR-100, the SGLD-based last-layer method achieved an AUROC of 0.794 for out-of-distribution detection, outperforming the baseline SGD method (0.789).
- For MNIST, the MC-Dropout last-layer method achieved an AUPR out of 0.935, surpassing the baseline SGD (0.905) and showing strong OOD detection capability.
- The bootstrap and MC-Dropout methods showed the highest improvements in AUPR out on CIFAR-100, with increases of 1.052 and 1.052 respectively over the baseline.
- The results suggest limited value in adding multiple uncertainty layers, as last-layer methods already achieve strong performance with far less computational cost.
- The method achieves strong performance with minimal additional inference cost, making it practical for real-world deployment in safety-critical applications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.