bioRxiv Science⌕ Search

Biology subjects

Gramfort, A.

Publications and source records attributed to Gramfort, A..

18 recordsLinked to original sources

EMG-BIDS: an extension to the Brain Imaging Data Structure for electromyography

Electromyography (EMG) is fundamental to clinical assessment, rehabilitation, neuromuscular research, and human-machine interfaces. Despite decades of use, no widely adopted standard exists for organizing and sharing EMG data, limiting reusability and large-scale data aggregation. We present EMG-BIDS, an extension to the Brain Imaging Data Structure (BIDS) that standardizes the organization of EMG recordings. EMG-BIDS addresses challenges unique to EMG, including diverse electrode types (surface or intramuscular, single channel to high-density arrays), heterogeneous electrode placements across anatomical locations, montages (e.g., monopolar or bipolar sensor designs), and the critical need for transparent documentation of sensor positioning. The specification introduces hierarchical coordinate systems that link local electrode grids to anatomical landmarks, enabling precise and reproducible placement documentation. EMG-BIDS is now part of BIDS as of version 1.11.0, supported by existing tools, including MNE-BIDS and EEGLAB. We demonstrate the specification through public datasets, including high-density surface EMG recordings. EMG-BIDS provides the foundation for FAIR (Findable, Accessible, Interoperable, Reusable) EMG data sharing, enabling meta-analyses, multi-site studies, and machine learning applications that require standardized, well-documented datasets.

neuroscience↗

Alpha power indexes working memory load for durations

Timing, that is estimating, comparing, or remembering how long events last, requires the temporary storage of durations. How durations are stored in working memory is unknown, despite the widely held view of memory systems central role in timing. Here, we investigated the neural signatures of a sequence of durations (n-item sequence) held in working memory. We recorded human participants using magnetoencephalography (MEG) while they performed an n-item delayed reproduction task, which required to encode a sequence of durations, maintain it, and then reproduce it. The number of items in a sequence (one or three) and the duration of the sequence were orthogonalized. Our results show that during working memory maintenance, the number of durations, not the duration of the sequence, affected recall precision and could be decoded from alpha and beta oscillatory activity. Parieto-occipital alpha power showed a direct link with the precision of temporal reproduction. Our results extend earlier behavioral findings suggesting that durations are itemized in working memory and that their number, not their duration, modulates recall precision (Herbst et al., 2025). Crucially, we establish that alpha power reflects a universal signature of working memory load and mediates recall precision, even for abstract information such as duration.

neuroscience↗

How forgiving are M/EEG inverse solutions to noise level misspecification? An excursion into the BSI-Zoo.

AO_SCPLOWBSTRACTC_SCPLOWBrain source imaging (BSI), also known as source localization, from magneto- and electroencephalographic (M/EEG) data, is a challenging ill-posed inverse problem. Accurate source estimation is sensitive to modeling parameters, such as regularization strength and noise level, where misconfigurations can lead to under- or overfitting. Different BSI methods, however, may vary in their robustness to suboptimal parameter choices. Here we conducted extensive simulations of brain sources superimposed by varying degrees of sensor noise to study the ranges of noise misspecification within which different BSI approaches can still localize well. Using the Earth Movers Distance (EMD) and other metrics, we compare the performance of smooth linear inverse solutions with that of sparse non-linear Bayesian learning solutions. Additionally, we assess the effectiveness of various noise estimation and cross-validation techniques to select hyperparameters close to those achieving optimal localization. Methods and experiments are made available within the BSI-Zoo Python package.

neuroscience↗

Do try this at home: Age prediction from sleep and meditation with large-scale low-cost mobile EEG

EEG is an established method for quantifying large-scale neuronal dynamics which enables diverse real-world biomedical applications including brain-computer interfaces, epilepsy monitoring and sleep staging. Advances in sensor technology have freed EEG from traditional laboratory settings, making low-cost ambulatory or at-home assessments of brain function possible. While ecologically valid brain assessments are becoming more practical, the impact of their reduced spatial resolution and susceptibility to noise remain to be investigated. This study set out to explore the potential of at-home EEG assessments for biomarker discovery using the brain age framework and four-channel consumer EEG data. We analyzed recordings from more than 5200 human subjects (18-81 years) during meditation and sleep, focusing on the age prediction task. With cross-validated R2 scores between 0.3 - 0.5, prediction performance was within the range of results obtained by recent benchmarks focused on laboratory-grade EEG. While age prediction was successful from both meditation and sleep recordings, the latter led to higher performance. Analysis by sleep stage uncovered that N2-N3 stages contained most of the signal. When combined, EEG features extracted from all sleep stages gave the best performance, suggesting that the entire night of sleep contains valuable age-related information. Furthermore, model comparisons suggested that information was spread out across electrodes and frequencies, supporting the use of multivariate modeling approaches. Thanks to our unique dataset of longitudinal repeat sessions spanning 153 to 529 days from eight subjects, we finally evaluated the variability of EEG-based age predictions, showing that they reflect both trait- and state-like information. Overall, our results demonstrate that state-of-the-art machine learning approaches based on age prediction can be readily applied to real-world EEG recordings obtained during at-home sleep and meditation practice.

neuroscience↗

Harmonizing and aligning M/EEG datasets with covariance-based techniques to enhance predictive regression modeling

Neuroscience studies face challenges in gathering large datasets, which limits the use of machine learning (ML) approaches. One possible solution is to incorporate additional data from large public datasets; however, data collected in different contexts often exhibit systematic differences called dataset shifts. Various factors, e.g., site, device type, experimental protocol, or social characteristics, can lead to substantial divergence of brain signals that can hinder the success of ML across datasets. In this work, we focus on dataset shifts in recordings of brain activity using MEG and EEG. State-of-the-art predictive approaches on M/EEG signals classically represent the data by covariance matrices. Model-based dataset alignment methods can leverage the geometry of covariance matrices, leading to three steps: recentering, re-scaling, and rotation correction. This work explains theoretically how differences in brain activity, anatomy, or device configuration lead to certain shifts in data covariances. Using controlled simulations, the different alignment methods are evaluated. Their practical relevance is evaluated for brain age prediction on one MEG dataset (Cam-CAN, n=646) and two EEG datasets (TUAB, n=1385; LEMON, n=213). When the target sample included recordings from the same subjects with a different task among the same dataset, paired rotation correction was essential ([Formula] (rest-passive) or +0.17 (rest-smt)). When the target dataset included new subjects and a new task, re-centering led to improved performance ([Formula] for rest-passive, [Formula] for rest-smt). For generalization to an independent dataset sampled from a different population and recorded with a different device, re-centering was necessary to achieve brain age prediction performance close to within domain prediction performance. This study demonstrates that the generalization of M/EEG-based regression models across datasets can be substantially enhanced by applying domain adaptation procedures that can statistically harmonize diverse datasets.

neuroscience↗

Methods and considerations for estimating parameters in biophysically detailed neural models with simulation based inference

Biophysically detailed neural models are a powerful technique to study neural dynamics in health and disease with a growing number of established and openly available models. A major challenge in the use of such models is that parameter inference is an inherently difficult and unsolved problem. Identifying unique parameter distributions that can account for observed neural dynamics, and differences across experimental conditions, is essential to their meaningful use. Recently, simulation based inference (SBI) has been proposed as an approach to perform Bayesian inference to estimate parameters in detailed neural models. SBI overcomes the challenge of not having access to a likelihood function, which has severely limited inference methods in such models, by leveraging advances in deep learning to perform density estimation. While the substantial methodological advancements offered by SBI are promising, their use in large scale biophysically detailed models is challenging and methods for doing so have not been established, particularly when inferring parameters that can account for time series waveforms. We provide guidelines and considerations on how SBI can be applied to estimate time series waveforms in biophysically detailed neural models starting with a simplified example and extending to specific applications to common MEG/EEG waveforms using the the large scale neural modeling framework of the Human Neocortical Neurosolver. Specifically, we describe how to estimate and compare results from example oscillatory and event related potential simulations. We also describe how diagnostics can be used to assess the quality and uniqueness of the posterior estimates. The methods described provide a principled foundation to guide future applications of SBI in a wide variety of applications that use detailed models to study neural dynamics. Author summaryA central problem in computational neural modeling is estimating model parameters that can account for observed activity patterns. While several techniques exist to perform parameter inference in special classes of abstract neural models, there are comparatively few approaches for large scale biophysically detailed neural models. In this work, we describe challenges and solutions in applying a deep learning based statistical framework to estimate parameters in a biophysically detailed large scale neural model, and emphasize the particular difficulties in estimating parameters for time series data. Our example uses a multi-scale model designed to connect human MEG/EEG recordings to the underlying cell and circuit level generators. Our approach allows for crucial insight into how cell-level properties interact to produce measured neural activity, and provides guidelines for diagnosing the quality of the estimate and uniqueness of predictions for different MEG/EEG biomarkers.

neuroscience↗

A reusable benchmark of brain-age prediction from M/EEG resting-state signals

Population-level modeling can define quantitative measures of individual aging by applying machine learning to large volumes of brain images. These measures of brain age, obtained from the general population, helped characterize disease severity in neurological populations, improving estimates of diagnosis or prognosis. Magnetoencephalography (MEG) and Electroencephalography (EEG) have the potential to further generalize this approach towards prevention and public health by enabling assessments of brain health at large scales in socioeconomically diverse environments. However, more research is needed to define methods that can handle the complexity and diversity of M/EEG signals across diverse real-world contexts. To catalyse this effort, here we propose reusable benchmarks of competing machine learning approaches for brain age modeling. We benchmarked popular classical machine learning pipelines and deep learning architectures previously used for pathology decoding or brain age estimation in 4 international M/EEG cohorts from diverse countries and cultural contexts, including recordings from more than 2500 participants. Our benchmarks were built on top of the M/EEG adaptations of the BIDS standard, providing tools that can be applied with minimal modification on any M/EEG dataset provided in the BIDS format. Our results suggest that, regardless of whether classical machine learning or deep learning was used, the highest performance was reached by pipelines and architectures involving spatially aware representations of the M/EEG signals, leading to R^2 scores between 0.60-0.71. Hand-crafted features paired with random forest regression provided robust benchmarks even in situations in which other approaches failed. Taken together, this set of benchmarks, accompanied by open-source software and high-level Python scripts, can serve as a starting point and quantitative reference for future efforts at developing M/EEG-based measures of brain aging. The generality of the approach renders this benchmark reusable for other related objectives such as modeling specific cognitive variables or clinical endpoints. Highlights- We provide systematic reusable benchmarks for brain age from M/EEG signals - The benchmarks were carried out on M/EEG from four countries > 2500 recordings - We compared machine learning pipelines capable of handling the non-linear regression task of relating biomedical outcomes to M/EEG dynamics, based on classical machine learning and deep learning - Next to data-driven methods we benchmarked template-based source localization as a practical tool for generating features less affected by electromagnetic field spread - The benchmarks are built on top of the MNE ecosystem and the braindecode package and can be applied on any M/EEG dataset presented in the BIDS format

neuroscience↗

Oxygenated hemoglobin signal provides greater predictive performance of experimental condition than de-oxygenated

Continuous-wave functional near-infrared spectroscopy (fNIRS) neuroimaging provides an estimate of relative changes in oxygenated and de-oxygenated hemoglobin content, from which regional neural activity is inferred. The relation between both signals is governed by neurovascular coupling mechanisms. However, the magnitude of concentration changes and the contribution of noise sources to each chromophore is unique. Subsequently, it is not apparent if either chromophore signal practically provides greater information about the underlying neural state and relation to an experimental condition. To assess this question objectively, we applied a machine-learning approach to four datasets and evaluated which hemoglobin signal best differentiated between experimental conditions. To further ensure the objective nature of the analysis, the algorithm utilized all samples from the epoched data rather than pre-selected features. Regardless of experimental task, brain region, or stimulus, the oxygenated hemoglobin signal was better able to differentiate between conditions than the de-oxygenated signal. Incorporating both signals into the analysis provided no additional improvement over oxygenated hemoglobin alone. These results indicate that oxyhemoglobin is the most informative fNIRS signal in relation to experimental condition.

neuroscience↗

GPT-2's activations predict the degree of semantic comprehension in the human brain

Language transformers, like GPT-2, have demonstrated remarkable abilities to process text, and now constitute the backbone of deep translation, summarization and dialogue algorithms. However, whether these models encode information that relates to human comprehension remains controversial. Here, we show that the representations of GPT-2 not only map onto the brain responses to spoken stories, but also predict the extent to which subjects understand narratives. To this end, we analyze 101 subjects recorded with functional Magnetic Resonance Imaging while listening to 70 min of short stories. We then fit a linear model to predict brain activity from GPT-2s activations, and correlate this mapping with subjects comprehension scores as assessed for each story. The results show that GPT-2s brain predictions significantly correlate with semantic comprehension. These effects are bilaterally distributed in the language network and peak with a correlation of R=0.50 in the angular gyrus. Overall, this study paves the way to model narrative comprehension in the brain through the lens of modern language algorithms.

neuroscience↗

Predicting future cognitive decline from non-brain and multimodal brain imaging data in healthy and pathological aging

Cognitive decline occurs in healthy and pathological aging, and both may be preceded by subtle changes in the brain -- offering a basis for cognitive predictions. Previous work has largely focused on predicting a diagnostic label from structural brain imaging. Our study broadens the scope of applications to cognitive decline in healthy aging by predicting future decline as a continuous trajectory, rather than a diagnostic label. Furthermore, since brain structure as well as function changes in aging, it is reasonable to expect predictive gains when using multiple brain imaging modalities. Here, we tested whether baseline multimodal neuroimaging data improve the prediction of future cognitive decline in healthy and pathological aging. Non-brain data (including demographics and clinical and neuropsychological scores) were combined with structural and functional connectivity MRI data from the OASIS-3 project (N = 662; age = 46 - 96y). The combined input data was entered into cross-validated multi-target random forest models to predict future cognitive decline (measured by the Clinical Dementia Rating and the Mini-Mental State Examination), on average 5.8y into the future. The analysis was preregistered and all analysis code is publicly available. We found that combining non-brain with structural data improved the continuous prediction of future cognitive decline (best test-set performance: R2 = 0.42) and that cognitive performance, daily functioning, and subcortical volume drove the performance of our model. In contrast, including functional connectivity did not improve predictive accuracy. In the future, the prognosis of age-related cognitive decline may enable earlier and more effective cognitive, pharmacological, and behavioral interventions to be tailored to the individual.

neuroscience↗

Combining electrophysiology with MRI enhances learning of surrogate-biomarkers

Electrophysiological methods, i.e., M/EEG provide unique views into brain health. Yet, when building predictive models from brain data, it is often unclear how electrophysiology should be combined with other neuroimaging methods. Information can be redundant, useful common representations of multimodal data may not be obvious and multimodal data collection can be medically contraindicated, which reduces applicability. Here, we propose a multimodal model to robustly combine MEG, MRI and fMRI for prediction. We focus on age prediction as surrogate biomarker in 674 subjects from the Cam-CAN. Strikingly, MEG, fMRI and MRI showed additive effects supporting distinct brain-behavior associations. Moreover, the contribution of MEG was best explained by source-topography of power spectra between 8 and 30 Hz. Finally, we demonstrate that the model maintains benefits of stacking when data is missing. The proposed framework hence enables multimodal learning for a wide range of biomarkers from diverse types of brain signals.

neuroscience↗

Predictive regression modeling with MEG/EEG: from source power to signals and cognitive states

Predicting biomedical outcomes from Magnetoencephalography and Electroencephalography (M/EEG) is central to applications like decoding, brain-computer-interfaces (BCI) or biomarker development and is facilitated by supervised machine learning. Yet most of the literature is concerned with classification of outcomes defined at the event-level. Here, we focus on predicting continuous outcomes from M/EEG signal defined at the subject-level, and analyze about 600 MEG recordings from Cam-CAN dataset and about 1000 EEG recordings from TUH dataset. Considering different generative mechanisms for M/EEG signals and the biomedical outcome, we propose statistically-consistent predictive models that avoid source-reconstruction based on the covariance as representation. Our mathematical analysis and ground truth simulations demonstrated that consistent function approximation can be obtained with supervised spatial filtering or by embedding with Riemannian geometry. Additional simulations revealed that Riemannian methods were more robust to model violations, in particular geometric distortions induced by individual anatomy. To estimate the relative contribution of brain dynamics and anatomy to prediction performance, we propose a novel model inspection procedure based on biophysical forward modeling. Applied to prediction of outcomes at the subject-level, the analysis revealed that the Riemannian model better exploited anatomical information while sensitivity to brain dynamics was similar across methods. We then probed the robustness of the models across different data cleaning options. Environmental denoising was globally important but Riemannian models were strikingly robust and continued performing well even without preprocessing. Our results suggest each method has its niche: supervised spatial filtering is practical for event-level prediction while the Riemannian model may enable simple end-to-end learning.

neuroscience↗

Comparison of beamformer implementations for MEG source localization

Beamformers are applied for estimating spatiotemporal characteristics of neuronal sources underlying measured MEG/EEG signals. Several MEG analysis toolboxes include an implementation of a linearly constrained minimum-variance (LCMV) beamformer. However, differences in implementations and in their results complicate the selection and application of beamformers and may hinder their wider adoption in research and clinical use. Additionally, combinations of different MEG sensor types (such as magnetometers and planar gradiometers) and application of preprocessing methods for interference suppression, such as signal space separation (SSS), can affect the results in different ways for different implementations. So far, a systematic evaluation of the different implementations has not been performed. Here, we compared the localization performance of the LCMV beamformer pipelines in four widely used open-source toolboxes (FieldTrip, SPM12, Brainstorm, and MNE-Python) using datasets both with and without SSS interference suppression.\n\nWe analyzed MEG data that were i) simulated, ii) recorded from a static and moving phantom, and iii) recorded from a healthy volunteer receiving auditory, visual, and somatosensory stimulation. We also investigated the effects of SSS and the combination of the magnetometer and gradiometer signals. We quantified how localization error and point-spread volume vary with SNR in all four toolboxes.\n\nWhen applied carefully to MEG data with a typical SNR (3-15 dB), all four toolboxes localized the sources reliably; however, they differed in their sensitivity to preprocessing parameters. As expected, localizations were highly unreliable at very low SNR, but we found high localization error also at very high SNRs. We also found that the SNR improvement offered by SSS led to more accurate localization.

neuroscience↗

MEG/EEG group study with MNE: recommendations, quality assessments and best practices

Cognitive neuroscience questions are commonly tested with experiments that involve a cohort of subjects. The cohort can consist of a handful of subjects for small studies to hundreds or thousands of subjects in open datasets.\n\nWhile there exist various online resources to get started with the analysis of magnetoencephalography (MEG) or electroencephalography (EEG) data, such educational materials are usually restricted to the analysis of a single subject. This is in part because data from larger group studies are harder to share, but also analyses of such data are often require subject-specific decisions which are hard to document.\n\nThis work presents the results obtained by the reanalysis of an open dataset from Wakeman and Henson (2015) using the MNE software package. The analysis covers preprocessing steps, quality assurance steps, sensor space analysis of evoked responses, source localization, and statistics in both sensor and source space. Results with possible alternative strategies are presented and discussed at different stages such as the use of high-pass filtering versus baseline correction, tSSS versus SSS, the use of a minimum norm inverse versus LCMV beamformer, and the use of univariate or multivariate statistics. This aims to provide a comparative study of different stages of M/EEG analysis pipeline on the same dataset, with open access to all of the scripts necessary to reproduce this analysis.

neuroscience↗

Oscillatory multiplexing indexes precision

Oscillatory coupling has been implicated in the representation and in the processing of information in the brain. Specific hypotheses suggest that oscillatory coupling may be relevant for the temporal coding of information but to which extent this may translate to conscious timing is unknown. Here, we tested the hypothesis that the temporal precision of self-generated timed actions may be controlled by phase-amplitude coupling (PAC). Using a timing task, we show the existence of significant alpha-beta (-{beta}) PAC, robust at the individual level, and specific to temporal production. Second, an increase in the strength of -{beta} PAC was associated with a smaller variance in time production, i.e. an increased precision in timing, but there was no correlation with the duration of the produced interval. Our results suggest an active role for -{beta} coupling in maintaining the precision of the endogenous temporal goal during time production: specifically, oscillations may maintain the content of current cognitive states, thus securing the endogenous temporal code for duration estimation instantiated in {beta} band. Oscillatory multiplexing may thus index the variance of neuronal computations, which translates into the precision of behavioral performance.

neuroscience↗

MEG-BIDS: an extension to the Brain Imaging Data Structure for magnetoencephalography

We present a significant extension of the Brain Imaging Data Structure (BIDS) to support the specific aspects of magnetoencephalography (MEG) data. MEG provides direct measurement of brain activity with millisecond temporal resolution and unique source imaging capabilities. So far, BIDS has provided a solution to structure the organization of magnetic resonance imaging (MRI) data, which nature and acquisition parameters are different. Despite the lack of standard data format for MEG, MEG-BIDS is a principled solution to store, organize and share the typically-large data volumes produced. It builds on BIDS for MRI, and therefore readily yields a multimodal data organization by construction. This is particularly valuable for the anatomical and functional registration of MEG source imaging with MRI. With MEG-BIDS and a growing range of software adopting the standard, the MEG community has a solution to minimize curation overheads, reduce data handling errors and optimize usage of computational resources for analytics. The standard also includes well-defined metadata, to facilitate future data harmonization and sharing efforts.

neuroscience↗

Non-linear Auto-Regressive Models for Cross-Frequency Coupling in Neural Time Series

We address the issue of reliably detecting and quantifying cross-frequency coupling (CFC) in neural time series. Based on non-linear auto-regressive models, the proposed method provides a generative and parametric model of the time-varying spectral content of the signals. As this method models the entire spectrum simultaneously, it avoids the pitfalls related to incorrect filtering or the use of the Hilbert transform on wide-band signals. As the model is probabilistic, it also provides a score of the model \"goodness of fit\" via the likelihood, enabling easy and legitimate model selection and parameter comparison; this data-driven feature is unique to our model-based approach. Using three datasets obtained with invasive neurophysiological recordings in humans and rodents, we demonstrate that these models are able to replicate previous results obtained with other metrics, but also reveal new insights such as the influence of the amplitude of the slow oscillation. Using simulations, we demonstrate that our parametric method can reveal neural couplings with shorter signals than non-parametric methods. We also show how the likelihood can be used to find optimal filtering parameters, suggesting new properties on the spectrum of the driving signal, but also to estimate the optimal delay between the coupled signals, enabling a directionality estimation in the coupling.\n\nAuthor SummaryNeural oscillations synchronize information across brain areas at various anatomical and temporal scales. Of particular relevance, slow fluctuations of brain activity have been shown to affect high frequency neural activity, by regulating the excitability level of neural populations. Such cross-frequency-coupling can take several forms. In the most frequently observed type, the power of high frequency activity is time-locked to a specific phase of slow frequency oscillations, yielding phase-amplitude-coupling (PAC). Even when readily observed in neural recordings, such non-linear coupling is particularly challenging to formally characterize. Typically, neuroscientists use band-pass filtering and Hilbert transforms with ad-hoc correlations. Here, we explicitly address current limitations and propose an alternative probabilistic signal modeling approach, for which statistical inference is fast and well-posed. To statistically model PAC, we propose to use non-linear auto-regressive models which estimate the spectral modulation of a signal conditionally to a driving signal. This conditional spectral analysis enables easy model selection and clear hypothesis-testing by using the likelihood of a given model. We demonstrate the advantage of the model-based approach on three datasets acquired in rats and in humans. We further provide novel neuroscientific insights on previously reported PAC phenomena, capturing two mechanisms in PAC: influence of amplitude and directionality estimation.

neuroscience↗

Decoding the categorization of visual motion with magnetoencephalography

Brain decoding techniques are particularly efficient at deciphering weak and distributed neural patterns. Brain decoding has primarily been used in cognitive neurosciences to predict differences between pairs of stimuli (e.g. faces vs. houses), but how distinct brain/perceptual states can be decoded following the presentation of continuous sensory stimuli is unclear. Here, we developed a novel approach to decode brain activity recorded with magnetoencephalography while participants discriminated the coherence of two intermingled clouds of dots. Seven levels of visual motion coherence were tested and participants reported the colour of the most coherent cloud. The decoding approach was formulated as a ranked-classification problem, in which the model was evaluated by its capacity to predict the order of a pair of trials, each tested with two distinct visual motion coherence levels. Two brain states were decoded as a function of the degree of visual motion coherence. Importantly, perceptual motion coherence thresholds were found to match the decoder boundaries in a fully data-driven way. The algorithm revealed the earliest categorization in hMT+, followed by V1/V2, IPS, and vlPFC.

neuroscience↗