Measuring Distances in High-Dimensional Spaces: Why Average Group Vector Comparisons Exhibit Bias, and What to Do About It
Political Analysis 33(3): 266-273, 2025.

Abstract
Analysts often seek to compare representations in high-dimensional space, e.g., embedding vectors of the same word across groups. We show that the distance measures calculated in such cases can exhibit considerable statistical bias, that stems from uncertainty in the estimation of the elements of those vectors. This problem applies to Euclidean distance, cosine similarity, and other similar measures. After illustrating the severity of this problem for text-as-data applications, we provide and validate a bias correction for the squared Euclidean distance. This same correction also substantially reduces bias in ordinary Euclidean distance and cosine similarity estimates, but corrections for these measures are not quite unbiased and are (non-intuitively) bimodal when distances are close to zero. The estimators require obtaining the variance of the latent positions. We (will) implement the estimator in free software, and we offer recommendations for related work.
Related Publications
- [Paper] Multilanguage Word Embeddings for Social Scientists: Estimation, Inference and Validation Resources for 157 Languages
- [Paper] Embedding Regression: Models for Context-Specific Description and Inference
- [Paper] What Good Is a Regression? Inference to the Best Explanation and the Practice of Political Science Research
- [Working Paper] Where's the Evidence that Respondents Understand Your Survey Questions?
- [Paper] Handle with Care: A Sociologist's Guide to Causal Inference with Instrumental Variables
- [Paper] Correcting the Measurement Errors of AI-Assisted Labeling in Image Analysis Using Design-Based Supervised Learning
- [Paper] Short-Term Exposure to "Filter-Bubble" Recommendation Systems Has Limited Polarization Effects: Naturalistic Experiments on YouTube
- [Paper] REFORMS: Consensus-Based Recommendations for Machine-Learning-Based Science