The Shape of Word Embeddings: Quantifying Non-Isometry With Topological Data Analysis
Ondřej Draganov, Steven Skiena
TL;DR
This work asks whether the global shape of unlabeled, $d$-dimensional word embeddings encodes language history. It applies persistent homology to token clouds from $81$ Indo-European$ languages, producing multiple language-distance matrices via distances between $0$-, $1$-, and $2$-dimensional persistence diagrams using metrics such as the Bottleneck, (Sliced) Wasserstein, Persistence Image, and Bars statistics. These distances feed two phylogenetic reconstruction methods, UPGMA and Neighbor Joining, and are evaluated against the Ethnologue reference tree through permutation tests across six tree-distance metrics, across $24$ parameter variants. The results show significant alignment for many configurations (e.g., $484$ of $864$ cases), indicating that embedding shapes carry a real signal of linguistic history and that topological data analysis can provide novel insights into language-space structure and cross-language relationships.
Abstract
Word embeddings represent language vocabularies as clouds of $d$-dimensional points. We investigate how information is conveyed by the general shape of these clouds, instead of representing the semantic meaning of each token. Specifically, we use the notion of persistent homology from topological data analysis (TDA) to measure the distances between language pairs from the shape of their unlabeled embeddings. These distances quantify the degree of non-isometry of the embeddings. To distinguish whether these differences are random training errors or capture real information about the languages, we use the computed distance matrices to construct language phylogenetic trees over 81 Indo-European languages. Careful evaluation shows that our reconstructed trees exhibit strong and statistically-significant similarities to the reference.
