RESEARCH / 01 A FIELD GUIDE TO THE MED-EEG STUDY

Understanding meditation through EEG signals.

What did the experiment measure? Why were different models compared? Which findings survived testing? A visual notebook explaining the methods, evidence and limitations.

FIG 01 / SIGNAL REPRESENTATIONSCHEMATIC · NOT RECORDED EEG
FzCzPzVOLTAGE OVER TIME / ILLUSTRATIVE clean & segmentextract features64 electrodesmodel → evaluate
EEG is measured over time, converted into numerical features, then tested against participants' reports. This diagram illustrates the process; it is not a recording from the datasets.
64Scalp electrodes
39Depth-study participants
1,707Reported ratings
0.609Published depth AUC

Reading the published results bundle…

Not “can we read minds?”
Can we find useful signal?

Participants meditate wearing EEG caps, then rate their own concentration, mind wandering, or meditation depth. We investigate whether preceding EEG helps predict those subjective reports.

Feature question

Can two understandable measurements compete with much richer descriptions of the EEG?

Algorithm question

With the same input measurements, does a more flexible model perform better?

Validation question

Do predictions generalize to people not used during training?

DISCOVERY / ds00178701

From meditation to concentration & mind wandering

Experienced and novice meditators rated their experience. Quality checks left 23 participants and 929 probes in the discovery analysis.

View original dataset ↗
INDEPENDENT / ds00883602

Testing relative meditation depth

39 experienced Vipassana meditators contributed 1,707 analysed depth reports. The registered ratio-replication test used a specific 830-report subset.

View original dataset ↗

The entire pipeline, step by step.

Select a stage to understand what its code actually does. The process is offline: the dashboard shows previously computed results, not incoming headset data.

STAGE 01 / INPUT

The model needs both EEG and labels.

Each pre-report EEG window is paired with a participant's self-reported rating. The recording supplies the input; the rating supplies the target that a model learns to predict.

INPUT: voltage samples from scalp electrodes + a report such as depth = 4/5.
Read the corresponding source code ↗

One brain recording. Different ways to describe it.

A feature is a numerical description of a signal. We don't train on “focus” itself: we train on measurements of EEG, paired with the participant's reported rating.

01 / POWER

Gamma ÷ theta

How strong is the fast gamma band (30–45 Hz) relative to slower theta (4–8 Hz)? The quotient is a candidate feature, not a concentration meter.

GAMMA / THETA0.50
Illustrative numbers only—this interactive calculator is not participant EEG.
02 / COUPLING

Theta–gamma PAC

Does the amplitude of fast gamma systematically depend on the phase of slower theta? The code measures a modulation index and compares it with time-shifted surrogates.

Theta phase Gamma amplitude
Schematic oscillations—not the calculated PAC values.
03 / SPECTRUM

67 regional features

Six scalp regions × 11 spectral measurements, plus frontal alpha asymmetry. These describe the amount and distribution of frequency content across the head.

6 regions
×
11 features
+
1 asymmetry
Log power, relative power and spectral slope per region.
04 / RELATIONSHIPS

64-channel covariance

Rather than measuring power alone, covariance describes which electrodes' voltage signals vary together. A symmetric 64 × 64 matrix contains 2,080 unique entries.

EXAMPLE COVARIANCE STRUCTURE
Illustrative matrix; not measured participant covariance.

Which helps more: features or complexity?

Ridge learns regularized weighted combinations. Gradient boosting builds many decision trees. Riemannian ridge transforms covariance matrices, then still uses ridge regression.

LINEAR + REGULARIZATION

Ridge regression

Fits feature weights while penalizing extreme weights. Useful when many EEG features are correlated.

prediction = Σ(weight × feature) + bias
NONLINEAR PATTERNS

Gradient boosting

Combines many small decision trees, each improving the ensemble. Can capture thresholds and interactions ridge may miss.

prediction = initial + tree₁ + tree₂ + …
DIFFERENT REPRESENTATION

Riemannian ridge

Converts covariance matrices to tangent-space vectors, then fits a regularized linear predictor.

covariance → tangent features → RidgeCV
REPOSITORY PUBLISHED RESULTS

Compare models on the same task

Reading published model scores…

AUC is a ranking metric, not percent accuracy. The expertise task instead reports participant-level classification accuracy. Scores and uncertainty shown here come from the published JSON, not recomputed in your browser.

How do we stop a model from fooling us?

A good training score isn't proof of a useful EEG effect. The project uses independent participants, non-EEG comparisons, permutation tests, and multiple-testing correction.

01 / LEAVE-ONE-SUBJECT-OUT

Train on everyone else. Test on one unseen person.

Each participant's entire set of recordings stays out of model training in their test round. With 39 people, the depth experiment runs 39 held-out-person rounds per model.

TRAIN
TEST

Four-person teaching example. The real study has 39 people for the depth experiment.

02 / BASELINE

What if we remove EEG?

Time, sex, age, and experiment context can predict some labels. The EEG model should beat appropriate no-EEG baselines, not just chance.

0.609Riemannian depth AUC
0.519Context-only depth AUC
Historical published depth comparison.
03 / PERMUTATIONS

Could the score happen by chance?

The analysis deliberately disrupts the EEG–rating pairing and reruns evaluation. For state tasks, ratings are circularly shifted within recordings to preserve more of their time structure.

EEG: A   B   C   DRating: 5   2   4   1
Simple demonstration only; actual tests retrain and rescore.
04 / MULTIPLE TESTING

Holm correction

Testing many models raises the chance of a misleadingly small p-value. Holm adjusts p-values across a defined family of tests.

Mind-wandering raw p0.015
Holm-adjusted p0.060

The corrected result does not cross the 0.05 threshold.

Not every result is positive. That's the point.

The published findings are modest and mixed. The website should make both positive and negative evidence visible, not just showcase a winning model.

Loading results from the published research bundle…

The main scoreboard uses the repository's historical published results. The current README calls for regeneration under the latest audited settings. Follow-up values below are separately documented and are not new live calculations.

The work doesn't end with a model comparison.

Each follow-up tests a different weakness of the original hypothesis. These are documented research phases, not features of a current clinical or real-time product.

01–03

Build the pipeline, compare features and models

Inspect raw datasets, process the EEG, extract ratio/PAC and regional spectral measurements, compare simple linear models with boosting, and audit models against non-EEG baselines.

Model comparison source ↗
04–05

Statistical relationships, electrode reduction, robustness

Mixed-effects models account for repeated ratings within people. Training-only electrode selection probes whether fewer sensors suffice; the promising AF8 single-electrode lead did not replicate across sessions.

Electrode experiment ↗
06

Independent gamma/theta replication NOT REPLICATED

On ds008836's 830-report silent-block subset, the amended primary slope was −0.072, one-sided p = 0.064. A previously reported successful mixed-model fit was invalid and the verdict was withdrawn.

Replication results ↗
07

Whole-scalp depth decoding MODEST SIGNAL

Riemannian covariance + ridge achieved a reported AUC of 0.609 over 39 people and 1,707 reports, better than the context-only baseline (0.519). This is relative, within-person depth ranking—not exact depth prediction.

Depth model results ↗
08

Try improving the depth model

Nine variants failed to confirm an improvement over plain covariance. A grouped-regularization rerun gave AUC 0.607; a separate 13-person holdout reached 0.551 (p = 0.057). The result is not equally strong in every sample.

Model search and holdout ↗
09

Lead-up horizon & introspective fidelity

EEG from 60–120 s before a report had AUC 0.584 (Holm p = 0.020), but those bins contain more data than short near-report bins. Session-to-session fidelity stability was not supported (ρ = 0.15, p = 0.19).

0–10 s0.5430.543
10–30 s0.5640.564
30–60 s0.5520.552
60–120 s0.5840.584

The bins have unequal durations. Equal-length analyses suggest a slowly changing state rather than proven online forecasting.

Phase 9 results ↗

A research platform, not a finished brain reader.

✓

What works today

Reproducible Python analysis components, documented comparisons, held-out-person evaluation, published results, and a website that explains those results.

×

What isn't demonstrated

A validated live concentration meter, clinical accuracy, robust single-electrode prediction, real-time EEG acquisition, or forecasting using only past data.

PYTHON ANALYSISCSV TABLESpublish_results.pyresults.jsonWEB DASHBOARD

The public results site fetches a JSON summary from GitHub. The live status refers to fetching newly published research summaries, not streaming someone's EEG. Some preprocessing and normalization use full sessions and therefore cannot be treated as prospective predictions.

What comes next?

01

Reproduce & audit

Regenerate preserved runs with updated statistical checks and stronger muscle-artifact controls.

02

Validate again

Test covariance models on new, balanced participants using fixed analysis settings.

03

Build a prospective protocol

Use past-only normalization and filtering before evaluating true live EEG prediction.