Skip to content

limchaos/ELogitNormOOD

Repository files navigation

Enhancing Out-of-Distribution Detection with Extended Logit Normalization (ELogitNorm)

Official implementation Extended Logit Normalization (ELogitNorm) of the CVPR 2026 paper: Enhancing Out-of-Distribution Detection with Extended Logit Normalization. The codebase is adapted from and integrated into the OpenOOD Benchmark.

We analyze the feature collapse issue in LogitNorm, and propose a simple yet powerful method that significantly improves Out-of-Distribution (OOD) detection across standard benchmarks and confidence calibration without sacrificing in-distribution accuracy.

Installation

This project is built on top of the OpenOOD framework.

Please follow the official OpenOOD setup instructions first:

pip install git+https://github.com/Jingkang50/OpenOOD

Then clone this repository:

git clone https://github.com/limchaos/ELogitNormOOD.git
cd ELogitNormOOD

Training

All training scripts are located in:

./scripts/ood/elogitnorm

You can directly use these scripts to reproduce the results reported in the paper across different datasets and model architectures.

Evaluation examples

CIFAR

python scripts/eval_ood.py \
    --id-data cifar10 \
    --root ./results/cifar10_resnet18_32x32_elogitnorm_e100_lr0.1_default \
    --postprocessor msp \
    --save-score \
    --save-csv

ImageNet

python scripts/eval_ood_imagenet.py \
    --ckpt-path ./results/imagenet_resnet50_elogitnorm_e100_lr0.1_default/s0/best.ckpt \
    --arch resnet50 \
    --postprocessor msp \
    --save-score \
    --save-csv

Calibration

Visualization of feature space calibration:

Citation

If you find this work helpful for your research, please cite:

@article{ding2025enhancing,
  title={Enhancing Out-of-Distribution Detection with Extended Logit Normalization},
  author={Ding, Yifan and Liu, Xixi and Unger, Jonas and Eilertsen, Gabriel},
  journal={arXiv preprint arXiv:2504.11434},
  year={2025}
}

About

Enhancing Out-of-Distribution Detection with Extended Logit Normalization (CVPR 2026)

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors