大多数中国预训练的模型都采用字符作为下游任务的基本单元。但是,这些模型忽略了单词传递的信息,从而导致某些重要语义的丧失。在本文中,我们提出了一种新方法来利用单词结构并将词汇语义集成到预训练模型的特征表示中。具体而言,我们根据相似度的重量将单词嵌入其内部字符的嵌入中。为了加强边界信息一词,我们将一个单词中内部字符的表示形式混合在一起。之后,我们将单词到字符对准注意机制通过掩盖不重要的角色来强调重要角色。此外,为了减少单词分割引起的误差传播,我们提出了一种合奏方法,以结合不同的标记者给出的分割结果。实验结果表明,我们的方法在不同的中文NLP任务上取得了优于基本预训练的模型Bert,Bert-WWM和Ernie:情感分类,句子对匹配,自然语言推断和机器阅读理解。我们进行进一步的分析以证明我们模型每个组成部分的有效性。
translated by 谷歌翻译
Lexicon信息和预先训练的型号,如伯特,已被组合以探索由于各自的优势而探索中文序列标签任务。然而,现有方法通过浅和随机初始化的序列层仅熔断词典特征,并且不会将它们集成到伯特的底层中。在本文中,我们提出了用于汉语序列标记的Lexicon增强型BERT(Lebert),其直接通过Lexicon适配器层将外部词典知识集成到BERT层中。与现有方法相比,我们的模型促进了伯特下层的深层词典知识融合。关于十个任务的十个中文数据集的实验,包括命名实体识别,单词分段和言语部分标记,表明Lebert实现了最先进的结果。
translated by 谷歌翻译
预训练的语言模型(PLM)在自然语言理解中的许多下游任务中取得了显着的性能增长。已提出了各种中文PLM,以学习更好的中文表示。但是,大多数当前模型都使用中文字符作为输入,并且无法编码中文单词中包含的语义信息。虽然最近的预训练模型同时融合了单词和字符,但它们通常会遭受不足的语义互动,并且无法捕获单词和字符之间的语义关系。为了解决上述问题,我们提出了一个简单而有效的PLM小扣手,该小扣子采用了对单词和性格表示的对比度学习。特别是,Clower通过对多透明信息的对比学习将粗粒的信息(即单词)隐式编码为细粒度表示(即字符)。在现实的情况下,小电动器具有很大的价值,因为它可以轻松地将其纳入任何现有的基于细粒的PLM中而无需修改生产管道。在一系列下游任务上进行的扩展实验表明,小动物的卓越性能超过了几个最先进的实验 - 艺术基线。
translated by 谷歌翻译
来自变压器(BERT)的双向编码器表示显示了各种NLP任务的奇妙改进,并且已经提出了其连续的变体来进一步提高预先训练的语言模型的性能。在本文中,我们的目标是首先介绍中国伯特的全文掩蔽(WWM)策略,以及一系列中国预培训的语言模型。然后我们还提出了一种简单但有效的型号,称为Macbert,这在几种方面提高了罗伯塔。特别是,我们提出了一种称为MLM作为校正(MAC)的新掩蔽策略。为了展示这些模型的有效性,我们创建了一系列中国预先培训的语言模型,作为我们的基线,包括BERT,Roberta,Electra,RBT等。我们对十个中国NLP任务进行了广泛的实验,以评估创建的中国人托管语言模型以及提议的麦克白。实验结果表明,Macbert可以在许多NLP任务上实现最先进的表演,我们还通过几种可能有助于未来的研究的调查结果来消融细节。我们开源我们的预先培训的语言模型,以进一步促进我们的研究界。资源可用:https://github.com/ymcui/chinese-bert-wwm
translated by 谷歌翻译
语言的演变遵循逐渐变化的规则。语法,词汇和词汇语义转移会随着时间的推移而发生,导致了直觉的语言差距。因此,用不同的时代语言编写了大量文本,这为自然语言处理任务(例如单词分割和机器翻译)造成了障碍。尽管中文历史悠久,但以前的中国自然语言处理研究主要集中在特定时代的任务上。因此,我们为中文单词分割(CWS)提出了一个跨时代的学习框架,该框架使用开关记忆(SM)模块来合并ERA特定的语言知识。来自不同时代的四个语料库的实验表明,每个语料库的性能都显着提高。进一步的分析还表明,SM可以有效地将时代的知识整合到神经网络中。
translated by 谷歌翻译
训练有素的语言模型在各种自然语言理解(NLU)任务中取得了巨大的成功,因为它通过在大型语料库上进行预培训来捕获文本中的深层语境化信息。在本技术报告中,我们介绍了我们在中国语料库和中国NLU任务的中国语料库和Fineetuning的培训前培训语言模型的实践。 Nezha的当前版本基于BERT,具有经过验证的改进的集合,包括功能相对位置编码,作为有效的位置编码方案,整个单词掩蔽策略,混合精密训练和羔羊优化器在训练模型中。实验结果表明,尼扎在若干代表性的中国任务上实现了最先进的表演,包括命名实体识别(人民每日NER),句子匹配(LCQMC),中国情绪分类(CHNSENTI)和自然语言推断(xnli)。
translated by 谷歌翻译
汉字带有大量的形态和语义信息;因此,汉字形态的语义增强引起了极大的关注。先前的方法旨在直接从整个汉字图像中提取信息,这些图像通常无法同时捕获全球和本地信息。在本文中,我们开发了一种基于中风的自动编码器(SAE),以用自我监督的方法对汉字的复杂形态进行建模。按照其规范写作顺序,我们首先将汉字作为一系列带有固定写作顺序的中风图像,然后我们的SAE模型经过训练以重建此中风图像序列。只要训练集中出现这种预训练的SAE模型,只要它们的中风或激进分出现在看不见的字符中。我们在不同形式的中风图像上设计了两个对比的SAE架构。一种是对现有基于中风的方法进行微调的,用于零拍识别手写的汉字,另一个用于从其形态特征中富含中文单词的嵌入。实验结果证明,在预训练之后,我们的SAE架构以零拍的识别优于其他现有方法,并以其丰富的形态和语义信息增强了汉字的表示。
translated by 谷歌翻译
令牌化是预用语言模型(PLMS)的基础。用于中文PLMS的现有销量化方法通常将每个角色视为不可分割的令牌。然而,它们忽略了中文写字系统的独特特征,其中附加语言信息在字符级别下方,即在子字符级别。要利用此类信息,我们提出了子字符(Sub Const for Short)标记。具体地,我们首先通过基于其字形或发音将每个汉字转换为短序列来编码输入文本,然后根据具有子字标记化的编码文本构造词汇表。实验结果表明,Sub Colar标记与现有标记均具有两个主要优点:1)它们可以将输入牌销料到更短的序列中,从而提高计算效率。 2)基于发音的Sub Col.Tokenizers可以将中文同音铭器编码为相同的音译序列并产生相同的标记输出,因此对所有同音声音拼写的强大。与此同时,使用Sub Colar标记培训的模型竞争地执行下游任务。我们在https://github.com/thunlp/subchartoken中发布我们的代码,以促进未来的工作。
translated by 谷歌翻译
近年来,基于变压器的预训练模型已获得了很大的进步,成为自然语言处理中最重要的骨干之一。最近的工作表明,变压器内部的注意力机制可能不需要,卷积神经网络和基于多层感知器的模型也已被研究为变压器替代方案。在本文中,我们考虑了一个用于语言模型预训练的图形循环网络,该网络通过本地令牌级通信为每个序列构建一个图形结构,以及与其他代币解耦的句子级表示。原始模型在受监督培训下的特定领域特定文本分类中表现良好,但是,其通过自我监督的方式学习转移知识的潜力尚未得到充分利用。我们通过优化体系结构并验证其在更通用的语言理解任务(英语和中文)中的有效性来填补这一空白。至于模型效率,我们的模型在基于变压器的模型中而不是二次复杂性,而是具有线性复杂性,并且在推断过程中的性能更有效。此外,我们发现与现有基于注意力的模型相比,我们的模型可以生成更多样化的输出,而背景化的功能冗余性较小。
translated by 谷歌翻译
最近,在机器阅读理解(MRC)中广泛研究了注意力增强的多层编码器,例如变压器。为了预测答案,通常使用预测因子仅从最终编码层中汲取信息,该层生成源序列的粗粒表示,即段落和问题。分析表明,随着编码层的增加,源序列的表示会变得更粗糙。人们普遍认为,随着深度神经网络中越来越多的层数,编码过程将越来越多地为每个位置收集相关信息,从而导致更粗糙的表示形式,这增加了与其他位置相似的可能性(指均质性) 。这种现象会误导该模型做出错误的判断并降低表现。在本文中,我们认为,如果预测指标可以利用编码器不同粒度的表示形式,从而提供了源序列的不同视图,从而使模型的表达能力可以充分利用,那将是更好的。为此,我们提出了一种新型方法,称为自适应双向注意封闭网络(ABA-NET),该方法可自适应地利用不同级别的源代表向预测指标。此外,由于更好的表示是提高MRC性能的核心,因此胶囊网络和自我发项模块被仔细设计为我们编码器的构建块,该模块分别提供了探索本地和全球表示的能力。在三个基准数据集(即小队1.0,Squad 2.0和COQA)上进行的实验结果证明了我们方法的有效性。特别是,我们在小队1.0数据集上设置了新的最新性能
translated by 谷歌翻译
Recent progress in pre-trained neural language models has significantly improved the performance of many natural language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the disentangled attention mechanism, where each word is represented using two vectors that encode its content and position, respectively, and the attention weights among words are computed using disentangled matrices on their contents and relative positions, respectively. Second, an enhanced mask decoder is used to incorporate absolute positions in the decoding layer to predict the masked tokens in model pre-training. In addition, a new virtual adversarial training method is used for fine-tuning to improve models' generalization. We show that these techniques significantly improve the efficiency of model pre-training and the performance of both natural language understand (NLU) and natural langauge generation (NLG) downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by +0.9% (90.2% vs. 91.1%), on SQuAD v2.0 by +2.3% (88.4% vs. 90.7%) and RACE by +3.6% (83.2% vs. 86.8%). Notably, we scale up DeBERTa by training a larger version that consists of 48 Transform layers with 1.5 billion parameters. The significant performance boost makes the single DeBERTa model surpass the human performance on the SuperGLUE benchmark (Wang et al., 2019a) for the first time in terms of macro-average score (89.9 versus 89.8), and the ensemble DeBERTa model sits atop the SuperGLUE leaderboard as of January 6, 2021, outperforming the human baseline by a decent margin (90.3 versus 89.8). The pre-trained DeBERTa models and the source code were released at: https://github.com/microsoft/DeBERTa 1 .
translated by 谷歌翻译
指定的实体识别任务是信息提取的核心任务之一。单词歧义和单词缩写是命名实体低识别率的重要原因。在本文中,我们提出了一种名为“实体识别模型WCL-BBCD”(与Bert-Bilstm-Crf-Dbpedia的单词对比学习),结合了对比度学习的概念。该模型首先在文本中训练句子对,计算句子对通过余弦的相似性中的单词对之间的相似性,以及通过相似性通过相似性来命名实体识别任务的BERT模型,以减轻单词歧义。然后,将微调的BERT模型与Bilstm-CRF模型相结合,以执行指定的实体识别任务。最后,将识别结果与先验知识(例如知识图)结合使用,以减轻单词缩写引起的低速问题的识别。实验结果表明,我们的模型在Conll-2003英语数据集和Ontonotes V5英语数据集上优于其他类似的模型方法。
translated by 谷歌翻译
Neural language representation models such as BERT pre-trained on large-scale corpora can well capture rich semantic patterns from plain text, and be fine-tuned to consistently improve the performance of various NLP tasks. However, the existing pre-trained language models rarely consider incorporating knowledge graphs (KGs), which can provide rich structured knowledge facts for better language understanding. We argue that informative entities in KGs can enhance language representation with external knowledge. In this paper, we utilize both large-scale textual corpora and KGs to train an enhanced language representation model (ERNIE), which can take full advantage of lexical, syntactic, and knowledge information simultaneously. The experimental results have demonstrated that ERNIE achieves significant improvements on various knowledge-driven tasks, and meanwhile is comparable with the state-of-the-art model BERT on other common NLP tasks. The source code and experiment details of this paper can be obtained from https:// github.com/thunlp/ERNIE.
translated by 谷歌翻译
与伯特(Bert)等语言模型相比,已证明知识增强语言表示的预培训模型在知识基础构建任务(即〜关系提取)中更有效。这些知识增强的语言模型将知识纳入预训练中,以生成实体或关系的表示。但是,现有方法通常用单独的嵌入表示每个实体。结果,这些方法难以代表播出的实体和大量参数,在其基础代币模型之上(即〜变压器),必须使用,并且可以处理的实体数量为由于内存限制,实践限制。此外,现有模型仍然难以同时代表实体和关系。为了解决这些问题,我们提出了一个新的预培训模型,该模型分别从图书中学习实体和关系的表示形式,并分别在文本中跨越跨度。通过使用SPAN模块有效地编码跨度,我们的模型可以代表实体及其关系,但所需的参数比现有模型更少。我们通过从Wikipedia中提取的知识图对我们的模型进行了预训练,并在广泛的监督和无监督的信息提取任务上进行了测试。结果表明,我们的模型比基线学习对实体和关系的表现更好,而在监督的设置中,微调我们的模型始终优于罗伯塔,并在信息提取任务上取得了竞争成果。
translated by 谷歌翻译
事实证明,将先验知识纳入预训练的语言模型中对知识驱动的NLP任务有效,例如实体键入和关系提取。当前的培训程序通常通过使用知识掩盖,知识融合和知识更换将外部知识注入模型。但是,输入句子中包含的事实信息尚未完全开采,并且尚未严格检查注射的外部知识。结果,无法完全利用上下文信息,并将引入额外的噪音,或者注入的知识量受到限制。为了解决这些问题,我们提出了MLRIP,该MLRIP修改了Ernie-Baidu提出的知识掩盖策略,并引入了两阶段的实体替代策略。进行全面分析的广泛实验说明了MLRIP在军事知识驱动的NLP任务中基于BERT的模型的优势。
translated by 谷歌翻译
单词嵌入是一项基本的自然语言处理任务,可以学习单词的特征。但是,大多数单词嵌入方法仅分配一个向量为一个单词,即使多序单词具有多声音。为了解决此限制,我们提出了SEMEMEWSD同义词(SWSD)模型,以在Open Hownet中的Word Sense Disampuation(WSD)(WSD)和同义词的帮助下为各种多词的矢量分配不同的向量。我们使用Sememewsd模型,这是一种基于Open Hownet的无监督的词义歧义模型,进行单词sense sense disammaguation并用sense id注释多义单词。然后,我们从Open Hownet获得了单词sense的十大同义词,并将同义词的平均向量作为sense sense的向量。在实验中,我们使用Gensim的WMDistance方法评估了有关语义相似性计算的SWSD模型。它可以提高准确性。我们还检查了不同BERT模型的Sememewsd模型,以找到更有效的模型。
translated by 谷歌翻译
Pre-trained language models are trained on large-scale unsupervised data, and they can be fine-tuned on small-scale labeled datasets and achieve good results. Multilingual pre-trained language models can be trained on multiple languages and understand multiple languages at the same time. At present, the research on pre-trained models mainly focuses on rich-resource language, while there is relatively little research on low-resource languages such as minority languages, and the public multilingual pre-trained language model can not work well for minority languages. Therefore, this paper constructs a multilingual pre-trained language model named MiLMo that performs better on minority language tasks, including Mongolian, Tibetan, Uyghur, Kazakh and Korean. To solve the problem of scarcity of datasets on minority languages and verify the effectiveness of the MiLMo model, this paper constructs a minority multilingual text classification dataset named MiTC, and trains a word2vec model for each language. By comparing the word2vec model and the pre-trained model in the text classification task, this paper provides an optimal scheme for the downstream task research of minority languages. The final experimental results show that the performance of the pre-trained model is better than that of the word2vec model, and it has achieved the best results in minority multilingual text classification. The multilingual pre-trained language model MiLMo, multilingual word2vec model and multilingual text classification dataset MiTC are published on https://milmo.cmli-nlp.com.
translated by 谷歌翻译
The lack of label data is one of the significant bottlenecks for Chinese Spelling Check (CSC). Existing researches use the method of automatic generation by exploiting unlabeled data to expand the supervised corpus. However, there is a big gap between the real input scenario and automatic generated corpus. Thus, we develop a competitive general speller ECSpell which adopts the Error Consistent masking strategy to create data for pretraining. This error consistency masking strategy is used to specify the error types of automatically generated sentences which is consistent with real scene. The experimental result indicates our model outperforms previous state-of-the-art models on the general benchmark. Moreover, spellers often work within a particular domain in real life. Due to lots of uncommon domain terms, experiments on our built domain specific datasets show that general models perform terribly. Inspired by the common practice of input methods, we propose to add an alterable user dictionary to handle the zero-shot domain adaption problem. Specifically, we attach a User Dictionary guided inference module (UD) to a general token classification based speller. Our experiments demonstrate that ECSpell$^{UD}$, namely ECSpell combined with UD, surpasses all the other baselines largely, even approaching the performance on the general benchmark.
translated by 谷歌翻译
Language model pre-training has proven to be useful in learning universal language representations. As a state-of-the-art language model pre-training model, BERT (Bidirectional Encoder Representations from Transformers) has achieved amazing results in many language understanding tasks. In this paper, we conduct exhaustive experiments to investigate different fine-tuning methods of BERT on text classification task and provide a general solution for BERT fine-tuning. Finally, the proposed solution obtains new state-of-the-art results on eight widely-studied text classification datasets. 1
translated by 谷歌翻译
Pre-trained Language Model (PLM) has become a representative foundation model in the natural language processing field. Most PLMs are trained with linguistic-agnostic pre-training tasks on the surface form of the text, such as the masked language model (MLM). To further empower the PLMs with richer linguistic features, in this paper, we aim to propose a simple but effective way to learn linguistic features for pre-trained language models. We propose LERT, a pre-trained language model that is trained on three types of linguistic features along with the original MLM pre-training task, using a linguistically-informed pre-training (LIP) strategy. We carried out extensive experiments on ten Chinese NLU tasks, and the experimental results show that LERT could bring significant improvements over various comparable baselines. Furthermore, we also conduct analytical experiments in various linguistic aspects, and the results prove that the design of LERT is valid and effective. Resources are available at https://github.com/ymcui/LERT
translated by 谷歌翻译