Section 21
Nearest-neighbor retrieval
For a sample of query images, how often do the k nearest neighbors in feature space share the query's ground-truth label? This reveals morphological coherence independent of any clustering algorithm's choices.
PathMNIST (histopathology)
| Representation | Precision@1 | Precision@5 | Precision@10 | Queries |
|---|---|---|---|---|
| PCA on pixels | 0.574 | 0.557 | 0.531 | 500 |
| Handcrafted color/texture | 0.294 | 0.288 | 0.286 | 500 |
| HOG | 0.232 | 0.203 | 0.198 | 500 |
| ResNet50 (ImageNet-supervised) | 0.806 | 0.780 | 0.741 | 500 |
| DINO ViT-S/16 | 0.946 | 0.892 | 0.860 | 500 |
| DINOv2 ViT-S/14 | 0.882 | 0.852 | 0.828 | 500 |
BloodMNIST (blood cell microscopy)
| Representation | Precision@1 | Precision@5 | Precision@10 | Queries |
|---|---|---|---|---|
| PCA on pixels | 0.580 | 0.520 | 0.498 | 500 |
| Handcrafted color/texture | 0.266 | 0.258 | 0.255 | 500 |
| HOG | 0.444 | 0.369 | 0.364 | 500 |
| ResNet50 (ImageNet-supervised) | 0.604 | 0.544 | 0.511 | 500 |
| DINO ViT-S/16 | 0.724 | 0.678 | 0.641 | 500 |
| DINOv2 ViT-S/14 | 0.640 | 0.566 | 0.536 | 500 |
Precision@k = fraction of a query's k nearest neighbors (excluding itself) that share its ground-truth label, averaged over a random sample of queries per representation. Labels are used only to evaluate retrieval quality after the fact, never to influence which neighbors are retrieved.