Skip to main content
QUICK REVIEW

[Paper Review] Distribution Calibration for Out-of-Domain Detection with Bayesian Approximation

Yanan Wu, Zhiyuan Zeng|arXiv (Cornell University)|Sep 14, 2022
Software Engineering ResearchComputer Science9 citations
TL;DR

This paper proposes a Bayesian OOD detection framework using Monte-Carlo Dropout to calibrate distribution uncertainty in softmax-based models, significantly reducing overconfidence on out-of-domain samples. By averaging multiple forward passes with dropout, the method achieves a 33.33% improvement in OOD F1 with only 0.41% increased inference time compared to MSP, effectively pushing predictions toward uniformity for OOD inputs.

ABSTRACT

Out-of-Domain (OOD) detection is a key component in a task-oriented dialog system, which aims to identify whether a query falls outside the predefined supported intent set. Previous softmax-based detection algorithms are proved to be overconfident for OOD samples. In this paper, we analyze overconfident OOD comes from distribution uncertainty due to the mismatch between the training and test distributions, which makes the model can't confidently make predictions thus probably causing abnormal softmax scores. We propose a Bayesian OOD detection framework to calibrate distribution uncertainty using Monte-Carlo Dropout. Our method is flexible and easily pluggable into existing softmax-based baselines and gains 33.33\% OOD F1 improvements with increasing only 0.41\% inference time compared to MSP. Further analyses show the effectiveness of Bayesian learning for OOD detection.

Motivation & Objective

  • To address the overconfidence issue in softmax-based OOD detection, where models assign high confidence to out-of-domain samples despite lacking prior knowledge.
  • To analyze the root cause of overconfidence as stemming from distribution uncertainty due to training-test distribution mismatch.
  • To develop a flexible, plug-in Bayesian framework that calibrates uncertainty without adding parameters or retraining.
  • To empirically validate the effectiveness of Monte-Carlo Dropout in improving OOD detection performance while maintaining low inference overhead.
  • To demonstrate that averaging predictions across multiple stochastic forward passes leads to more uniform, reliable OOD predictions.

Proposed method

  • Train an in-domain intent classifier on labeled IND data using standard training with dropout.
  • During inference, perform multiple stochastic forward passes (Monte-Carlo Dropout) with a fixed dropout rate (e.g., 0.7) to sample different model outputs.
  • Average the normalized logits from multiple forward passes to obtain a calibrated prediction distribution.
  • Use the averaged output distribution as the final prediction, which tends toward uniformity for OOD inputs due to uncertainty calibration.
  • Integrate the Bayesian approximation into existing softmax-based OOD detectors like MSP or Entropy without architectural changes.
  • Apply KL-divergence between predicted and uniform distributions to quantitatively assess calibration quality.

Experimental results

Research questions

  • RQ1Why do softmax-based OOD detection methods produce overconfident predictions for out-of-domain samples?
  • RQ2To what extent does distribution uncertainty—arising from model variability under different random seeds—contribute to overconfidence in OOD detection?
  • RQ3Can Monte-Carlo Dropout be used effectively to calibrate distribution uncertainty and improve OOD detection performance?
  • RQ4How does the number of Monte-Carlo samples and dropout rate affect the trade-off between calibration accuracy and inference cost?
  • RQ5Does the Bayesian approximation method outperform or match state-of-the-art distance-based OOD detection methods like LOF and GDA?

Key findings

  • The proposed Bayesian OOD detection method improves OOD F1 by 33.33% compared to MSP, with only a 0.41% increase in inference time when using 10 Monte-Carlo samples.
  • KL-divergence between predicted and uniform distributions decreases significantly for OOD samples (mean from 3.63 to 2.59) as sampling increases, confirming effective calibration.
  • A dropout rate of 0.7 yields better OOD performance than lower rates, as it enhances the uniformity of OOD predictions due to greater feature perturbation.
  • Sampling 100 times achieves a good balance between performance and efficiency, with diminishing returns beyond 1000 samples.
  • The method effectively reduces overlap between IND and OOD confidence score distributions, especially for entropy-based metrics, improving separability.
  • The averaged output distribution for OOD inputs converges toward uniformity, while IND predictions remain consistent and confident, validating the method’s calibration objective.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.