Spelling-out is not Straightforward: LLMs' Capability of Tokenization from Token to Characters
Preprint
Abstract
Large language models (LLMs) can spell out tokens character by character with high accuracy, yet they struggle with more complex character-level tasks, such as identifying compositional subcomponents within tokens. In this work, we investigate how LLMs internally represent and utilize character-level information during the spelling-out process. Our analysis reveals that, although spelling out is a simple task for humans, it is not handled in a straightforward manner by LLMs. Specifically, we show that the embedding layer does not fully encode character-level information, particularly beyond the first character. As a result, LLMs rely on intermediate and higher Transformer layers to reconstruct character-level knowledge, where we observe a distinct "breakthrough" in their spelling behavior. We validate this mechanism through three complementary analyses: probing classifiers, identification of knowledge neurons, and inspection of attention weights.Keywords
All Related Versions
This publication has 10 references indexed in Scilit:
- Word Form Matters: LLMs’ Semantic Reconstruction under Typoglycemia2025
- Enhancing Character-Level Understanding in LLMs through Token Internal Structure Learning2025
- CUTE: Measuring LLMs’ Understanding of Their Tokens2024
- Tokenization Falling Short: On Subword Robustness in Large Language Models2024
- Subword Segmentation in LLMs: Looking at Inflection and Consistency2024
- Neurons in Large Language Models: Dead, N-gram, Positional2024
- Probing Classifiers: Promises, Shortcomings, and AdvancesComputational Linguistics, 2022
- Attention is Not Only a Weight: Analyzing Transformers with Vector Norms2020
- Transformers: State-of-the-Art Natural Language Processing2020
- Attention is not Explanation2019