Abstract
Well-calibrated confidence estimates are important for reliable decision-making when models encounter distribution shift. However, entropy-based test-time adaptation can reinforce confident errors even when accuracy improves, without necessarily yielding well-calibrated predictions.
We propose MIRA, Mutual Information guided calibration for Reliable Test-Time Adaptation, a source-free online method that probes prediction reliability with Gaussian perturbations of the final classifier. MIRA computes backbone features once per target batch and reuses them across classifier samples and candidate perturbation scales. A mutual-information (MI) criterion and a prediction-agreement constraint select a batch-specific probing radius without target labels or posterior fitting. The resulting local disagreement and confidence define detached sample weights for a stochastic entropy objective.
The stochastic objective supplies the adaptation signal, while reliability weighting reduces the influence of perturbation-sensitive samples. Experiments with CNNs, a vision transformer, and CLIP show improvements in the accuracy–calibration trade-off. Further evaluations cover continual and dynamic adaptation, stronger representation shifts, and computational time constraints. MIRA provides a reliability module whose accuracy gains depend on the base adaptation method; its MI is an operational stability signal, rather than calibrated Bayesian posterior uncertainty.
How MIRA works
-
Cache features and probe the classifier
Compute the backbone features once, then reuse them for Gaussian weight and bias perturbations of the final classifier. The same noise draws are shared across candidate radii within a batch.
-
Select an informative probing radius
Use normalized MI to find a non-trivial response and top-1 agreement to limit prediction changes. The finite-grid implementation includes a fallback when both conditions cannot be met.
-
Adapt with detached reliability weights
Combine local disagreement and confidence into unit-mean sample weights. Keep those weights detached while minimizing the stochastic entropy objective and updating the base method’s adaptation parameters.
HE: entropy of the mean prediction. EH: mean predictive entropy.
Accuracy and calibration
TENT with and without MIRA.
Scroll horizontally to see all metrics →
| Method | Accuracy (%) ↑ | MMC | ECE ↓ | NLL ↓ |
|---|---|---|---|---|
| CIFAR-100-C / ResNeXt AugMix | ||||
| TENT | 67.844 ± 0.052 | 0.7461 ± 0.0007 | 0.0693 ± 0.0004 | 1.2547 ± 0.0021 |
| TENT + MIRA | 68.692 ± 0.153 | 0.7305 ± 0.0012 | 0.0452 ± 0.0007 | 1.1940 ± 0.0111 |
| ImageNet-C / ResNet-50 | ||||
| TENT | 36.618 ± 0.120 | 0.4089 ± 0.0014 | 0.0478 ± 0.0018 | 3.2549 ± 0.0075 |
| TENT + MIRA | 39.448 ± 0.141 | 0.4053 ± 0.0014 | 0.0361 ± 0.0022 | 3.0205 ± 0.0020 |
What changes when gradient norms are matched?
The stochastic objective accounts for much of the adaptation gain. The incremental effect of reliability weighting depends on the protocol. In a separate control with the global L2 norm of the adaptation gradient fixed to 1, full MIRA improves CIFAR accuracy relative to TENT, but falls below TENT on ImageNet-C. This control changes the update scale and is evaluated separately from the main comparison above.
| Method | Accuracy (%) ↑ | ECE ↓ | NLL ↓ |
|---|---|---|---|
| CIFAR-10-C / WRN AugMix | |||
| TENT | 87.787 ± 0.046 | 0.0635 ± 0.0006 | 0.4462 ± 0.0025 |
| TENT + MIRA | 88.416 ± 0.067 | 0.0396 ± 0.0011 | 0.3808 ± 0.0023 |
| CIFAR-100-C / ResNeXt AugMix | |||
| TENT | 65.972 ± 0.106 | 0.0586 ± 0.0005 | 1.3250 ± 0.0029 |
| TENT + MIRA | 66.180 ± 0.106 | 0.0322 ± 0.0009 | 1.2937 ± 0.0025 |
| ImageNet-C / ResNet-50 | |||
| TENT | 32.336 ± 0.121 | 0.0298 ± 0.0001 | 3.5997 ± 0.0040 |
| TENT + MIRA | 32.132 ± 0.132 | 0.0324 ± 0.0014 | 3.6162 ± 0.0036 |
Video
Coming soon
Citation
Coming soon