Decoupling MaxLogit for Out-of-Distribution Detection

Zihan Zhang, Xiang Xiang
2/14/2026

No official code found. Best implementation: HAIV-Lab/DML (3 stars, last commit 2025-08-10).

Abstract

In machine learning, it is often observed that standard training outputs anomalously high confidence for both in-distribution (ID) and out-of-distribution (OOD) data. Thus, the ability to detect OOD samples is critical to the model deployment. An essential step for OOD detection is post-hoc scoring. MaxLogit is one of the simplest scoring functions which uses the maximum logits as OOD score. To provide a new viewpoint to study the logit-based scoring function, we reformulate the logit into cosine similarity and logit norm and propose to use MaxCosine and MaxNorm. We empirically find that MaxCosine is a core factor in the effectiveness of MaxLogit. And the performance of MaxLogit is encumbered by MaxNorm. To tackle the problem, we propose the Decoupling MaxLogit (DML) for flexibility to balance MaxCosine and MaxNorm. To further embody the core of our method, we extend DML to DML+ based on the new insights that fewer hard samples and compact feature space are the key components to make logit-based methods effective. We demonstrate the effectiveness of our logit-based OOD detection methods on CIFAR-10, CIFAR-100 and ImageNet and establish state-of-the-art performance.

DOISemantic Scholar

Code Implementations(1)

HAIV-Lab/DMLCommunity66%

This is the Official Code Repo for DML:Decoupling MaxLogit for Out-of-Distribution Detection, in CVPR 2023

30PythonApr 10, 20231 years ago

Cite this paper

@article{zhang2026decoupling,
  title  = {Decoupling MaxLogit for Out-of-Distribution Detection},
  author = {Zihan Zhang and Xiang Xiang},
  year   = {2026},
  doi    = {10.1109/CVPR52729.2023.00330},
  url    = {https://doi.org/10.1109/CVPR52729.2023.00330},
  journal = {CVPR 2023 2023}
}

Discussion