arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2211.12677cs.CL
收藏

用于语言建模的词级表示

Word-Level Representation From Bytes For Language Modeling

Fudan University(复旦大学);Amazon(亚马逊)

Chu-Tak Lee, Qipeng Guo, Xipeng Qiu

摘要:

现代语言模型大多采用子词作为输入,这种设计平衡了词汇量、参数数量和性能之间的权衡。然而,子词标记化仍然存在缺点,如对噪声不鲁棒,难以推广到新的语言。此外,当前模型规模扩大的趋势表明,更大的模型需要更大的嵌入,但这使得并行化变得困难。先前关于图像分类的工作证明,将原始输入分割成一系列卡盘是一种强的、与模型无关的归纳偏差。基于这一观察,我们重新思考了现有的字符感知方法,该方法采用字符级输入,但进行单词级序列建模和预测。我们通过引入直接从字节构建单词级表示的交叉注意网络和基于单词级隐藏状态的子单词级预测来彻底改造这种方法,以避免单词级预测的时间和空间要求。结合这两个改进,我们有一个无令牌模型,用于下游任务的输入嵌入很小。我们将我们的方法命名为Byte2Word,并对语言建模和文本分类进行评估。实验表明,Byte2Word算法的嵌入量仅占强子词基线BERT的10%,与强子词基线算法相当。我们进一步测试我们的方法在合成噪声和跨语言迁移,并发现它的竞争力的基线方法在这两种设置。

英文摘要:

Modern language models mostly take sub-words as input, a design that balances the trade-off between vocabulary size, number of parameters, and performance. However, sub-word tokenization still has disadvantages like not being robust to noise and difficult to generalize to new languages. Also, the current trend of scaling up models reveals that larger models require larger embeddings but that makes parallelization hard. Previous work on image classification proves splitting raw input into a sequence of chucks is a strong, model-agnostic inductive bias. Based on this observation, we rethink the existing character-aware method that takes character-level inputs but makes word-level sequence modeling and prediction. We overhaul this method by introducing a cross-attention network that builds word-level representation directly from bytes, and a sub-word level prediction based on word-level hidden states to avoid the time and space requirement of word-level prediction. With these two improvements combined, we have a token free model with slim input embeddings for downstream tasks. We name our method Byte2Word and perform evaluations on language modeling and text classification. Experiments show that Byte2Word is on par with the strong sub-word baseline BERT but only takes up 10\% of embedding size. We further test our method on synthetic noise and cross-lingual transfer and find it competitive to baseline methods on both settings.

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

↑