Software code complexity assessment using EEG features: Towards a new software engineering paradigm using biofeedback
Year: 2019
Type: dissertation
Abstract: This study was developed on behalf of the on-going project BASE, Biofeedback Augmented Software Engineering (POCI - 01-0145 - FEDER- 031581), which aims at monitoring cognitive functions of the brain during code development to detect possible bugs that might occur due to shifts in the emotional condition of the subject. Specifically, the goal of this initial study is to investigate the brain activity during code comprehension through the analysis of Electroencephalogram (EEG) signals acquired from multiple volunteers and try to establish possible EEG biomarkers sensitive to different levels of mental workload. The use of EEG for this purpose is relevant, since the existing studies in bug detection were mostly focused on neuroimaging techniques based on fMRI, which have disadvantages, such as subject discomfort and impossibility to be acquired in normal programming condition.The study reported herein was conducted using information from 64 channels of EEG recorded from 30 subjects during code comprehension tasks. The subjects were submitted to three different trials corresponding to three different difficulty code comprehension tasks. The three different code complexity levels considered were according to five software complexity metrics widely used. Through a sequence of preprocessing methods, artifacts were identified and removed from EEG signals for further extraction of linear and nonlinear features. Then, the possibility to distinguish different levels of complexity based on EEG features was investigated. For this purpose, different types of classification models were considered, either binary or multiclass, by combining four different feature selection/reduction methods with four different classifiers. Considering a multiclass model using Principal Component Analysis (PCA) and a Support Vector Machine (SVM) classifier with linear kernel, it was obtained a F-Measure of 93.60% for code complexity easy, 50.60% for code complexity intermediate, 47.09% for code complexity advanced and 94.42% for the control (reading) task. These results reveals an evidence of mental effort saturation as code complexity increases and also suggest that current code complexity metrics do not capture cognitive load and might not be the best approach to assess bug risk.From the analysis, it was also found that the features related with the Theta, Alpha and Beta activity were the most common among the selected features with highest discriminative power. Concerning the channels which contributed with more information, they were located predominantly in frontal (mainly in Fz, F2 and FCz), central-parietal (mainly in CPz and CP2) and parietal (mainly in Pz) regions. These findings are in agreement with the features and regions (Frontal and Parietal Lobes) more relevant to cognitive load in the areas of mental workload and code comprehension, reported in related studies.Finally, as a preliminary study, using two of the most discriminant features, it was explored the possibility of a space-temporal analysis in order to spot areas that exhibited a higher mental effort during the code task being performed. These areas were compared to the (i) clusters of Eye tracking data; (ii) critical regions pointed by expert professionals; and (iii) other two biosignals (Heart Rate Variability and Pupillography).
Author: Júlio Medeiros
Institution: University of Coimbra
Language: English
Subfield: Cognitive Neuroscience
Field: Neuroscience
Domain: Life Sciences
Open Access status: green
OpenAlex ID: W2991397899
