Language Guidance for Deep Metric Learning
Using pretrained language models as a supervisory signal for vision embeddings — a multi-stage schedule that fine-tunes intermediate layers rather than only the head.

Deep metric learning trains a network to put similar images close together in an embedding space. This project explored how language supervision could add semantic structure to embeddings learned from images.
The opening is that ImageNet pretraining gives you pseudolabels — and a pseudolabel is a word. Once you have words you can reach for a pretrained language model, which knows that a chihuahua and a terrier are both dogs, and that a dog is not a bus. That semantic structure is free, needs no extra annotation, and is exactly the structure the embedding space is trying to learn.
My thesis work was on where that guidance should be applied. The usual move is to supervise the final embedding. Instead this fine-tunes intermediate layers against the language signal across several training stages, so the semantics shape the representation as it forms rather than being imposed on it at the end.
The premise reproduces cleanly. On CUB-200 with a ResNet-50 backbone and a 128-dimensional embedding, both language-guided runs sit well above the plain multi-similarity baseline — that gap is the published result, and it is real. What I can show of my own contribution is training behaviour: swapping the order of the hint and distillation stages moves the loss curve, either side of the published run — which is evidence that where the guidance lands matters, and not yet evidence about what it is worth.
Credit where it is due
This built on published work — Roth et al., Integrating Language Guidance into Vision-based Deep Metric Learning (CVPR 2022) — and my repository is a fork of theirs. The base pipeline, the datasets and much of the training scaffolding are the authors’. My contribution was the hint learning and multi-stage training schedule described above.
Supervised by Prof. Biplab Banerjee at IIT Bombay, July – December 2022. It ran straight on into out-of-distribution detection, which was the second half of the same question.
Gallery
0303

