Skip to content

beijifeng02/How-KNN-Improve-the-Reliability-of-DNN-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How-KNN-Improve-the-Reliability-of-DNN-

In this project, we explore how KNN improves the reliability of neural networks, including two parts:

  • how model performs on data samples with different KNN distances
  • whether the KNN distances of out-of-distribution dataset exhibits different distribution compared with in-distribution

Additionally, we provide a demo for Conformal Prediction.

Reference

This project is motivated by the following two works:

@article{sun2022knnood,
  title={Out-of-distribution Detection with Deep Nearest Neighbors},
  author={Sun, Yiyou and Ming, Yifei and Zhu, Xiaojin and Li, Yixuan},
  journal={ICML},
  year={2022}
}
@article{yuksekgonul2023beyond,
  title={Beyond Confidence: Reliable Models Should Also Consider Atypicality},
  author={Yuksekgonul, Mert and Zhang, Linjun and Zou, James and Guestrin, Carlos},
  journal={arXiv preprint arXiv:2305.18262},
  year={2023}
}

setups

We use CIFAR10 and CIFAR100 as in-distribution datasets on which we conduct experiments to answer the first problem. We solve the second problem on a common out-of-distribution dataset: SVHN.

running

CIFAR10

bash scripts/cifar10.sh 

CIFAR100

bash scripts/cifar100.sh 

SVHN

bash scripts/svhn.sh 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published