Vergelijken van lineaire probes met Mahalanobis cosinusovereenkomst
Comparing Linear Probes with Mahalanobis Cosine Similarity
June 17, 2026
Auteurs: Zhuofan Josh Ying, Peter Hase, Nikolaus Kriegeskorte
cs.AI
Samenvatting
Lineaire probes worden veel gebruikt in interpreteerbaarheidsonderzoek en worden vaak vergeleken door cosinusovereenkomst. De Mahalanobis-cosinusovereenkomst (MCS) tussen twee richtingen, die het inwendig product herweegt op basis van covariantie van testgegevens, is een natuurlijke taakbewuste verfijning. Ying et al. (2026) rapporteren dat de MCS van een probe met een referentieprobe die is getraind op de out-of-distribution (OOD)-gegevens bijna perfect lineair de OOD AUROC van de probe voorspelt (R² = 0,98). Hier breiden we deze empirische bevinding uit over modellen, lagen en conceptdomeinen, en bewijzen we dit algemene fenomeen in gesloten vorm: voor gebalanceerde klassen waarvan de projecties Gaussisch zijn, zijn OOD AUROC en MCS ten opzichte van de referentieprobe lineair omdat beide sigmoïdevormige functies zijn van de signaal-ruisverhouding (SNR) van de probe op de testgegevens. De theorie voorspelt ook wanneer deze lineariteit faalt, wat we empirisch verifiëren. MCS biedt een theoretisch onderbouwd en empirisch effectief alternatief voor Euclidische cosinusovereenkomst voor het vergelijken van lineaire probes.
English
Linear probes are widely used in interpretability research and often compared by cosine similarity. The Mahalanobis cosine similarity (MCS) between two directions, which reweights the inner product by test data covariance, is a natural task-aware refinement. Ying et al. (2026) report that a probe's MCS to a reference probe trained on the out-of-distribution (OOD) data near-perfectly linearly predicts the probe's OOD AUROC (R^2 = 0.98). Here, we extend this empirical finding across models, layers, and concept domains, and prove this general phenomenon in closed form: For balanced classes whose projections are Gaussian, OOD AUROC and MCS to the reference probe are linear because both are sigmoid-shaped functions of the probe's signal-to-noise ratio (SNR) on the test data. The theory also predicts when this linearity fails, which we verify empirically. MCS offers a theoretically grounded and empirically effective alternative to Euclidean cosine similarity for comparing linear probes.