Neural Clamping: Joint Input Perturbation and Temperature Scaling for Neural Network Calibration

Yung-Chen Tang, Pin-Yu Chen, Tsung-Yi Ho
9/23/2022
cs.LG

Official code: yungchentang/NCToolkit (2 stars, Python, MIT, last commit 2024-10-09).

Abstract

Neural network calibration is an essential task in deep learning to ensure consistency between the confidence of model prediction and the true correctness likelihood. In this paper, we propose a new post-processing calibration method called Neural Clamping, which employs a simple joint input-output transformation on a pre-trained classifier via a learnable universal input perturbation and an output temperature scaling parameter.

Show full abstract

Moreover, we provide theoretical explanations on why Neural Clamping is provably better than temperature scaling. Evaluated on BloodMNIST, CIFAR-100, and ImageNet image recognition datasets and a variety of deep neural network models, our empirical results show that Neural Clamping significantly outperforms state-of-the-art post-processing calibration methods. The code is available at github.com/yungchentang/NCToolkit, and the demo is available at huggingface.co/spaces/TrustSafeAI/NCTV.

View on arXivView PDF

Code Implementations(1)

MIT

[TMLR] Neural Clamping: Joint Input Perturbation and Temperature Scaling for Neural Network Calibration

20PythonAug 24, 20222 years agoMIT

Similar Papers

Cite this paper

@article{tang2022neural,
  title  = {Neural Clamping: Joint Input Perturbation and Temperature Scaling for Neural Network Calibration},
  author = {Yung-Chen Tang and Pin-Yu Chen and Tsung-Yi Ho},
  year   = {2022},
  eprint = {2209.11604},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2209.11604}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2209.11604.svg)](https://codeofpaper.com/paper/2209.11604)

Discussion