Table of Contents
Fetching ...

Frame Representation Hypothesis: Multi-Token LLM Interpretability and Concept-Guided Text Generation

Pedro H. V. Valois, Lincon S. Souza, Erica K. Shimomoto, Kazuhiro Fukui

TL;DR

The Frame Representation Hypothesis (FRH) extends the Linear Representation Hypothesis (LRH) from single tokens to multi-token words by representing words as ordered frames and concepts as frames in a shared geometric space. Concept Frames are computed as Fréchet means of Word Frames on the Stiefel manifold, and Combined Concept Frames capture interactions via Procrustes-based constructions; Top-$k$ Concept-Guided Decoding enables concept-aligned text generation by selecting next tokens that maximize correlation with a target Concept Frame. Empirical results across Llama 3.1, Gemma 2, and Phi 3 with Open Multilingual WordNet data show that most words are full-rank frames, reveal biases in generated content, and demonstrate that concept-guided decoding can steer outputs and expose vulnerabilities. The work provides a structured, mathematically grounded framework for LLM interpretability and control, with potential for safer, more transparent language models and avenues for future extensions like higher-order concepts and dictionary-learning integration.

Abstract

Interpretability is a key challenge in fostering trust for Large Language Models (LLMs), which stems from the complexity of extracting reasoning from model's parameters. We present the Frame Representation Hypothesis, a theoretically robust framework grounded in the Linear Representation Hypothesis (LRH) to interpret and control LLMs by modeling multi-token words. Prior research explored LRH to connect LLM representations with linguistic concepts, but was limited to single token analysis. As most words are composed of several tokens, we extend LRH to multi-token words, thereby enabling usage on any textual data with thousands of concepts. To this end, we propose words can be interpreted as frames, ordered sequences of vectors that better capture token-word relationships. Then, concepts can be represented as the average of word frames sharing a common concept. We showcase these tools through Top-k Concept-Guided Decoding, which can intuitively steer text generation using concepts of choice. We verify said ideas on Llama 3.1, Gemma 2, and Phi 3 families, demonstrating gender and language biases, exposing harmful content, but also potential to remediate them, leading to safer and more transparent LLMs. Code is available at https://github.com/phvv-me/frame-representation-hypothesis.git

Frame Representation Hypothesis: Multi-Token LLM Interpretability and Concept-Guided Text Generation

TL;DR

The Frame Representation Hypothesis (FRH) extends the Linear Representation Hypothesis (LRH) from single tokens to multi-token words by representing words as ordered frames and concepts as frames in a shared geometric space. Concept Frames are computed as Fréchet means of Word Frames on the Stiefel manifold, and Combined Concept Frames capture interactions via Procrustes-based constructions; Top- Concept-Guided Decoding enables concept-aligned text generation by selecting next tokens that maximize correlation with a target Concept Frame. Empirical results across Llama 3.1, Gemma 2, and Phi 3 with Open Multilingual WordNet data show that most words are full-rank frames, reveal biases in generated content, and demonstrate that concept-guided decoding can steer outputs and expose vulnerabilities. The work provides a structured, mathematically grounded framework for LLM interpretability and control, with potential for safer, more transparent language models and avenues for future extensions like higher-order concepts and dictionary-learning integration.

Abstract

Interpretability is a key challenge in fostering trust for Large Language Models (LLMs), which stems from the complexity of extracting reasoning from model's parameters. We present the Frame Representation Hypothesis, a theoretically robust framework grounded in the Linear Representation Hypothesis (LRH) to interpret and control LLMs by modeling multi-token words. Prior research explored LRH to connect LLM representations with linguistic concepts, but was limited to single token analysis. As most words are composed of several tokens, we extend LRH to multi-token words, thereby enabling usage on any textual data with thousands of concepts. To this end, we propose words can be interpreted as frames, ordered sequences of vectors that better capture token-word relationships. Then, concepts can be represented as the average of word frames sharing a common concept. We showcase these tools through Top-k Concept-Guided Decoding, which can intuitively steer text generation using concepts of choice. We verify said ideas on Llama 3.1, Gemma 2, and Phi 3 families, demonstrating gender and language biases, exposing harmful content, but also potential to remediate them, leading to safer and more transparent LLMs. Code is available at https://github.com/phvv-me/frame-representation-hypothesis.git

Paper Structure

This paper contains 37 sections, 3 theorems, 29 equations, 12 figures, 1 table.

Key Result

Lemma A.1

Let $\{{{\mathtt{y}}_{j}}\}_{j=1}^{\mathrm{n}}$ be a set of tokens sharing a common concept $\mathbf{s}_{\mathnormal{}}$, we can estimate the concept as with error of order $\mathcal{O}(\frac{1}{\sqrt{\mathrm{n}}})$.

Figures (12)

  • Figure 1: Frame Representation Hypothesis Overview: Tokens are vectors, which combine into words as multi-dimensional frames. In turn, Concept Frames are centroids of word sets.
  • Figure 2: Top-$k$ Concept-Guided Decoding Overview: Top-$k$ sentence candidates are derived from the model logits, and we chose the one which maximizes the correlation with the target Concept Frames. The process is repeated in a loop until the desired number of tokens is reached.
  • Figure 3: Uniform Manifold Approximation and Projection (UMAP)]McInnes2018UMAPUM of the 10k most frequent single-token English words for Gemma 2. While some points are clearly separated, others overlap due to the Superposition Hypothesis (SH). For example, $\textsf{ad}$ is a token in the unrelated words advertisement, admit, adventure, etc., while restaurant is a single token and it is not found in other words.
  • Figure 4: Histogram of lemma token count among all OMW lemmas. The dashed vertical bar indicates the 75% percentile for each model family.
  • Figure 5: Relative Rank as a function of token count for all OMW lemmas and model families. Over 99% of words are full-rank. Phi 3 has lower overall rank for longer lemmas than other models.
  • ...and 7 more figures

Theorems & Definitions (6)

  • Lemma A.1: Concept estimation
  • proof
  • Proposition A.1: 1st-order Concepts
  • proof
  • Proposition A.2
  • proof