Table of Contents
Fetching ...

SDPERL: A Framework for Software Defect Prediction Using Ensemble Feature Extraction and Reinforcement Learning

Mohsen Hesamolhokama, Amirahmad Shafiee, Mohammadreza Ahmaditeshnizi, Mohammadamin Fazli, Jafar Habibi

TL;DR

SDPERL addresses the challenge of adaptive, high-dimensional software defect prediction by marrying ensemble semantic feature extraction from multiple code-specific pre-trained models with reinforcement-learning–based feature selection using PPO. The framework introduces a custom embedding space and a pheromone table to guide feature selection, achieving superior F1 and AUC performance on PROMISE datasets, notably with an average F1 improvement of $6.25\%$ over baselines. Key contributions include (1) a novel SDPERL framework, (2) extensive evaluation against traditional SDP approaches, and (3) insights into the practical integration of RL in SDP for adaptive, scalable defect detection in evolving software systems.

Abstract

Ensuring software quality remains a critical challenge in complex and dynamic development environments, where software defects can result in significant operational and financial risks. This paper proposes an innovative framework for software defect prediction that combines ensemble feature extraction with reinforcement learning (RL)--based feature selection. We claim that this work is among the first in recent efforts to address this challenge at the file-level granularity. The framework extracts diverse semantic and structural features from source code using five code-specific pre-trained models. Feature selection is enhanced through a custom-defined embedding space tailored to represent feature interactions, coupled with a pheromone table mechanism inspired by Ant Colony Optimization (ACO) to guide the RL agent effectively. Using the Proximal Policy Optimization (PPO) algorithm, the proposed method dynamically identifies the most predictive features for defect detection. Experimental evaluations conducted on the PROMISE dataset highlight the framework's superior performance on the F1-Score metric, achieving an average improvement of $6.25\%$ over traditional methods and baseline models across diverse datasets. This study underscores the potential for integrating ensemble learning and RL for adaptive and scalable defect prediction in modern software systems.

SDPERL: A Framework for Software Defect Prediction Using Ensemble Feature Extraction and Reinforcement Learning

TL;DR

SDPERL addresses the challenge of adaptive, high-dimensional software defect prediction by marrying ensemble semantic feature extraction from multiple code-specific pre-trained models with reinforcement-learning–based feature selection using PPO. The framework introduces a custom embedding space and a pheromone table to guide feature selection, achieving superior F1 and AUC performance on PROMISE datasets, notably with an average F1 improvement of over baselines. Key contributions include (1) a novel SDPERL framework, (2) extensive evaluation against traditional SDP approaches, and (3) insights into the practical integration of RL in SDP for adaptive, scalable defect detection in evolving software systems.

Abstract

Ensuring software quality remains a critical challenge in complex and dynamic development environments, where software defects can result in significant operational and financial risks. This paper proposes an innovative framework for software defect prediction that combines ensemble feature extraction with reinforcement learning (RL)--based feature selection. We claim that this work is among the first in recent efforts to address this challenge at the file-level granularity. The framework extracts diverse semantic and structural features from source code using five code-specific pre-trained models. Feature selection is enhanced through a custom-defined embedding space tailored to represent feature interactions, coupled with a pheromone table mechanism inspired by Ant Colony Optimization (ACO) to guide the RL agent effectively. Using the Proximal Policy Optimization (PPO) algorithm, the proposed method dynamically identifies the most predictive features for defect detection. Experimental evaluations conducted on the PROMISE dataset highlight the framework's superior performance on the F1-Score metric, achieving an average improvement of over traditional methods and baseline models across diverse datasets. This study underscores the potential for integrating ensemble learning and RL for adaptive and scalable defect prediction in modern software systems.

Paper Structure

This paper contains 34 sections, 2 equations, 8 figures, 2 tables, 3 algorithms.

Figures (8)

  • Figure 1: The Overview of SDPERL Framework
  • Figure 2: Embedding Pipeline
  • Figure 3: Structure Of Phoromone Table
  • Figure 4: F1-scores In Different Modes
  • Figure 5: Metrics For Different Numbers Of Features
  • ...and 3 more figures