Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add the Distinction Maximization Loss (DisMax) to notably improve the OOD detection performance on ImageNet #1382

Open
dlmacedo opened this issue Jul 29, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@dlmacedo
Copy link

dlmacedo commented Jul 29, 2022

We suggest adding DisMax loss to improve OOD detection:

https://arxiv.org/abs/2205.05874

It improves the AUROC OOD detection performance of a ResNet18 trained on ImageNet by almost 25% using the hard ImageNet-O as out-of-distribution.

All it is required is to replace the SoftMax loss (i.e., the combination of the linear output layer, the SoftMax activation, and the cross-entropy loss) with the DisMax loss (see details how it is done in the code below).

The code is basically ready. It is essentially a matter of integrating into this lib:

https://github.com/dlmacedo/distinction-maximization-loss/

Using DisMax without FPR, which resulted in the above-mentioned result, no hyperparameter is required to be tuned.

@dlmacedo dlmacedo added the enhancement New feature or request label Jul 29, 2022
@dlmacedo dlmacedo changed the title [FEATURE] Add Distinction Maximization Loss for improved OOD detection performance on ImageNet [FEATURE] Add Distinction Maximization Loss to notably improve the OOD detection performance on ImageNet Jul 29, 2022
@dlmacedo dlmacedo changed the title [FEATURE] Add Distinction Maximization Loss to notably improve the OOD detection performance on ImageNet [FEATURE] Add the Distinction Maximization Loss (DisMax) to notably improve the OOD detection performance on ImageNet Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant