Comprehensive Benchmark: Comparing Classical, Recurrent, and Transformer-Based Models for Sentiment Analysis Across Text Length Strata
Text length variation presents an understudied yet significant challenge in sentiment analysis applications. This paper introduces a systematic cross-architectural performance evaluation framework specifically targeting text length as a critical variable. We benchmark five sentiment analysis approaches—TF-IDF with Logistic Regression, TF-IDF with SVM, LSTM networks, BERT, and DistilBERT—across four precisely defined text length strata using the IMDb movie review dataset. Our findings reveal previously undocumented performance patterns: transformer architectures excel with shorter texts (achieving up to 94.36% accuracy) but show steeper performance degradation as text length increases (11.5 percentage points drop from short to extra-long texts), while classical approaches demonstrate remarkable stability across length categories (less than 1.5 percentage points variation). Notably, for extra-long texts, TF-IDF with Logistic Regression outperforms transformer models by 5.41 percentage points. We identify distinct error patterns specific to each architectural family and quantify the compression-performance trade-off for distilled transformer models. These empirical insights enable practitioners to make informed architectural choices based on target text characteristics and computational constraints, potentially supporting hybrid model deployment strategies that optimize both accuracy and efficiency.
Authors
- Ashraf Hany
- Wael H. Gomma
Institutions
- Beni-Suef University (EG)
- October University of Modern Sciences and Arts (EG)
Publication Details
- Published
- 2025-07-12
- DOI
- https://doi.org/10.1109/imsa65733.2025.11166950
- Primary Topic
- Sentiment Analysis and Opinion Mining
- Type
- article
- Field-Weighted Citation Impact
- 0.00