HyperAIHyperAI

Command Palette

Search for a command to run...

4 months ago

DisCoPatch: Batch Statistics Are All You Need For OOD Detection, But Only If You Can Trust Them

Caetano Francisco ; Viviers Christiaan ; Zavala-Mondragón Luis A. ; de With Peter H. N. ; van der Sommen Fons

DisCoPatch: Batch Statistics Are All You Need For OOD Detection, But
  Only If You Can Trust Them

Abstract

Out-of-distribution (OOD) detection holds significant importance across manyapplications. While semantic and domain-shift OOD problems are well-studied,this work focuses on covariate shifts - subtle variations in the datadistribution that can degrade machine learning performance. We hypothesize thatdetecting these subtle shifts can improve our understanding of in-distributionboundaries, ultimately improving OOD detection. In adversarial discriminatorstrained with Batch Normalization (BN), real and adversarial samples formdistinct domains with unique batch statistics - a property we exploit for OODdetection. We introduce DisCoPatch, an unsupervised Adversarial VariationalAutoencoder (VAE) framework that harnesses this mechanism. During inference,batches consist of patches from the same image, ensuring a consistent datadistribution that allows the model to rely on batch statistics. DisCoPatch usesthe VAE's suboptimal outputs (generated and reconstructed) as negative samplesto train the discriminator, thereby improving its ability to delineate theboundary between in-distribution samples and covariate shifts. By tighteningthis boundary, DisCoPatch achieves state-of-the-art results in public OODdetection benchmarks. The proposed model not only excels in detecting covariateshifts, achieving 95.5% AUROC on ImageNet-1K(-C) but also outperforms all priormethods on public Near-OOD (95.0%) benchmarks. With a compact model size of25MB, it achieves high OOD detection performance at notably lower latency thanexisting methods, making it an efficient and practical solution for real-worldOOD detection applications. The code will be made publicly available

Benchmarks

BenchmarkMethodologyMetrics
out-of-distribution-detection-on-imagenet-1k-10DisCoPatch
AUROC: 96.4
FPR95: 18.9
Latency, ms: 1.56
out-of-distribution-detection-on-imagenet-1k-11DisCoPatch
AUROC: 94.4
FPR95: 29.7
Latency, ms: 1.56
out-of-distribution-detection-on-imagenet-1k-13DisCoPatch
AUROC: 94.3
FPR@95: 39.0
Latency, ms: 1.56
out-of-distribution-detection-on-imagenet-1k-14DisCoPatch
AUROC: 97.2
FPR95: 10.6
Latency, ms: 1.56
out-of-distribution-detection-on-imagenet-1k-15DisCoPatch
AUROC: 95.8
FPR95: 19.8
Latency, ms: 1.56
out-of-distribution-detection-on-imagenet-1k-3DisCoPatch
AUROC: 99.1
FPR95: 3.6
Latency, ms: 1.56

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp