Discriminant Distance-Aware Representation on Deterministic Uncertainty Quantification Methods

Jiaxin Zhang, Kamalika Das, Kumar Sricharan

Abstract

Deep Neural Networks (DNNs) often exhibit overconfidence, particularly when encountering out-of-distribution (OOD) data. While Uncertainty Quantification (UQ) methods like Deep Ensembles provide a solution, their computational cost is prohibitive for real-time applications. Deterministic Uncertainty Methods (DUMs) offer a single-pass alternative but frequently suffer from "feature collapse," where OOD data is mapped to the same latent space as training data. We present Discriminant Distance-Aware Representation (DDAR), a pluggable layer that achieves distance-aware uncertainty without the restrictive mathematical constraints of previous DUMs. By utilizing learnable prototypes and a distinction maximization layer, DDAR matches the performance of ensembles while maintaining the efficiency of single-pass models.

Introduction

In safety-critical domains such as autonomous driving and medical diagnostics, it is vital for a model to "know what it doesn't know." Standard DNNs are notoriously overconfident, often assigning high-probability scores to unfamiliar inputs. To address this, researchers have turned to Deterministic Uncertainty Methods (DUMs). However, many DUMs rely on strict bi-Lipschitz constraints to prevent feature collapse—a phenomenon where the model fails to distinguish between in-distribution and OOD features in the latent space. These constraints often limit architecture choices and complicate implementation. DDAR addresses these challenges by focusing on discriminant representations and prototype separation, providing an architecture-agnostic solution for robust uncertainty quantification.

The DDAR Framework

Overview of the DDAR architecture, illustrating the flow from feature extraction to distance-aware uncertainty via learnable prototypes and distinction maximization.

DDAR introduces a "pluggable" layer designed to learn a distance-aware representation of data through four key components:

  1. Learnable Prototypes: Instead of mapping inputs directly to class labels, the model learns representative points (prototypes) in the latent space for each class.
  2. Distinction Maximization (DM) Layer: This layer computes the cosine distance between the input’s feature vector and the class prototypes. An exponential activation function is applied to "sharpen" these similarities, enhancing the distinctiveness of the representation.
  3. Regularized Loss Functions: To prevent prototypes from clustering together (which leads to feature collapse), two specific constraints are added to the loss:
  4. $L_{dissimilar}$: Ensures prototypes remain well-separated in the latent space.
  5. $L_{entropy}$: Encourages the model to consider the entire feature space rather than collapsing onto a single prototype.
  6. Relaxed Constraints: By achieving distance awareness through loss structure and prototype mapping, DDAR removes the need for global Lipschitz constraints, making it compatible with any architecture, including Transformers and standard feed-forward networks.

Experimental Evaluation

The authors evaluated DDAR across diverse benchmarks, including image classification (CIFAR-10/100 vs. SVHN) and Natural Language Processing (CLINC intent detection). To visualize the model's behavior, a "Two Moons" toy dataset was used to map uncertainty boundaries.

Comparison of class probabilities and predictive uncertainty across various UQ methods on the Two Moons dataset. DDAR demonstrates superior distance-aware uncertainty compared to standard deterministic and SNGP models.

Key Results

  • Efficiency and Accuracy: On CIFAR-10, DDAR achieved an AUROC of 0.949, nearly matching the gold-standard Deep Ensembles (0.947) while requiring significantly less memory and computation.
  • SOTA Comparison: DDAR consistently outperformed other single-pass methods like DUQ and SNGP in both classification accuracy and OOD detection across vision and text tasks.
  • NLP Versatility: When integrated with BERT for intent detection, DDAR-256 achieved a high AUROC of 0.969, demonstrating its effectiveness in high-dimensional language tasks.

Discussion and Insights

The Lipschitz Paradox

Traditional DUMs assume that a bi-Lipschitz constraint is mandatory to avoid feature collapse. DDAR provides a counter-argument: by focusing on discriminant representations and explicit prototype separation, models can achieve high-quality OOD detection without the restrictive mathematical overhead that slows down training and limits model selection.

Pluggability

Because DDAR does not require specific architectural components (like residual blocks for spectral normalization), it serves as a versatile tool for developers. It can be dropped into existing pipelines to provide immediate uncertainty quantification with minimal modification.

Conclusion

DDAR represents a significant step forward for efficient uncertainty quantification. By solving the feature collapse problem through learnable prototypes rather than restrictive constraints, it offers a scalable, architecture-agnostic solution. Future work will explore the application of DDAR to Large Language Models (LLMs) and more complex computer vision tasks where single-pass efficiency is paramount.

Summary updated

BibTeX
@inproceedings{zhang2024discriminant,
  author = {Jiaxin Zhang and Kamalika Das and Kumar Sricharan},
  title = {{Discriminant Distance-Aware Representation on Deterministic Uncertainty Quantification Methods}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
}
Figure