ChatPaper.aiChatPaper

La cancellazione dei token come impronta degli elementi del vocabolario implicito nei modelli linguistici di grandi dimensioni

Token Erasure as a Footprint of Implicit Vocabulary Items in LLMs

June 28, 2024
Autori: Sheridan Feucht, David Atkinson, Byron Wallace, David Bau
cs.AI

Abstract

I LLM elaborano il testo come sequenze di token che corrispondono approssimativamente a parole, dove le parole meno comuni sono rappresentate da più token. Tuttavia, i singoli token spesso non sono semanticamente correlati ai significati delle parole o dei concetti che compongono. Ad esempio, il tokenizer di Llama-2-7b suddivide la parola "northeastern" nei token ['_n', 'ort', 'he', 'astern'], nessuno dei quali corrisponde a unità semanticamente significative come "north" o "east". Allo stesso modo, i significati complessivi di entità denominate come "Neil Young" e di espressioni composte da più parole come "break a leg" non possono essere dedotti direttamente dai loro token costituenti. Meccanicamente, come fanno i LLM a convertire tali gruppi arbitrari di token in rappresentazioni di livello superiore utili? In questo lavoro, scopriamo che le rappresentazioni dell'ultimo token per entità denominate e parole composte da più token mostrano un marcato effetto di "cancellazione", in cui le informazioni sui token precedenti e correnti vengono rapidamente dimenticate nei primi strati. Utilizzando questa osservazione, proponiamo un metodo per "leggere" il vocabolario implicito di un LLM autoregressivo esaminando le differenze nelle rappresentazioni dei token tra gli strati, e presentiamo i risultati di questo metodo per Llama-2-7b e Llama-3-8B. A nostra conoscenza, questo è il primo tentativo di sondare il vocabolario implicito di un LLM.
English
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.
PDF64November 28, 2024