A Framework for Uncertainty Quantification Based on Nearest Neighbors Across Layers

Miguel N. Font, José L. Jorro-Aragoneses, Carlos M. Alaíz
6/24/2025
cs.LGcs.AI

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Neural Networks have high accuracy in solving problems where it is difficult to detect patterns or create a logical model. However, these algorithms sometimes return wrong solutions, which become problematic in high-risk domains like medical diagnosis or autonomous driving. One strategy to detect and mitigate these errors is the measurement of the uncertainty over neural network decisions. In this paper, we present a novel post-hoc framework for measuring the uncertainty of a decision based on retrieved training cases that have a similar activation vector to the query for each layer. Based on these retrieved cases, we propose two new metrics: Decision Change and Layer Uncertainty, which capture changes in nearest-neighbor class distributions across layers. We evaluated our approach in a classification model for two datasets: CIFAR-10 and MNIST. The results show that these metrics enhance uncertainty estimation, especially in challenging classification tasks, outperforming softmax-based confidence.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{font2025framework,
  title  = {A Framework for Uncertainty Quantification Based on Nearest Neighbors Across Layers},
  author = {Miguel N. Font and José L. Jorro-Aragoneses and Carlos M. Alaíz},
  year   = {2025},
  eprint = {2506.19895},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.19895v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.19895.svg)](https://codeofpaper.com/paper/2506.19895)

Discussion