-
Notifications
You must be signed in to change notification settings - Fork 121
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
A follow up on large noise for input perturbation on MDS method #156
Comments
@2454511550Lin You are right. More specifically, the bug is because of the following lines: OpenOOD/openood/evaluators/ood_evaluator.py Lines 41 to 59 in 69cd8ca
where the searched hyperparameter will only be applied to OOD samples and not to ID samples (the [id_pred, id_conf, id_gt] is obtained only once with the default hyperparam). When you directly specify the hyperparam instead of using automatic search, the issue is gone which is expected.
I've actually fixed this bug in my local branch but just realized that I haven't pushed it to the main branch. Thanks for all the experimentation though! |
I see. Thank you for letting me know. While directly specifying the hyperparam gives the correct result, are you planning to push the fixed version to the main branch sooner? It would be very helpful to have an automatic hyperparameters searching scripts to work with. |
Yes I will make a pull request in 1-2 days. I'm just wrapping up a lot of commits and trying to document what changes I made. Will let you know for sure. |
Sounds good. Thank you so much! |
Hi @2454511550Lin, just so you know that OpenOOD v1.5 has been released. See here for a summary of the updates. |
Dear Authors, I have a follow-up about the "extremely good" result using the MDS method using large noise for input processing in #154. I was running on Cifar-10 as ID. I was testing different noises using the
postprocessor_sweep
inconfigs/postprocessors/mds.yml
:The script surprisingly picks noise = 0.3, and claims that it has the best AUROC on validation datasets. This does not make sense as from my perspective 0.3 will no doubt distort any information in the original image. I expect all ID/OOD samples would have extremely high scores and are not distinguishable. But here is the log and result:
ood.csv outputs:
I also visualize the scores using histogram and boxplot:
I then think what happens is that only the ID samples are processed with large noise of 0.3, while OOD samples are only processed with small noise. But what causes this in the code? I think the issue is at the
configs/postprocessors/mds.yml
. When we specify the default noise,postprocessor.postprocessor_args.noise
, it isn't overwritten for processing OOD samples even after the hyperparameter searching. Therefore, the code chooses 0.3 for ID, and 0.0014 for OOD for input perturbation in this case. To verify, I setpostprocessor.postprocessor_args.noise = 0.3
, I expect all the ID/OOD scores to be pushed very high this time:The log gives:
ood.csv outputs:

And boxplots show that both ID/OOD scores are indistinguishable (except for MNIST):
But now I am confused. It looks like the ID dataset (Cifar-10) is not pushed toward zero as it was in the previous case, although the noise is the same. But the result kind of makes sense because scores are indistinguishable. It is hard for me to tell if the code is "correct" at this point. I am not sure if I set the config file correctly, but any feedback from you will be greatly appreciated. I am more than happy to provide more details if needed.
The text was updated successfully, but these errors were encountered: