prh-mnn-per-sample-average-intersection-formula

IN premise — summaries/2026/08/24/huh-2024-prh-sR-references-chunk-1.md

Created 2026-08-24T17:10:56+00:00

The mNN metric computes per-sample alignment as (1/k)·|S(ϕᵢ) ∩ S(ψᵢ)| where S(ϕᵢ) = d_knn(ϕᵢ, Φ \ {ϕᵢ}) (self-excluded), then averages over the mini-batch; it is local, symmetric, and non-ordinal (neighbor ordering is irrelevant).

Summary

This metric scores how well two embedding spaces line up by checking, for each sample, what fraction of its k nearest neighbors (itself excluded) are shared with the corresponding sample in the other space, then averaging across the batch. Because it treats the top-k as an unordered set, two spaces can score perfectly even if they disagree on which neighbor is "closest," which means the system's alignment score is insensitive to ranking noise but sensitive to whether the right group of points is identified.