Uncovering Hierarchical Structure in LLM Embeddings with $δ$-Hyperbolicity, Ultrametricity, and Neighbor Joining
By: Prakash Chourasia, Sarwan Ali, Murray Patterson
Potential Business Impact:
Shows how computer language models organize information.
The rapid advancement of large language models (LLMs) has enabled significant strides in various fields. This paper introduces a novel approach to evaluate the effectiveness of LLM embeddings in the context of inherent geometric properties. We investigate the structural properties of these embeddings through three complementary metrics $δ$-hyperbolicity, Ultrametricity, and Neighbor Joining. $δ$-hyperbolicity, a measure derived from geometric group theory, quantifies how much a metric space deviates from being a tree-like structure. In contrast, ultrametricity characterizes strictly hierarchical structures where distances obey a strong triangle inequality. While Neighbor Joining quantifies how tree-like the distance relationships are, it does so specifically with respect to the tree reconstructed by the Neighbor Joining algorithm. By analyzing the embeddings generated by LLMs using these metrics, we uncover to what extent the embedding space reflects an underlying hierarchical or tree-like organization. Our findings reveal that LLM embeddings exhibit varying degrees of hyperbolicity and ultrametricity, which correlate with their performance in the underlying machine learning tasks.
Similar Papers
Hyperbolic Large Language Models
Artificial Intelligence
Helps computers understand complex relationships better.
Large Language Models Enhanced Hyperbolic Space Recommender Systems
Information Retrieval
Finds better movies and songs for you.
A Multiscale Geometric Method for Capturing Relational Topic Alignment
Computation and Language
Finds hidden science ideas and how they change.