Friday October 29 2:00 PM – Friday October 29 3:30 PM in Workshop/Tutorial II

Introduction to Distance Metric Learning

Dor Kedem

Prior knowledge:
No previous knowledge expected


Metric learning, a supervised branch of representation learning, is a useful dimensionality reduction approach to learn a meaningful representation of your data. It's used both for visualization purposes of high-dimensional datasets, and in several applications in computer vision, NLP & recommendation engines. Join us, and add this useful and underutilized tool to your data scientist's toolkit.


In this tutorial will cover several topics:

  • Distances: definitions, examples, parameterized distances & the Mahalanobis distance
  • Going from learning meaningful distances to learning meaningful transformations
  • Manifold learning vs. Distance Metric Learning (DML): Similarities & differences
  • Linear (metric-learn) & non-linear (pytorch-metric-learning) metric learning examples

We'll combine all that goodness in a notebook, together with an NLP example to classify customer service queries, and using state-of-the-art sentence transformers & an interactive visualization library, we'll showcase how DML can utilize supervision improve on the general-purpose sentence embedding.