Machine learning, deep learning, or large language models: An empirical study on multi-label requirements classification
摘要
Automated requirements classification is crucial for software quality assurance, yet it remains a challenging task, particularly for multi-label classification (MLC) where requirements can span multiple quality attributes. While traditional machine learning (ML) and deep learning (DL) methods have been widely studied, the true potential of modern Large Language Models (LLMs) in this complex domain remains largely unexplored.
ObjectiveThis paper presents the first comprehensive empirical study to systematically evaluate generative LLMs for multi-label requirements classification. We benchmark them against reproduced state-of-the-art traditional methods and dissect the impact of three core drivers of LLM performance: model architecture, Parameter-Efficient Fine-Tuning (PEFT), and prompting strategies.
MethodTo ensure robust external validity, our evaluation leverages two distinct datasets: the widely-used, imbalanced EMSE benchmark and a newly constructed, balanced App Reviews Balanced Dataset (ARBD). We assess performance across various scenarios, including zero-shot, few-shot, and fine-tuned settings, using a suite of standard classification metrics.
ResultsOur findings reveal critical, context-dependent insights. First, we establish that data distribution dictates the optimal paradigm: while Deep Learning (BERT) and Classical ML (SVM) define the “accuracy ceiling” in imbalanced and balanced supervised settings respectively, LLMs offer decisive advantages in high-recall scenarios (critical for requirements discovery) and are the only viable solution in low-data environments. Second, we demonstrate that architectural suitability trumps raw scale, as a moderately-sized open-source LLM (Qwen3-14B) consistently outperforms massive frontier models in F1-score. Finally, we show that PEFT (LoRA) serves a dual role dictated by data balance—acting as a precision-recall trade-off lever in imbalanced scenarios, but as a robust performance amplifier in balanced ones.
ConclusionLLM-based approaches represent a powerful and versatile new paradigm. Our findings provide a foundational guide and a clear decision framework for practitioners, highlighting how data characteristics (balance) and project goals (accuracy vs. coverage) determine the choice between Traditional Models and LLMs. This study paves the way for a more effective and context-aware application of LLMs in requirements engineering.