LACE-HC: A Lightweight Attention-Based Classifier for Efficient Hierarchical Classification of Software Requirements
摘要
[Context and Motivation] The hierarchical classification of Software Requirements (SRs), where SRs are initially categorized into Functional Requirements (FRs) and Non-Functional Requirements (NFRs), followed by the further classification of NFRs into specific types, is crucial for addressing the diverse quality attributes that impact system performance. Traditional transformer-based models like BERT, RoBERTa, and DistilBERT often impose high computational and memory costs, making them impractical for resource-limited environments. This underscores the need for an efficient and accurate solution. [Question/Problem] We aim to investigate how to design a scalable, lightweight, attention-based model that maintains high classification accuracy for Hierarchical Classification of Software Requirements while significantly reducing computational and memory demands. [Principal Ideas/Results] This paper introduces LACE-HC, a Lightweight Attention-based Classifier for Efficient Hierarchical Classification of Software Requirements. The LACE-HC model incorporates a streamlined architecture with sparse attention, token pooling, and a Mixture of Experts (MoE) to enhance memory efficiency and minimize training time without sacrificing performance. Our experimental results on publicly available datasets, including PROMISE, PROMISE_EXP, PURE, and SecReq, demonstrate that the LACE-HC model achieves accuracy competitive with traditional transformer models while notably reducing training time by 86.10% and memory usage by 62.46%. [Contributions] The proposed LACE-HC model demonstrates substantial applicability in resource-constrained environments, such as small-scale applications and embedded systems, where traditional transformer models may be inefficient. By offering an effective alternative for intent classification, the LACE-HC model supports automated requirement engineering practices and improves the scalability of Natural Language Processing (NLP) applications.