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

使用经过预训练的Transformers处理长篇法律文档:改装LegalBERT和Longformer

Processing Long Legal Documents with Pre-trained Transformers: Modding LegalBERT and Longformer

Athens University of Economics and Business(雅典经济与商业大学);University of Copenhagen(哥本哈根大学);Cognitiv+

Dimitris Mamakas, Petros Tsotsi, Ion Androutsopoulos, Ilias Chalkidis

摘要:

预先训练的Transformers目前主导着大多数NLP任务。然而,它们对最大输入长度(BERT中的512个子字)施加了限制,这在法律领域中限制太多。即使是稀疏注意模型,如Longformer和BigBird,将最大输入长度增加到4,096个子词,也会严重截断LexGLUE六个数据集中的三个数据集的文本。具有TF-IDF特征的更简单的线性分类器可以处理任何长度的文本,需要更少的资源来训练和部署,但通常优于预先训练的Transformers。我们探索了两个方向来处理长的法律文本:(i)修改从LegalBERT开始的Longformer warm-started来处理更长的文本(多达8,192个子字),以及(ii)修改LegalBERT以使用TF-IDF表示。第一种方法在性能方面是最好的,超过了LegalBERT的分层版本,这是LexGLUE之前的最先进的方法。第二种方法以较低的性能为代价导致计算效率更高的模型,但所得模型在长法律文档分类中的整体性能仍然优于具有TF-IDF特征的线性SVM。

英文摘要:

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.

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

↑