CaliBrain: A Python toolbox for uncertainty quantification, calibration, and benchmarking in Bayesian M/EEG inverse source imaging

Preprint, not yet peer reviewed. Electroencephalography (EEG) and magnetoencephalography (MEG) source imaging estimates underlying neural current sources from non-invasive sensor recordings. Bayesian reconstruction methods address this ill-posed inverse problem by providing source estimates together with posterior uncertainty. However, the resulting credible regions are not necessarily empirically calibrated, as their nominal credibility may differ from actual coverage. While existing software packages support forward modelling and Bayesian source reconstruction, dedicated tools for evaluating and recalibrating source-wise posterior uncertainty remain unavailable. CaliBrain is an open-source Python toolbox for uncertainty quantification, calibration, and benchmarking in Bayesian M/EEG inverse source imaging. The package provides an end-to-end workflow encompassing source simulation, leadfield preparation, sensor-level data projection and noise generation, Bayesian source reconstruction, construction of voxel-wise credible regions from posterior means and covariance matrices, empirical coverage assessment, and post-hoc uncertainty recalibration. Its reproducible benchmarking workflows enable systematic comparisons across inverse solvers, orientation models, noise specifications, and simulation settings. Depending on the source orientation model, uncertainty is represented by one-dimensional credible intervals, two-dimensional credible ellipses, or three-dimensional credible ellipsoids. CaliBrain provides a unified Python framework for Bayesian source reconstruction, voxel-wise uncertainty assessment, and post-hoc recalibration across EEG and MEG modalities and source-orientation models. While it can use forward solutions prepared with established neuroimaging software, its reconstruction, uncertainty quantification, and calibration procedures are implemented within CaliBrain, enabling reproducible methodological comparisons. Software: https://doi.org/10.5281/zenodo.24459785 (version 1.1.0).Source code at https://github.com/braindatalab/CaliBrain.Documentation at https://calibrain.readthedocs.io.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-25
DOI
https://doi.org/10.5281/zenodo.24544960
Primary Topic
EEG and Brain-Computer Interfaces
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

CaliBrain: A Python toolbox for uncertainty quantification, calibration, and benchmarking in Bayesian M/EEG inverse source imaging

Srikantan S. Nagarajan, Ismail T. Huseynov, Stefan Haufe, Mohammad Orabe
Zenodo (CERN European Organization for Nuclear Research)
EEG and Brain-Computer Interfaces
preprint

CaliBrain: A Python toolbox for uncertainty quantification, calibration, and benchmarking in Bayesian M/EEG inverse source imaging

Srikantan S. Nagarajan, Ismail T. Huseynov, Stefan Haufe, Mohammad Orabe
preprint en

Abstract

Preprint, not yet peer reviewed. Electroencephalography (EEG) and magnetoencephalography (MEG) source imaging estimates underlying neural current sources from non-invasive sensor recordings. Bayesian reconstruction methods address this ill-posed inverse problem by providing source estimates together with posterior uncertainty. However, the resulting credible regions are not necessarily empirically calibrated, as their nominal credibility may differ from actual coverage. While existing software packages support forward modelling and Bayesian source reconstruction, dedicated tools for evaluating and recalibrating source-wise posterior uncertainty remain unavailable. CaliBrain is an open-source Python toolbox for uncertainty quantification, calibration, and benchmarking in Bayesian M/EEG inverse source imaging. The package provides an end-to-end workflow encompassing source simulation, leadfield preparation, sensor-level data projection and noise generation, Bayesian source reconstruction, construction of voxel-wise credible regions from posterior means and covariance matrices, empirical coverage assessment, and post-hoc uncertainty recalibration. Its reproducible benchmarking workflows enable systematic comparisons across inverse solvers, orientation models, noise specifications, and simulation settings. Depending on the source orientation model, uncertainty is represented by one-dimensional credible intervals, two-dimensional credible ellipses, or three-dimensional credible ellipsoids. CaliBrain provides a unified Python framework for Bayesian source reconstruction, voxel-wise uncertainty assessment, and post-hoc recalibration across EEG and MEG modalities and source-orientation models. While it can use forward solutions prepared with established neuroimaging software, its reconstruction, uncertainty quantification, and calibration procedures are implemented within CaliBrain, enabling reproducible methodological comparisons. Software: https://doi.org/10.5281/zenodo.24459785 (version 1.1.0).Source code at https://github.com/braindatalab/CaliBrain.Documentation at https://calibrain.readthedocs.io.

Zenodo (CERN European Organization for Nuclear Research)
Physikalisch-Technische Bundesanstalt (DE), Federal Institute For Materials Research and Testing (DE), University of California, San Francisco (US), Technische Universität Berlin (DE), Charité - Universitätsmedizin Berlin (DE)
EEG and Brain-Computer Interfaces
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon