用随机截取的短片段实现长法律文书高效分类
Classifying long legal documents using short random chunks
- 从长文档中随机抽取48个短片段(每段≤128词)输入模型
- 在法律文本分类任务上达到0.898加权F1分数
- 可在普通CPU上处理,每百份文件平均耗时约8分钟
法律文书分类面临挑战,因其专业词汇多且常篇幅冗长。直接将完整文档输入基于Transformer的模型可能不可行、成本高或速度慢。为此,我们提出一种基于DeBERTa V3与LSTM的法律文书分类器,仅使用48个随机选取的短片段(每段最多128个标记)作为输入。此外,我们还设计了基于Temporal的部署流水线,实现可靠稳定的处理流程。最佳模型在测试集上获得0.898的加权F1分数,而运行在CPU上的流水线处理每100份文件的中位时间为498秒。
原文摘要 · Abstract (English)
Classifying legal documents is a challenge, besides their specialized vocabulary, sometimes they can be very long. This means that feeding full documents to a Transformers-based models for classification might be impossible, expensive or slow. Thus, we present a legal document classifier based on DeBERTa V3 and a LSTM, that uses as input a collection of 48 randomly-selected short chunks (max 128 tokens). Besides, we present its deployment pipeline using Temporal, a durable execution solution, which allow us to have a reliable and robust processing workflow. The best model had a weighted F-score of 0.898, while the pipeline running on CPU had a processing median time of 498 seconds per 100 files.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。