Query2Uncertainty: Robust Uncertainty Quantification and Calibration for 3D Object Detection under Distribution Shift

Till Beemelmanns, Alexey Nekrasov, Stefan Vilceanu, Jonas Steinhaus, Timo Woopen, Bastian Leibe, Lutz Eckstein

TL;DR

Query2Uncertainty introduces a lightweight, density-aware post-hoc calibration method for DETR-style 3D object detectors. By mapping the feature density of latent object queries using normalizing flows, it dynamically adjusts both classification and regression uncertainties, significantly improving model trustworthiness under challenging distribution shifts like adverse weather.

What Problem Does This Paper Address?

Safety-critical applications like autonomous driving rely heavily on 3D object detection to navigate safely. However, deep neural networks are notoriously overconfident, and their uncertainty estimates break down entirely when encountering distribution shifts—such as heavy rain, snow, or transitioning to an entirely new city.

While standard post-hoc calibration methods (like Temperature Scaling) can fix miscalibration on familiar data, they are "blind" to distribution shifts. They apply the exact same static correction factor to all inputs, assuming the test data matches the training distribution. This paper addresses the lack of robust, unified calibration methods capable of dynamically adjusting both classification confidences and bounding box regression variances when a model encounters unfamiliar environments.

Figure 1. Our density-aware calibration method improves reliabil- ity under distribution-shift. An uncalibrated 3D detector exhibits miscalibrated uncertainty estimates when facing distribution shifts, such as a heavy rain or snow. Our method uses feature density to perform density-aware calibration of classification confidences and regression values, improving the model’s trustworthiness.

Methods

The authors present Query2Uncertainty, an approach that leverages the latent object queries inherent to modern DETR-style 3D object detectors. Because these queries compactly encode class, location, and size hypotheses, they serve as an ideal low-dimensional bottleneck for density estimation.

The pipeline consists of three main steps:

  1. Density Estimation: The authors train a RealNVP normalizing flow on the final-layer object queries corresponding to true positive detections from the training set.
  2. Familiarity Scoring: At inference time, the model computes a normalized log-density score ($z_{dens}$) for each query, quantifying how well the input aligns with the known training distribution.
  3. Density-Aware Calibrators: This dynamic density signal is injected directly into post-hoc calibrators. For classification, they introduce Density-Aware Temperature Scaling (DA-TS), Platt Scaling (DA-PS), and Isotonic Regression (DA-IR). For regression, they use the density score to dynamically scale the predicted bounding box coordinate variances and angular concentrations.
Figure 2. Overview of Query2Uncertainty We feed 3D features (either LiDAR or multi-view camera) as tokens into a standard DETR-style 3D object detector where they interact with object queries z. The refined queries at the last decoder layer are passed through a feature density estimator, that returns zdense a measure how well each individual query aligns with True Positives queries from the train set. This module is followed by the detection heads that return probabilistic 3D box parameters and class scores. To obtain well calibrated uncertainties for ID and distribution shift data, we propose our density-aware post-hoc calibration module that calibrates box variances and scores.

Datasets

  • nuScenes: The primary multi-modal dataset used for in-distribution training and evaluation. It was also utilized to evaluate semantic shifts by training models on scenes from Boston and testing them on scenes from Singapore.
  • MultiCorrupt: A benchmark dataset containing 10 different camera and LiDAR corruptions across three severity levels, used to evaluate the model's robustness against environmental distribution shifts.
  • Standardized Uncertainty Benchmark: The authors introduce a new evaluation framework built on top of nuScenes, adapting metrics like Detection Expected Calibration Error (D-ECE), Location-Aware Expected Calibration Error (LaECE), and Miscalibration Area (MCA) specifically for 3D object detection tasks.

Key Insights and Ideas

  • Object Queries as Density Proxies: Instead of performing density estimation on high-dimensional raw images or point clouds, the latent object queries in DETR architectures act as a highly effective, low-dimensional proxy that encapsulates both semantic and spatial context.
  • Density as a Shift Indicator: As environmental corruptions worsen, the query feature density exhibits a clear, progressive drift. This makes feature density an excellent dynamic signal for identifying out-of-distribution data.
  • Unified Recalibration: A single density estimation module can simultaneously correct both classification confidences and regression variances, ensuring that a detector becomes appropriately conservative when it encounters unfamiliar scenarios.
Figure 3. Uncertainties under distributional shift. We visualize classification entropy, centroid total variance, and query density for increasing brightness severity levels. The progressive drift of the query density histogram indicates that the density estimator effectively captures distributional shifts in the input data.

Key Results

  • Robustness Under Shift: On the MultiCorrupt benchmark, standard post-hoc calibration methods degrade significantly, performing close to uncalibrated baselines. Query2Uncertainty consistently maintains low calibration errors across both camera (PETR) and LiDAR (SECOND) detectors.
  • In-Distribution Gains: Even on clean, in-distribution data, the density-aware variants outperform or match standard post-hoc methods, proving that feature density provides useful granularity even within the training domain.
  • Class-Wise Calibration Matters: Implementing class-wise calibration provided substantial benefits due to the severe class imbalance inherent in autonomous driving datasets (e.g., rare classes like traffic cones vs. common cars).

Limitations and Future Work

  • Compute vs. Accuracy Trade-off: The choice of density estimator involves a clear trade-off. Normalizing Flows (NF) provide the best calibration performance but introduce a latency of ~8.99 ms per batch on an NVIDIA A100. Conversely, a Gaussian Mixture Model (GMM) is much faster (0.58 ms) but slightly less accurate.
  • Post-Hoc Dependency: The method still requires a clean, split validation set to optimize the calibration parameters before deployment. The authors suggest that future work could explore fully online or unsupervised calibration adjustments that adapt continuously without a calibration dataset.

Summary updated

BibTeX
@inproceedings{beemelmanns2026query,
  author = {Till Beemelmanns and Alexey Nekrasov and Stefan Vilceanu and Jonas Steinhaus and Timo Woopen and Bastian Leibe and Lutz Eckstein},
  title = {{Query2Uncertainty: Robust Uncertainty Quantification and Calibration for 3D Object Detection under Distribution Shift}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=loJ49ObocL},
}
Figure