Comparing Linear Probes with Mahalanobis Cosine Similarity

Zhuofan Ying, Peter Hase, Nikolaus Kriegeskorte


Abstract
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 a nearly perfect linear relationship between a probe’s MCS to a reference probe trained on out-of-distribution (OOD) data and its OOD AUROC (R^2=0.98). Here, we extend this empirical finding across models, layers, and concept domains, and prove it in closed form: For balanced classes whose projections are Gaussian, OOD AUROC and MCS to the reference probe are near-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.
Anthology ID:
2026.emnlp-main.946
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
21793–21810
Language:
URL:
https://aclanthology.org/2026.emnlp-main.946/
DOI:
Bibkey:
Cite (ACL):
Zhuofan Ying, Peter Hase, and Nikolaus Kriegeskorte. 2026. Comparing Linear Probes with Mahalanobis Cosine Similarity. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 21793–21810, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Comparing Linear Probes with Mahalanobis Cosine Similarity (Ying et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.946.pdf