arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.20558cs.CLcs.AI

打破令牌障碍:利用分块与卷积实现基于 BERT 的高效长文本分类

Breaking the Token Barrier: Chunking and Convolution for Efficient Long Text Classification with BERT

Dalhousie University(达尔豪斯大学)

Aman Jaiswal, Evangelos Milios

AI总结:

本文提出 ChunkBERT,通过令牌分块与 CNN 层扩展 BERT,使其能高效处理任意长文本,在多种分类任务上以仅 6.25% 的内存占用实现一致性能。

摘要:

基于 Transformer 的模型,特别是 BERT,推动了各种自然语言处理任务的研究。然而,这些模型受限于 512 个令牌的最大令牌限制。因此,在具有长输入的实际应用场景中应用它并非易事。各种复杂方法声称已克服这一限制,但近期研究对这些模型在不同分类任务上的有效性提出了质疑。这些在精心构建的长文本数据集上评估的复杂架构,其性能与简单基线相当甚至更差。在本工作中,我们提出了对 vanilla BERT 架构的一个相对简单的扩展,称为 ChunkBERT,它允许对任何预训练模型进行微调,以对任意长度的文本执行推理。所提出的方法基于对令牌表示进行分块和 CNN 层,使其与任何预训练的 BERT 兼容。我们专门在一个用于比较长文本分类模型的基准上评估 ChunkBERT,该基准涵盖多种任务(包括二分类、多分类和多标签分类)。使用 ChunkBERT 方法微调的 BERT 模型在该基准的长样本上表现一致,同时仅利用了原始内存占用的一小部分(6.25%)。这些发现表明,通过对预训练 BERT 模型进行简单修改,即可实现高效的微调和推理。

英文摘要:

Transformer-based models, specifically BERT, have propelled research in various NLP tasks. However, these models are limited to a maximum token limit of 512 tokens. Consequently, this makes it non-trivial to apply it in a practical setting with long input. Various complex methods have claimed to overcome this limit, but recent research questions the efficacy of these models across different classification tasks. These complex architectures evaluated on carefully curated long datasets perform at par or worse than simple baselines. In this work, we propose a relatively simple extension to vanilla BERT architecture called ChunkBERT that allows finetuning of any pretrained models to perform inference on arbitrarily long text. The proposed method is based on chunking token representations and CNN layers, making it compatible with any pre-trained BERT. We evaluate chunkBERT exclusively on a benchmark for comparing long-text classification models across a variety of tasks (including binary classification, multi-class classification, and multi-label classification). A BERT model finetuned using the ChunkBERT method performs consistently across long samples in the benchmark while utilizing only a fraction (6.25\%) of the original memory footprint. These findings suggest that efficient finetuning and inference can be achieved through simple modifications to pre-trained BERT models.

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

↑