Skip to content

ERP Processing

Resting-state analysis tells you how the brain is organized when nothing specific is demanded of it. Event-related processing tells you how the brain responds when something is—a stimulus appears, a decision must be made, an impulse must be inhibited. The event-related potential (ERP) is the brain’s time-locked electrical response to a discrete event, averaged across many trials to extract the signal from the noise. The event-related spectral perturbation (ERSP) extends this to the frequency domain, revealing which oscillatory components change in response to the event.

The Coherence Workstation processes ERPs from a GO/NoGo paradigm—a task where the subject responds to one stimulus type (GO) and withholds response to another (NoGo). This paradigm is a standard clinical tool for assessing executive function, response inhibition, and attentional allocation.

The continuous task recording is segmented into epochs—time windows centered on stimulus events:

erp:
epoch_window: [-0.5, 1.0]
baseline_window: [-0.5, -0.2]
min_trials: 30

Epoch window: −500 to +1000 ms. Each epoch begins 500 ms before the stimulus and extends 1000 ms after it. The pre-stimulus period provides the baseline for amplitude correction. The post-stimulus period captures the full sequence of cognitive processing stages, from early sensory registration through response execution and recovery.

Baseline correction: −500 to −200 ms. The mean amplitude in the 500-to-200 ms pre-stimulus interval is subtracted from the entire epoch. This removes slow voltage drifts and DC offsets, centering the pre-stimulus baseline at zero so that post-stimulus deflections reflect event-related activity rather than pre-existing voltage levels. The baseline window ends at −200 ms (not at stimulus onset) to avoid contamination from anticipatory activity that may begin shortly before the expected stimulus.

Minimum trials: 30. ERP averaging requires enough trials to achieve an adequate signal-to-noise ratio. A single trial’s ERP is dominated by ongoing EEG activity (which is not time-locked to the stimulus and averages out across trials) rather than by the event-related response. With 30 trials, the SNR improvement is approximately √30 ≈ 5.5×, which is generally sufficient for reliably measuring the major ERP components (N100, P200, P300). If fewer than 30 artifact-free trials survive for either condition (GO or NoGo), the ERP analysis is skipped rather than reporting unreliable averages.

The averaged ERP waveform contains a sequence of deflections—positive and negative voltage peaks at characteristic latencies after the stimulus. Each deflection reflects a different stage of cognitive processing. The pipeline extracts amplitude and latency measurements from five standard windows:

erp:
stages:
N100: [0.08, 0.15]
P200: [0.15, 0.25]
P300: [0.25, 0.45]
Late: [0.45, 0.70]
Recovery: [0.70, 1.0]

N100 (80–150 ms) is the first major negative deflection—an automatic sensory registration response. Its latency and amplitude reflect the speed and strength of initial stimulus processing. N100 is relatively unaffected by attention or cognitive load; it tells you about sensory pathway integrity.

P200 (150–250 ms) is a positive deflection associated with early stimulus classification—the brain’s initial categorization of the stimulus before a decision is made. P200 amplitude may reflect the ease of stimulus discrimination.

P300 (250–450 ms) is the most studied ERP component and the most clinically informative. Its amplitude reflects the amount of attentional resources allocated to stimulus processing; its latency reflects processing speed. P300 is larger for novel or task-relevant stimuli and smaller when attention is divided or depleted. The GO/NoGo paradigm produces two distinct P300 variants: P3b at parietal sites for GO stimuli (context updating) and P3a at frontal sites for NoGo stimuli (response inhibition).

Late (450–700 ms) captures post-decisional processing—error monitoring, response evaluation, and early recovery. Amplitude in this window reflects the brain’s assessment of its own response.

Recovery (700–1000 ms) captures the brain’s return to baseline after the event-related activation. The speed and completeness of recovery are clinically informative—slow recovery may indicate resource depletion or poor neural efficiency.

The pipeline overlays a clinically grounded interpretive structure on the ERP time course called the AODEMR perturbation-response sequence:

aodemr:
paradigm: visual_gonogo
stage_boundaries:
A_start: 0.050
O_start: 0.120
D_start: 0.200
E_start: 0.300
M_start: 0.450
R_start: 0.650
R_end: 1.000

AODEMR stands for Arousal, Orientation, Discrimination, Execution, Monitoring, Recovery—six stages that describe the brain’s sequential response to a perturbation (the stimulus). Each stage corresponds to a functional process:

Arousal (50–120 ms): The initial physiological response to sensory input—the brainstem and thalamus register that something happened.

Orientation (120–200 ms): Attentional resources are directed toward the stimulus—the brain orients to the event and begins preliminary classification.

Discrimination (200–300 ms): The stimulus is categorized and a response decision is formed—GO or NoGo, relevant or irrelevant, familiar or novel.

Execution (300–450 ms): The response is initiated (for GO) or inhibited (for NoGo). This stage overlaps with the P300 component and reflects the core executive function demands of the task.

Monitoring (450–650 ms): The brain evaluates the response—was it correct? Was it fast enough? Error-related activity peaks in this window.

Recovery (650–1000 ms): The system returns to its pre-stimulus state, restoring the baseline for the next trial. The speed and completeness of recovery reflect neural efficiency and resource availability.

The AODEMR framework is not a standard ERP classification—it’s a clinical interpretive model developed for the Coherence Workstation that maps the established ERP components onto a coherent functional narrative. The stage boundaries are approximate and based on a visual GO/NoGo paradigm; different paradigms (auditory, different inter-stimulus intervals) may shift these boundaries.

Global Field Power (GFP) is computed as the root-mean-square voltage across all channels at each time point. It collapses the multichannel ERP into a single summary waveform that peaks when the scalp electrical field is strongest—regardless of which electrodes contribute.

GFP peaks correspond to moments of maximal cortical synchronization—the entire scalp field is organized into a strong pattern. GFP troughs correspond to transitional states where the field is reorganizing. The timing and amplitude of GFP peaks provide a reference-independent summary of the ERP time course that’s useful for identifying the major processing stages without choosing specific electrodes.

The pipeline measures when GFP returns to its pre-stimulus baseline level after the P300 peak. This GFP recovery time is a clinically informative metric—it captures how quickly the brain can disengage from stimulus processing and restore its resting state. Prolonged recovery (slow return to baseline) may indicate difficulty disengaging, resource depletion, or poor neural efficiency. Rapid recovery suggests efficient processing with adequate resources.

The recovery time is measured in milliseconds from the P300 peak to the first sustained return to within one standard deviation of the pre-stimulus baseline GFP. It’s reported in the ERP stage output and displayed in the dashboard.

Beyond the voltage-domain ERP, the pipeline computes the Event-Related Spectral Perturbation (ERSP)—a time-frequency representation showing how oscillatory power changes over time relative to the stimulus:

ersp:
freqs_min: 2
freqs_max: 50
n_freqs: 30
n_cycles_min: 2
n_cycles_max: 8
baseline_window: [-0.5, -0.2]

ERSP is computed using Morlet wavelets (via MNE-Python’s tfr_morlet), which provide a natural trade-off between time resolution and frequency resolution. Low frequencies (2 Hz) use 2 cycles per wavelet, providing good time resolution but coarse frequency resolution. High frequencies (50 Hz) use 8 cycles, providing fine frequency resolution but coarser time resolution. The cycle count scales linearly between these bounds across the 30 frequency steps.

The ERSP is baseline-corrected using the same pre-stimulus window (−500 to −200 ms) as the ERP. Each time-frequency pixel shows the change in power relative to the baseline—positive values indicate event-related power increase (synchronization), negative values indicate power decrease (desynchronization).

The pipeline computes ERSP separately for GO and NoGo conditions and produces matched-scale visualizations for direct comparison. The ERSP difference map (NoGo minus GO) highlights condition-specific spectral dynamics—for example, increased theta power for NoGo trials reflects the additional cognitive control demands of response inhibition.

The matched scaling ensures that the same color scale is used for both conditions, so visual comparison is meaningful. Without matched scales, a weak theta increase in the GO condition could look identical to a strong theta increase in the NoGo condition if the scales were independently normalized.