Attention over pre-trained Sentence Embeddings for Long Document Classification

Amine Abdaoui, Sourav Dutta
7/18/2023
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Despite being the current de-facto models in most NLP tasks, transformers are often limited to short sequences due to their quadratic attention complexity on the number of tokens. Several attempts to address this issue were studied, either by reducing the cost of the self-attention computation or by modeling smaller sequences and combining them through a recurrence mechanism or using a new transformer model. In this paper, we suggest to take advantage of pre-trained sentence transformers to start from semantically meaningful embeddings of the individual sentences, and then combine them through a small attention layer that scales linearly with the document length. We report the results obtained by this simple architecture on three standard document classification datasets. When compared with the current state-of-the-art models using standard fine-tuning, the studied method obtains competitive results (even if there is no clear best model in this configuration). We also showcase that the studied architecture obtains better results when freezing the underlying transformers. A configuration that is useful when we need to avoid complete fine-tuning (e.g. when the same frozen transformer is shared by different applications). Finally, two additional experiments are provided to further evaluate the relevancy of the studied architecture over simpler baselines.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{abdaoui2023attention,
  title  = {Attention over pre-trained Sentence Embeddings for Long Document Classification},
  author = {Amine Abdaoui and Sourav Dutta},
  year   = {2023},
  eprint = {2307.09084},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.09084v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.09084.svg)](https://codeofpaper.com/paper/2307.09084)

Discussion