Recent advancements in deep learning techniques have transformed the area of semantic text matching. However, most state-of-the-art models are designed to operate with short documents such as tweets, user reviews, comments, etc. These models have fundamental limitations when applied to long-form documents such as scientific papers, legal documents, and patents. When handling such long documents, there are three primary challenges: (i) the presence of different contexts for the same word throughout the document, (ii) small sections of contextually similar text between two documents, but dissimilar text in the remaining parts (this defies the basic understanding of "similarity"), and (iii) the coarse nature of a single global similarity measure which fails to capture the heterogeneity of the document content. In this paper, we describe CoLDE: Contrastive Long Document Encoder - a transformer-based framework that addresses these challenges and allows for interpretable comparisons of long documents. CoLDE uses unique positional embeddings and a multi-headed chunkwise attention layer in conjunction with a supervised contrastive learning framework to capture similarity at three different levels: (i) high-level similarity scores between a pair of documents, (ii) similarity scores between different sections within and across documents, and (iii) similarity scores between different chunks in the same document and across other documents. These fine-grained similarity scores aid in better interpretability. We evaluate CoLDE on three long document datasets namely, ACL Anthology publications, Wikipedia articles, and USPTO patents. Besides outperforming the state-of-the-art methods on the document matching task, CoLDE is also robust to changes in document length and text perturbations and provides interpretable results.
翻译:最近深层学习技术的进步改变了语义文本匹配的领域。 但是,大多数最先进的模型的设计是使用简短的文件,如推文、用户评论、评论等。 这些模型在应用科学论文、法律文件和专利等长格式文件时具有根本性的局限性。 当处理如此长的文件时,有三大挑战:(一) 在整个文档中存在不同背景的同一词,(二) 两个文档之间背景相似的文本的小部分,但在其余部分中则有差异的文本(这不符合对“相似性”的基本理解),以及(三) 单一全球相似性衡量的粗略性质,无法捕捉到文件内容内容的异性。 在本文件中,我们描述COLDE: 对比性长文档编码――一个基于变异框架,可以对长文档进行可解释的比较。 CoLDE使用独特的位置嵌嵌入和多发式直径直线的注意层层,连同一个监督的对比性学习框架,用来在三个不同层次上反映相似性,(一) 类似文件在不同的分级和分级文档中,(一) 在不同的分级文档和分级中,不同层次之间,不同分级之间也提供相似的更高层次的文件解释。