FlowCon: Out-of-Distribution Detection using Flow-Based Contrastive Learning

Saandeep Aathreya, Shaun J. Canavan
2/14/2026

No official code found. Best implementation: saandeepa93/FlowCon_OOD (9 stars, MIT, last commit 2025-01-27).

Abstract

Identifying Out-of-distribution (OOD) data is becoming increasingly critical as the real-world applications of deep learning methods expand. Post-hoc methods modify softmax scores fine-tuned on outlier data or leverage intermediate feature layers to identify distinctive patterns between In-Distribution (ID) and OOD samples. Other methods focus on employing diverse OOD samples to learn discrepancies between ID and OOD. These techniques, however, are typically dependent on the quality of the outlier samples assumed. Density-based methods explicitly model class-conditioned distributions but this requires long training time or retraining the classifier. To tackle these issues, we introduce \textit{FlowCon}, a new density-based OOD detection technique. Our main innovation lies in efficiently combining the properties of normalizing flow with supervised contrastive learning, ensuring robust representation learning with tractable density estimation. Empirical evaluation shows the enhanced performance of our method across common vision datasets such as CIFAR-10 and CIFAR-100 pretrained on ResNet18 and WideResNet classifiers. We also perform quantitative analysis using likelihood plots and qualitative visualization using UMAP embeddings and demonstrate the robustness of the proposed method under various OOD contexts. Code will be open-sourced post decision.

View on arXivView PDF

Code Implementations(1)

MIT

Flowcon: Out-of-Distribution Detection using Flow-Based Contrastive Learning [In Progress]

90PythonDec 19, 20231 years agoMIT

Similar Papers

Cite this paper

@article{aathreya2026flowcon,
  title  = {FlowCon: Out-of-Distribution Detection using Flow-Based Contrastive Learning},
  author = {Saandeep Aathreya and Shaun J. Canavan},
  year   = {2026},
  eprint = {2407.03489},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2407.03489},
  journal = {ECCV 2024 2024}
}

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/2407.03489.svg)](https://codeofpaper.com/paper/2407.03489)

Discussion