[论文解读] Tokenization Matters! Degrading Large Language Models through Challenging Their Tokenization
本论文提出用于对抗语言模型分词的对抗数据集(ADT),展示分词错误可能在开放源代码和闭源模型中造成输出错误,并提出一个用于中文分词挑战的自动 ADT-Auto 框架。
Large Language Models (LLMs) have shown remarkable capabilities in language understanding and generation. Nonetheless, it was also witnessed that LLMs tend to produce inaccurate responses to specific queries. This deficiency can be traced to the tokenization step LLMs must undergo, which is an inevitable limitation inherent to all LLMs. In fact, incorrect tokenization is the critical point that hinders LLMs in understanding the input precisely, thus leading to unsatisfactory output. This defect is more obvious in Chinese scenarios. To demonstrate this flaw of LLMs, we construct an adversarial dataset, named as $ extbf{ADT (Adversarial Dataset for Tokenizer)}$, which draws upon the vocabularies of various open-source LLMs to challenge LLMs' tokenization. ADT consists of two subsets: the manually constructed ADT-Human and the automatically generated ADT-Auto. Our empirical results reveal that our ADT is highly effective on challenging the tokenization of leading LLMs, including GPT-4o, Llama-3, Deepseek-R1 and so on, thus degrading these LLMs' capabilities. Moreover, our method of automatic data generation has been proven efficient and robust, which can be applied to any open-source LLMs. In this paper, we substantially investigate LLMs' vulnerability in terms of challenging their token segmentation, which will shed light on the subsequent research of improving LLMs' capabilities through optimizing their tokenization process and algorithms.
研究动机与目标
- 调查分词缺陷是否会导致特定输入的 LLM 输出不令人满意。
- 构建 ADT(手动和自动)以挑战多个 LLM 的分词器。
- 评估分词错误与模型响应错误之间的相关性。
- 展示一个可扩展的用于分词对抗样例的自动数据生成框架。
- 强调对未来 LLM 系统改进分词的影响。
提出的方法
- 从多个 LLM(中英文)导出词汇表以构建 ADT 词汇表。
- 通过在选定令牌周围插入具有挑战性的片段来误导分词器,手动构建 ADT-Human。
- 通过自动的词对匹配生成 trap words 并使用 GPT-4 创建具有挑战性的实例来开发 ADT-Auto。
- 应用过滤(Trap Word 是否出现在分词列表中)和人工审查来优化实例。
- 在本地和 API 部署中,对多种开源和闭源 LLM 进行 ADT 测试。
实验结果
研究问题
- RQ1分词错误是否可以直接导致特定输入的模型输出不正确或无意义?
- RQ2手动构建的 ADT-Human 在揭示多种 LLM 的分词漏洞方面有多有效?
- RQ3自动生成的 ADT-Auto 框架是否能可靠地生成跨语言的分词挑战实例?
- RQ4不同模型下中英文输入的分词挑战难度的相对差异如何?
- RQ5在对分词对抗输入的鲁棒性方面,较大模型与较小模型相比如何?
主要发现
- ADT-Human 在所有测试模型中产生非常高的错误率,表明分词存在强烈漏洞。
- GPT-4o 等其他最先进模型在 ADT-Human 上仍显示非平凡的错误率,表明尽管规模增大,分词缺陷仍然存在。
- ADT-Auto 生成了 231 个中文实例,具有显著的错误分词效应,证实自动生成的有效性。
- 开源 LLM 在 ADT-Auto 上表现出比某些闭源同类更明显的分词弱点,这意味着模型开发者更容易获得更好的分词器。
- 在分词挑战下,较大模型往往比较小模型更鲁棒,尽管并非免疫于错误。
- 该研究提供了一个框架和数据集,以引导未来在分词算法和词汇设计方面的改进。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。