English

Deep Language Geometry: Constructing a Metric Space from LLM Weights

Computation and Language 2025-08-19 v1 Artificial Intelligence Machine Learning

Abstract

We introduce a novel framework that utilizes the internal weight activations of modern Large Language Models (LLMs) to construct a metric space of languages. Unlike traditional approaches based on hand-crafted linguistic features, our method automatically derives high-dimensional vector representations by computing weight importance scores via an adapted pruning algorithm. Our approach captures intrinsic language characteristics that reflect linguistic phenomena. We validate our approach across diverse datasets and multilingual LLMs, covering 106 languages. The results align well with established linguistic families while also revealing unexpected inter-language connections that may indicate historical contact or language evolution. The source code, computed language latent vectors, and visualization tool are made publicly available at https://github.com/mshamrai/deep-language-geometry.

Keywords

Cite

@article{arxiv.2508.11676,
  title  = {Deep Language Geometry: Constructing a Metric Space from LLM Weights},
  author = {Maksym Shamrai and Vladyslav Hamolia},
  journal= {arXiv preprint arXiv:2508.11676},
  year   = {2025}
}

Comments

18 pages, accepted to RANLP 2025

R2 v1 2026-07-01T04:52:23.973Z