Learning a metric for class-conditional KNN

Daniel Jiwoong Im, Graham W. Taylor
7/11/2016
6 citations
cs.LGstat.ML

Official code: jiwoongim/CCML (0 stars, Python, last commit 2016-04-03).

Abstract

Naive Bayes Nearest Neighbour (NBNN) is a simple and effective framework which addresses many of the pitfalls of K-Nearest Neighbour (KNN) classification. It has yielded competitive results on several computer vision benchmarks.

Show full abstract

Its central tenet is that during NN search, a query is not compared to every example in a database, ignoring class information. Instead, NN searches are performed within each class, generating a score per class. A key problem with NN techniques, including NBNN, is that they fail when the data representation does not capture perceptual (e.g.~class-based) similarity. NBNN circumvents this by using independent engineered descriptors (e.g.~SIFT). To extend its applicability outside of image-based domains, we propose to learn a metric which captures perceptual similarity. Similar to how Neighbourhood Components Analysis optimizes a differentiable form of KNN classification, we propose "Class Conditional" metric learning (CCML), which optimizes a soft form of the NBNN selection rule. Typical metric learning algorithms learn either a global or local metric. However, our proposed method can be adjusted to a particular level of locality by tuning a single parameter. An empirical evaluation on classification and retrieval tasks demonstrates that our proposed method clearly outperforms existing learned distance metrics across a variety of image and non-image datasets.

View on arXivView PDF

Code Implementations(1)

jiwoongim/CCMLOfficial100%
00PythonApr 2, 201610 years ago

Similar Papers

Cite this paper

@article{im2016learning,
  title  = {Learning a metric for class-conditional KNN},
  author = {Daniel Jiwoong Im and Graham W. Taylor},
  year   = {2016},
  eprint = {1607.03050},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1607.03050}
}

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

Discussion