拼写输出并非易事:大语言模型从Token到字符的分词能力
Spelling-out is not Straightforward: LLMs' Capability of Tokenization from Token to Characters
AI总结:
本研究针对大语言模型能高精度逐字符拼写却难完成复杂字符级任务的问题,探究其拼写过程中字符级信息的内部表征机制,发现嵌入层未完全编码字符信息,需依赖Transformer中高层重建知识,并通过三类分析验证了该机制。
摘要:
大语言模型(LLMs)能够高精度地逐字符拼写输出token,却难以完成更复杂的字符级任务,例如识别token内部的组成子成分。本研究探究了LLMs在拼写输出过程中如何在内部表征和利用字符级信息。分析表明,尽管拼写输出对人类而言是简单任务,但LLMs对其的处理方式并非直截了当。具体而言,我们发现嵌入层并未完全编码字符级信息,尤其是首字符之外的字符信息。因此,LLMs依赖Transformer的中间层和更高层来重建字符级知识,我们在此过程中观察到其拼写行为出现明显的“突破”现象。我们通过三类互补分析验证了这一机制:探测分类器、知识神经元识别以及注意力权重检视。
英文摘要:
Large language models (LLMs) can spell out tokens character by character with high accuracy, yet they struggle with more complex character-level tasks, such as identifying compositional subcomponents within tokens. In this work, we investigate how LLMs internally represent and utilize character-level information during the spelling-out process. Our analysis reveals that, although spelling out is a simple task for humans, it is not handled in a straightforward manner by LLMs. Specifically, we show that the embedding layer does not fully encode character-level information, particularly beyond the first character. As a result, LLMs rely on intermediate and higher Transformer layers to reconstruct character-level knowledge, where we observe a distinct "breakthrough" in their spelling behavior. We validate this mechanism through three complementary analyses: probing classifiers, identification of knowledge neurons, and inspection of attention weights.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。