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

中文预训练语言模型的子字符Tokenization

Sub-Character Tokenization for Chinese Pretrained Language Models

Tsinghua University(清华大学);Huawei Noah’s Ark Lab(华为诺亚方舟实验室);University of Maryland, College Park(马里兰大学帕克分校)

Chenglei Si, Zhengyan Zhang, Yingfa Chen, Fanchao Qi, Xiaozhi Wang, Zhiyuan Liu, Yasheng Wang, Qun Liu, Maosong Sun

摘要:

标记化是预训练语言模型(PLM)的基础。现有的用于中文PLM的标记化方法通常将每个字符视为不可分割的标记。然而,他们忽略了汉语书写系统的独特之处,即在字符水平之下存在额外的语言信息,即,在子角色层面上。为了利用这些信息,我们提出了子字符(简称SubChar)标记化。具体地说,我们首先将输入的文本编码,将每个汉字转换成一个短序列的基础上,其名称或发音,然后构建词汇的基础上编码的文本与子分词。实验结果表明,SubChar标记器与已有的标记器相比具有两个主要优点:1)可以将输入标记为更短的序列,从而提高了计算效率。2)基于发音的SubChar分词器可以将汉语同音字编码成相同的音译序列,并产生相同的分词输出,因此对同音字拼写错误具有鲁棒性。与此同时,使用SubChar标记器训练的模型在下游任务上表现出竞争力。我们在https://github.com/thunlp/SubCharTokenization上发布了我们的代码和模型,以促进未来的工作。

英文摘要:

Tokenization is fundamental to pretrained language models (PLMs). Existing tokenization methods for Chinese PLMs typically treat each character as an indivisible token. However, they ignore the unique feature of the Chinese writing system where additional linguistic information exists below the character level, i.e., at the sub-character level. To utilize such information, we propose sub-character (SubChar for short) tokenization. Specifically, we first encode the input text by converting each Chinese character into a short sequence based on its glyph or pronunciation, and then construct the vocabulary based on the encoded text with sub-word segmentation. Experimental results show that SubChar tokenizers have two main advantages over existing tokenizers: 1) They can tokenize inputs into much shorter sequences, thus improving the computational efficiency. 2) Pronunciation-based SubChar tokenizers can encode Chinese homophones into the same transliteration sequences and produce the same tokenization output, hence being robust to homophone typos. At the same time, models trained with SubChar tokenizers perform competitively on downstream tasks. We release our code and models at https://github.com/thunlp/SubCharTokenization to facilitate future work.

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

↑