Replication of The advantage of combining MEG and EEG: comparison to fMRI in focally-stimulated visual cortex by Sharon et al. (2007, Neuroimage)

Author

Qiyuan Feng (qyfeng@stanford.edu)

Published

December 14, 2025

Repository link: GitHub repo Original paper (PDF in repo): sharon2007.pdf

Introduction

Justification

I study visual perception using different neuroimaging techniques, including EEG/MEG and fMRI. I’m particularly interested in finding out how well we can localize signals across modalities. This original paper reports that combining EEG and MEG can approach the spatial resolution of fMRI when localizing signals in primary visual cortex (V1). This is significant for vision research: if we can get fMRI-like localization without scanning every time, we can run more flexible studies while keeping spatial accuracy in check. I will replicate the core idea on the EEG side, using the same two visual stimuli at 5° eccentricity in the left visual field that the original paper used. Using each subject’s pRF maps and structural MRI-based head models as “ground truth”, I will quantify localization error of EEG source estimates and compare it to the paper’s reported error profiles.

Stimuli and Procedures

Stimuli will be two small patches presented at 5° eccentricity in the left visual field (same positions as two of the original paper’s four stimuli), designed to drive a circumscribed patch of right-hemisphere early visual cortex (V1). Each patch will be a high-contrast checkerboard (size ~1–2°; exact size matched to our lab’s display geometry), contrast-reversing at a steady rate to boost SSVEP SNR. Subjects fixate centrally with a fixation marker; brief attention checks (e.g., infrequent color change at fixation) help maintain fixation. Each stimulus position will be run in multiple short blocks to collect adequate trials for frequency-domain averaging.

For “ground truth,” I will use each subject’s pRF maps and cortical surfaces from T1 MRI to define the expected cortical locus (and extent) representing each 5° stimulus. For EEG, I will use each subject’s MRI to build a BEM head model, co-register electrodes to the scalp, and compute forward models. I will estimate sources with a standard inverse (e.g., depth-weighted MNE/dSPM or an LCMV beamformer with appropriate regularization). Localization error will be computed as the cortical (geodesic) distance between the EEG peak (or center-of-mass above a fixed threshold) and the pRF-defined target vertex/ROI. I will summarize error per stimulus and per subject, plus uncertainty via bootstrap over epochs.

Potential Challenges

  • Retinotopic variability: the same 5° polar-angle location can fall on gyral vs. sulcal cortex across people; sources buried in a sulcus have weaker EEG fields, inflating error.
  • Ground-truth alignment: pRF maps have their own uncertainty (fit noise, attention/fixation drift). I will propagate pRF ROI uncertainty when scoring error (e.g., distance to the nearest vertex within the pRF ROI).
  • Head model/inverse sensitivity: localization is sensitive to BEM accuracy, conductivity assumptions, coregistration error, inverse depth weighting, and regularization. I will fix parameters a priori and report sensitivity analyses (e.g., ±10% regularization, with/without depth weighting).
  • SNR and sample size: with few subjects, variance will be high. I will maximize SNR (SSVEP averaging, artifact rejection/ICA, notch and band-pass) and report per-subject results plus group medians rather than rely only on NHST.

Methods

Power Analysis

The original study by Sharon et al. (2007) included six participants, each completing four scanning sessions (MEG/EEG, fMRI, retinotopy, and structural MRI). They reported statistically reliable localization differences across modalities (EEG vs MEG vs combined), with effect sizes corresponding to localization-error differences of ~8 mm ± 1 mm between conditions. Based on this magnitude, a power analysis (Cohen’s d ≈ 1.0) indicates that n = 7 yields ~80 % power, n = 9 ~90 %, and n = 11 ~95 % power for within-subject paired comparisons (α = .05, two-tailed).

Planned Sample

We plan to include 6 adult participants (ages 25–35) recruited from the Stanford University community (students, faculty, and staff).

  • Inclusion criteria: normal or corrected-to-normal vision; no neurological or psychiatric disorders; availability of a high-quality T1-weighted MRI scan.
  • Exclusion criteria: none beyond standard EEG contraindications (e.g., skin irritation, implanted metal).Only individuals with an existing MRI are included for budget and modeling reasons. No pre-selection based on handedness or eye dominance is used.

Materials

“A single 100 % contrast Gabor patch was presented in one of four locations (upper or lower visual quadrant, at 5 or 10 degrees eccentricity) for 500 ms while the subject fixated a central fixation cross. A blank condition (gray except for the fixation cross) was additionally presented… Each arm of the fixation cross was 0.17° long… The gray level of the background was equivalent to the mean of the Gabor patches. The carrier spatial frequency of the Gabor patch was 2 cycles/degree, and the Gaussian full-width at half-maximum was 1.2° and 1.7° for the 5° and 10° eccentricity stimuli, respectively.”

All stimuli in our replication will closely follow these parameters except for two planned modifications:

  1. We will use three flickering stimuli instead of four static ones, employing frequency tagging (steady-state visual evoked potentials, SSVEP) to increase SNR.

  2. Each stimulus will be a contrast-reversing checkerboard at distinct temporal frequencies (5, 6, 7.5 Hz).

The stimuli will be positioned as follows: - Two patches at 5° eccentricity in the upper-left and lower-left quadrants (polar angles ≈ 45° and 135°). - One patch at 2° eccentricity on the left horizontal meridian (near central vision). This arrangement allows simultaneous frequency-specific tagging of multiple visual field locations within hardware refresh constraints (60 Hz monitor; each frequency synchronized to integer frame durations).

Procedure

“In both fMRI and MEG/EEG sessions, a single 100 % contrast Gabor patch was presented in one of four locations for 500 ms while the subject fixated a central fixation cross… One arm of the fixation cross disappeared for 33 ms as soon as the stimulus epoch ended, and the subject indicated by button-press whether it was the upper or lower arm. Incorrect or missed trials were discarded. The inter-stimulus interval was randomized between 1–6.5 s… Each session included 20 scans of 4:16 minutes, for a total of 500 repetitions per condition.”

In our EEG-only replication, each stimulus frequency will be presented continuously in 10 s blocks, alternating between the three stimulus locations. Participants will maintain fixation on the central cross and perform a simple letter-change detection task at fixation to ensure stable gaze. Each frequency condition will include 40 blocks per subject, giving ~10-12 minutes total per frequency. EEG will be recorded at 128 channels using the same montage across participants, with EOG monitoring for eye artifacts.

Analysis Plan

“MEG/EEG data were analyzed using the MNE software… low-pass filtered at 200 Hz… noisy channels identified by inspection and ignored… forward solution constructed using a three-layer BEM (conductivities = 0.3, 0.006, 0.3 S/m). The data and forward matrix were whitened using the noise covariance matrix… Anatomically constrained inverse solutions (dSPM and depth-weighted MNE) were computed with a loose orientation constraint of 0.6… Localization error was defined as the 3D distance between the EEG/MEG V1 peak and the fMRI V1 peak.”

Our analysis follows the same procedure:

  1. Preprocessing: band-pass (1–40 Hz), notch filter at 60 Hz, ICA for eye/blink artifacts.
  2. Frequency-domain extraction: Fourier transform of each block; extract complex coefficients at 5, 6, 7.5 Hz.
  3. Source estimation: use subject-specific BEM head model and structural MRI for forward modeling. Apply dSPM and depth-weighted MNE to obtain complex-valued source estimates per frequency.
  4. Ground truth: use pRF-based retinotopic maps from each subject’s fMRI to define the expected cortical ROI (analogous to Sharon’s V1 ROI).
  5. Localization error: compute geodesic distance between the maximum (or center of mass) of EEG power at each frequency and the expected V1 ROI center.
  6. Statistical comparison: bootstrap within-subject error distribution; report median error per frequency.

Clarify key analysis of interest here

Differences from Original Study

Compared with Sharon et al. (2007):

  • Modalities: we use EEG only, not MEG/EEG simultaneous recording. This will correspond to only the first part of Sharon et al.(2007)’s study, where they compare EEG to the ground-truth fMRI.

  • Stimuli: instead of transient 500 ms flashes, we use continuous frequency-tagged stimuli (5, 6, and 7.5 Hz) to improve SNR and allow simultaneous multi-location stimulation for budget consideration.

  • Timing: Sharon used ~500 ms trials with randomized ISI; we use 10s SSVEP blocks with continuous presentation.

  • Session duration: shorter overall session (originally 1 hour total recording per subject; now ~12min per subject).

  • Ground truth: instead of fMRI recorded in the same session, we use pRF maps from prior scans as a reference.

  • Expected impact: frequency tagging yields higher SNR and more stable phase estimates but sacrifices precise transient timing. The change from transient to steady-state stimulation should not alter the spatial pattern of V1 activation but may slightly broaden cortical response spread due to temporal integration.

Methods Addendum (Post Data Collection)

Actual Sample

The final sample consisted of six adult participants (ages 23–35) recruited from the Stanford University community (students, faculty, and staff). All participants had normal or corrected-to-normal vision and no history of neurological or psychiatric disorders. All participants had an existing high-quality T1-weighted structural MRI scan, which was required for EEG forward modeling and source localization.

All six participants completed the EEG recording session. Data from all participants met the predefined quality criteria and were included in the analysis. No participants or trials were excluded beyond the standard preprocessing steps described in the Analysis Plan (e.g., removal of segments contaminated by eye blinks or excessive noise).

Differences from pre-data collection methods plan

None.

Results

Data preparation

Data preparation following the analysis plan.

Confirmatory analysis

The analyses as specified in the analysis plan.

# get a summary table
sem <- function(x) sd(x, na.rm = TRUE) / sqrt(sum(!is.na(x)))

tbl_overall <- d_correct %>%
summarise(
n = n(),
mean = mean(loc_error),
median = median(loc_error),
sem = sem(loc_error)
)

tbl_by_method <- d_correct %>%
group_by(inverse_method) %>%
summarise(
n = n(),
mean = mean(loc_error),
median = median(loc_error),
sem = sem(loc_error),
.groups = "drop"
)

tbl_by_roi <- d_correct %>%
group_by(roi_data_norm) %>%
summarise(
n = n(),
mean = mean(loc_error),
median = median(loc_error),
sem = sem(loc_error),
.groups = "drop"
)

tbl_overall
# A tibble: 1 × 4
      n  mean median   sem
  <int> <dbl>  <dbl> <dbl>
1   108  23.5   20.4  1.48
tbl_by_method
# A tibble: 3 × 5
  inverse_method     n  mean median   sem
  <fct>          <int> <dbl>  <dbl> <dbl>
1 MNE               36  21.7   19.9  2.05
2 dSPM              36  22.5   21.1  1.93
3 sLORETA           36  26.4   21.5  3.43
tbl_by_roi
# A tibble: 3 × 5
  roi_data_norm     n  mean median   sem
  <fct>         <int> <dbl>  <dbl> <dbl>
1 up               36  31.2   30.1 3.55 
2 low              36  18.0   18.6 0.801
3 center           36  21.4   21.4 2.04 
# figure: localization error by inverse method

ggplot(d_correct, aes(x = inverse_method, y = loc_error)) +
geom_violin(trim = FALSE, alpha = 0.25) +
geom_jitter(width = 0.12, alpha = 0.6, size = 1.6) +
stat_summary(fun = median, geom = "point", shape = 23, size = 3, fill = "black") +
labs(
x = "Inverse method",
y = "Localization error (mm)"
) 

# figure: localization error by ROI × method

ggplot(d_correct, aes(x = roi_data_norm, y = loc_error, fill = inverse_method)) +
geom_violin(position = position_dodge(width = 0.8), trim = FALSE, alpha = 0.25) +
geom_jitter(
aes(color = inverse_method),
position = position_jitterdodge(jitter.width = 0.15, dodge.width = 0.8),
alpha = 0.6, size = 1.4, show.legend = FALSE
) +
stat_summary(
fun = median, geom = "point",
position = position_dodge(width = 0.8),
shape = 23, size = 2.8, fill = "black"
) +
scale_x_discrete(labels = c(up = "Upper Left", low = "Lower Left", center = "Center Left")) +
labs(
x = "Stimulus location",
y = "Localization error (mm)",
fill = "Inverse method"
) 

Exploratory analyses

## Do “incorrect” trials have larger localization error than “correct” trials?

# group summary

df %>%
group_by(is_correct) %>%
summarise(
n = n(),
mean = mean(loc_error),
median = median(loc_error),
sem = sem(loc_error),
.groups = "drop"
)
# A tibble: 2 × 5
  is_correct     n  mean median   sem
  <lgl>      <int> <dbl>  <dbl> <dbl>
1 FALSE        216  25.9   22.9  1.09
2 TRUE         108  23.5   20.4  1.48
# Welch t-test (row-level)
t.test(loc_error ~ is_correct, data = df)

    Welch Two Sample t-test

data:  loc_error by is_correct
t = 1.2625, df = 221.83, p-value = 0.2081
alternative hypothesis: true difference in means between group FALSE and group TRUE is not equal to 0
95 percent confidence interval:
 -1.29963  5.93359
sample estimates:
mean in group FALSE  mean in group TRUE 
           25.85150            23.53452 
# Mann–Whitney (Wilcoxon rank-sum)
wilcox.test(loc_error ~ is_correct, data = df, exact = FALSE)

    Wilcoxon rank sum test with continuity correction

data:  loc_error by is_correct
W = 13014, p-value = 0.08955
alternative hypothesis: true location shift is not equal to 0

Discussion

Summary of Replication Attempt

The goal of this project was to replicate the core EEG localization result reported by Sharon et al. (2007), using focal visual stimulation and anatomically constrained inverse modeling, with pRF-defined V1 as a subject-specific ground truth. Across inverse methods, median localization errors in the present EEG data ranged from approximately 20–22 mm, with mean errors between 22–26 mm, depending on the inverse solution used. These values are broadly comparable to the EEG localization errors reported by Sharon et al. (2007), who reported mean localization errors of 28.9 ± 5.2 mm for depth-weighted MNE and 16.6 ± 2.9 mm for dSPM. Although the exact inverse methods and stimulus timing differed between studies, the present results fall within the same order of magnitude and therefore provide partial support for the original finding that EEG source localization can achieve spatial precision on the order of a few centimeters when ground-truth cortical targets are well defined.

Commentary

Across inverse methods, localization performance was broadly similar, with MNE and dSPM yielding comparable median errors, and sLORETA showing slightly larger mean error and variability. This pattern is consistent with known properties of distributed inverse methods: stronger depth weighting and normalization can reduce superficial bias but may increase spatial spread, especially in EEG-only recordings. The absence of a strong separation between inverse methods in this dataset may reflect limited sample size, correlated noise across methods, or the use of steady-state stimulation rather than transient evoked responses.

Localization accuracy varied substantially across stimulus locations. Errors were largest for the upper-left visual field stimulus, and lowest for the lower-left stimulus, consistent with known retinotopic and anatomical asymmetries in early visual cortex. Specifically, cortical representations of the upper visual field are more likely to lie deep within the calcarine sulcus, which is less favorably oriented for EEG sensitivity. This spatial dependence is consistent with Sharon et al.’s observation that stimulus location and cortical geometry strongly influence localization error, and suggests that anatomical variability across subjects remains a major limiting factor for EEG source localization.

Exploratory analyses comparing “correct” versus “incorrect” ROI assignments showed a trend toward larger localization errors for incorrect pairs, but this difference did not reach significance thresholds in either parametric or nonparametric tests. This shows the limited statistical power available for trial-level inference in small sample EEG localization studies, which suggests the importance of subject-level analyses.

Several differences between the present study and the original work may plausibly moderate the observed results. 1) this replication used EEG only, whereas Sharon et al. demonstrated improved localization when EEG and MEG were combined; 2) the use of frequency-tagged steady-state stimulation instead of transient event-related responses likely altered the spatial and temporal integration properties of the measured signals, potentially increasing spatial spread while improving signal-to-noise ratio. 3)ground truth was defined using previously acquired pRF maps rather than fMRI data collected in the same session. While pRF-based retinotopy provides a principled estimate of cortical stimulus location, it introduces additional uncertainty relative to simultaneous fMRI measurements.

Together, these results suggest that the present study partially replicates the original EEG localization findings of Sharon et al. (2007): EEG source localization achieves centimeter-scale accuracy when targeting well-defined regions of early visual cortex, but performance remains sensitive to cortical geometry, stimulus location, and modeling choices. The results support the general feasibility of EEG-based localization in the visual system, while underscoring the limitations that motivate multimodal approaches combining EEG, MEG, and fMRI.