Distributional Uncertainty for Out-of-Distribution Detection

JinYoung Kim, DaeUng Jo, Kimin Yun, Jeonghyo Song, Youngjoon Yoo · DOI

Introduction

In safety-critical applications such as autonomous driving, semantic segmentation models must do more than just classify pixels; they must reliably identify objects that fall outside their training distribution (Out-of-Distribution, or OoD). A standard model might encounter a cow on a highway—an object not present in its urban training set—and erroneously assign it a high-confidence label like "building" or "road." This overconfidence poses significant risks to navigation and safety systems.

This paper introduces the Free Energy Posterior Network (FEPN), a novel framework designed to quantify "distributional uncertainty." By combining normalizing flows with a Beta distribution, the method provides a computationally efficient, sampling-free approach to identifying anomalies in real-time environments.

The Challenge of Overconfidence

Standard deep learning models for semantic segmentation are notorious for overconfidence. When presented with unseen data, they often map these features to known classes with high certainty. Existing attempts to mitigate this issue face several bottlenecks:

  1. Computational Overhead: Methods like Monte Carlo (MC) Dropout require multiple stochastic forward passes to estimate uncertainty, making them too slow for real-time robotics.
  2. Brittle Thresholding: Post-hoc energy-based methods often rely on hand-crafted thresholds that fail to generalize across different lighting conditions or environments.
  3. Uncertainty Conflation: Many models fail to distinguish between aleatoric uncertainty (noise inherent in the data) and distributional uncertainty (novelty of the data).

The FEPN framework aims to address these issues by learning to explicitly model the distribution of features during the training phase.

Methodology: The Free Energy Posterior Network

The authors propose a two-pronged architecture integrated into the Residual Pattern Learning (RPL) framework. The core innovation lies in how the network represents and supervises uncertainty.

Flow-based Posterior Modeling

Instead of a standard softmax output, the network utilizes Normalizing Flows to map complex image features into a tractable latent space. For every pixel, the network outputs the parameters ($\alpha$ and $\beta$) of a Beta distribution. In this formulation, $\alpha$ represents the evidence for "inlier" classes, while $\beta$ represents the evidence for "outliers."

Variance as a Measure of Uncertainty

Unlike traditional methods that rely on a single energy score, FEPN uses the variance of the predicted Beta distribution as the primary signal for OoD detection. High variance occurs when the model encounters ambiguous or unseen data where the evidence for inliers and outliers is roughly equal ($\alpha \approx \beta$). This provides a more semantically meaningful and localized signal for anomalies.

The BUCE Loss Function

To train the network, the authors introduce the Beta Uncertainty Cross Entropy and Energy (BUCE) loss. This function leverages "Outlier Exposure"—showing the model unrelated images (e.g., from the COCO dataset) during training—to "teach" the network what an anomaly looks like. The loss encourages the model to increase variance in regions containing OoD objects, effectively sharpening the model's internal representation of uncertainty.

Experimental Results

The model was trained using Cityscapes as the in-distribution dataset and evaluated against several rigorous OoD benchmarks, including Fishyscapes, RoadAnomaly, and Segment-Me-If-You-Can (SMIYC).

Quantitative Performance

FEPN consistently outperformed established baselines such as MC Dropout and standard Free Energy (EnE) methods:

  • Fishyscapes-Static: The model achieved a False Positive Rate (FPR95) of 13.23%, a substantial improvement over MC Dropout (25.20%) and EnE (15.81%).
  • SMIYC-Anomaly: The framework reached an Area Under Precision-Recall Curve (AuPRC) of 56.55%, significantly higher than the 45.94% achieved by the baseline.

Qualitative Precision

Visual analysis of the uncertainty maps reveals that FEPN produces much cleaner and more precise heatmaps around anomalous objects. While other models often produce "noisy" uncertainty maps that flag background textures, FEPN focuses sharply on the actual anomaly, such as a construction barrier or an animal on the road.

Conclusion and Future Work

The Free Energy Posterior Network represents a significant step forward in making OoD detection viable for real-time systems. By replacing slow sampling methods with a single-pass flow-based architecture, the authors demonstrate that high-quality uncertainty estimation does not have to come at the cost of latency.

Future research directions include reducing the dependency on a frozen backbone (such as DeepLabV3+) and automating the tuning of the BUCE loss hyperparameters. Additionally, the authors suggest that this approach to distributional uncertainty could be highly effective in other domains, such as medical imaging and industrial quality control.

Summary updated

BibTeX
@inproceedings{kim2025distributional,
  author = {JinYoung Kim and DaeUng Jo and Kimin Yun and Jeonghyo Song and Youngjoon Yoo},
  title = {{Distributional Uncertainty for Out-of-Distribution Detection}},
  booktitle = {AVSS},
  year = {2025},
  doi = {10.1109/avss65446.2025.11149895},
}
Figure