Skip to content

Source Localization

Source localization is the attempt to answer a deceptively simple question: where in the brain is this electrical activity coming from? The scalp EEG tells you what the brain is doing in the frequency domain and the time domain, but it doesn’t directly tell you where. The signal measured at electrode Fz is not “the frontal lobe”—it’s a weighted mixture of activity from multiple cortical sources, blurred through layers of tissue. Source localization mathematically inverts this blurring to estimate the cortical current distribution that most likely produced the observed scalp pattern.

This is, mathematically, an ill-posed problem. There are infinitely many cortical source configurations that could produce any given scalp pattern. Source localization algorithms resolve this ambiguity by imposing constraints—smoothness assumptions, anatomical priors, statistical regularization—that narrow the solution space to a unique estimate. The estimate is useful but inherently uncertain, and that uncertainty is greater with fewer electrodes.

We are honest about this. Nineteen electrodes provide meaningful source estimates for large-scale cortical patterns (which lobe, which broad region) but cannot resolve fine spatial details (which gyrus, which cortical layer). The source localization display in the Coherence Workstation should be read as “the activity is approximately here,” not as a precise anatomical claim.

The pipeline uses a pre-computed transformation matrix (TM) for source estimation—the same mathematical approach used by EEGLAB’s LORETA plugin and the standalone sLORETA-KEY software. This is a single matrix multiply that transforms a vector of scalp potentials (19 values) into a vector of cortical current densities (2,394 voxels × 3 orientations).

preprocessing:
source:
enabled: true
use_bundled_tm: true
spacing: oct6
method: sloreta
snr: 3.0
cache_forward: true

The TM is computed once, offline, from three components: a forward model (how each cortical source contributes to each scalp electrode, given the geometry of the head), an inverse method (sLORETA, which finds the smoothest current distribution consistent with the data), and a regularization parameter (SNR = 3.0, so λ² = 1/9 ≈ 0.11). These three components produce a fixed matrix that maps any 19-channel scalp measurement to a cortical current density estimate.

The forward model—the physics of how electrical fields propagate through the head—depends on the head geometry (skull thickness, CSF layer, cortical folding) and the electrode positions, but not on the EEG data itself. For a standard 10-20 montage with a template head (the MNE-Python fsaverage template), the forward model is the same for every subject. This means the transformation matrix can be computed once and bundled with the application, eliminating the need for FreeSurfer, BEM computation, or any runtime dependency on neuroimaging software.

This is the same approach used throughout the clinical QEEG field. sLORETA-KEY, the reference implementation of sLORETA, uses a pre-computed TM with the MNI152 head model. EEGLAB’s LORETA plugin does the same. The assumption—that a template head is “close enough” for clinical purposes—is well-validated for 19-channel recordings where the spatial resolution is already limited by the electrode count.

The inverse method is sLORETA (standardized Low Resolution Electromagnetic Tomography). sLORETA finds the current distribution that is maximally smooth across the cortical surface—it assumes that neighboring cortical regions tend to have similar activity levels, which is biophysically reasonable because cortical columns are organized in functional patches.

The “standardized” part normalizes the current density estimates by their expected variance, which corrects for the depth bias inherent in minimum-norm solutions (deeper sources produce weaker scalp signals and are underestimated without normalization). The result is that sLORETA has zero localization error for single dipolar sources in noise-free simulations—a theoretical property that, while idealized, indicates sound mathematical foundations.

Alternative inverse methods (eLORETA, dSPM, MNE) are available via the method parameter but are not the default. sLORETA is the most widely used in clinical QEEG, providing the best basis for comparison with existing clinical literature and other platforms.

preprocessing:
source:
spacing: oct6

The source space uses oct6 spacing—a recursive octahedral subdivision of the cortical surface that produces approximately 4,098 source points per hemisphere (8,196 total, reduced to ~2,394 after excluding deep/medial sources not well-resolved by scalp EEG). This density is standard for 19-channel source estimation—finer spacing would not add genuine resolution given the electrode count.

Each source voxel is labeled with both a Brodmann area and a Desikan-Killiany atlas region, providing two complementary anatomical reference systems:

Brodmann areas are the classic histological parcellation of the cortex into 47 regions based on cytoarchitecture (cell structure). They’re the lingua franca of clinical neurophysiology—“BA 10” (frontopolar cortex) or “BA 17” (primary visual cortex) are immediately meaningful to neurologists and neuropsychologists. The pipeline maps source voxels to Brodmann areas using the LORETA-Talairach-BAs coordinate lookup table.

Desikan-Killiany atlas is a modern MRI-based parcellation that divides each hemisphere into 34 regions based on sulcal and gyral anatomy. It provides more functionally meaningful labels than Brodmann areas in some cases (“superior temporal gyrus” is more informative than “BA 22” for many clinicians) and is the standard atlas used by MNE-Python’s source estimation tools.

Both systems are reported because different clinicians prefer different reference frames, and because the two systems don’t always align neatly—a single Brodmann area may span multiple Desikan-Killiany regions, and vice versa.

The source localization results are rendered as cortical activation maps with configurable display parameters:

loreta:
threshold_pct: 60
smooth_fwhm: 14
colormap: hot
alpha: 0.55
html_3d: true
surf_mesh: colin27
surf_type: pial

Threshold (60th percentile) means only the top 40% of source intensity is displayed. This focuses the visualization on the regions of peak activation rather than showing the entire (noisy) cortical distribution. Lower thresholds reveal more of the surrounding activity; higher thresholds focus more tightly on the peaks.

Smoothing (14 mm FWHM) applies Gaussian spatial smoothing to the source estimate before display. This reflects the genuine spatial uncertainty of 19-electrode source localization—the smoothing kernel is roughly the size of the spatial resolution achievable with this electrode count.

Interactive 3D viewers (html_3d: true) generate standalone HTML files with rotatable 3D brain renderings using the Colin27 template surface. These are embedded in the clinical report and allow the clinician to inspect the source distribution from any angle.

Source-Space Connectivity (DICS Beamformer)

Section titled “Source-Space Connectivity (DICS Beamformer)”

Beyond static source localization, the pipeline computes source-space connectivity—functional coupling between anatomical brain regions in source space rather than sensor space. This uses the DICS beamformer (Dynamic Imaging of Coherent Sources):

source_connectivity:
enabled: true
use_bundled_forward: true
spacing: oct6
reg: 0.05
pick_ori: max-power
max_epochs: 80
methods: [dwpli, coh, imcoh]

DICS is a spatial filter that estimates the power and cross-spectral density at each source location by constructing a filter that passes activity from the target location while suppressing activity from elsewhere. Unlike the TM approach (which applies a fixed matrix), DICS adapts its spatial filter to the data’s cross-spectral structure, making it more accurate for connectivity estimation.

Source connectivity is computed between 18 anatomical regions of interest (ROIs) based on the Desikan-Killiany atlas:

NetworkROIs
ExecutiveDLPFC left, DLPFC right, mPFC
SalienceACC, Insula left, Insula right
Default ModePCC, MPFC
SensorimotorPrecentral, Postcentral
VisualVisual cortex
AuditorySTG, MTG

Each ROI is defined as a set of source-space vertices within the corresponding atlas region. The DICS beamformer estimates the cross-spectral density between ROI pairs, and connectivity metrics (dwPLI, coherence, imaginary coherence) are computed from the cross-spectra—the same metrics used at the sensor level, but now between anatomically defined regions rather than scalp electrodes.

Source-space connectivity with 19 electrodes is at the edge of what the physics supports. The DICS beamformer’s spatial resolution depends on the number of sensors—with 19 channels, the effective resolution is roughly 3–4 cm, which is adequate for distinguishing frontal from parietal or left from right hemisphere, but not for resolving adjacent cortical regions within the same lobe.

The 18-ROI parcellation reflects this limitation. The ROIs are large enough to be distinguishable at this resolution—they correspond to major functional networks, not to individual gyri. Finer parcellations (the full 68-region Desikan-Killiany atlas, for instance) would create ROIs that the beamformer can’t reliably separate, leading to spurious connectivity from spatial leakage.

We include source-space connectivity because it provides complementary information to sensor-space analysis—it references anatomical regions rather than electrode positions, which is more meaningful for clinical interpretation. But it should be interpreted with appropriate caution, and never as a substitute for direct measurement with higher-density arrays or functional neuroimaging.