Source-linked AI summary

Calibrating Where It Matters: Constrained Temperature Scaling

Stephen McKenna, Jacob Carse

arXiv:2406.11456v1cs.LGcs.CV

TL;DR

Clinical decision makers can use calibrated classifiers to minimize expected costs, but deployment cost functions are usually unknown during training and constrain which probability regions affect decisions. The paper modifies temperature scaling to focus calibration on those regions; experiments on dermoscopy classifiers report improved calibration there while retaining benefits elsewhere.

  • Problem

    Clinical decision makers need calibrated probabilities to minimize expected costs, but deployment cost functions are usually unknown at training time and constrain where decision boundaries may lie.

    Source: §1 · p. 1
  • Method

    The paper modifies post-hoc temperature scaling by fitting temperature on calibration examples in regions selected using assumed deployment decision constraints.

    Source: §1 · p. 2, §2 · p. 2
  • Results

    T* further reduced binary ECE for p < 0.5 while retaining much of the benefit for p ≥ 0.5, and reduced multi-class ECEBen without increasing ECEMal.

    Source: §3 · pp. 2–3
  • Takeaways & Limitations

    The experiments demonstrate calibration tailored to constrained cost functions in regions of the probability simplex likely to be near decision boundaries.

    Source: §4 · p. 3

    The method may adversely affect estimation of overall expected cost, and this preliminary study needs evaluation across more datasets and architectures and under dataset shift.

    Source: §4 · p. 3

Abstract

from arXiv · show

We consider calibration of convolutional classifiers for diagnostic decision making. Clinical decision makers can use calibrated classifiers to minimise expected costs given their own cost function. Such functions are usually unknown at training time. If minimising expected costs is the primary aim, algorithms should focus on tuning calibration in regions of probability simplex likely to effect decisions. We give an example, modifying temperature scaling calibration, and demonstrate improved calibration where it matters using convnets trained to classify dermoscopy images.

1 Classifier Calibration for Medical Decision Making

Calibrated probabilities matter because they support cost-minimizing clinical decisions, but deployment cost functions are usually unknown during training and vary across healthcare settings. The paper proposes tailoring temperature scaling to cost-function constraints and demonstrates the approach on dermoscopy classifiers.

  • Deep classifiers often provide poorly calibrated predictions, while calibration quality varies with neural architecture.Calibration methods include training regularization, post-hoc calibration, and combinations of the two.Source: §1 · p. 1
  • Calibrated classifiers can support actions that minimize expected cost, but healthcare settings differ in their cost functions and those functions are unlikely to be known at training time.In binary classification, relative false-positive and false-negative costs and class priors determine a cost-minimizing threshold.Source: §1 · p. 1
  • Because deployment cost functions are constrained by prior knowledge, calibration is most important near the decision boundaries they could produce, not uniformly across the probability simplex.The paper illustrates this with triage, where the relative costs of misclassifying malignant and benign cases constrain the possible decision-boundary region.Source: §1 · p. 1
  • The paper modifies temperature estimation to tailor calibration to clinically motivated cost constraints and demonstrates it with convolutional classifiers on the ISIC 2019 dermoscopy dataset.The experiments cover binary and multi-class classification.Source: §1 · p. 2

2 Estimating Temperature for Post-hoc Calibration

The method modifies post-hoc temperature scaling by fitting its temperature on calibration examples in regions relevant to assumed deployment decision boundaries. The selected subset stays fixed as temperature changes.

  • Temperature scaling post-hoc calibrates deep classifiers by scaling logits with a single temperature fitted on a validation set to minimize negative log-likelihood.The validation set is also called the calibration set.Source: §2 · p. 2
  • For binary classification with decision thresholds in (0.0, 0.5), the modified fit minimizes negative log-likelihood using only calibration examples with p < 0.5.The paper denotes this fitted temperature T*; above 0.5, it considers sufficient that observed frequencies be at least 0.5.Source: §2 · p. 2
  • For multi-class classification, the modified fit uses calibration examples whose most probable class is benign, reflecting the assumption that mistakes involving benign classes are most costly.Temperature does not change membership in the selected subset; the estimated temperature is denoted T*.Source: §2 · p. 2

3 Experiments

On ISIC 2019 dermoscopy classifiers, modified temperature scaling improved calibration in the regions emphasized by the assumed decision constraints while retaining calibration benefits elsewhere. Experiments used two ImageNet-pretrained architectures and fixed train, validation, and test splits.

3 Experiments

  • Experiments used seven ISIC 2019 classes, a fixed 60:20:20 train-validation-test split, and ImageNet-pretrained EfficientNet B7 and ResNet101 architectures.The validation set supported early stopping and temperature estimation.Source: §3 · p. 2
  • The EfficientNet B7 binary reliability diagram shows the modified-scaled classifier consistent with reliability and especially well calibrated for p ≤ 0.5, unlike the uncalibrated classifier.Figure 1 compares classifiers without calibration and with modified temperature scaling.Source: §3 · p. 2, Figure 1 · p. 3
  • T* further reduced binary ECE for test examples with p < 0.5 while retaining much of temperature scaling's benefit for p ≥ 0.5.Standard temperature scaling reduced ECE in both ranges for both architectures.Source: §3 · p. 2, Table 1 · p. 3
  • T* further reduced ECEBen, marginally for ResNet, without increasing ECEMal in the multi-class results.Standard temperature scaling reduced ECE in both benign-predicted and malignant-predicted regions for both architectures.Source: §3 · pp. 2–3, Table 2 · p. 3

4 Discussion

Modifying temperature estimation can improve calibration near probability-simplex regions likely to inform decisions. The approach accounts for constraints on deployment cost functions, but may adversely affect overall expected-cost estimation; broader validation remains future work.

4 Discussion

  • Temperature-estimation changes can improve calibration near probability-simplex regions likely to be near decision boundaries.The method accounts for constraints on cost functions, with class priors; broader exploration across cost-function priors and calibration methods is future work.Source: §4 · p. 3
  • The method may adversely affect estimation of overall expected cost.The preliminary study should be extended to multiple datasets and architectures, with robustness to dataset shift investigated.Source: §4 · p. 3
  • When reporting confidences, probabilities can be given in the well-calibrated simplex region, while elsewhere a qualitative comparison may be more appropriate.The example may also be applied to other accuracy-preserving post-hoc calibration methods or combined with decision calibration.Source: §4 · p. 3
Loading 2406.11456v1…