Skip to main content
Have a personal or library account? Click to login
A Deep Learning Approach to Classifying Software Requirements: The Application of Transformer-Based Ensemble Learning and Attention-Based Fusion Cover

A Deep Learning Approach to Classifying Software Requirements: The Application of Transformer-Based Ensemble Learning and Attention-Based Fusion

Open Access
|Mar 2026

Abstract

The functional requirements (FRs) classification in software requirements classification (SRC) is a difficult task due to class imbalance, fine-grained subcategories, and semantic complexities. Existing Machine Learning (ML) and Deep Learning (DL) models often rely on handcrafted characteristics or overlook the contextual meaning. This work presents a novel hybrid ensemble framework that refines three pre-trained transformers (BERT, DistilBERT, and RoBERTa) and combines them using two mechanisms: (1) an Attention-Based Fusion Mechanism that dynamically selects the most contextually relevant transformer for each instance, and (2) an Accuracy-Per-Class Weighted Ensemble that assigns weights based on per-class validation accuracy. Tested on multiple datasets, the approach outperformed single-transformer and DL models (CNN, LSTM, BiLSTM, and GRU) by a large margin (p < 0.001), achieving 95% accuracy and 0.94 F1-score. To the best of our knowledge, this is the first study to combine attention fusion and transformer-based ensembles for SRC, establishing a new standard for SRC.

DOI: https://doi.org/10.2478/fcds-2026-0003 | Journal eISSN: 2300-3405 | Journal ISSN: 0867-6356
Language: English
Page range: 71 - 110
Submitted on: Aug 29, 2025
Accepted on: Feb 18, 2026
Published on: Mar 17, 2026
In partnership with: Paradigm Publishing Services
Publication frequency: 4 issues per year

© 2026 Azaz Ahmed Kiani, published by Poznan University of Technology
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License.