Margin-bounded Confidence Scores for Out-of-Distribution Detection

Lakpa D. Tamang, Mohamed Reda Bouadjenek, Richard Dazeley, Sunil Aryal
9/22/2024
cs.CV

Official code: lakpa-tamang9/margin_ood (3 stars, Apache-2.0, last commit 2025-02-07).

Abstract

In many critical Machine Learning applications, such as autonomous driving and medical image diagnosis, the detection of out-of-distribution (OOD) samples is as crucial as accurately classifying in-distribution (ID) inputs. Recently Outlier Exposure (OE) based methods have shown promising results in detecting OOD inputs via model fine-tuning with auxiliary outlier data. However, most of the previous OE-based approaches emphasize more on synthesizing extra outlier samples or introducing regularization to diversify OOD sample space, which is rather unquantifiable in practice. In this work, we propose a novel and straightforward method called Margin bounded Confidence Scores (MaCS) to address the nontrivial OOD detection problem by enlarging the disparity between ID and OOD scores, which in turn makes the decision boundary more compact facilitating effective segregation with a simple threshold. Specifically, we augment the learning objective of an OE regularized classifier with a supplementary constraint, which penalizes high confidence scores for OOD inputs compared to that of ID and significantly enhances the OOD detection performance while maintaining the ID classification accuracy. Extensive experiments on various benchmark datasets for image classification tasks demonstrate the effectiveness of the proposed method by significantly outperforming state-of-the-art (S.O.T.A) methods on various benchmarking metrics. The code is publicly available at https://github.com/lakpa-tamang9/margin_ood

View on arXivView PDF

Code Implementations(1)

Apache-2.0

This repository contains the tests and implementation for the OOD detection based on margin loss between the known and unknown samples.

30PythonDec 18, 20231 years agoApache-2.0

Similar Papers

Cite this paper

@article{tamang2024marginbounded,
  title  = {Margin-bounded Confidence Scores for Out-of-Distribution Detection},
  author = {Lakpa D. Tamang and Mohamed Reda Bouadjenek and Richard Dazeley and Sunil Aryal},
  year   = {2024},
  eprint = {2410.07185},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2410.07185v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.07185.svg)](https://codeofpaper.com/paper/2410.07185)

Discussion