Interpreting EEG Measures of Cognitive Load in Software Engineering
A Task-Difficulty-Grounded Approach
We ground EEG markers of cognitive load in the difficulty of the software-engineering task itself: – participants solved – Python code-comprehension tasks at three difficulty levels in dark and light GUI mode. Difficulty-related EEG changes identify the markers and set the scale on which the GUI-mode effect is read.
Results overview
Alpha power rises step by step with task difficulty; on that scale, dark and light GUI mode do not differ significantly. Click a tile for the evidence, or watch the hard − easy scalp map evolve over the task.
Approach
We use the task’s own difficulty as the yardstick: EEG features that change with difficulty become the markers, and the GUI-mode difference is read on that scale. Below are the tasks, the design, the time windows and how the EEG was cleaned.
Our proposed five-step approach
- 1Source comprehension tasksCode-comprehension tasks from the developers’ own setting, graded easy, medium and hard.The tasks
- 2Validate the difficultiesPeople outside the study rate each task’s difficulty and clarity before any EEG is recorded.The tasks
- 3Design & collectEvery participant solves all tasks in dark and light mode while EEG and behaviour are recorded.Design and data
- 4Identify the markerEEG features that change with difficulty (hard − easy) become the markers of cognitive load.The difficulty staircase
- 5Measure at the markerDark − light is read at those markers and sized against the hard − easy change.Dark vs light
Waveforms are synthetic and serve only to illustrate our preprocessing pipeline.
Alpha power climbs step by step with task difficulty
Whole-scalp alpha power rises step by step with task difficulty. Switch the measure, site or step below, or compare the bands side by side.
Temporal analysis shows sustained differences over time
Harder tasks take longer, so the contrast is taken in equally long 6-s windows at eleven positions from task onset to the response. Alpha and theta are significantly higher in hard tasks at every one of those positions: the difference is sustained across the whole task, not confined to its start.
α power (8–12 Hz, 8 posterior electrodes) around task onset by difficulty. Median of 42 participants, ribbon ± robust SE, log power relative to the pre-task countdown [−28, −12] s; time axis in seconds from the moment the code appears. Pen at ≈ 5× real time; the faint trace is the previous sweep. Scalp map: hard − easy α in the first 6 s, n = 42, colour limit ±0.2 log power.
Alpha drops at task onset, least for hard tasks
Aligned to the moment the code appears, whole-scalp alpha drops sharply within the first seconds and stays suppressed at every difficulty level, less deeply for hard tasks than for easy ones. The difficulty difference is sustained, but it sits on top of a response that itself changes over the course of a task.
The task-grounded marker set carried forward to RQ2
The band-power cells that reflected task difficulty form the candidate set: – features, with α and θ carrying the strongest evidence. The dark − light comparison is read on this set, at the scale that difficulty set.
Dark vs light: no significant difference at the markers
The same – participants solved half of their tasks in dark mode and half in light mode. At the markers that difficulty identified, dark and light did not differ significantly, and for whole-scalp α the difference is bounded below one third of the difficulty effect.
Did the difficulty levels differ in demand?
Accuracy fell from – (easy) to – (medium) and – (hard), while completion time (– → – → – s) and reported mental effort (– → – → – on the 1–9 Paas scale) rose with every step.
Participants
– right-handed participants (– years) from Computer Science and related programmes solved the tasks while EEG was recorded from – scalp channels.
Replication package
The anonymized package (–) holds the behavioural and EEG-feature data of all – participants, the study materials, the analysis notebooks and scripts, every result table and the extended results. The continuous raw EEG signals (≈ –) follow upon acceptance.
bash run_all.sh reproduces every result from the shipped feature tables, no EEG signals needed.