Language Ranker: A Metric for Quantifying LLM Performance Across High and Low-Resource Languages

Zihao Li, Yucheng Shi, Zirui Liu, Fan Yang, Ali Payani, Ninghao Liu, Mengnan Du

Abstract

Large Language Models (LLMs) exhibit significant performance disparities across languages, primarily due to the English-centric nature of their training data. This paper introduces Language Ranker, an intrinsic metric that quantifies these disparities by measuring the cosine similarity between internal representations of target languages and an English baseline. Our analysis reveals that high-resource languages cluster closely with English, while low-resource languages occupy "compressed," less expressive embedding subspaces. We demonstrate a strong correlation between Language Ranker scores and downstream reasoning performance, providing a robust, language-agnostic tool for evaluating multilingual capabilities.

Introduction

The rapid advancement of LLMs has not benefited all languages equally. Training corpora are often heavily biased, with English frequently comprising over 90% of tokens. This imbalance leads to a "multilingual gap," where models perform exceptionally well in high-resource languages but struggle with low-resource ones. This gap exacerbates the global digital divide. Quantifying this disparity is challenging, as traditional benchmarks often require expensive human translation and are unavailable for many languages. We propose Language Ranker to address this by examining the model's internal mathematical representations directly, providing an intrinsic measure of language understanding.

Methodology

Language Ranker operates on the internal hidden states of an LLM, establishing English as a "gold standard" baseline. For a given sentence and its English translation (using the OPUS-100 corpus), we extract the hidden representation vector of the last token after each Transformer layer. The metric is defined as the cosine similarity between the target language vector and the English vector, averaged across a subset of intermediate layers (e.g., layers 5, 10, 15, 20, 25).

To further investigate the structure of the embedding space, we employ Principal Component Analysis (PCA) and introduce "double variance"—the variance of the top eigenvalues. This measure quantifies the degree of "compression" or imbalance in a language's embedding subspace, allowing us to see how the model's internal logic differs across linguistic resources.

Analysis of Embedding Spaces

Our findings indicate that the representation gap is a physical property of the model's internal space. High-resource languages like German and Spanish exhibit high similarity to English and occupy a broad, even distribution in the embedding space. In contrast, low-resource languages like Oriya and Kazakh are mathematically "squashed" into narrow, almost linear subspaces, reflecting their underrepresentation in training data.

PCA visualization of embedding spaces: high-resource languages (top) show broad distributions, while low-resource languages (bottom) are compressed into narrow subspaces.

Empirical Results

Language Ranker scores reveal a clear hierarchy across various model architectures, including Llama, Gemma, Mistral, and Qwen. High-resource languages consistently maintain cosine similarity scores above 0.6, whereas low-resource languages frequently fall below 0.4. This trend is consistent across model scales; for instance, Llama2 13B maintains the same clear separation between high and low-resource languages as its 7B counterpart.

Cosine similarity scores across layers for four popular 7B models, showing a consistent gap between high-resource (top) and low-resource (bottom) languages.

Crucially, these intrinsic scores correlate strongly with performance on downstream reasoning tasks. Using the MLMM-evaluation benchmark, we found that higher similarity scores predict better performance on tasks like ARC and MMLU. For example, Gemma 7B scores approximately 77% on the ARC benchmark for Spanish (high similarity) but only 40% for Armenian (low similarity). Furthermore, we observed that as "double variance" increases—meaning the embedding subspace becomes more unbalanced and narrow—the similarity score and subsequent task performance decrease.

Conclusion

Language Ranker provides a powerful macro-level metric for assessing the multilingual equity of LLMs. Our results suggest that the multilingual gap is a fundamental consequence of current data-driven training paradigms, where training data is destiny. Future work will focus on refining the metric to capture finer semantic nuances and using Language Ranker to guide the development of more balanced training datasets, ultimately working toward closing the digital divide in artificial intelligence.

Summary updated

BibTeX
@inproceedings{li2025language,
  author = {Zihao Li and Yucheng Shi and Zirui Liu and Fan Yang and Ali Payani and Ninghao Liu and Mengnan Du},
  title = {{Language Ranker: A Metric for Quantifying LLM Performance Across High and Low-Resource Languages}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i27.35038},
}
Figure