The Strawberry Problem: Emergence of Character-level Understanding in Tokenized Language Models

Adrian Cosma, Stefan Ruseti, Emilian Radoi, Mihai Dascalu

TL;DR

Why do state-of-the-art Large Language Models (LLMs) struggle to count the number of "r"s in "strawberry"? This paper shows that text tokenization blinds models to character-level details, forcing character understanding to emerge abruptly and late in training via a process mirroring "concept percolation." To fix this structural blind spot, the authors introduce a lightweight, cross-attention architectural modification that restores character awareness without sacrificing the efficiency of subword tokenization.

What Problem Does This Paper Address?

Despite mastering complex reasoning tasks, LLMs notoriously fail at simple character-level manipulations—a phenomenon epitomized by the "Strawberry Problem" (failing to count the letters in a word).

The root cause is tokenization. Modern language models compress raw text into multi-character subword tokens. This compression severs the explicit link between a word and its constituent characters. Furthermore, natural text exhibits a strong "reporting bias": humans rarely explicitly spell out words or discuss their internal character composition because it is self-evident to us. Consequently, the empirical mutual information between a text's context and its character composition is practically zero.

This paper investigates the dynamics of how tokenized models manage to learn character composition at all, framing it as a problem of concept emergence, and addresses how we can fix this perceptual bottleneck.

Figure 1: Tokenization obscures character composition of words. (a) We develop 19 token manipulation tasks spanning token↔token, token↔char, char↔token, and mixed settings, isolating character reasoning from se- mantics. (b) In a standard transformer decoder LM, character-level understanding emerges abruptly and late in training, having the emergence point pushed back as the tokenizer vocabulary size |V | increases; adding our character-aware module brings early emergence that is effectively independent of |V |.

Methods

The authors analyze character-level capability emergence using a standard Transformer decoder baseline across varying vocabulary sizes ($|V|$) and character lengths per token ($K$).

To solve the tokenization bottleneck, they propose a lightweight character-aware architecture:

  1. Character Encoding: A small, 1-layer Transformer block processes the constituent characters of each token. It uses a Block-Causal Self-Attention mask, allowing characters within the same token to see each other, but preventing them from looking ahead to future tokens.
  2. Information Fusion: The resulting character embeddings are injected into the main model using Block-Causal Cross-Attention at specific layers. This allows the model to explicitly attend to a token's characters while preserving the standard next-token prediction objective.
Figure 2: Diagram of our character-aware language model. During inference, each token attends to its corresponding characters using a block-causal cross-attention operation. Characters are encoded alongside their positions within their corresponding tokens using a small 1-block Transformer decoder, using a block-causal self-attention mechanism. MLPs are omitted in the figure for brevity.

Datasets

  • Synthetic Benchmark: The authors introduced a suite of 19 synthetic token- and character-manipulation tasks (7 word-level, 12 character-level). Tasks include operations like Remove letter, Reverse words, Swap every K letters, and Rewrite uppercase.
  • Real-World Data: To validate the synthetic findings, the authors evaluated models on sentences sourced from Wikipedia using two popular pretrained tokenizers: GPT-2 (vocabulary size of 50K) and LLaMA-2 (vocabulary size of 32K).

Key Insights and Ideas

  • Inverse Scaling with Vocabulary Size: The larger a tokenizer's vocabulary ($|V|$) or the more characters per token ($K$), the later character-level capabilities emerge during training. This is a worrying trend for modern LLMs, which are scaling up vocabularies (e.g., Gemma 3 uses a 256K vocabulary) to improve efficiency.
  • The Percolation Model of Character Learning: The sudden, delayed emergence of character understanding perfectly fits bipartite graph percolation theory. Learning character-token mappings behaves exactly like learning abstract concept-property associations. When training steps are scaled by the percolation threshold $\sqrt{|V| \cdot K}$, the emergence points across different vocabulary sizes collapse onto a single predictable curve.
  • Capacity Alone Doesn't Fix Perception: Simply scaling up the baseline model's width (adding parameters) slightly accelerates emergence but remains highly inefficient. The explicit character-aware module achieves the same performance as scaled-up vanilla models while using 15x fewer parameters.

Key Results

  • Vanilla Models Fail on Real Data: In standard Transformer decoders trained on Wikipedia sentences, character-level understanding flatlines near 0% accuracy throughout training.
  • Decoupling Emergence from Vocabulary: The proposed character-aware module completely eliminates the dependence of character learning on vocabulary size. Capabilities emerge early and steadily across all settings.
  • Highly Efficient Footprint: Downsizing the character encoder's dimensionality to just 12.5% of the main model's size ($d_{chars}/d_{toks} = 0.125$) yielded virtually identical performance gains, proving the intervention adds negligible computational overhead.

Limitations and Future Work

  • Scale Constraints: The majority of the experiments were conducted in an idealized, synthetic environment on relatively small models (10M to 150M parameters). Validating this architecture at the scale of billions of parameters remains future work.
  • Attention Complexity: The character module still relies on standard attention, which carries quadratic complexity relative to word length. Though word lengths are typically small, exploring local attention patterns or linear recurrent units (like LRUs or Mamba blocks) for the character encoder could optimize efficiency further.

Summary updated

Abstract

Despite their remarkable progress across diverse domains, Large Language Models (LLMs) consistently fail at simple character-level tasks, such as counting letters in words, due to a fundamental limitation: tokenization. In this work, we frame this limitation as a problem of low mutual information and analyze it in terms of concept emergence. Using a suite of 19 synthetic tasks that isolate character-level reasoning in a controlled setting, we show that such capabilities emerge suddenly and only late in training. We find that percolation-based models of concept emergence explain these patterns, suggesting that learning character composition is not fundamentally different from learning commonsense knowledge. To address this bottleneck, we propose a lightweight architectural modification that significantly improves character-level reasoning while preserving the inductive advantages of subword models. Together, our results bridge low-level perceptual gaps in tokenized LMs and provide a principled framework for understanding and mitigating their structural blind spots. We make our code publicly available.
BibTeX
@inproceedings{cosma2025strawberry,
  author = {Adrian Cosma and Stefan Ruseti and Emilian Radoi and Mihai Dascalu},
  title = {{The Strawberry Problem: Emergence of Character-level Understanding in Tokenized Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
}
Figure