arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.10771cs.CL
收藏

在大语言模型中实现词恢复增强了字符级分词的鲁棒性

Word Recovery in Large Language Models Enables Character-Level Tokenization Robustness

Zhipeng Yang(杨志鹏);Shu Yang(杨舒);Lijie Hu(胡丽杰);Di Wang(王迪)

Zhipeng Yang, Shu Yang, Lijie Hu, Di Wang

AI总结:

本研究通过机制可解释性发现词恢复是大语言模型处理字符级输入的关键机制,增强了分词鲁棒性。

摘要:

训练时使用传统分词方法的大语言模型(LLMs)表现出对非传统输入(如字符级分词)的惊人鲁棒性,但这种鲁棒性的机制仍不清楚。我们通过机制可解释性研究这一现象,并识别出一个核心过程,我们称之为词恢复。我们首先介绍一种基于解码的方法来检测词恢复,显示隐藏状态能够从字符级输入中重建传统词级分词身份。然后我们通过移除对应的隐藏状态子空间来提供因果证据,这会一致地降低下游任务性能。最后,我们进行细致的注意力分析,显示同一传统词的字符之间的组内注意力对词恢复至关重要:在早期层中屏蔽这种注意力会显著降低恢复分数和任务性能。总的来说,我们的发现为分词鲁棒性提供了机制解释,并将词恢复识别为使LLM处理字符级输入的关键机制。

英文摘要:

Large language models (LLMs) trained with canonical tokenization exhibit surprising robustness to non-canonical inputs such as character-level tokenization, yet the mechanisms underlying this robustness remain unclear. We study this phenomenon through mechanistic interpretability and identify a core process we term word recovery. We first introduce a decoding-based method to detect word recovery, showing that hidden states reconstruct canonical word-level token identities from character-level inputs. We then provide causal evidence by removing the corresponding subspace from hidden states, which consistently degrades downstream task performance. Finally, we conduct a fine-grained attention analysis and show that in-group attention among characters belonging to the same canonical token is critical for word recovery: masking such attention in early layers substantially reduces both recovery scores and task performance. Together, our findings provide a mechanistic explanation for tokenization robustness and identify word recovery as a key mechanism enabling LLMs to process character-level inputs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑