Calibration of Neural Networks

January 24, 2022 · View on GitHub

Introduction

This repository contains all scripts needed to train neural networks (ResNet, DenseNet, DAN etc) and to calibrate the probabilities. These networks are trained on 4 different datasets and the model weights and output logits are available for use in this repository.

Structure

Structure of the repository:

  • Logits - pickled files with logits for the trained models. Additionally logits can be downloaded from HERE.
  • Models - model weights of the trained models.
  • Reliability diagrams - reliability diagrams generated for the models.
  • Scripts - Python code and notebooks used to train the models, evaluate the outcome and calibrate the probabilities of the models (Python 3.6.4, Keras 2.1.4, Tensorflow 1.4.1)

Datasets

Following datasets were used:

Models

Following models were used and trained:

The hyperparameters and data preparation suggested by the authors of the papers were used to train the models, except for LeNet and DAN.

Calibration

Following calibration methods were used:

Citation

If you find the work relevant to your research, please cite:

@article{kull2019beyond,
  title={Beyond temperature scaling: Obtaining well-calibrated multiclass probabilities with Dirichlet calibration},
  author={Kull, Meelis and Perello-Nieto, Miquel and K{\"a}ngsepp, Markus and Song, Hao and Flach, Peter and others},
  journal={arXiv preprint arXiv:1910.12656},
  year={2019}
}

Author

Markus Kängsepp, University of Tartu