potentialpaper

Complementarity Matters: A Closer Look at Nearest Neighbor Guidance for OOD Detection

Zhenyu Yang, Ettore Merlo, Nikita Dvornik

ICLR 2026 submission

Edit this page

Or clone it with git

The page gets its repository with its first edit, so start in the web editor.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Out-of-distribution (OOD) detection seeks to identify inputs that fall outside the training distribution, which is crucial for ensuring the reliability of deep neural networks (DNNs). The dominant approach to OOD detection is score-based: each sample receives a score, and those with scores that differ significantly from the training data are flagged as out-of-distribution. The most effective score functions typically rely on DNN's classifier uncertainty, or nearest-neighbour (NN) similarity of test and training samples. Moreover, recent research demonstrates that combining the classifier- and NN-based scores - the process called NN Guidance - yields the best OOD detectors. However, the exact reasons for the success of NN Guidance are poorly understood. In this work, we take a closer look at NN Guidance and uncover the core reason behind its success - the complementarity between the classifier- and NN-based scores. Put simply, the two scores are complementary when they detect diverse OOD samples, and thus they can perform better when combined. Guided by these insights, we make three main contributions. First, we design a strong baseline OOD detector based on NN Guidance with improved score complementarity. Second, we propose a novel model pruning strategy that further enhances the complementarity and improves performance. Third, we propose a novel method to combine complementary signals from different hidden DNN layers and further improve NN Guidance. Finally, by integrating all the sources of complementary information into a unified framework - CoNNGuide - we achieve state-of-the-art performance on CIFAR-10, CIFAR-100, and ImageNet benchmarks, outperforming prior methods by up to 5.7% in FPR and 2.79% in AUROC.

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

add · history

No versions are recorded yet: its preprint, the venues it went to and what they decided, the camera-ready. Missing a version?

We don't know of a submission of this paper to a venue with open reviews. Missing a submission?

Loading the discussion…