LogitDynamics: Reliable ViT Error Detection from Layerwise Logit Trajectories
Organizations: Technion - Israel Institute of Technology, Israel
Abstract
Reliable confidence estimation is critical when deploying vision models. We study error prediction: determining whether an image classifier's output is correct using only signals from a single forward pass. Motivated by internal-signal hallucination detection in large language models, we investigate whether similar depth-wise signals exist in Vision Transformers (ViTs). We propose a simple method that models how class evidence evolves across layers. By attaching lightweight linear heads to intermediate layers, we extract features from the last L layers that capture both the logits of the predicted class and its top-K competitors, as well as statistics describing instability of top-ranked classes across depth. A linear probe trained on these features predicts the error indicator. Across datasets, our method improves or matches AUCPR over baselines and shows stronger cross-dataset generalization while requiring minimal additional computation.
Figures & tables
| ImageNet | CIFAR-100 | Places365 | |
|---|---|---|---|
| Number of classes | 1000 | 100 | 365 |
| Dataset size | 50,000 | 10,000 | 36,500 |
| Misclassification rate | 20.34% | 6.91% | 44.5% |
| Max logit | 0.5395 | 0.3680 | 0.6969 |
| Entropy | 0.5766 | 0.3967 | 0.7038 |
| Margin | 0.5471 | 0.4197 | 0.6728 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.