Table of Contents
Fetching ...

Demystifying Embedding Spaces using Large Language Models

Guy Tennenholtz, Yinlam Chow, Chih-Wei Hsu, Jihwan Jeong, Lior Shani, Azamat Tulepbergenov, Deepak Ramachandran, Martin Mladenov, Craig Boutilier

TL;DR

The paper tackles the interpretability of domain embeddings by introducing Embedding Language Model (ELM), which injects continuous domain vectors into a pretrained LLM using an adapter to enable narrative descriptions and queries about embeddings. The approach formalizes a domain-embedding space $(\mathcal{W}, d)$ and trains an adapter $E_A$ to map embeddings into the LLM's token space, yielding an interpretable model ${\mathcal{M}}_{\text{ELM}} = ((E_0 \times E_A)^H, M_0)$ trained via a two-stage procedure. The authors validate ELM on MovieLens 25M data with semantic and behavioral embeddings across 24 movie tasks plus user-profile generation, using semantic consistency (SC) and behavioral consistency (BC) metrics along with human judgments. They show that ELM generalizes to unseen embeddings, performs better on interpolations than text-only LLMs, and supports extrapolations like CAV-driven attribute directions, thereby bridging dense embeddings with natural-language interpretability. The work presents a practical framework for querying and describing complex embedding spaces, with potential applicability to diverse domains beyond recommendation systems.

Abstract

Embeddings have become a pivotal means to represent complex, multi-faceted information about entities, concepts, and relationships in a condensed and useful format. Nevertheless, they often preclude direct interpretation. While downstream tasks make use of these compressed representations, meaningful interpretation usually requires visualization using dimensionality reduction or specialized machine learning interpretability methods. This paper addresses the challenge of making such embeddings more interpretable and broadly useful, by employing Large Language Models (LLMs) to directly interact with embeddings -- transforming abstract vectors into understandable narratives. By injecting embeddings into LLMs, we enable querying and exploration of complex embedding data. We demonstrate our approach on a variety of diverse tasks, including: enhancing concept activation vectors (CAVs), communicating novel embedded entities, and decoding user preferences in recommender systems. Our work couples the immense information potential of embeddings with the interpretative power of LLMs.

Demystifying Embedding Spaces using Large Language Models

TL;DR

The paper tackles the interpretability of domain embeddings by introducing Embedding Language Model (ELM), which injects continuous domain vectors into a pretrained LLM using an adapter to enable narrative descriptions and queries about embeddings. The approach formalizes a domain-embedding space and trains an adapter to map embeddings into the LLM's token space, yielding an interpretable model trained via a two-stage procedure. The authors validate ELM on MovieLens 25M data with semantic and behavioral embeddings across 24 movie tasks plus user-profile generation, using semantic consistency (SC) and behavioral consistency (BC) metrics along with human judgments. They show that ELM generalizes to unseen embeddings, performs better on interpolations than text-only LLMs, and supports extrapolations like CAV-driven attribute directions, thereby bridging dense embeddings with natural-language interpretability. The work presents a practical framework for querying and describing complex embedding spaces, with potential applicability to diverse domains beyond recommendation systems.

Abstract

Embeddings have become a pivotal means to represent complex, multi-faceted information about entities, concepts, and relationships in a condensed and useful format. Nevertheless, they often preclude direct interpretation. While downstream tasks make use of these compressed representations, meaningful interpretation usually requires visualization using dimensionality reduction or specialized machine learning interpretability methods. This paper addresses the challenge of making such embeddings more interpretable and broadly useful, by employing Large Language Models (LLMs) to directly interact with embeddings -- transforming abstract vectors into understandable narratives. By injecting embeddings into LLMs, we enable querying and exploration of complex embedding data. We demonstrate our approach on a variety of diverse tasks, including: enhancing concept activation vectors (CAVs), communicating novel embedded entities, and decoding user preferences in recommender systems. Our work couples the immense information potential of embeddings with the interpretative power of LLMs.
Paper Structure (22 sections, 9 equations, 8 figures, 7 tables)

This paper contains 22 sections, 9 equations, 8 figures, 7 tables.

Figures (8)

  • Figure 1: Decoded outputs of our model, ELM, for hypothetical movie embeddings. Text in blue and red correspond to the textual and domain embedding portions of the prompt to ELM. Text in black corresponds to the output of ELM.
  • Figure 2: We train ELM using $n$ tasks that incorporate embeddings as tokens in language. Specifically, to incorporate the domain embedding space ${\mathcal{W}}$, we enhance the pretrained LLM ${\mathcal{M}}$ with an adapter model $E_A: {\mathcal{W}} \mapsto {\mathcal{Z}}$ to create a new language model ${\mathcal{M}}_{\text{ELM}}$, ensuring tokens and embeddings are mapped to a shared space. While $E_0$ projects language tokens to ${\mathcal{Z}}$, the adapter $E_A$ learns to project domain embedding vectors $E_D$ from embedding space ${\mathcal{W}}$ to the same space, ${\mathcal{Z}}$. The resulting sequence is input to a pretrained language model $M_0$, which can be further fine-tuned (see \ref{['section: embd LLM']}).
  • Figure 3: Results show consistency results for movie and user interpolations using ELM, compared to one-shot decoded results of text only LLM. We show semantic consistency (cosine) scores for movies and behavioral consistency (NDCG) scores for user profiles.
  • Figure 4: Plot depicts SC scores (using cosine similarity) for interpolations of movies with the movie "Forrest Gump", as well as extrapolation of CAV attributes in semantic space.
  • Figure 5: Plot depicts BC scores (using NDCG with the predicted CF model ratings) for user profile decoded outputs, where user embeddings are extrapolated in different CAV directions. Dotted lines show two baselines (for $\alpha = 0$): the random baseline, which rates movies randomly, and the ground-truth baseline, which uses the ground-truth user profile data to compute BC (i.e., BC of the ground-truth training data).
  • ...and 3 more figures