EconPapers    
Economics at your fingertips  
 

Explainable Security Requirements Classification Through Transformer Models

Luca Petrillo (), Fabio Martinelli, Antonella Santone and Francesco Mercaldo ()
Additional contact information
Luca Petrillo: Institute for Informatics and Telematics, National Research Council of Italy (CNR), 56124 Pisa, Italy
Fabio Martinelli: Institute for High Performance Computing and Networking, National Research Council of Italy (CNR), 87036 Rende, Italy
Antonella Santone: Department of Medicine and Health Sciences “Vincenzo Tiberio”, University of Molise, 86100 Campobasso, Italy
Francesco Mercaldo: Institute for Informatics and Telematics, National Research Council of Italy (CNR), 56124 Pisa, Italy

Future Internet, 2025, vol. 17, issue 1, 1-27

Abstract: Security and non-security requirements are two critical issues in software development. Classifying requirements is crucial as it aids in recalling security needs during the early stages of development, ultimately leading to enhanced security in the final software solution. However, it remains a challenging task to classify requirements into security and non-security categories automatically. In this work, we propose a novel method for automatically classifying software requirements using transformer models to address these challenges. In this work, we fine-tuned four pre-trained transformers using four datasets (the original one and the three augmented versions). In addition, we employ few-shot learning techniques by leveraging transfer learning models, explicitly utilizing pre-trained architectures. The study demonstrates that these models can effectively classify security requirements with reasonable accuracy, precision, recall, and F1-score, demonstrating that the fine-tuning and SetFit can help smaller models generalize, making them suitable for enhancing security processes in the Software Development Cycle. Finally, we introduced the explainability of fine-tuned models to elucidate how each model extracts and interprets critical information from input sequences through attention visualization heatmaps.

Keywords: requirements classification; transformers; explainability (search for similar items in EconPapers)
JEL-codes: O3 (search for similar items in EconPapers)
Date: 2025
References: View complete reference list from CitEc
Citations:

Downloads: (external link)
https://www.mdpi.com/1999-5903/17/1/15/pdf (application/pdf)
https://www.mdpi.com/1999-5903/17/1/15/ (text/html)

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:gam:jftint:v:17:y:2025:i:1:p:15-:d:1559779

Access Statistics for this article

Future Internet is currently edited by Ms. Grace You

More articles in Future Internet from MDPI
Bibliographic data for series maintained by MDPI Indexing Manager ().

 
Page updated 2025-03-19
Handle: RePEc:gam:jftint:v:17:y:2025:i:1:p:15-:d:1559779