Hierarchical Text Classification: Fine-tuned GPT-2 vs BERT-BiLSTM
Abstract Hierarchical Text Classification (HTC) is a specialised task in natural language processing that involves categorising text into a hierarchical structure of classes. This approach is particularly valuable in several domains, such as document organisation, sentiment analysis, and information retrieval, where classification schemas naturally form hierarchical structures. In this paper, we propose and compare two deep learning-based models for HTC. The first model involves fine-tuning GPT-2, a large language model (LLM), specifically for hierarchical classification tasks. Fine-tuning adapts GPT-2’s extensive pre-trained knowledge to the nuances of hierarchical classification. The second model leverages BERT for text preprocessing and encoding, followed by a BiLSTM layer for the classification process. Experimental results demonstrate that the fine-tuned GPT-2 model significantly outperforms the BERT-BiLSTM model in accuracy and F1 scores, underscoring the advantages of using advanced LLMs for hierarchical text classification.
Authors
- Sofiane Boukli Hacene (ORCID: https://orcid.org/0000-0002-9760-3806)
- Abdelghani Bouziane (ORCID: https://orcid.org/0000-0002-8583-3858)
- Djelloul Bouchiha (ORCID: https://orcid.org/0000-0001-7314-4329)
- Noureddine Doumi (ORCID: https://orcid.org/0000-0002-3108-4732)
- Benamar Hamzaoui
Institutions
- Université Djilali de Sidi Bel Abbès (DZ)
- Université de Saida Dr.Moulay Tahar (DZ)
- University of Blida (DZ)
Publication Details
- Journal
- Applied Computer Systems
- Published
- 2025-01-01
- DOI
- https://doi.org/10.2478/acss-2025-0005
- Citations
- 2
- Primary Topic
- Topic Modeling
- Type
- article
- Field-Weighted Citation Impact
- 4.96