Latent Discriminant Deterministic Uncertainty

Gianni Franchi, Xuanlong Yu, Andrei Bursuc, Emanuel Aldea, Séverine Dubuisson, David Filliat

Abstract

Deep Neural Networks (DNNs) are frequently deployed in safety-critical environments, such as autonomous driving, where overconfidence in erroneous predictions can lead to catastrophic outcomes. While Deep Ensembles provide a gold standard for uncertainty estimation, their computational overhead is prohibitive for real-time applications. This paper presents Latent Discriminant deterministic Uncertainty (LDU), a novel Deterministic Uncertainty Method (DUM) that achieves high-quality uncertainty estimates in a single forward pass. By integrating a trainable set of prototypes within the latent space, LDU addresses the limitations of existing DUMs, such as feature collapse and poor scalability, while maintaining the inference speed of standard deterministic models.

Introduction

In autonomous driving, models must distinguish between what they know and what they do not. This involves quantifying both aleatoric uncertainty (inherent noise in data) and epistemic uncertainty (lack of knowledge about a scenario). Current state-of-the-art methods for uncertainty estimation typically rely on Deep Ensembles, which require training and executing multiple model instances. This approach is computationally ruinous for real-time systems requiring low-latency responses.

Single-pass alternatives, known as Deterministic Uncertainty Methods (DUMs), have emerged to solve this efficiency gap. However, many DUMs rely on strict mathematical constraints, such as the Lipschitz constant, which are difficult to enforce in high-resolution tasks like semantic segmentation or monocular depth estimation. Furthermore, these methods often suffer from "feature collapse," where the model maps out-of-distribution (OOD) inputs to the same latent representations as in-distribution data. LDU is proposed to overcome these challenges by focusing on the latent space organization rather than global architectural constraints.

Methodology

LDU introduces a Distinction Maximization (DM) layer into the network's latent space—the bottleneck where high-level features are extracted. This approach allows LDU to be integrated into standard backbones like ResNet or DenseNet without requiring the entire architecture to be bi-Lipschitz.

Trainable Prototypes and Latent Space

The core of LDU is a set of trainable "prototypes" or anchor points in the latent space. During inference, the model calculates the cosine similarity between input features and these prototypes. This mechanism acts as a "memory" of the training distribution, allowing the model to quantify how much a new input deviates from known patterns.

Loss Functions for Discriminant Features

To prevent feature collapse and ensure a well-structured latent space, LDU employs three specific loss functions:

  1. Distinction Loss ($\mathcal{L}^{Dis}$): Forces prototypes to remain distinct and well-separated in the latent space.
  2. Entropy Loss ($\mathcal{L}^{Entrop}$): Encourages features to be distributed across different prototypes, preventing the model from collapsing all inputs into a single representation.
  3. Uncertainty Loss ($\mathcal{L}^{Unc}$): Trains an auxiliary lightweight MLP head to predict the model's own error based on the feature's position relative to the prototypes.

Experimental Evaluation

The authors evaluated LDU across three major computer vision domains to test its versatility and scalability:

  • Image Classification: Using CIFAR-10 (In-distribution) and SVHN (Out-of-distribution) to measure OOD detection capabilities.
  • Semantic Segmentation: Tested on MUAD (a synthetic dataset with adverse weather and OOD objects), Cityscapes (urban scene understanding), and BDD Anomaly (real-world anomaly detection).
  • Monocular Depth Estimation: Evaluated on the KITTI dataset (Eigen split) to assess performance in regression-based tasks.

Key Results

LDU demonstrates a significant improvement over existing DUMs and remains competitive with Deep Ensembles across several metrics:

  • Efficiency: In semantic segmentation tasks, LDU achieved an inference time of 14ms per image—identical to a standard uncertainty-blind baseline. In contrast, a 3-model Deep Ensemble required 56ms, making LDU 4x faster and suitable for real-time deployment.
  • Accuracy and Calibration: On the MUAD dataset, LDU reached an mIoU of 69.32%, nearly matching the 69.80% achieved by Deep Ensembles. It also showed superior calibration (lower Expected Calibration Error) under distribution shifts, such as those found in Cityscapes-C.
  • OOD Detection: LDU outperformed popular DUMs like SNGP and DUQ in image classification, achieving an AUROC of 0.872 compared to their 0.844.

Discussion and Limitations

LDU’s success lies in its ability to disentangle latent representations. By forcing the model to organize features around prototypes, it effectively prevents the overlap of different classes that typically plagues standard networks. This scalability is a major contribution, as it allows DUMs to move beyond simple 32x32 images to high-resolution autonomous driving datasets.

However, the method is primarily empirical. While it performs well in practice, it lacks the formal theoretical guarantees on uncertainty correctness that more mathematically rigid (but less scalable) methods provide. Additionally, the optional two-stage training for epistemic uncertainty relies on OOD data synthesizers, which can be difficult to optimize for complex visual environments.

Conclusion

Latent Discriminant deterministic Uncertainty (LDU) represents a significant step forward for real-time uncertainty estimation. By focusing on prototype-based latent space organization, LDU provides the accuracy and robustness of Deep Ensembles with the computational efficiency of a single-pass model. Future work will explore more sophisticated regularization strategies to further bound model error while maintaining high task performance in increasingly complex environments.

Summary updated

BibTeX
@inproceedings{franchi2022latent,
  author = {Gianni Franchi and Xuanlong Yu and Andrei Bursuc and Emanuel Aldea and Séverine Dubuisson and David Filliat},
  title = {{Latent Discriminant Deterministic Uncertainty}},
  booktitle = {European Conference on Computer Vision},
  year = {2022},
  doi = {10.1007/978-3-031-19775-8\_15},
}
Figure