From Signals to Trajectories

Companion site

From Signals to Trajectories A primer on low‑dimensional dynamics in human EEG and MEG

Vanessa Hadid, Hamza Abdelhedi, Annalisa Pascarella, Sara A. Solla, Paul Cisek, Karim Jerbi

PC 1 PC 2
  • Famous
  • Unfamiliar
  • Scrambled
The MEG response to famous faces, unfamiliar faces and scrambled images, averaged over 16 people. These are the trajectories of Figure 3b, seen on the first two principal components. Drag the slider to move through time.

About

The primer

Neural activity can be described as a point moving through a high-dimensional state space. This view has shaped systems neuroscience through recordings of neuronal populations, but it is still little used with non-invasive human recordings such as EEG and MEG.

The primer presents trajectory analysis based on principal component analysis (PCA) as an accessible way in. It explains how to organise EEG or MEG activity into neural states, project them onto a few components, and read the result as trajectories that show how distributed activity evolves over time. It also covers the limits of PCA and the problems specific to EEG and MEG: spatial mixing, sensitivity to preprocessing, validation and overinterpretation. Read the preprint on arXiv.

What this site is for

The paper works through two examples: motor execution and imagery in EEG, and face perception in MEG. Every analysis behind them was run on the full cohort, and each run wrote an interactive report with its figures, tables, statistics and settings. This site publishes those reports.

Use it to look closer at a figure from the paper, to check the numbers behind it, or to see the analyses that did not fit in the paper: other sensor selections, other contrasts, and a comparison of PCA with nonlinear methods.

All reports

Everything that was run, by dataset. Reports open in a viewer with a bar on top for moving between analyses, contrasts and sensor selections. They are files of 5 to 20 MB, so give them a few seconds to load.

EEG: moving a hand, or imagining it

The PhysioNet EEG Motor Movement/Imagery dataset. 64-channel EEG from 106 people who opened and closed their left or right hand, or imagined doing so.

Trajectories

The main analysis. One PCA space for all four conditions, how much variance it holds, and where the paths separate.

PCA next to nonlinear methods

The same data through UMAP, PHATE and Isomap, to see what PCA keeps and what it misses.

Decoding across participants

Train on some people, test on someone new. Raw sensors compared with PCA components aligned between participants.

MEG: looking at faces

The Wakeman and Henson dataset (OpenNeuro ds000117). 306-channel MEG from 16 people who looked at famous faces, unfamiliar faces and scrambled images.

Sensors

The paper uses the right-occipital sensors. These are groups of sensors by their position on the helmet. They are not source-localised brain regions.

Trajectories

The three image types in one shared PCA space, with the faces vs scrambled and famous vs unfamiliar contrasts.

Frequency bands

The same analysis on alpha, beta and low-gamma (30 to 45 Hz) power instead of the broadband signal.

Decoding across participants

Train on 15 people, test on the 16th. Raw sensors compared with shared and aligned PCA components.

Code and tutorials

Everything is in one repository. How to install and run it

Notebooks

Six tutorials that explain each step and the choices behind it. They run on a few participants, so they finish on a laptop. Start here to learn the method.

Scripts

One script per notebook, in scripts/. It runs the same workflow on the full cohort and writes the tables, the figures and the report you see on this site.

coco-pipe

The library underneath: PCA and other reducers, alignment between participants, decoding, and the report format. Use it on your own data.

NotebookWhat it coversIn the paper
1 EEG: the core workflow Fit PCA, plot trajectories for executed and imagined hand movements, and measure how they differ. Figure 2
2 EEG: PCA next to UMAP, PHATE and Isomap The same data through three nonlinear methods. Goes beyond it
3 EEG: decoding across participants Train on some people and test on someone new, from sensors and from aligned components. Follows Figure 2
4 MEG: faces in one shared space Famous, unfamiliar and scrambled faces in a single PCA space. Figure 3a–b
5 MEG: frequency bands Trajectories of alpha power, extended to beta and low gamma. Figure 3c–d
6 MEG: decoding across participants Cross-participant decoding and alignment. Figure 3e–f

Cite

@article{hadid2026signals,
  title   = {From Signals to Trajectories: A Primer on Low-Dimensional
             Dynamics in Human EEG and MEG},
  author  = {Hadid, Vanessa and Abdelhedi, Hamza and Pascarella, Annalisa
             and Solla, Sara A. and Cisek, Paul and Jerbi, Karim},
  journal = {arXiv preprint arXiv:2609.32315},
  year    = {2026}
}