Research Article

Transformer Based News Text Classification

Junshuai Li*
Institute of Information, University of International Business and Economics, Beijing, China

* Corresponding author: [email protected]

Abstract

With the exponential growth of online news, Transformer models based on self-attention mechanisms (e.g., BERT, GPT) have demonstrated theoretical advantages over traditional methods (e.g., SVM, Naïve Bayes, and CNN) in news text classification by capturing global semantic relationships. The encoder-only Transformer architecture developed in this study, integrating multi-head self-attention, dynamic positional encoding, and global average pooling, achieved an initial accuracy of 69.52% on the 20 Newsgroups dataset (significantly higher than CNN's 57.59%), showcasing its superior global feature extraction, adaptive polysemy handling, and noise resilience. However, the model suffers from prolonged training times (1,252 seconds per epoch compared to CNN's 149 seconds) and late-stage overfitting. Despite computational efficiency challenges, the research proposes optimizing performance through sparse attention mechanisms, domain-specific pretraining, and hybrid Transformer-CNN architectures to enhance classification capabilities in long-text and multilingual scenarios. These findings validate Transformer's potential for complex NLP tasks while emphasizing the necessity of architectural refinements to balance performance and scalability, providing critical directions for advancing news classification systems.

Keywords: transformer model; news text classification; deep learning
Published: May 30, 2025
DOI: 10.54254/2755-2721/2025.TJ23582
Volume: ACE Vol.160
pp. 142-154
Download PDF

References

  1. Pawar, S. (2024). Text Classification for News Article. International Journal for Research in Applied Science and Engineering Technology, 12(5), 4464–4467. https://doi.org/10.22214/ijraset.2024.62610
  2. Barlaug, N., & Gulla, J. A. (2021). Neural Networks for Entity Matching: A Survey. ACM Transactions on Knowledge Discovery from Data, 15(3), 1–37. https://doi.org/10.1145/3442200
  3. Yilahun, H., & Hamdulla, A. (2023). Entity extraction based on the combination of information entropy and TF-IDF. International Journal of Reasoning-Based Intelligent Systems, 15(1), 71. https://doi.org/10.1504/ijris.2023.128371
  4. Chauhan, N. K., & Singh, K. (2018). A Review on Conventional Machine Learning vs Deep Learning. 2018 International Conference on Computing, Power and Communication Technologies (GUCON), 347–352. https://doi.org/10.1109/gucon.2018.8675097
  5. Anding, K., Haar, L., Polte, G., Walz, J., & Notni, G. (2019). Comparison of the performance of innovative deep learning and classical methods of machine learning to solve industrial recognition tasks. In B. Zagar, P. Mazurek, M. Rosenberger, & P.-G. Dittrich (Eds.), Photonics and Education in Measurement Science 2019 (p. 26). SPIE. https://doi.org/10.1117/12.2530899
  6. Alameri, S. A., & Mohd, M. (2021). Comparison of Fake News Detection using Machine Learning and Deep Learning Techniques. 2021 3rd International Cyber Resilience Conference (CRC), 1–6. https://doi.org/10.1109/crc50527.2021.9392458
  7. Kumar, S., & Solanki, A. (2024). Improving <scp>ROUGE</scp>‐1 by 6%: A novel multilingual transformer for abstractive news summarization. Concurrency and Computation: Practice and Experience, 36(20). https://doi.org/10.1002/cpe.8199
  8. Fu, K., Gao, P., Liu, S., Zhang, R., Qiao, Y., & Wang, M. (2022). POS-BERT: Point Cloud One-Stage BERT Pre-Training (Version 1). arXiv. https://doi.org/10.48550/ARXIV.2204.00989
  9. Chen, X., Cong, P., & Lv, S. (2022). A Long-Text Classification Method of Chinese News Based on BERT and CNN. IEEE Access, 10, 34046–34057. https://doi.org/10.1109/access.2022.3162614
  10. Deping, L., Hongjuan, W., Mengyang, L., & Pei, L. (2021). News text classification based on Bidirectional Encoder Representation from Transformers. 2021 International Conference on Artificial Intelligence, Big Data and Algorithms (CAIBDA), 137–140. https://doi.org/10.1109/caibda53561.2021.00036