变形金机对文本建模很重要。但是,由于输入文本长度的二次复杂性,它难以处理长文件。为了处理这个问题,我们提出了一种分层交互式变压器(高变压器),用于高效且有效的长文档建模。高变压器模型以分层方式模型,即首先了解句子表示,然后学习文档表示。它可以有效地降低复杂性,同时在每个句子的建模中捕获全局文档上下文。更具体地说,我们首先使用句子变压器来学习每个句子的表示。然后我们使用文档变形器从这些句子表示中模拟全局文档上下文。接下来,我们使用另一个句子变换器来使用全局文档上下文增强句子建模。最后,我们使用分层汇集方法获取文档嵌入。三个基准数据集的广泛实验验证了长文档建模中高变压器的效率和效力。
translated by 谷歌翻译
变形金刚是文本理解的强大模型。然而,由于其二次复杂性对输入序列长度的二次复杂性效率低下。虽然有很多关于变压器加速的方法,但它们仍然效率低于长序列或不够有效。在本文中,我们提出了FastFormer,即基于添加剂关注的高效变压器模型。在FastFormer中,我们首先使用添加剂注意机制来模拟全局上下文,而不是在令牌之间建模的成对相互建模,而不是建模。然后,基于与全局上下文表示的交互,进一步转换每个令牌表示。以这种方式,FastFormer可以实现具有线性复杂性的有效上下文建模。关于五个数据集的广泛实验表明,FastFormer比许多现有的变压器模型更有效,同时可以实现可比或甚至更好的长文本建模性能。
translated by 谷歌翻译
我们提出了一种三级等级变压器网络(3级),用于在临床笔记上建模长期依赖性,以患者级预测的目的。该网络配备了三个级别的基于变压器的编码器,以逐步地从单词中学到句子,句子票据,最后给患者注释。单词到句子的第一级直接将预先训练的BERT模型应用为完全可训练的组件。虽然第二和第三级实现了一堆基于变压器的编码器,但在最终患者表示进入临床预测的分类层之前。与传统的BERT模型相比,我们的模型将512个令牌的最大输入长度增加到适合建模大量临床笔记的更长的序列。我们经验检查不同的超参数,以识别给定的计算资源限制的最佳权衡。我们的实验结果对不同预测任务的模拟-III数据集表明,所提出的等级变压器网络优于以前的最先进的模型,包括但不限于BigBird。
translated by 谷歌翻译
Directly training a document-to-document (Doc2Doc) neural machine translation (NMT) via Transformer from scratch, especially on small datasets usually fails to converge. Our dedicated probing tasks show that 1) both the absolute position and relative position information gets gradually weakened or even vanished once it reaches the upper encoder layers, and 2) the vanishing of absolute position information in encoder output causes the training failure of Doc2Doc NMT. To alleviate this problem, we propose a position-aware Transformer (P-Transformer) to enhance both the absolute and relative position information in both self-attention and cross-attention. Specifically, we integrate absolute positional information, i.e., position embeddings, into the query-key pairs both in self-attention and cross-attention through a simple yet effective addition operation. Moreover, we also integrate relative position encoding in self-attention. The proposed P-Transformer utilizes sinusoidal position encoding and does not require any task-specified position embedding, segment embedding, or attention mechanism. Through the above methods, we build a Doc2Doc NMT model with P-Transformer, which ingests the source document and completely generates the target document in a sequence-to-sequence (seq2seq) way. In addition, P-Transformer can be applied to seq2seq-based document-to-sentence (Doc2Sent) and sentence-to-sentence (Sent2Sent) translation. Extensive experimental results of Doc2Doc NMT show that P-Transformer significantly outperforms strong baselines on widely-used 9 document-level datasets in 7 language pairs, covering small-, middle-, and large-scales, and achieves a new state-of-the-art. Experimentation on discourse phenomena shows that our Doc2Doc NMT models improve the translation quality in both BLEU and discourse coherence. We make our code available on Github.
translated by 谷歌翻译
非结构化数据,尤其是文本,在各个领域继续迅速增长。特别是,在金融领域,有大量累积的非结构化财务数据,例如公司定期向监管机构提交的文本披露文件,例如证券和交易委员会(SEC)。这些文档通常很长,并且倾向于包含有关公司绩效的宝贵信息。因此,从这些长文本文档中学习预测模型是非常兴趣的,尤其是用于预测数值关键绩效指标(KPI)。尽管在训练有素的语言模型(LMS)中取得了长足的进步,这些模型从大量的文本数据中学习,但他们仍然在有效的长期文档表示方面挣扎。我们的工作满足了这种批判性需求,即如何开发更好的模型来从长文本文档中提取有用的信息,并学习有效的功能,这些功能可以利用软件财务和风险信息来进行文本回归(预测)任务。在本文中,我们提出并实施了一个深度学习框架,该框架将长文档分为大块,并利用预先训练的LMS处理和将块汇总为矢量表示,然后进行自我关注以提取有价值的文档级特征。我们根据美国银行的10-K公共披露报告以及美国公司提交的另一个报告数据集评估了模型。总体而言,我们的框架优于文本建模的强大基线方法以及仅使用数值数据的基线回归模型。我们的工作提供了更好的见解,即如何利用预先训练的域特异性和微调的长输入LMS来表示长文档可以提高文本数据的表示质量,从而有助于改善预测分析。
translated by 谷歌翻译
现有的文档级神经计算机翻译(NMT)模型具有足够探索的不同上下文设置,为目标生成提供指导。但是,对于慷慨的上下文信息,对揭开更多样化的背景的注意力很少。在本文中,我们提出了一种选择性的内存增强神经文件翻译模型,以处理包含上下文的大假设空间的文档。具体而言,我们从训练语料库中检索类似的双语句子对来增强全局上下文,然后通过选择性机制扩展双流注意模型,以捕获本地上下文和不同的全局背景。这种统一的方法允许我们的模型在三个公开的文档级机器翻译数据集上优雅地培训,并且显着优于以前的文档级NMT型号。
translated by 谷歌翻译
变压器注意机制的二次计算和内存复杂性限制了对长序列建模的可扩展性。在本文中,我们提出了Luna,一种线性统一嵌套关注机制,使Softmax注意力具有两个嵌套线性关注功能,仅产生线性(与二次)的时间和空间复杂度相反。具体地,通过第一注意功能,LUNA将输入序列包装成固定长度的序列。然后,使用第二关注功能未包装包装序列。与更传统的关注机制相比,LUNA引入具有固定长度的附加序列作为输入和额外的相应输出,允许LUNA线性地进行关注操作,同时还存储足够的上下文信息。我们对三个序列建模任务的基准进行了广泛的评估:长上下文序列建模,神经机平移和大型预磨损的屏蔽语言建模。竞争甚至更好的实验结果表明了Luna的有效性和效率与各种各样相比
translated by 谷歌翻译
基于方面的情绪分析(ABSA)是一种文本分析方法,其定义了与特定目标相关的某些方面的意见的极性。 ABSA的大部分研究都是英文,阿拉伯语有少量的工作。最先前的阿拉伯语研究依赖于深度学习模型,主要依赖于独立于上下文的单词嵌入(例如,e.g.word2vec),其中每个单词都有一个独立于其上下文的固定表示。本文探讨了从预先培训的语言模型(如BERT)的上下文嵌入的建模功能,例如BERT,以及在阿拉伯语方面情感极度分类任务中使用句子对输入。特别是,我们开发一个简单但有效的基于伯特的神经基线来处理这项任务。根据三种不同阿拉伯语数据集的实验结果,我们的BERT架构与简单的线性分类层超出了最先进的作品。在Arabic Hotel评论数据库中实现了89.51%的准确性,73%的人类注册书评论数据集和阿拉伯新闻数据集的85.73%。
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 谷歌翻译
文档级别的情感分析(DSA)由于含糊的语义链接并使情感信息复杂化,因此更具挑战性。最近的工作专门用于利用文本摘要,并取得了令人鼓舞的结果。但是,这些基于摘要的方法没有充分利用摘要,包括忽略摘要和文档之间的固有交互。结果,他们将代表限制在文档中表达主要点,这高度表明了关键情绪。在本文中,我们研究了如何有效地产生具有明确的主题模式和情感环境的歧视性表示。提出了一个分层互动网络(HIN),以探索多个粒度的摘要和文档之间的双向交互,并学习以主题为导向的文档表示情感分类。此外,我们通过使用情感标签信息来完善HIN来学习基于情感的重新思考机制(SR),以学习更感知的文档表示。我们在三个公共数据集上广泛评估了我们提出的模型。实验结果始终证明了我们提出的模型的有效性,并表明HIN-SR优于各种最新方法。
translated by 谷歌翻译
以互联网上的文件形式存储的信息量迅速增加。因此,它已成为以最佳方式组织和维护这些文件的必要性。文本分类算法研究文本中单词之间的复杂关系,并尝试解释文档的语义。这些算法在过去几年中已经显着发展。从简单的机器学习算法到基于变压器的架构有很多进展。然而,现有文献在不同的数据集上分析了不同的方法,从而难以比较机器学习算法的性能。在这项工作中,我们使用标准机器学习方法重新审视长文件分类。我们在六个标准文本分类数据集中从简单的天真贝叶斯到复杂伯爵的基准方法。我们在一系列长文档数据集中呈现了不同算法的详尽比较。我们重新延长了长篇文档分类是一个更简单的任务,甚至基本算法竞争地在大多数数据集上具有基于BERT的方法。基于BERT的模型在所有数据集上始终如一地执行,并且当计算成本不是一个问题时,可以盲目地用于文档分类任务。在浅模范的类别中,我们建议使用原始Bilstm + Max架构的用法,这些架构在所有数据集中体面效果。即使是更简单的手套+注意单词模型也可用于更简单的用例。在IMDB情绪数据集中清晰可见使用复杂模型的重要性,这是一个相对较难的任务。
translated by 谷歌翻译
Pre-trained Transformers currently dominate most NLP tasks. They impose, however, limits on the maximum input length (512 sub-words in BERT), which are too restrictive in the legal domain. Even sparse-attention models, such as Longformer and BigBird, which increase the maximum input length to 4,096 sub-words, severely truncate texts in three of the six datasets of LexGLUE. Simpler linear classifiers with TF-IDF features can handle texts of any length, require far less resources to train and deploy, but are usually outperformed by pre-trained Transformers. We explore two directions to cope with long legal texts: (i) modifying a Longformer warm-started from LegalBERT to handle even longer texts (up to 8,192 sub-words), and (ii) modifying LegalBERT to use TF-IDF representations. The first approach is the best in terms of performance, surpassing a hierarchical version of LegalBERT, which was the previous state of the art in LexGLUE. The second approach leads to computationally more efficient models at the expense of lower performance, but the resulting models still outperform overall a linear SVM with TF-IDF features in long legal document classification.
translated by 谷歌翻译
Transformers do not scale very well to long sequence lengths largely because of quadratic self-attention complexity. In the recent months, a wide spectrum of efficient, fast Transformers have been proposed to tackle this problem, more often than not claiming superior or comparable model quality to vanilla Transformer models. To this date, there is no well-established consensus on how to evaluate this class of models. Moreover, inconsistent benchmarking on a wide spectrum of tasks and datasets makes it difficult to assess relative model quality amongst many models. This paper proposes a systematic and unified benchmark, Long-Range Arena, specifically focused on evaluating model quality under long-context scenarios. Our benchmark is a suite of tasks consisting of sequences ranging from 1K to 16K tokens, encompassing a wide range of data types and modalities such as text, natural, synthetic images, and mathematical expressions requiring similarity, structural, and visual-spatial reasoning. We systematically evaluate ten well-established long-range Transformer models (Reformers, Linformers, Linear Transformers, Sinkhorn Transformers, Performers, Synthesizers, Sparse Transformers, and Longformers) on our newly proposed benchmark suite. Long-Range Arena paves the way towards better understanding this class of efficient Transformer models, facilitates more research in this direction, and presents new challenging tasks to tackle. Our benchmark code will be released at https://github.com/google-research/long-range-arena.
translated by 谷歌翻译
近年来,基于变压器的预训练模型已获得了很大的进步,成为自然语言处理中最重要的骨干之一。最近的工作表明,变压器内部的注意力机制可能不需要,卷积神经网络和基于多层感知器的模型也已被研究为变压器替代方案。在本文中,我们考虑了一个用于语言模型预训练的图形循环网络,该网络通过本地令牌级通信为每个序列构建一个图形结构,以及与其他代币解耦的句子级表示。原始模型在受监督培训下的特定领域特定文本分类中表现良好,但是,其通过自我监督的方式学习转移知识的潜力尚未得到充分利用。我们通过优化体系结构并验证其在更通用的语言理解任务(英语和中文)中的有效性来填补这一空白。至于模型效率,我们的模型在基于变压器的模型中而不是二次复杂性,而是具有线性复杂性,并且在推断过程中的性能更有效。此外,我们发现与现有基于注意力的模型相比,我们的模型可以生成更多样化的输出,而背景化的功能冗余性较小。
translated by 谷歌翻译
最近的工作表明,(1)增加输入长度或(2)增加模型大小可以提高基于变压器的神经模型的性能。在本文中,我们提出了一个名为Longt5的新模型,我们探讨了同时缩放输入长度和模型大小的效果。具体而言,我们综合了从长输入变压器(ETC)的关注思路,并采用了从摘要预训练(PEGASU)的预训练策略进入可扩展的T5架构。结果是我们称之为{\ EM瞬态全球}(TGLOBAL)的新关注机制,这些机制是模仿等本地/全球注意力机制,但不需要额外的侧面输入。我们能够实现最先进的结果,以若干摘要任务,优于问题应答任务的原始T5模型。
translated by 谷歌翻译
排名模型是信息检索系统的主要组成部分。排名的几种方法是基于传统的机器学习算法,使用一组手工制作的功能。最近,研究人员在信息检索中利用了深度学习模型。这些模型的培训结束于结束,以提取来自RAW数据的特征来排序任务,因此它们克服了手工制作功能的局限性。已经提出了各种深度学习模型,每个模型都呈现了一组神经网络组件,以提取用于排名的特征。在本文中,我们在不同方面比较文献中提出的模型,以了解每个模型的主要贡献和限制。在我们对文献的讨论中,我们分析了有前途的神经元件,并提出了未来的研究方向。我们还显示文档检索和其他检索任务之间的类比,其中排名的项目是结构化文档,答案,图像和视频。
translated by 谷歌翻译
Short text classification is a crucial and challenging aspect of Natural Language Processing. For this reason, there are numerous highly specialized short text classifiers. However, in recent short text research, State of the Art (SOTA) methods for traditional text classification, particularly the pure use of Transformers, have been unexploited. In this work, we examine the performance of a variety of short text classifiers as well as the top performing traditional text classifier. We further investigate the effects on two new real-world short text datasets in an effort to address the issue of becoming overly dependent on benchmark datasets with a limited number of characteristics. Our experiments unambiguously demonstrate that Transformers achieve SOTA accuracy on short text classification tasks, raising the question of whether specialized short text techniques are necessary.
translated by 谷歌翻译
Document Visual Question Answering (DocVQA) refers to the task of answering questions from document images. Existing work on DocVQA only considers single-page documents. However, in real scenarios documents are mostly composed of multiple pages that should be processed altogether. In this work we extend DocVQA to the multi-page scenario. For that, we first create a new dataset, MP-DocVQA, where questions are posed over multi-page documents instead of single pages. Second, we propose a new hierarchical method, Hi-VT5, based on the T5 architecture, that overcomes the limitations of current methods to process long multi-page documents. The proposed method is based on a hierarchical transformer architecture where the encoder summarizes the most relevant information of every page and then, the decoder takes this summarized information to generate the final answer. Through extensive experimentation, we demonstrate that our method is able, in a single stage, to answer the questions and provide the page that contains the relevant information to find the answer, which can be used as a kind of explainability measure.
translated by 谷歌翻译
多文件摘要中的一个关键挑战是捕获区分单个文档摘要(SDS)和多文件摘要(MDS)的输入文档之间的关系。现有的MDS工作很少解决此问题。一种有效的方法是编码文档位置信息,以帮助模型捕获跨文档关系。但是,现有的MDS模型(例如基于变压器的模型)仅考虑令牌级的位置信息。此外,这些模型无法捕获句子的语言结构,这不可避免地会引起生成的摘要中的混乱。因此,在本文中,我们提出了可以与MDS的变压器体系结构融合的文档意识到的位置编码和语言引导的编码。对于文档感知的位置编码,我们引入了一项通用协议,以指导文档编码功能的选择。对于语言引导的编码,我们建议使用简单但有效的非线性编码学习者进行特征学习,将句法依赖关系嵌入依赖关系掩码中。广泛的实验表明,所提出的模型可以生成高质量的摘要。
translated by 谷歌翻译
我们对13个最近的模型进行了全面评估,用于使用两个流行的收藏(MS MARCO文档和Robust04)排名长期文档。我们的模型动物园包括两个专门的变压器模型(例如longformer),它们可以处理长文档而无需分配它们。一路上,我们记录了有关培训和比较此类模型的几个困难。有些令人惊讶的是,我们发现简单的第一个基线(满足典型变压器模型的输入序列约束的截断文档)非常有效。我们分析相关段落的分布(内部文档),以解释这种现象。我们进一步认为,尽管它们广泛使用,但Robust04和MS Marco文档对于基准长期模型并不是特别有用。
translated by 谷歌翻译