Research map / Large language models / Language, safety and interpretability
TokDrift: When LLM Speaks in Subwords but Code Speaks in Grammar
Yinxi Li, Yuntian Deng, Pengyu Nie
University of Waterloo
Read the paperPlace an idea next to itCheck your own paper ↗
8measured effects
1improved
1no clear effect
5hurt
1mixed
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| apply a single semantic-preserving rewrite rule (naming or spacing) that changes tokenization | nine code LLMs · HumanEvalPack and Avatar/CodeNet tasks | accuracy: -2.90 to +0.32 points (avg over models) | Hurt |
| apply tokenization-changing rewrites | nine code LLMs · code benchmarks | sensitivity (%): 9.26 naming, 8.29 spacing | Hurt |
| apply the wildcard spacing rules (op-name, op-all) | nine code LLMs · code benchmarks | sensitivity (%): over 10 | Hurt |
| use larger model (large vs small/medium) in each series (ablation) | Llama-3, Qwen2.5-Coder, DeepSeek-Coder · code benchmarks | sensitivity | Mixed |
| scale model size on naming rewrites (ablation) | three model series · code benchmarks | sensitivity | No clear effect |
| samples with identifier fragment change vs unchanged (ablation) | large models · code benchmarks | sensitivity | Hurt |
| use Llama-3 instead of Qwen2.5-Coder or DeepSeek-Coder | code LLMs · code benchmarks | sensitivity | Hurt |
| convert camelCase and snake_case identifiers to each other | code LLMs · code benchmarks | sensitivity | Improved |
Open problems in controlled text generation
How can generation be controlled and checked reliably across languages, domains and model sizes without extra cost?
- Each study covers one domain, source or task, so transfer is unknown. · 13 papers state it
- Only a few languages are tested, mostly English or high-resource ones. · 12 papers state it
- Extra stages, calls or tokens make generation slower and costlier. · 10 papers state it
Closest papers by meaning
- TokAlign: Efficient Vocabulary Adaptation via Token Alignment (ACL 2025 · similarity 0.90)
- Tokenization Falling Short: On Subword Robustness in Large Language Models (EMNLP 2024 · similarity 0.89)
- Grammar-Based Code Representation: Is It a Worthy Pursuit for LLMs? (ACL 2025 · similarity 0.88)
- Getting the most out of your tokenizer for pre-training and domain adaptation (ICML 2024 · similarity 0.87)
- Emergent Representations of Program Semantics in Language Models Trained on Programs (ICML 2024 · similarity 0.87)
- zip2zip: Inference-Time Adaptive Tokenization via Online Compression (NeurIPS 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.