mutual-knn-metric-computation-method

IN premise — summaries/2026-08-24/koepke-2026-back-into-cave-s2-related-work.md

Created 2026-08-24T17:11:00+00:00

The mutual kNN alignment metric is computed by L2-normalizing representations of n shared samples, retrieving the k nearest neighbors for each query point (excluding self) via dot-product similarity independently in each modality's space, and scoring as the mean of |N_a^k(i) ∩ N_b^k(i)| / k across all queries; the metric is invariant to orthogonal transformations and isotropic scaling.

Summary

This defines how the system measures whether two different data representations (for example, an image embedding and a text embedding) agree on which samples are close to which other samples, by comparing each point's nearest-neighbor set across the two spaces and averaging the overlap. The key practical point is that this score is unaffected by rotating or uniformly resizing either feature space, so it captures genuine structural agreement between the two modalities rather than being an artifact of how the vectors happen to be oriented or scaled.