Cosine Similarity Under Diagonal Rescalings: Mathematics, SEO/AI Search Risks, and Solution Patterns for Vectorization tools like IncRevs QueryMatch DOI:10.5281/zenodo.18886768
Abstract
Modern Semantic SEO and AI‑search systems rely heavily on dense text embeddings whose cosine similarity scores are used as proxies for semantic relatedness, topical coverage, and link value at scale. Recent theoretical work, notably by Steck, Ekanadham and Kallus (2024), shows that in many embedding pipelines diagonal re‑scalings of latent dimensions can leave task predictions unchanged (e.g., dot‑product scores or recommendations) while changing item–item cosine similarities—sometimes dramatically. This creates a risk for tools such as QueryMatch, which use cosine both as a diagnostic metric and as an optimization target for AI‑driven content rewriting. This paper integrates internal modelaudit reports and production experiments from QueryMatch, empirical analyses, and literature reviews into a single framework. We first formalize how diagonal matrices affect cosine similarity — specifically, how transformations that scale each embedding dimension by a different factor (e.g., D = diag(2, 0.5, …)) stretch or squash the space, altering angles and cosine values without changing prediction outcomes. We illustrate this with lowdimensional, geometric examples that match common operations on embedding spaces. We then analyze productlevel risks for SEO and AI search workflows that use cosine thresholds and cosinedriven KPIs. Building on this, we propose a family of solution patterns: (i) mathematical and training level remedies that make cosine more “rigid” and task aligned; (ii) ensemble and architecture strategies that reduce dependence on any single embedding geometry; and (iii) system and product design patterns, including stabilityaware topical mapping and multiobjective rewrite optimization.
Fields of Study & Subjects
Topic Modeling
Information Retrieval and Search Behavior
Recommender Systems and Techniques
Publication details
- Journal / source
- Zenodo (CERN European Organization for Nuclear Research)
- Publication date
- 6 March 2026
- Language
- EN
- Document type
- Preprint