# Surpassing Cosine Similarity for Multidimensional Comparisons: Dimension Insensitive Euclidean Metric

arXiv: https://arxiv.org/abs/2407.08623 · HTML: https://mlsanity.com/paper/2407.08623/

## Key facts

- Cited by 9 papers in the map (data through 14 Oct 2026).
- Builds on 3 of its 29 references that are in the map.
- First posted on arXiv 11 Jul 2024.

## Builds on (most cited first, 3 of 3)

- [MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers](https://mlsanity.com/paper/2002.10957/) (2020)
- [SemEval-2017 Task 1: Semantic Textual Similarity - Multilingual and Cross-lingual Focused Evaluation](https://mlsanity.com/paper/1708.00055/) (2017)
- [Cosine Normalization: Using Cosine Similarity Instead of Dot Product in Neural Networks](https://mlsanity.com/paper/1702.05870/) (2017)

## Built on by (most cited first, 9 of 9)

- [Safe Pruning LoRA: Robust Distance-Guided Pruning for Safety Alignment in Adaptation of LLMs](https://mlsanity.com/paper/2506.18931/) (2025)
- [Giving Simulated Cells a Voice: Evolving Prompt-to-Intervention Models for Cellular Control](https://mlsanity.com/paper/2505.02766/) (2025)
- [Magnitude Matters: a Superior Class of Similarity Metrics for Holistic Semantic Understanding](https://mlsanity.com/paper/2509.19323/) (2025)
- [Real-time and personalized product recommendations for large e-commerce platforms](https://mlsanity.com/paper/2506.21368/) (2025)
- [Sharp Eyes and Memory for VideoLLMs: Information-Aware Visual Token Pruning for Efficient and Reliable VideoLLM Reasoning](https://mlsanity.com/paper/2511.08003/) (2025)
- [Anisotropy Decides Cosine vs. Rank Metrics for Text Embeddings](https://mlsanity.com/paper/2606.29571/) (2026)
- [CosMAP: Contrastive Manifold Approximation and Projection for Dimensionality Reduction of Omics and Genealogical Data](https://mlsanity.com/paper/2608.11269/) (2026)
- [Geometric Filtering of LLM-Generated Samples for Few-Shot Text Classification](https://mlsanity.com/paper/2608.13866/) (2026)
- [ECOKV: Geometry-Aware KV Cache Eviction via Complementary Diversity Metrics](https://mlsanity.com/paper/2609.06663/) (2026)

## Abstract (arXiv)

Advances in computational power and hardware efficiency have enabled tackling increasingly complex, high-dimensional problems. While artificial intelligence (AI) achieves remarkable results, the interpretability of high-dimensional solutions remains challenging. A critical issue is the comparison of multidimensional quantities, essential in techniques like Principal Component Analysis. Metrics such as cosine similarity are often used, for example in the development of natural language processing algorithms or recommender systems. However, the interpretability of such metrics diminishes as dimensions increase. This paper analyzes the effects of dimensionality, revealing significant limitations of cosine similarity, particularly its dependency on the dimension of vectors, leading to biased and poorly interpretable outcomes. To address this, we introduce a Dimension Insensitive Euclidean Metric (DIEM) which demonstrates superior robustness and generalizability across dimensions. DIEM maintains consistent variability and eliminates the biases observed in traditional metrics, making it a reliable tool for high-dimensional comparisons. An example of the advantages of DIEM over cosine similarity is reported for a large language model application. This novel metric has the potential to replace cosine similarity, providing a more accurate and insightful method to analyze multidimensional data in fields ranging from neuromotor control to machine learning.
