Med-EEG
Can two EEG numbers track a meditator’s focus?
A retrospective study of meditation EEG: can the gamma/theta power ratio and theta–gamma phase-amplitude coupling at a few frontal electrodes predict self-reported concentration nearly as well as a model on the full 64-channel spectrum? Every score is set against chance from permutations and against non-EEG baselines, with a pre-registered replication on a second dataset. NeuroDial is its live results dashboard.
- the problem
- Small EEG studies report accuracies that rarely mean much: with 24 people, a model with no signal reaches 70% accuracy about 8% of the time, and a group label can hide a confound.
- what I built
- An MNE pipeline from raw EEG to features, person-held-out models with permutation tests and non-EEG baselines, mixed-effects statistics, a pre-registered replication, and NeuroDial, a dashboard that loads the latest published run.
The question
Can a two-number biomarker, the gamma/theta power ratio and theta–gamma phase-amplitude coupling at a few frontal-midline electrodes, predict moment-to-moment self-reported concentration nearly as well as a black-box model on the full 64-channel spectrum?
data
- OpenNeuro ds001787 (Delorme & Brandmeyer): 24 people, 12 experienced meditators and 12 novices, 64-channel EEG, about an hour of meditation each
- One person excluded for poor electrode contact by a rule set before any results: 23 people, 929 probes
- Replication on OpenNeuro ds008836: 39 experienced Vipassana meditators, a different lab, EEG system and rating scale; 1,707 depth reports
Results
ds001787, leave-one-subject-out. 200 permutations per model; p-values Holm-corrected across models and baselines within each question.
| Question | Best EEG result | Non-EEG baseline | Verdict |
|---|---|---|---|
| Expert vs novice | 78.3% of people (18/23), corrected p = 0.10 | sex alone: 82.6% | not supported |
| Concentration, moment to moment | within-person AUC 0.529, corrected p = 0.64 | time on task: 0.561 | no signal |
| Mind wandering, moment to moment | within-person AUC 0.587, corrected p = 0.060 | time on task: 0.533 | weak |
what held, and what didn’t
- not supportedExpert vs novice is confounded: experts are 9 of 11 male and novices 10 of 12 female, and sex alone predicts better than the EEG model, which mostly detects sex.
- not replicatedThe pre-registered gamma/theta prediction on ds008836: the slope is negative as predicted but not significant (one-sided p = 0.064). An earlier “replicated” verdict rested on a model fit that never converged, and was withdrawn.
- supportedOn ds008836, a Riemannian model on each report’s 64-channel covariance separates a person’s deeper reports from their shallower ones: within-person AUC 0.609 (95% 0.565–0.649, chance 0.502, Holm p = 0.035). Modest, and people vary a lot.
- supportedPre-registered: the depth a meditator is about to report is already in their EEG 60–120 s before the report (AUC 0.584, Holm p = 0.020).
Limitations
what these results do not show
- Expertise is confounded with sex, and partly age, in ds001787; only a sex-balanced sample can answer the expertise question.
- Self-reports are subjective and arrive every ~90 s, so the labels are noisy.
- Scalp gamma (30–45 Hz) can’t be fully separated from muscle activity.
- 23 usable people is small; every result is hypothesis-generating.
- Retrospective only: the held-out person’s full recording is used for normalisation, so these scores say nothing about a live neurofeedback device.
Reproduce
sources last checked 2026-11-08
pip install -r requirements.txt -c constraints.txt
python scripts/download_dataset.py --dataset ds001787 --bids_root ../ds001787
python scripts/run_pipeline.py --dataset ds001787 --bids_root ../ds001787 --run_dir ../runs/discovery-001 --n_permutations 100
python scripts/run_tests.pyThe pipeline
- Preprocessing: 1–45 Hz bandpass, mains notch, bad channels found and interpolated, average reference, ICA for eye and muscle
- 2-second epochs before each self-report probe, never overlapping the previous probe’s question
- Features per region: band power, the gamma/theta ratio, 1/f slope, alpha asymmetry, and theta–gamma coupling (Tort modulation index, surrogate-corrected)
- Leave-one-subject-out models, each compared with shuffled-label runs and non-EEG baselines, p-values Holm-corrected
- Linear mixed-effects models with subject as a random effect and time on task as a covariate
- A pre-registered replication on a second dataset, written before any of its EEG was loaded
- NeuroDial: a dashboard that reads results.json from the repository, so it always shows the latest published run
How it's built
each layer feeds the one below
- OpenNeuro ds001787, 64-channel BioSemi
- self-report probes every ~2 min
- filter, notch, bad channels
- average reference, ICA
- epochs before each probe
- spectral and coupling features
- LOSO models vs chance and baselines
- mixed-effects stats, replication