Neural Nearest Neighbors Networks

Tobias Plötz, Stefan Roth
10/30/2018
379 citations
cs.CVcs.LG

Official code: visinf/n3net (287 stars, Python, last commit 2023-07-06).

Abstract

Non-local methods exploiting the self-similarity of natural signals have been well studied, for example in image analysis and restoration. Existing approaches, however, rely on k-nearest neighbors (KNN) matching in a fixed feature space.

Show full abstract

The main hurdle in optimizing this feature space w.r.t. application performance is the non-differentiability of the KNN selection rule. To overcome this, we propose a continuous deterministic relaxation of KNN selection that maintains differentiability w.r.t. pairwise distances, but retains the original KNN as the limit of a temperature parameter approaching zero. To exploit our relaxation, we propose the neural nearest neighbors block (N3 block), a novel non-local processing layer that leverages the principle of self-similarity and can be used as building block in modern neural network architectures. We show its effectiveness for the set reasoning task of correspondence classification as well as for image restoration, including image denoising and single image super-resolution, where we outperform strong convolutional neural network (CNN) baselines and recent non-local models that rely on KNN selection in hand-chosen features spaces.

View on arXivView PDF

Code Implementations(1)

visinf/n3netOfficial100%

Neural Nearest Neighbors Networks (NIPS*2018)

28743Python, CudaOct 24, 20183 years agoNOASSERTION

Similar Papers

Cite this paper

@article{pltz2018neural,
  title  = {Neural Nearest Neighbors Networks},
  author = {Tobias Plötz and Stefan Roth},
  year   = {2018},
  eprint = {1810.12575},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1810.12575}
}

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/1810.12575.svg)](https://codeofpaper.com/paper/1810.12575)

Discussion