Abstract
This paper provides a comprehensive benchmark of text classification models—ranging from traditional Naive Bayes to state-of-the-art Transformers—specifically for long documents. The study reveals that while BERT-based models generally lead in accuracy, simpler "shallow" neural networks and basic bag-of-words approaches perform surprisingly well. This suggests that long document classification may be a simpler task than often assumed due to an abundance of classification signals inherent in longer texts.
Introduction
In the field of Natural Language Processing (NLP), "long documents" (consisting of multiple paragraphs) present unique challenges compared to short snippets. Unlike tweets or short reviews, long texts require models to maintain context over a large span. While research in text classification is plentiful, existing literature is often fragmented, with researchers testing different models on varying datasets. This study seeks to provide a holistic view by benchmarking a wide variety of model families on a standardized set of six datasets.
Methodology
The experimental models were categorized into three main groups:
- Traditional/Non-Neural: TF-IDF features paired with a Naive Bayes classifier.
- Shallow Neural Networks: Models trained from scratch, including word embedding averages (GloVe), LSTMs, CNNs, and Hierarchical Attention Networks (HAN).
- Pre-trained Transformers: Universal Sentence Encoder (USE), ULMFiT, BERT, and DistilBERT.
These models were evaluated across six standard benchmarks: BBC News, BBC Sports, AG News, 20 Newsgroups, R8, and IMDB.
Key Insights and Visual Analysis
A primary finding is the "Abundance of Signals" hypothesis. Because long documents contain more words, they provide more keywords and context that even simple models can leverage. However, the task type is a critical factor: topic-based classification is well-handled by simpler models, whereas sentiment analysis (e.g., IMDB) requires the deeper semantic understanding of Transformers.
The impact of model choice and fine-tuning is evident in document representation space. t-SNE visualizations show that while pre-trained models like the Universal Sentence Encoder (USE) have distinct clusters out of the box, BERT's initial representations for specific tasks may require optimization.
Fine-tuning BERT significantly improves the separability of document representations, leading to highly compact clusters that directly correlate with its superior classification accuracy.
Key Results
BERT emerged as the most consistent performer, achieving the highest accuracy on 4 out of 6 datasets (e.g., 98.2% on BBC News). DistilBERT was a close second, even outperforming the full BERT model on the BBC Sports dataset (99.32%). Among shallow models, the BiLSTM + Max architecture was highlighted as a strong, efficient choice. Notably, on the 20 Newsgroups dataset, the gap between Naive Bayes (81.69%) and BERT (85.78%) was relatively small, reinforcing the idea that sophisticated models are not always strictly necessary for topic categorization.
Conclusion
While BERT-based models are the most consistent performers and can be used "blindly" for high performance, they are not always required. For topic-based tasks, simpler models offer a competitive and computationally efficient alternative. Future work will focus on efficient Transformer variants like Longformer or BigBird to address the quadratic memory and time dependencies of standard BERT on extremely long sequences.
Summary updated