Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2022 Mar 7:16:788272.
doi: 10.3389/fnhum.2022.788272. eCollection 2022.

Software Bug Detection Causes a Shift From Bottom-Up to Top-Down Effective Connectivity Involving the Insula Within the Error-Monitoring Network

Affiliations

Software Bug Detection Causes a Shift From Bottom-Up to Top-Down Effective Connectivity Involving the Insula Within the Error-Monitoring Network

Joao Castelhano et al. Front Hum Neurosci. .

Abstract

The neural correlates of software programming skills have been the target of an increasing number of studies in the past few years. Those studies focused on error-monitoring during software code inspection. Others have studied task-related cognitive load as measured by distinct neurophysiological measures. Most studies addressed only syntax errors (shallow level of code monitoring). However, a recent functional MRI (fMRI) study suggested a pivotal role of the insula during error-monitoring when challenging deep-level analysis of code inspection was required. This raised the hypothesis that the insula is causally involved in deep error-monitoring. To confirm this hypothesis, we carried out a new fMRI study where participants performed a deep source-code comprehension task that included error-monitoring to detect bugs in the code. The generality of our paradigm was enhanced by comparison with a variety of tasks related to text reading and bugless source-code understanding. Healthy adult programmers (N = 21) participated in this 3T fMRI experiment. The activation maps evoked by error-related events confirmed significant activations in the insula [p(Bonferroni) < 0.05]. Importantly, a posterior-to-anterior causality shift was observed concerning the role of the insula: in the absence of error, causal directions were mainly bottom-up, whereas, in their presence, the strong causal top-down effects from frontal regions, in particular, the anterior cingulate cortex was observed.

Keywords: computer science; connectivity; error-monitoring; fMRI; insula.

PubMed Disclaimer

Conflict of interest statement

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Figures

FIGURE 1
FIGURE 1
Task timeline. Code with and without bugs and natural text blocks were presented randomly interleaved with a fixation cross for rest. Participants were instructed to search for bugs (error-monitoring/discovery), read the story (Text; control task), and perform a code comprehension task. These stimuli had more than one page, and the participants could navigate the code/text pages with a joystick.
FIGURE 2
FIGURE 2
Summary of behavioral data. Subjects’ accuracy reported as precision and sensitivity measures are reported in the left plot. Notably, subjects 5 and 6, as well as subject 11, did not report any bugs; thus, we were not able to calculate their parameters. The box plot on the right has shown the average delays from code start to the eureka moments. No significant differences were found between events. TP, true positive; FP, false positive.
FIGURE 3
FIGURE 3
Brain activation map of bug detection when searching for bugs. The regions that are activated at the first insight of bug detection are shown (eureka moment of suspicion) at the group level. We found significant activation in the anterior insula replicating our previous study (Castelhano et al., 2019).
FIGURE 4
FIGURE 4
Connectivity maps for the insula. The left panel represents the brain (Granger) connectivity map of regions that give input to the insula. The right panel shows the brain regions receiving input from the insula. In these maps, each color map represents each condition of the experiment. Notably, the “Code with bugs” condition recruits a larger set of areas to integrate with the insula, and these are located in more anterior regions of the brain compared to the other conditions that have more posterior connections. In sum, bug detection leads to an anterior shift of influences.

References

    1. Barnett L., Barrett A. B., Seth A. K. (2018). Solved problems for Granger causality in neuroscience: a response to stokes and purdon. Neuroimage 178 744–748. 10.1016/j.neuroimage.2018.05.067 - DOI - PubMed
    1. Bastin J., Deman P., David O., Gueguen M., Benis D., Minotti L., et al. (2017). Direct recordings from human anterior insula reveal its leading role within the error-monitoring network. Cereb. Cortex 27 1545–1557. 10.1093/cercor/bhv352 - DOI - PubMed
    1. Billeke P., Ossandon T., Perrone-Bertolotti M., Kahane P., Bastin J., Jerbi K., et al. (2020). Human anterior insula encodes performance feedback and relays prediction error to the medial prefrontal cortex. Cereb. Cortex 30 4011–4025. 10.1093/CERCOR/BHAA017 - DOI - PubMed
    1. Castelhano J., Duarte I. C., Duraes J., Madeira H., Castelo-Branco M. (2021). Reading and calculation neural systems and their weighted adaptive use for programming skills. Neural. Plast. 2021:145. 10.1155/2021/5596145 - DOI - PMC - PubMed
    1. Castelhano J., Duarte I. C., Ferreira C., Duraes J., Madeira H., Castelo-Branco M. (2019). The role of the insula in intuitive expert bug detection in computer code: an fMRI study. Brain Imag. Behav. 13 623–637. 10.1007/s11682-018-9885-1 - DOI - PMC - PubMed