Shared Global and Local Geometric Structure of LLM EmbeddingsShared Global and Local Geometry of Language Model Embeddings
The authors found that token embeddings of LLMs from the same family share global orientation and local geometry, and accordingly linearly transfer steering vectors.
- Whether token embeddings of contemporary same-family LLMs share global orientation and local geometry is unclear, and this relates to whether representations converge and whether steering vectors can be reused across models.
- On GPT2, Llama3, and Gemma2 sharing a tokenizer, compare Pearson correlations of cosine matrices, and characterize local structure with LLE and neighbor PCA intrinsic dimensions. EMB2EMB maps unembeddings with least squares, then linearly transforms steering vectors.
- Figure 1: embedding Pearson for 8B* vs. 1B is 0.01, unembedding is 0.87. Table 2: SCS–ID Spearman for GPT2-Medium is -0.67. The authors state that after steering transfer, most results are similar in trend to the original vectors.
- The paper does not list limitations separately. The Discussion lists the relationship between embedding geometry and hidden states as a future direction. Experiments cover GPT2, Llama3, Gemma2 same-family models and the NeoX vs. Olmo comparison; the main text does not give readings for the steering figures.
- Evaluated models
- GPT2-SmallGPT2-MediumGPT2-LargeGPT2-XLLlama3-1BLlama3-3BLlama3-8BLlama3-11B-VisionLlama3-70BLlama3-1B-ILlama3-3B-ILlama3-8B-ILlama3-11B-Vision-ILlama3-70B-IGemma2-2BGemma2-9BGemma2-27BGPT-NeoX-20BOlmo-7B
- Benchmarks
- ConceptNetRealToxicityPromptsPerez et al. (2022) 与 Rimsky et al. (2023) 的行为评测集
- Metrics
- Pearson correlationcosine similarityintrinsic dimensionSpearman correlationsemantic coherence scorep(Behavior)toxicity score
The researchers find substantial geometric similarity among token embedding vectors of different large language models: they share similar relative directions and also exhibit locally similar structures. Using two characterizations, Locally Linear Embeddings and intrinsic dimension, the authors find that embeddings lie on lower-dimensional manifolds, and tokens with lower intrinsic dimension often form semantically consistent clusters. Based on this, they propose EMB2EMB, which can linearly transfer steering vectors to another language model with a different dimension.
Paper analysis
What problem does this paper attempt to solve?
Whether token embeddings of same-family LLMs share geometry, and whether steering vectors can be linearly transferred.
Do token embeddings of same-family LLMs share global and local geometry, and can steering vectors be linearly transferred accordingly?
- Context: The authors note that existing research suggests models often share representations; Huh et al. (2024) proposed the Platonic Representation Hypothesis; token embeddings are also the starting point of the residual stream and are used to represent linear relationships and hierarchical information. The authors therefore directly compare the embedding geometry of contemporary large language models.
- Existing scope: The authors state that previous word embedding alignment has mostly been conducted across different techniques (e.g., GloVe vs. word2vec), modalities, or cross-lingual settings. This paper shifts to model families with the same tokenizer but different sizes.
- Observation: The authors report that relative orientations of tokens within a family are often similar, and LLE weights and intrinsic dimensions also show local similarity. Tokens with lower intrinsic dimension more often form semantically coherent clusters, while those with higher intrinsic dimension are less coherent. The authors also state that this alignment appears to extend to hidden layers.
- Method: The authors characterize geometry using Pearson correlation of cosine similarity matrices, LLE, and intrinsic dimension, and propose EMB2EMB: linearly transforming a steering vector from one model to another model of different dimensionality.
What related research exists?
Related work covers representational similarity, embedding geometry, cross-embedding alignment, and steering vectors.
Shared Representations and Geometry
- Layer stitching: Bansal et al. (2021) used stitching (Lenc & Vedaldi, 2015) to connect layers of different models; this paper reports that the performance change was very small.
- Cross-modal convergence: Huh et al. (2024) proposed the Platonic Representation Hypothesis, suggesting that representations of large models across modalities may converge under large-scale training data.
- Representation geometry: Valeriani et al. (2023) and Doimo et al. (2024) studied the geometry of language model representations; the latter involves the representation landscape of few-shot and fine-tuning.
Embedding Geometry
- Linearity and hierarchy: word2vec by Mikolov et al. (2013b) showed that word relationships can be represented linearly; Park et al. (2024a) studied category and hierarchy information in token embeddings of contemporary LMs. The residual connections of He et al. (2016) make the input embedding the starting point of the residual stream (Elhage et al., 2021).
- Stability: Burdick et al. (2021) and Wendlandt et al. (2018) studied the instability of word2vec and GloVe. The authors explicitly contrast: unlike these works, this paper finds that embeddings of contemporary LMs share multiple geometric similarities.
- Theoretical geometry: Papyan et al. (2020) proposed neural collapse; Zhao et al. (2024) analyzed the implicit geometry of next-token prediction. The authors state that this paper is closely related to these two lines and may be an empirical instance of their findings.
Word Embedding Alignment
- Cross-technique and cross-lingual: Dev et al. (2019) compared different embedding mechanisms. Cross-lingual work includes the linear projection of Mikolov et al. (2013a), Gromov-Wasserstein by Alvarez-Melis & Jaakkola (2018), and Artetxe et al. (2017), Conneau et al. (2020) for downstream tasks such as machine translation.
- Cross-modal and visualization: Huh et al. (2024) and Merullo et al. reported alignment between images and text. Boggust et al. (2022) visualized global structure and local neighborhoods, observing changes in fine-tuning or language over time.
Steering and Baselines
- Linear interventions: Nanda et al. (2023), Li et al. (2024), Park et al. (2024b), Rimsky et al. (2023) discussed linear representations of concepts; Turner et al. (2023) called the vectors used to intervene on behavior steering vectors. The authors state that concurrent work by Oozeer et al. (2025) also shows that activation interventions can transfer between large models.
- Baselines and data: The intrinsic dimension baseline is 1,000 random Gaussian vectors (Baseline E, G in Table 1). The steering baselines are no intervention, and the original vector with source and target models identical. Semantic coherence uses ConceptNet; toxicity uses RealToxicityPrompts; Llama3 behavior evaluation uses datasets from Perez et al. (2022) and Rimsky et al. (2023).
The authors position this paper on the token (un)embedding geometry of contemporary LLMs from the same family, rather than cross-technique, cross-modal, or cross-lingual alignment, and use this geometry to transfer steering vectors. The introduction also cites universal neurons and circuits (Gurnee et al., 2024; Chughtai et al., 2023; Merullo et al., 2024) as background on shared components.
How does the paper address this problem?
Characterize same-family embeddings with distance matrices, LLE, and intrinsic dimension, then transfer steering vectors via least squares.
Compare relative orientation and local reconstruction of tokens across model families sharing a tokenizer, then transfer steering vectors using a linear mapping between unembeddings. The application is named EMB2EMB.
Setup and Model Families
- Families: GPT2 (small, medium, large, xl), Llama3 (1B, 3B, 8B, 11B-Vision, 70B), Gemma2 (2B, 9B, 27B). Models in a family share a tokenizer but differ in size and dimension. Llama3 also compares instruction-tuned models.
- Tying and forward pass: Most models are tied, sharing E between embedding and unembedding. Llama3's 8B, 11B-V, 70B are untied, learning E and U separately. Hidden states update as h_{i+1} = h_i + F_i(h_i); logits are the inner product of the final hidden state and the unembedding.
Global Orientation
- Distance matrix: Each model samples the same N=20,000 tokens, forming an N×N matrix whose entries are cosine similarities of token embeddings. Then compute the Pearson correlation between entries of the two matrices. The authors use high correlation to indicate similar relative orientations between tokens.
- Llama3: Both embedding and unembedding are computed. In the figure, "-I" denotes instruction-tuned, asterisks denote untied.
LLE Local Structure
- Reconstruction: Each token embedding e_i is written as a linear combination of its k nearest neighbors. Weights outside the neighbors are 0, rows sum to 1, making weights invariant to rotation, scaling, and translation.
- Closed form: Appendix A gives W̃i = Ci−1 1 / (1T Ci−1 1), where C_i is the local covariance. The appendix adds εI to make the matrix invertible; the paper does not give ε.
- Comparison: For the same token in two models, compare the cosine similarity of weight rows. Figure 2's Llama3 unembedding uses k=10. Tokens with cosine 0, the authors suggest, may be undertrained tokens present in the tokenizer but not in training data, with vectors near initialization and easily orthogonal in high dimensions.
Intrinsic Dimension and Semantic Coherence
- Definition: Take the token's k neighbors, perform PCA, and treat the number of principal components needed to explain 95% variance as the intrinsic dimension. The authors state that absolute values change with k and variance threshold, but the trend of lower intrinsic dimension corresponding to more coherent clusters is similar.
- SCS: ConceptNet is described by the authors as having 34 million nodes and edges and 34 relations. For 500 random tokens, take k=50 neighbors in embedding space, use shortest paths truncated at L=5 to define the semantic coherence score between 0 and 1, then compute Spearman correlation with intrinsic dimension. The k in the table is the number of neighbors for computing intrinsic dimension, not the k for SCS.
EMB2EMB
- Mapping: Sample N=100,000 token unembeddings from source and target models, fit a linear transformation A by least squares to map U_S to U_T. A can connect different dimensions.
- Intervention: The authors state that when unembedding orientations are similar on both sides, the source steering vector can be transferred to the target model: hi+1T = hiT + FiT(hiT) + αAvS.
- Intuition: The next token is determined by the inner product of the final hidden state and the unembedding; adding the corresponding direction to the hidden state increases that token's probability; residual connections mean additions at earlier layers can still affect the final layer. The authors mention this alongside the reason LogitLens works. After projecting the steering vector onto the unembedding, neighbors are often related to the represented concept.
What experiments did the paper conduct?
Same-family distance matrices have relatively high Pearson values, while untied embeddings and Gemma2-27B are lower.
Experimental Setup
- Models: GPT2-Small, Medium, Large, XL; Llama3-1B, 3B, 8B, 11B-Vision, 70B and the instruction-tuned versions in Figure 1; Gemma2-2B, 9B, 27B. Also GPT-NeoX-20B and Olmo-7B.
- Global geometry: Cosine similarity matrices of 20,000 identical tokens per model, with the metric being Pearson correlation between entries. Llama3 is separated into embedding and unembedding.
- Local geometry: LLE in Figure 2 uses k=10, with the metric being cosine of weight rows. Intrinsic dimension is PCA on neighbors, 95% variance. Cross-model intrinsic dimension correlation uses 500 tokens (Figure 3).
- Semantic coherence: SCS on ConceptNet uses 500 tokens, k=50 neighbors, path truncation L=5. Spearman and p-values are in Table 2 and Table 4. The baseline in Table 1 is 1,000 random Gaussian vectors.
- Steering: Llama3 behaviors are Coordination with Other AIs, Corrigibility, Hallucination, Myopic Reward, Survival Instinct, Sycophancy, Refusal; vectors come from Rimsky et al. (2023), questions from Perez et al. (2022) and Rimsky et al. (2023), option order shuffled, metric is the probability of the option exhibiting the target behavior. GPT2 uses 1,199 prompts from RealToxicityPrompts and toxicity from the Perspective API; scaling factors are 20 for Small, Medium, Large, and 4 for XL.
- Not specified: The paper does not report the number of Llama3 behavior questions, number of steering repetitions, layer selection criteria, or the attributes and thresholds of the Perspective API.
Main Results
According to Figure 1, the Pearson correlations of same-family cosine similarity matrices are as follows. The table lists only 8 pairs, including the lowest embedding correlation in the figure.
Model pair Space Pearson GPT2-S vs. XL embedding 0.69 GPT2-L vs. XL embedding 0.89 Llama3-1B vs. 3B embedding 0.94 Llama3-8B* vs. 3B-I embedding -0.03 Llama3-8B* vs. 1B unembedding 0.87 Llama3-70B* vs. 1B unembedding 0.75 Gemma2-2B vs. 9B embedding 0.70 Gemma2-9B vs. 27B embedding 0.36 - Author interpretation: The authors state that most models in a family have similar relative orientations despite different dimensions. Correlations between base and instruction-tuned models are close to 1: 0.98 for 1B vs. 1B-I, 0.99 for 3B vs. 3B-I, and 1.00 for 8B*, 11B-V*, 70B* vs. their instruction-tuned versions (Figure 1). The authors believe global geometry changes little.
- Untied: The embedding correlations for 8B, 11B-V, 70B are low, while unembedding correlations are higher. For example, embedding for 11B-V* vs. 1B is 0.09, and for 70B* vs. 1B is 0.20. The authors suggest that tokens in untied models may start differently but converge in final hidden states after layers; embedding similarity in tied models may simply result from weight tying. The authors suggest that logits convergence could be neural collapse (Papyan et al., 2020; Wu & Papyan, 2024), or the implicit geometry of next-token prediction discussed by Zhao et al. (2024).
- Cross-data: GPT-NeoX-20B and Olmo-7B share a tokenizer and were trained on The Pile and Dolma respectively, with Pearson 0.32. The authors state this score is lower than within-family scores and speculate that training data plays a large role in global similarity.
Local Geometry and Semantic Clusters
- LLE: The authors state that local weights for most tokens are similar across models; the density in Figure 2 is concentrated at high cosine similarity. The x-axis is Cosine Similarity, the y-axis is Percentage (%), and the main text does not give bar heights. Appendix B gives similar figures for GPT2, Llama3 embedding, and Gemma2.
- Intrinsic dimension: In Figure 3, GPT2-S vs. M is 0.93, L vs. XL is 0.96; for Llama3 embedding, 1B vs. 3B is 0.95, 1B vs. 8B is 0.64; for unembedding, 1B vs. 8B is 0.43, 1B vs. 70B is 0.49. Gemma2-2B vs. 27B is -0.09, 9B vs. 27B is -0.03. The authors state that token intrinsic dimensions are similar for GPT2 and Llama3, while Gemma2's local similarity is also low, and leave further investigation for later due to unclear training details.
- Semantic coherence: Table 1 gives examples on GPT2-medium where lower ID neighbors look more like the same semantic class and higher ID neighbors look more like morphological fragments. Baseline E is 605±7.3, Baseline G is 611±0. Table 2: GPT2-Medium (k=100) Spearman -0.67 (p=1e-66), Llama3-3B -0.45 (p=7e-27), Gemma2-2B 0.22 (p=2e-7). The authors state that on GPT2 and Llama3, lower ID corresponds to higher semantic coherence; for Gemma2, the authors state no correlation was observed and speculate it relates to special symbols, emojis, and non-English tokens in the 256k vocabulary (Llama3 128k, GPT2 50k). Figure 9 and 10 captions give p as 1.9e-66 and 7.3e-27; Figure 11 caption gives Spearman 0.23, p=2.8e-07, not exactly matching Table 2's 0.22, 2e-7.
Steering Transfer
- Llama3: Figure 4 intervenes on Llama3-8B using vectors from 1B and 3B. Dashed lines are the target model's own vectors, solid lines are transferred vectors; x-axis ticks are -2 to 2, y-axis is p(Behavior). The legend gives source and target layers, e.g., for Hallucination 8b_13→8b_13, 1b_13→8b_10, 3b_12→8b_13. The authors state that in most cases the trends are similar to the original vectors. The main text does not give curve endpoints. Figure 12 intervenes on Llama-3B using vectors from 1B and 8B.
- GPT2: In Figure 5, red bars are no intervention, green bars are source and target identical, blue bars are cross-model transfer. The y-axis is labeled Toxicity, with visible ticks 0.0, 0.2, 0.4; the main text does not give bar heights. The authors state that in most cases, results for same-source vectors and transferred vectors are similar.
- Neighbors: Table 3 projects vectors onto the unembedding. Myopic neighbors in 3B layer 14 include straightforward, simple; with negation, layer 26 includes wait, delay. After transferring 8B to 3B, straightforward, simpler or Wait, waiting also appear. Toxicity neighbors are listed in the table and not repeated here. The authors state that transferred vectors can encode information similar to the original vectors.
Other Ablations and Analyses
- Table 4: When the number of neighbors for computing ID increases from 100 to 1000, GPT2-Medium's Spearman goes from -0.67 to -0.56; Llama3-3B is -0.46 at k=300 and -0.18 at k=1000 (p=4e-5); Gemma2-2B goes from 0.22 (p=2e-7) to 0.02 at k=1000 (p=0.6).
- Appendix C: Comparison with the undertrained list of Land & Bartolo (2024). For Llama3-8B, theirs has 2,225, this paper's candidates 13,967, overlap 924, recall 0.415, precision 0.066. For GPT2-Medium, theirs has 967, this paper's 3,581, overlap 106, recall 0.11, precision 0.029. Gemma2 has no list from the other work.
- The paper does not give per-behavior numerical differences for steering, nor does it name which curves differ from the original vectors; the authors' summary for Figure 4 and Figure 5 is "in most cases."
What are some points that can be further explored?
The paper does not list limitations separately; the Discussion lists the relationship between embedding geometry and hidden states as a future direction.
Limitations and Future Directions Noted by the Authors
- No dedicated section: The paper has no Limitations section, nor does it frame any result as a limitation or shortcoming.
- Possible uses: In Section 7, Discussion, the authors suggest the results may relate to transfer learning, distillation, or model efficiency, and envision first training a smaller model, then reusing its token embeddings to initialize pretraining of a larger model.
- Future directions: The same section calls the relationship between embedding geometry and hidden states an exciting future direction.
Experimental Coverage
- Same-family geometry: Global correlation covers four GPT2 sizes, five Llama3 sizes and their instruction-tuned versions, and three Gemma2 sizes, with 20,000 tokens per model (Section 4, Figure 1). Intrinsic dimension correlation uses 500 tokens; Figure 3 does not include instruction-tuned models.
- Cross-data comparison: The numerical comparison with the same tokenizer but different training data is GPT-NeoX-20B vs. Olmo-7B, Pearson 0.32 (Section 4.1). The paper does not report training configurations within each family.
- Local characterization: The main LLE figure is Llama3 unembedding, k=10 (Figure 2); Appendix B includes GPT2, Llama3 embedding, and Gemma2. The intrinsic dimension threshold is stated as 95% variance.
- Semantic correlation: The models specified for Spearman are GPT2-Medium, Llama3-3B, Gemma2-2B; SCS uses ConceptNet, 500 tokens, k=50 neighbors, truncation L=5. Table 4 varies the number of neighbors used to compute ID.
- Steering: Transfer appears among Llama3-1B, 3B, 8B (Figure 4, Figure 12) and among the four GPT2 sizes (Figure 5); the linear mapping uses 100,000 unembeddings. The paper does not report the number of behavior questions, number of repetitions, layer selection criteria, or specific readings for Figure 4 and Figure 5.
Summarize the main content of the paper
Same-family embeddings share geometry, and EMB2EMB linearly transfers steering vectors to models of different dimensions.
Token embeddings of same-family LLMs are often aligned in relative orientation and local structure, and the authors accordingly transfer steering vectors using linear mappings.
- Question: Characterize whether the global and local geometry of token embeddings is similar across LLMs with the same tokenizer but different sizes, and whether it can be used to transfer steering vectors.
- Method: Compare global orientation using cosine matrices of 20,000 tokens; describe local structure using LLE and the number of principal components explaining 95% variance. EMB2EMB fits a linear mapping by least squares on 100,000 unembeddings, then adds the steering vector to the target model's residual stream.
- Global: In Figure 1, GPT2-S vs. XL is 0.69, L vs. XL is 0.89; Llama3-1B vs. 3B embedding is 0.94. 8B* vs. 3B-I embedding is -0.03, 8B* vs. 1B unembedding is 0.87. Gemma2-9B vs. 27B is 0.36. GPT-NeoX-20B vs. Olmo-7B is 0.32.
- Local: The authors report that neighbors of tokens with low intrinsic dimension are more coherent. In Table 2, GPT2-Medium (k=100) Spearman is -0.67, Llama3-3B is -0.45, Gemma2-2B is 0.22. In Figure 3, ID correlation for Gemma2-2B vs. 27B is -0.09.
- Transfer: The authors state that behavior vectors from Llama3-1B and 3B transferred to 8B, and toxicity vectors among GPT2 sizes, are in most cases similar in trend to the original vectors; the main text does not give readings for Figure 4 and Figure 5. In Table 3, transferred Myopic neighbors remain related to that behavior.
- Author conclusion: The authors believe embeddings share global and local structure, and steering vectors can be linearly reused across dimensions; they also suggest this may relate to transfer learning, distillation, or pretraining initialization, with the geometric relationship between embeddings and hidden states remaining a future direction.