Skip to content

InfoNCE, Soft Nearest Neighbour on MNIST and Fashion-MNIST

License

Notifications You must be signed in to change notification settings

minggli/deep-metric-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deep Metric Learning

This repository contains exploratory study of recent advancements of Deep Metric Learning in particular Contrastive Representation Learning.

InfoNCE (Oord et al 2019) is based on Noise Contrastive Estimation (Gutmann and Hyvarinen 2012) and aims to maximise Mutual Information of query-document pair (or as put originally, context and signal). NCE itself is a generalization of triplet loss used in FaceNet (Schroff et al 2015) to multiple negative examples.

Some intimate connection between NCE and Generative Adverserial Networks (GANs) have been discussed (Goodfellow 2015, Frosst 2019).

Soft Nearest Neighbour Loss (Frosst 2019) further generalises InfoNCE to allow multiple positive examples.

Embedding

Visualisation were produced using representation of last layer of untrained ResNet18 and t-SNE.

MNIST

Cross Entropy InfoNCE Soft NN Loss
alt text alt text alt text

Fashion-MNIST

Cross Entropy InfoNCE Soft NN Loss
alt text alt text alt text

Requirement

poetry install

Further Work

  • simple top-k Retrieval model
  • explore connection of GANs and NCE

About

InfoNCE, Soft Nearest Neighbour on MNIST and Fashion-MNIST

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published