Overconfident

A model is overconfident when it understates its own uncertainty. Predicted probabilities sit too close to 0 and 1, intervals are too narrow, and posteriors are too sharp. The common thread is that the stated certainty exceeds what the model has earned.

Where it shows upWhat it looks like
Classification probabilitiesThe model says 0.99 and is right about 80 percent of the time
Confidence intervalsA nominal 95 percent interval that contains the true value in 70 percent of repetitions
Bayesian posteriorsA posterior too sharp for the data to justify, usually from a strong prior or a misspecified likelihood

How to tell

The shorthand is that an overconfident model’s reliability curve sits below the diagonal. That is only half right, and the half it misses is where the diagnosis goes wrong.

Take a balanced binary problem first, where the picture is simplest. Overconfidence pushes probabilities away from 0.5 in both directions. Above 0.5 the model predicts more than reality delivers, so the curve runs below the diagonal. Below 0.5 it predicts less than reality delivers, so the curve runs above it. In this positive-class probability plot, the signature is an S crossing the diagonal near the middle. A different plot groups predictions by confidence in the predicted label and compares confidence with correctness; overconfidence there can appear below the diagonal.

import numpy as np

def population(n=40000, seed=2):
    rng = np.random.default_rng(seed)
    p_true = rng.beta(2, 2, n)
    return (rng.uniform(size=n) < p_true).astype(int), p_true

def sharpen(p, strength):
    """strength > 1 pushes probabilities toward 0 and 1; < 1 pulls them toward 0.5."""
    odds = (p / (1 - p)) ** strength
    return odds / (1 + odds)

def diagnose(y, p, bins=10):
    """Signed gap per bin: positive means the model predicted more than happened."""
    edges = np.linspace(0, 1, bins + 1)
    gaps = []
    for lo, hi in zip(edges[:-1], edges[1:]):
        m = (p > lo) & (p <= hi)
        if m.sum() > 50:
            gaps.append((p[m].mean(), p[m].mean() - y[m].mean()))
    low = np.mean([g for c, g in gaps if c < 0.5])
    high = np.mean([g for c, g in gaps if c >= 0.5])
    return low, high

y, p_true = population()
for name, strength in (("honest", 1.0), ("overconfident", 2.0), ("underconfident", 0.5)):
    p = sharpen(p_true, strength)
    low, high = diagnose(y, p)
    print(f"{name:15} {low:+.4f} {high:+.4f} {float(np.mean((p - y) ** 2)):.4f}")
# honest -0.0012 +0.0007 0.2004
# overconfident -0.0964 +0.0945 0.2130
# underconfident +0.1092 -0.1069 0.2092
ModelGap below 0.5Gap above 0.5Brier
Honest-0.0012+0.00070.2004
Overconfident-0.0964+0.09450.2130
Underconfident+0.1092-0.10690.2092

The gap is the mean prediction minus the observed rate, so a positive number means the model promised more than happened. Overconfidence gives a negative gap at the low end and a positive one at the high end; underconfidence gives exactly the mirror image. Checking the two halves separately takes one line and distinguishes the two conditions, where a single averaged number cannot — the two gaps in each row nearly cancel.

It does not show up where you look first

The overconfident model in that table ranks cases exactly as well as the honest one. Sharpening probabilities is a monotone transformation, so it leaves the ordering untouched: accuracy at 0.5 is identical because this transformation fixes 0.5, AUC is identical, and the confusion matrix at any fixed quantile is identical. Every metric a team is likely to be watching says nothing has changed, while the Brier score rises from 0.2004 to 0.2130 and every probability the model reports has become a lie of a specific size.

That invisibility is why overconfidence tends to be discovered late and downstream — when a threshold set at 0.8 turns out to fire on cases that convert at 0.6, or when an expected-value calculation built on the probabilities stops matching outcomes.

Where it comes from

  • Modern neural networks, by default. Guo and colleagues report that “modern neural networks, unlike those from a decade ago, are poorly calibrated”, and identify depth, width, weight decay and batch normalization as contributing factors. Overconfidence here is not a bug in a particular model; Guo and colleagues trace it to how high-capacity networks fit the cross-entropy loss on finite training data, which can keep pushing confidence up after accuracy has stopped improving.
  • Overfitting. A model that has partly memorized its training data looks more separable there than it is, and carries that certainty into predictions on new data.
  • Fitting a calibrator on training data. The specific failure scikit-learn warns about — it produces “a biased calibrator that maps to probabilities closer to 0 and 1 than it should”, so an attempt to fix overconfidence makes it worse.
  • Ignoring dependence. Standard errors computed as if observations were independent when they are clustered are too small, which is the interval version of the same mistake.
  • Distribution shift. A model calibrated on one population meeting another. The ranking often survives; the probability scale does not.

Fixing it

When the ordering remains useful and the main error is a distortion of the probability scale, a monotone rescaling fitted on held-out data can improve calibration without retraining the classifier. Overconfidence caused by misspecification or distribution shift need not have this form, so validate the corrected probabilities on independent data. Decisions are a separate question. Under a strictly increasing calibrator a cutoff expressed as a quantile — the top 5 percent — selects the same cases; under isotonic regression the cases at the boundary can be tied and the selection then depends on the tie-break. A cutoff expressed as a fixed probability such as 0.5 can select a different set either way — not always, since a calibration that leaves 0.5 in place, or one that moves no case across it, changes nothing — which is the point of recalibrating thresholds.

For a neural network the first thing to try is temperature scaling, which fits a single parameter and, for an overconfident model, lands above 1 — flattening every distribution without touching which class is predicted. For a binary scorer, Platt scaling fits an S-shaped correction, which is the right shape for an S-shaped distortion. Isotonic regression can absorb a distortion of any monotone shape, at the cost of more data.

Two things that do not fix it are worth naming. Retraining with more data can reduce overfitting, but a high-capacity network trained the same way can still end up overconfident. And clipping probabilities away from 0 and 1 makes the worst penalties smaller without making the probabilities true. What calibration is and when it is worth the effort is under model calibration.

References


Discover more from Insightful Data Lab

Subscribe to get the latest posts sent to your email.

Similar Posts

Questions, corrections, or additional insights?

This site uses Akismet to reduce spam. Learn how your comment data is processed.