arXiv:2506.07248cs.CLcs.LG2025-06被引 1

用关键词权重筛选关键句,大幅减少长文档处理时间

Improving the Efficiency of Long Document Classification using Sentence Ranking Approach

  • 基于TF-IDF和句子长度优化的关键词加权排序方法
  • 仅用不到一半文本量,准确率损失不足0.33%
  • 适合需要快速处理长文本的生产环境

长文档分类受限于Transformer模型(如BERT)的固定输入长度和二次注意力复杂度。全文档输入常冗余,因仅部分句子承载关键信息。本文提出一种基于TF-IDF的句子排序方法,通过固定数量或百分比筛选最相关句子,并结合归一化TF-IDF得分与句子长度优化评分策略。在马拉地语新闻数据集MahaNews LDC上评估,该方法优于首句、末句及随机选取基线。使用MahaBERT-v2时,仅需约47%的输入长度,推理延迟降低43%,准确率相比完整上下文基线仅下降0.33%,证明显著压缩上下文仍可保持高性能,适用于实际长文档分类任务。

原文摘要 · Abstract (English)

Long document classification poses challenges due to the computational limitations of transformer-based models, particularly BERT, which are constrained by fixed input lengths and quadratic attention complexity. Moreover, using the full document for classification is often redundant, as only a subset of sentences typically carries the necessary information. To address this, we propose a TF-IDF-based sentence ranking method that improves efficiency by selecting the most informative content. Our approach explores fixed-count and percentage-based sentence selection, along with an enhanced scoring strategy combining normalized TF-IDF scores and sentence length. Evaluated on the MahaNews LDC dataset of long Marathi news articles, the method consistently outperforms baselines such as first, last, and random sentence selection. With MahaBERT-v2, we achieve near-identical classification accuracy with just a 0.33 percent drop compared to the full-context baseline, while reducing input size by over 50 percent and inference latency by 43 percent. This demonstrates that significant context reduction is possible without sacrificing performance, making the method practical for real-world long document classification tasks.

长文档分类句子筛选效率优化TF-IDF

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。