{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/tokenization-falling-short-the-curse-of","title":"Tokenization Falling Short: On Subword Robustness in Large Language Models","arxiv_id":"2406.11687","date":"2024-06-17","proceeding":null,"authors":["Yekun Chai","Yewei Fang","Qiwei Peng","Xuhong LI"],"abstract":"Language models typically tokenize raw text into sequences of subword identifiers from a predefined vocabulary, a process inherently sensitive to typographical errors, length variations, and largely oblivious to the internal structure of tokens--issues we term the curse of tokenization. In this study, we delve into these drawbacks and demonstrate that large language models (LLMs) remain susceptible to these problems. This study systematically investigates these challenges and their impact on LLMs through three critical research questions: (1) complex problem solving, (2) token structure probing, and (3) resilience to typographical variation. Our findings reveal that scaling model parameters can mitigate the issue of tokenization; however, LLMs still suffer from biases induced by typos and other text format variations. Our experiments show that subword regularization such as BPE-dropout can mitigate this issue. We release our evaluation code and data at https://github.com/FloatAI/TKEval.","url_abs":"https://arxiv.org/abs/2406.11687v3","url_pdf":"https://arxiv.org/pdf/2406.11687v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"tokenization-falling-short-the-curse-of","repo_url":"https://github.com/floatai/tkeval","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.11687","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.11687"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/floatai/tkeval","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":6,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":8,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"1d233f39e0fd58dd","entry":"argmax","repo":"floatai/tkeval","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1d233f39e0fd58dd"}},{"code_sha256_prefix":"3d2dcc489e259a67","entry":"get_prompt","repo":"floatai/tkeval","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3d2dcc489e259a67"}},{"code_sha256_prefix":"20a7cc804eb22661","entry":"hash_args","repo":"floatai/tkeval","repo_kind":"official","path":"evaluation/lm-evaluation-harness/lm_eval/api/model.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/evaluation/lm-evaluation-harness/lm_eval/api/model.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"20a7cc804eb22661"}},{"code_sha256_prefix":"400ea4f64ccce5ef","entry":"parse_eval_args","repo":"floatai/tkeval","repo_kind":"official","path":"evaluation/lm-evaluation-harness/lm_eval/__main__.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/evaluation/lm-evaluation-harness/lm_eval/__main__.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"400ea4f64ccce5ef"}},{"code_sha256_prefix":"29ee1d8c120f674a","entry":"remove_after_return","repo":"floatai/tkeval","repo_kind":"official","path":"evaluation/bigcode-evaluation-harness/bigcode_eval/utils.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/evaluation/bigcode-evaluation-harness/bigcode_eval/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29ee1d8c120f674a"}},{"code_sha256_prefix":"794f4a8bb713bf26","entry":"sample_gpt_task","repo":"floatai/tkeval","repo_kind":"official","path":"evaluation/bigcode-evaluation-harness/finetuning/APPS/apps_dataset.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/evaluation/bigcode-evaluation-harness/finetuning/APPS/apps_dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"794f4a8bb713bf26"}},{"code_sha256_prefix":"0de883f1fa31ab88","entry":"update_code_gens","repo":"floatai/tkeval","repo_kind":"official","path":"evaluation/bigcode-evaluation-harness/bigcode_eval/utils.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/evaluation/bigcode-evaluation-harness/bigcode_eval/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0de883f1fa31ab88"}},{"code_sha256_prefix":"f48fdeea774497b1","entry":"word_scorer","repo":"floatai/tkeval","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f48fdeea774497b1"}},{"code_sha256_prefix":"5274bc5bf6e54c72","entry":"complete_code","repo":"floatai/tkeval","repo_kind":"official","path":"evaluation/bigcode-evaluation-harness/bigcode_eval/utils.py","file_url":"https://github.com/floatai/tkeval/blob/HEAD/evaluation/bigcode-evaluation-harness/bigcode_eval/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5274bc5bf6e54c72"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}