[论文解读] Say Anything but This: When Tokenizer Betrays Reasoning in LLMs
论文展示了分词不唯一性可能导致幻觉式编辑,其中大模型改变了令牌id但解码文本保持不变,从而揭示开源模型中的分词器引发的推理脆弱性。
Large language models (LLMs) reason over discrete token ID sequences, yet modern subword tokenizers routinely produce non-unique encodings: multiple token ID sequences can detokenize to identical surface strings. This representational mismatch creates an unmeasured fragility wherein reasoning processes can fail. LLMs may treat two internal representations as distinct "words" even when they are semantically identical at the text level. In this work, we show that tokenization can betray LLM reasoning through one-to-many token ID mappings. We introduce a tokenization-consistency probe that requires models to replace designated target words in context while leaving all other content unchanged. The task is intentionally simple at the surface level, enabling us to attribute failures to tokenizer-detokenizer artifacts rather than to knowledge gaps or parameter limitations. Through analysis of over 11000 replacement trials across state-of-the-art open-source LLMs, we find a non-trivial rate of outputs exhibit phantom edits: cases where models operate under the illusion of correct reasoning, a phenomenon arising from tokenizer-induced representational defects. We further analyze these cases and provide a taxonomy of eight systematic tokenizer artifacts, including whitespace-boundary shifts and intra-word resegmentation. These findings indicate that part of apparent reasoning deficiency originates in the tokenizer layer, motivating tokenizer-level remedies before incurring the cost of training ever-larger models on ever-larger corpora.
研究动机与目标
- 激发并诊断子词分词工件如何削弱LLM推理能力。
- 引入一个分词一致性探针,以将分词器引起的失败与真正的知识缺口区分开。
- 量化跨多个开源LLM的分词器引起的幻觉式编辑的普遍性。
- 提供导致非唯一表示的分词器工件分类,并评估缓解策略。
提出的方法
- 定义一个分词一致性任务,在保持其他文本固定的情况下替换目标词。
- 在XSUM新闻文章中抽取5%的非停用词,并用括号标记为替换目标。
- 在多种大小版本的十个开源LLM上评估其在不改变表层文本的前提下执行替换的能力。
- 将结果归类为未改变、已替换、或不同,基于输入/输出令牌ID及去标记后的文本。
- 分析Different类别以识别八种分词器工件类型。
- 应用令牌ID屏蔽干预,以评估移除有问题的令牌序列的影响。
实验结果
研究问题
- RQ1LLMs是否将对同一单词解标后呈现的不同令牌ID序列视为实际编辑或语义变化?
- RQ2哪些分词器引发的工件在当前开源LLMs中造成幻觉式编辑?
- RQ3是否通过屏蔽有害令牌ID来缓解分词器引发的推理失败,而不重新训练分词器?
- RQ4模型规模如何影响真正替换与分词器引发的失败之间的平衡?
- RQ5在推理任务中有哪些切实可行的面向分词器的缓解或 remedy 路径?
主要发现
- 在11k次试验和10个模型中,存在相当比例的幻觉式编辑,即令牌ID改变但表面文本保持不变。
- 分词器工件包括空白边界移动、空白字符分离/重新连接、换行符替换、内词重新分段、专有名词分段、词根/词素分段、缩略词,以及复数/所有格尾部令牌等。
- 模型规模并不能完全修复分词器引起的失败;更大的模型仍然会显示Different类别,原因是存在非唯一的令牌表示。
- 对输出令牌ID进行屏蔽可显著将Different类别降至大约0-5%,在各模型中表明问题在很大程度上由分词器驱动。
- 事后缓解显示模型具备潜在的推理能力,但被分词器工件掩盖,提示需要分词器感知的缓解措施。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。