Probability Bounding: Post-Hoc Calibration via Box-Constrained Softmax

Kyohei Atarashi, Satoshi Oyama, Hiromi Arai, Hisashi Kashima
6/12/2025
1 citation
stat.MLcs.LG

Official code: neonnnnn/torchbcsoftmax (1 star, Python, MIT, last commit 2025-06-13).

Abstract

Many studies have observed that modern neural networks achieve high accuracy while producing poorly calibrated probabilities, making calibration a critical practical issue. In this work, we propose probability bounding (PB), a novel post-hoc calibration method that mitigates both underconfidence and overconfidence by learning lower and upper bounds on the output probabilities.

Show full abstract

To implement PB, we introduce the box-constrained softmax (BCSoftmax) function, a generalization of Softmax that explicitly enforces lower and upper bounds on the output probabilities. While BCSoftmax is formulated as the solution to a box-constrained optimization problem, we develop an exact and efficient algorithm for computing BCSoftmax. We further provide theoretical guarantees for PB and introduce two variants of PB. We demonstrate the effectiveness of our methods experimentally on four real-world datasets, consistently reducing calibration errors. Our Python implementation is available at https://github.com/neonnnnn/torchbcsoftmax.

View on arXivView PDF

Code Implementations(1)

MIT

An implementation of Box-Constrained Softmax function in PyTorch.

11PythonJun 9, 20251 years agoMIT

Similar Papers

Cite this paper

@article{atarashi2025probability,
  title  = {Probability Bounding: Post-Hoc Calibration via Box-Constrained Softmax},
  author = {Kyohei Atarashi and Satoshi Oyama and Hiromi Arai and Hisashi Kashima},
  year   = {2025},
  eprint = {2506.10572},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.10572v2}
}

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/2506.10572.svg)](https://codeofpaper.com/paper/2506.10572)

Discussion