Exploring the Small World of Word Embeddings: A Comparative Study on Conceptual Spaces from LLMs of Different Scales

Zhu Liu, Ying Liu, Kangyang Luo, Cunliang Kong, Maosong Sun

TL;DR

This paper constructs "lexico-semantic networks" from the internal word embeddings of Large Language Models (LLMs) to understand how these models represent word meanings. They found that these networks exhibit "small-world" properties, and larger LLMs create richer, more complex semantic structures, suggesting a scaling effect in how LLMs represent meaning.

What Problem Does This Paper Address?

Understanding how language models represent meaning is crucial for interpreting their behavior and improving their capabilities. Traditional methods for building semantic networks often rely on manual curation or static word embeddings, which can be labor-intensive or fail to capture the dynamic nature of meaning in modern LLMs. Specifically, this paper focuses on decoder-only LLMs (like GPT-style models), whose "next-token prediction" training objective differs from encoder models (like BERT), potentially leading to different internal semantic representations. The authors aim to explore these representations by constructing networks from LLM embeddings and comparing how these networks change with LLM scale.

Methods

The core of the methodology involves constructing lexico-semantic networks from LLM input embeddings. Here's a breakdown:

  1. Embedding Extraction: They extract the input embeddings for all tokens in the LLM's vocabulary. Each token is treated as a node in the network.
  2. Complete Graph Construction: A complete graph is formed where every pair of nodes (tokens) is connected. The edge weight between two tokens is determined by their cosine similarity. To address potential embedding anisotropy, they center the embeddings by subtracting the mean vector.
  3. Sparsification (Minimum Connectivity Hypothesis): To create a manageable and meaningful network, they prune edges. They retain the top K edges based on similarity (highest weights first) until the graph becomes connected. This "minimum connectivity" approach ensures that all words are reachable while favoring stronger semantic connections.
  4. Network Analysis:
    • Global Properties: They analyze network statistics like global clustering coefficient (GCC), average local clustering coefficient (ALCC), and diameter to identify "small-world" characteristics (high clustering, short path lengths).
  5. Local Properties: They examine specific subgraphs representing common conceptual domains, WordNet relations, and cross-lingual qualitative words to assess how well the networks capture human-understandable semantic structures.

Datasets

  • LLM Embeddings: The paper uses input embeddings from two Llama models: Llama2-7B and Llama2-70B. The vocabulary size for both is 32,000 tokens.
  • WordNet: A filtered subset of the WN18 dataset is used for Scenario 2, focusing on 40,943 synsets and 18 relation types.
  • Cross-lingual Semantic Map: For Scenario 3, they use a resource of qualitative words from 22 African languages and English, resulting in a final set of 75 concepts.

Key Insights and Ideas

  • LLMs as Semantic Network Generators: The study demonstrates that LLM input embeddings can be effectively used to construct lexico-semantic networks that reflect semantic relationships.
  • Small-World Phenomenon in LLMs: The generated networks consistently exhibit small-world properties (high clustering, short path lengths), mirroring patterns observed in social and biological networks. This suggests that LLMs organize semantic information in a highly efficient, interconnected manner.
  • Scaling Matters for Semantic Richness: Larger LLMs (Llama2-70B vs. Llama2-7B) produce networks with longer average path lengths and more complex structures. This implies that increased model scale leads to a richer, more nuanced representation of semantic relationships, potentially capturing more intricate conceptual connections.
  • Bridging Cross-Lingual Gaps: The networks derived from LLMs show moderate correlation and coverage with human-annotated cross-lingual semantic maps, suggesting their potential as a preliminary space for linguistic analysis and cross-lingual research.

Key Results

  • Small-World Properties: Both Llama2-7B and Llama2-70B networks showed high global and local clustering coefficients and a diameter of 6, consistent with the "six degrees of separation" phenomenon.
  • Larger Models, Longer Paths: Llama2-70B consistently exhibited longer shortest paths within and across semantic groups compared to Llama2-7B. This was observed across various scenarios, including common concepts and WordNet relations.
  • Scenario 1 (Common Concepts): Llama2-70B showed longer paths, indicating a more complex traversal between concepts.
  • Scenario 2 (WordNet Relations): For most relation types, Llama2-70B had longer paths, suggesting it captures more intricate connections, especially for relations like "member of domain topic" and "hypernym."
  • Scenario 3 (Qualitative Words): The LLM-constructed networks showed moderate correlation (0.449-0.466) and coverage (0.378-0.568) with a human-annotated ground truth, though precision was lower.

Limitations and Future Work

  • Monosemous Words: The study primarily focuses on monosemous words, and the behavior with ambiguous or homonymous words is not explored.
  • Limited Model Scope: The evaluation is restricted to two Llama models. Results might differ with other architectures or parameter scales.
  • Input Embeddings Only: The analysis focuses solely on input embeddings, not output embeddings, which might also contain valuable semantic information.
  • Shortest Path as Metric: The shortest path length is used as a primary metric, but the authors acknowledge that more sophisticated metrics might be needed to fully capture embedding quality.
  • Future Work: The authors suggest exploring more sophisticated metrics and extending the analysis to other LLM architectures and output embeddings. They also highlight the potential of these networks as a preliminary space for linguists to refine.

Summary updated

Abstract

A conceptual space represents concepts as nodes and semantic relatedness as edges. Word embeddings, combined with a similarity metric, provide an effective approach to constructing such a space. Typically, embeddings are derived from traditional distributed models or encoder-only pretrained models, whose objectives directly capture the meaning of the current token. In contrast, decoder-only models, including large language models (LLMs), predict the next token, making their embeddings less directly tied to the current token's semantics. Moreover, comparative studies on LLMs of different scales remain underexplored. In this paper, we construct a conceptual space using word embeddings from LLMs of varying scales and comparatively analyze their properties. We establish a network based on a linguistic typology-inspired connectivity hypothesis, examine global statistical properties, and compare LLMs of varying scales. Locally, we analyze conceptual pairs, WordNet relations, and a cross-lingual semantic network for qualitative words. Our results indicate that the constructed space exhibits small-world properties, characterized by a high clustering coefficient and short path lengths. Larger LLMs generate more intricate spaces, with longer paths reflecting richer relational structures and connections. Furthermore, the network serves as an efficient bridge for cross-lingual semantic mapping.
BibTeX
@misc{liu2025exploring,
  author = {Zhu Liu and Ying Liu and Kangyang Luo and Cunliang Kong and Maosong Sun},
  title = {{Exploring the Small World of Word Embeddings: A Comparative Study on Conceptual Spaces from LLMs of Different Scales}},
  year = {2025},
  eprint = {2502.11380},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.11380},
}
Figure