Auditing Routing Entropy as an Uncertainty Signal in Attention-Residual Transformers
Organizations: Adelaide University, Adelaide, Australia
Abstract
Dynamic architectures leave a per-example routing trace beside each prediction, and diffuse routing is easy to read as a sign that the prediction is unreliable. We audit that reading for routing entropy in Attention-Residual (AR) variants of Swin-Tiny and DeiT-Small, trained from scratch on CIFAR-10/100 with a soft-binned calibration auxiliary loss, asking whether the trace carries information about correctness beyond what the model's own confidence already reveals. Three checks probe this increment: does a routing signal appear at fixed confidence, does it replicate across training seeds, and can a held-out predictor exploit it against output-only and shuffled-trace controls? A sensitivity audit then injects effects of known size and measures the fraction of each that the probes recover. No test in the fixed 30-test binned family survives multiplicity correction, and neither the nominal hit nor a borderline result recurs in its sibling seeds. Across 24 paired runs a scalar routing probe yields no pooled improvement in routing-stratified calibration, and an entropy-profile probe predicts correctness better than the same probe given shuffled profiles yet worse than a confidence-only predictor in both binary log-loss and Brier score: a gain over shuffled traces does not become a gain over the output. Conditioning on the complete logit vector leaves the corresponding comparison unresolved. The audit bounds how far these non-detections can be read: at an injected effect of 0.010 nats the profile probe recovers 24-59% of the oracle gain, and a reference-preserving correction probe recovers 8% and 23% in the two CIFAR-100 settings, below the threshold we fixed for applying it to real labels. The results establish control-dependent gains and incomplete estimator recovery, not the absence of conditional routing information.
Figures & tables
| Oracle | Routing increment | Candidate gain | Recovery | |||
|---|---|---|---|---|---|---|
| Setting | gain | E2 | E3 | E2 | E3 | (E3) |
| Swin / C-100 | 0 | – | ||||
| Swin / C-100 | 0.005 | 5.5% | ||||
| Swin / C-100 | 0.010 | 8.1% | ||||
| DeiT / C-100 | 0 | – | ||||
| DeiT / C-100 | 0.005 | 15.5% | ||||
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Variant | Max gap | Wt. gap | CI (Wt.) | Bins | Min/ /Med | Null | Perm. |
|---|---|---|---|---|---|---|---|
| Block-AR |
| Method | ECE | AdaECE | NLL | Brier | Worst-tert. ECE | Acc@ (%) |
|---|---|---|---|---|---|---|
| No calibration | ||||||
| Temp. Scaling (TS) | ||||||
| Ensemble TS | ||||||
| Vector Scaling | ||||||
| Classwise TS | ||||||
| Parametric TS |
| Method | MCE | Classwise ECE | SmoothECE |
|---|---|---|---|
| No calibration | |||
| Temp. Scaling (TS) | |||
| Ensemble TS | |||
| Vector Scaling | |||
| Classwise TS | |||
| Parametric TS |
| Method | NLL vs raw | Brier vs raw |
|---|---|---|
| Temp. Scaling (TS) | ||
| Ensemble TS | ||
| Vector Scaling | ||
| Classwise TS | ||
| Parametric TS | ||
| Histogram Binning |
| Setting | Variant | Seed | , | , profile | ||||
|---|---|---|---|---|---|---|---|---|
| Swin/C-10 | Block | 0 | 0.500 | 0.625 | 0.653 | 0.798 | ||
| Swin/C-10 | Block | 1 | 0.682 | 0.254 | 0.421 | 0.913 | ||
| Swin/C-10 | Block | 2 | 0.774 | 0.623 | 0.491 | 0.083 | ||
| Swin/C-10 | Full | 0 | 0.135 | 0.331 | 0.206 | 0.063 | ||
| Swin/C-10 | Full | 1 | 0.434 | 0.740 | 0.329 | 0.345 | ||
| Swin/C-10 | Full | 2 | 0.831 | 0.523 | 0.296 | 0.679 |
| Statistic | Block-AR |
|---|---|
| Max gap (point) | |
| bootstrap CI | |
| Weighted integrated gap (point) | |
| bootstrap CI | |
| Within-bin permutation | |
| Shared bins (of ) |
| Variant | Seed | Acc@1 | Max gap | Wt. gap | Wt. CI | Bins | Min/ /Med | Perm. | Reject? |
|---|---|---|---|---|---|---|---|---|---|
| Block-AR ( ) | yes | ||||||||
| Block-AR ( ) | no | ||||||||
| Block-AR ( ) | no |
| Mode | Multiplier / selection | Global ECE | Worst-tertile ECE | NLL |
|---|---|---|---|---|
| Scott | ||||
| Scott | (paper default) | |||
| Scott | ||||
| CV-NLL | -fold cal. NLL | |||
| Oracle-ECE | held-out global ECE |
| Log-loss | Brier | |||
| Setting | Confidence | Shuffled | Confidence | Shuffled |
| Swin / CIFAR-10 | ||||
| Swin / CIFAR-100 | ||||
| DeiT / CIFAR-10 | ||||
| DeiT / CIFAR-100 | ||||
| Pooled (24 runs) | ||||
| Oracle | Diagnostic ( ) | NW probe ( ) | ||||
|---|---|---|---|---|---|---|
| Setting | gain | Gain | Recovery | |||
| Swin / CIFAR-10 | 0 | 1000 | 0.042 | 0.001 | – | |
| Swin / CIFAR-10 | 0.0005 | 200 | 0.095 | 0.000 | % | |
| Swin / CIFAR-10 | 0.002 | 200 | 0.170 | 0.010 | % | |
| Swin / CIFAR-10 | 0.005 | 200 | 0.545 | 0.035 | % | |
| Swin / CIFAR-10 | 0.010 | 200 | 0.930 | 0.185 | % | |
| Oracle gain | Oracle gain | |||
|---|---|---|---|---|
| Setting | Recovered | Fraction | Recovered | Fraction |
| Swin / CIFAR-10 | ||||
| Swin / CIFAR-100 | ||||
| DeiT / CIFAR-10 | ||||
| DeiT / CIFAR-100 | ||||
| Profile output-only | Profile permuted profile | ||||
|---|---|---|---|---|---|
| Setting | Selected | MLP | Ridge | MLP | Ridge |
| Swin / CIFAR-10 | |||||
| Swin / CIFAR-100 | |||||
| DeiT / CIFAR-10 | |||||
| DeiT / CIFAR-100 | |||||
| runs ( ) | |||||
| Grid | Grid | |
| Profile output-only, selected | ||
| Profile output-only, MLP | ||
| Profile output-only, ridge | ||
| Profile permuted, MLP | ||
| Profile permuted, ridge | ||
| Output-only MLP reference |
| Dataset | Variant | Max gap | Permutation |
|---|---|---|---|
| CIFAR-10 | Block-AR | ||
| CIFAR-10 | Full-AR | ||
| CIFAR-100 | Block-AR | ||
| CIFAR-100 | Full-AR | ||
| Tiny-ImageNet | Block-AR | ||
| Tiny-ImageNet | Full-AR |
| Setting | Variant | Max gap | Min , | |
|---|---|---|---|---|
| Sw-T / C-10 | Block-AR ( ) | , | ||
| Full-AR | , | |||
| DeiT-S / C-10 | Block-AR ( ) | , | ||
| Full-AR | , | |||
| DeiT-S / C-100 | Block-AR ( ) | , | ||
| Full-AR | , |
| Feature | Block-AR ECE | Full-AR ECE |
|---|---|---|
| CIFAR-10 (Swin-Tiny seed- , for Block-AR) | ||
| Confidence only | 0.0131 | 0.0232 |
| Predictive entropy | 0.0092 | 0.0199 |
| Aggregate routing entropy | 0.0099 | 0.0241 |
| Last-layer routing entropy | 0.0075 | 0.0191 |
| Routing concentration | 0.0099 | 0.0241 |
| Setting | AR variant | seed 0 | seed 1 | seed 2 |
|---|---|---|---|---|
| DeiT-Small / CIFAR-10 | Block-AR | 0.6947 | 0.9055 | 0.9011 |
| DeiT-Small / CIFAR-10 | Full-AR | 0.8972 | 0.9180 | 0.9103 |
| DeiT-Small / CIFAR-100 | Block-AR | 0.6842 | 0.7013 | 0.6880 |
| DeiT-Small / CIFAR-100 | Full-AR | 0.7207 | 0.7205 | 0.7058 |
| Swin-Tiny / CIFAR-10 | Block-AR | 0.9026 | 0.9012 | 0.9024 |
| Swin-Tiny / CIFAR-10 | Full-AR | 0.7444 | 0.9242 | 0.9239 |