2024/06/28 by Sheridan Feucht, Feucht, Sheridan, David Atkinson +5 · 2 voices · 7 citations
Computer Science · Social Sciences · #Artificial Intelligence in Law #Computation and Language (cs.CL) #FOS: Computer and information sciences #I.2.7 #Library Science and Information Systems #Machine Learning (cs.LG) #Natural Language Processing Techniques #cs.CL #cs.LG
paper · pdf · doi:10.48550/arxiv.2406.20086
openalex publication_date 2024/06/28 · arxiv published 2024/06/28 · arxiv updated 2024/10/11 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28
LLMs process text as sequences of tokens that roughly correspond to words, where less common words are represented by multiple tokens. However, individual tokens are often semantically unrelated to the meanings of the words/concepts they comprise. For example, Llama-2-7b's tokenizer splits the word "northeastern" into the tokens ['n', 'ort', 'he', 'astern'], none of which correspond to semantically meaningful units like "north" or "east." Similarly, the overall meanings of named entities like "Neil Young" and multi-word expressions like "break a leg" cannot be directly inferred from their constituent tokens. Mechanistically, how do LLMs convert such arbitrary groups of tokens into useful higher-level representations? In this work, we find that last token representations of named entities and multi-token words exhibit a pronounced "erasure" effect, where information about previous and current tokens is rapidly forgotten in early layers. Using this observation, we propose a method to "read out" the implicit vocabulary of an autoregressive LLM by examining differences in token representations across layers, and present results of this method for Llama-2-7b and Llama-3-8B. To our knowledge, this is the first attempt to probe the implicit vocabulary of an LLM.