arXiv:2611.06979cs.LGNov 2026

Manuscript Offprint

arXiv:2611.06979

Uncertainty calibration in Bayesian M/EEG source imaging

Ismail Huseynov, Mohammad Orabe, Srikantan Nagarajan, Stefan Haufe

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Many applications of M/EEG source imaging require not only accurate source localization but also reliable uncertainty estimates. However, most inverse solutions are still evaluated predominantly through point estimates, and even when Bayesian methods provide full posterior distributions, it is often unclear whether the resulting credible regions are empirically well calibrated. This motivates a systematic framework for both posterior uncertainty quantification and calibration in M/EEG source reconstruction.

We focus on empirical Bayesian inverse methods with closed-form Gaussian posterior summaries, including Bayesian minimum norm (BMN) and sparse Bayesian learning (SBL) methods. We hypothesize that these methods can provide near-calibrated uncertainties when combined with adaptive noise learning. Since voxel-wise SBL produces degenerate posterior variances at sources estimated to be zero, we combine SBL with sparse basis field expansions (S-FLEX), allowing retained basis coefficients to contribute nonzero marginal posterior variance at those locations. For BMN with sLORETA-based depth weighting, we derive joint source- and noise-variance updates through evidence maximization. Both methods showed residual miscalibration in our experiments. Therefore, we consider isotonic regression to adjust credible-region levels based on empirical coverage estimates as an additional post-hoc recalibration step.

*Corresponding authors: haufe@tu-berlin.de, ismail.huseynov@ptb.de

In simulations, we benchmark BMN+sLORETA and SBL+S-FLEX for both fixed- and free-orientation source models, with and without post-hoc recalibration, and for different noise estimators. We evaluate calibration, as well as localization accuracy and posterior uncertainty, across different signal-to-noise ratios (SNR), source sparsity levels, and subject-specific head models.

SBL+S-FLEX exhibits lower localization error, measured by the Wasserstein distance metric, smaller posterior uncertainty, and empirical coverage closer to nominal credibility than BMN+sLORETA before recalibration. Isotonic recalibration further improves the calibration of both methods, with the largest gains for the conservative BMN+sLORETA posterior, whereas transfer across mismatched SNR, sparsity, and head model conditions remains condition dependent. The three noise specifications (oracle, baseline-estimated, and adaptively learned) yielded broadly consistent reconstruction and uncertainty trends within each estimator.

Finally, application to real auditory MEG data demonstrates not only more focal localization but also tighter uncertainties for SBL+S-FLEX as compared to dense BMN+sLORETA, suggesting higher statistical power in identifying the expected sources in bilateral auditory cortices.

Keywords: M/EEG source imaging, Bayesian inverse modeling, Source reconstruction, Uncertainty quantification, Uncertainty calibration

1. Introduction

Magneto- and electroencephalography (M/EEG) are indispensable non-invasive tools for monitoring brain activity and provide insight into both normal function and pathology. In clinical contexts such as surgical planning for drug-resistant epilepsy, precise localization of abnormal activity to specific brain structures is imperative [32]. Achieving such precision requires solving the inverse problem that maps sensor-level M/EEG measurements to the underlying neuronal current sources. Because the M/EEG inverse problem is highly underdetermined and measurements are contaminated by noise, prior assumptions and noise modeling critically affect source localization accuracy. The problem is therefore commonly characterized as ill-posed and severely ill-conditioned, meaning that even small perturbations in the sensor data may lead to large differences in the reconstructed sources. Although a broad range of Bayesian and empirical-Bayesian source imaging methods has been developed for this setting [2, 3, 6, 7, 11–13, 17, 18, 22, 24, 31, 37, 41, 43, 44], most studies focus on point estimates, such as posterior means, as the main output quantity while neglecting their associated uncertainty, for example as encoded in posterior variances or local covariance blocks. In high-stakes biomedical applications, however, calibrated uncertainty can be as important as localization accuracy itself. For example, in presurgical epilepsy evaluation, an overconfident source estimate may give the misleading impression that abnormal activity is precisely localized within or outside a candidate resection zone, even when the inverse problem admits substantial spatial uncertainty [32]. This creates a strong need not only to quantify posterior uncertainty, but also to assess whether that uncertainty is well calibrated, meaning that nominal credible regions are accurately mirrored by empirical coverages.

The study of uncertainty quantification (UQ) and uncertainty calibration (UC) in M/EEG source imaging is still comparatively limited. Bayesian modeling has enabled state-of-the-art source reconstruction algorithms through application-specific priors and hierarchical variance models [2, 3, 7, 11–13, 43, 44]. A key advantage of these methods is that, beyond posterior means, they also yield posterior covariance information that can in principle be used for uncertainty quantification. In applications such as presurgical epilepsy evaluation, this means that the inverse solution should ideally provide not only a map of estimated source strengths, but also information about the reliability of these estimates, for example through probabilities of source presence, posterior variances, or credible intervals and regions for local neural current activity [32].

Minimum-norm estimators were among the first methods that used Bayesian maximum-a-posteriori (MAP) estimation for ill-posed electromagnetic inverse problems [10]. Dale and colleagues introduced dynamic statistical parametric mapping, combining anatomical and functional constraints with MEG to obtain spatiotemporal cortical activity maps [4]. Pascual-Marqui and colleagues developed the LORETA/sLORETA/eLORETA family, which uses standardized current-density estimates to reduce localization bias in distributed source imaging [29, 30]. Friston and colleagues developed empirical-Bayesian and multiple-sparse-prior formulations, in which source covariance components and hyperparameters are estimated from the data [6, 17, 24, 31]. In parallel, He and colleagues advanced electrophysiological source imaging for high-density EEG and clinical applications, including epilepsy-related source localization [16, 25]. All of these algorithms can be viewed as Type-I penalized likelihood estimation methods [11, 43]). These contributions have strongly shaped modern Bayesian source reconstruction, but their regularizers and source priors were developed primarily to improve localization accuracy of the MAP estimate rather than to achieve empirical calibration of posterior credible intervals or regions.

Early work on uncertainty quantification in M/EEG inverse modeling used Bayesian analysis to estimate error bounds for EEG source reconstructions and examined their behavior in simulations [36]. Conductivity-related uncertainty in EEG source imaging has also been addressed using Bayesian approximation error modelling and neural stochastic differential equation networks [34, 42]. SESAMEEG explicitly quantifies posterior uncertainty in the number and locations of M/EEG sources using approximate Bayesian inference via sequential Monte Carlo [23].

A central unresolved question is whether nominal credibility translates into empirical coverage across different source, noise, and head-model conditions, and how systematic discrepancies can be corrected. We address this question for Type-II Bayesian source-imaging methods with closed-form conditional posterior summaries through a unified simulation benchmark of localization accuracy, posterior uncertainty, and calibration, together with post-hoc recalibration evaluated on held-out data.

Uncertainty calibration asks whether given uncertainty information has the intended empirical coverage behavior when evaluated against simulated or validation cases with known ground truth. In measured-data inverse problems, exact ground truth is generally unavailable; however, one can ask whether source parameters drawn from a plausible data-generating process fall inside nominal (e.g., 95%) credible regions in the expected fraction (95%) of test cases. If this agreement holds (approximately), the inverse procedure is empirically well-calibrated. If empirical coverage is systematically larger than the nominal level, the method is underconfident; if empirical coverage is systematically smaller, the method is overconfident. This distinction is important in clinical interpretation. An underconfident method may make a correct localization appear too uncertain to support a decision, whereas an overconfident method may give unjustified confidence in an incorrect localization. In the epilepsy example, both failure regimes are problematic: the former may obscure a true seizure-onset zone, while the latter may overstate evidence for an incorrect candidate region.

Bayesian posteriors represent uncertainty about inverse parameters conditional on the observed data, the prior, and the assumed model. A Bayesian credible region is a set assigned a prescribed posterior probability mass, for example 0.95. Thus, conditional on the model and observed data, the posterior probability assigned to the parameter lying in a 95% credible region is 0.95. This posterior statement is distinct from the empirical coverage property considered below.

However, the quantification of Bayesian credible regions is not, by itself, a guarantee of empirical coverage in practical applications. It is conditional on correct model specification and a prior that accurately encodes domain knowledge. In current M/EEG source imaging practice, priors are mainly used to encode low-level structural assumptions on the posterior mean such as sparsity or smoothness in certain domains. Besides zero-mean assumptions, quantitative knowledge is rarely available to be encoded in M/EEG priors. In particular, prior and noise co/variances critically shape posterior uncertainties but are rarely fully specified. These parameters can be modeled in a fully-Bayesian (hierarchical) way [18, 22] or be estimated directly through Bayesian evidence maximization also known as Type-II maximum-likelihood estimation [6, 43]. Both approaches, however, typically provide only approximations to the posterior. Together with shrinkage effects and posterior degeneracies of sparsity-inducing mechanisms, all these factors may lead to systematic discrepancies between nominal posterior credibility and empirical coverage. To the best of the authors' knowledge, such discrepancies have not been systematically quantified yet.

The present study benchmarks uncertainty calibration in Bayesian source imaging across a broad range of simulated settings and introduces methodological extensions to address four questions:

  1. How can uncertainty and calibration be assessed for fixed- and free-orientation sources?

  2. How can voxel-wise marginal posterior degeneracy in sparse Bayesian learning (SBL) be mitigated to support meaningful UQ and UC?

  3. How do sparse and dense empirical Bayesian methods with Gaussian posteriors compare with respect to uncertainty and calibration? How does adaptive learning of noise variances compare to using oracle or baseline-derived estimates?

  4. Can post-hoc recalibration improve calibration on unseen data with different source configurations, noise levels, and anatomical head models?

We address these questions through two complementary contributions: UQ- and UC-ready empirical-Bayesian inverse methods and a benchmarking framework for assessing their calibration performance. The methodological idea is to reduce ad hoc variance tuning by learning variance-related parameters directly from the observed data, so that the inverse methods can be applied in a zero-shot empirical-Bayesian manner. On the methodological side, our study focuses on two Type-II Bayesian learning approaches with distinct structural behavior. The first considered method is Bayesian minimum norm (BMN), which employs a dense Gaussian prior and learns a single common scalar source variance hyperparameter [38]. We extend this dense-prior model to a fully empirical-Bayesian minimum-norm variant in which the source variance and the sensor-noise variance are learned jointly from the observed data, and we combine it with sLORETA-based depth weighting to reduce depth bias while preserving a dense posterior representation. The second method is γ\gamma-MAP, also known as Champagne, which learns source-wise variance hyperparameters and thereby promotes sparse reconstructions through automatic relevance determination (ARD) [2, 3, 7, 11, 43, 44]. While sparsity can be highly beneficial for localization, it introduces a major difficulty for UQ: when sources are pruned, the corresponding posterior variances may collapse toward zero, so credible regions become degenerate or ill-defined. To mitigate this voxel-wise marginal degeneracy, we incorporate sparse basis field expansions, which replace strictly local sparse support by a spatially extended basis representation. Retained basis functions can thereby contribute nonzero posterior variance to cortical locations whose corresponding sparse coefficients are inactive, yielding informative local covariance summaries for uncertainty analysis [14, 15]. The resulting joint source covariance may nevertheless remain globally rank deficient. Thus, BMN+sLORETA with adaptive noise learning represents the dense-prior case, whereas γ\gamma-MAP with S-FLEX represents the sparse-prior case in which the uncertainty retained in the sparse coefficient representation is spatially distributed over cortical source space. Both methods are further combined with post-hoc isotonic recalibration as an additional layer for improving empirical calibration.

On the benchmarking side, we establish a unified simulation-based framework for UQ and UC in M/EEG source imaging. This framework addresses the questions of vector-valued source uncertainty and fixed-versus-free orientation by covering both fixed-orientation and free-orientation source models within a single dimension-matched perspective. Starting from the full multivariate Gaussian posterior, we use Gaussian marginalization to derive voxel wise uncertainty summaries suitable for evaluation and visualization. This leads naturally to credible intervals in the fixed-orientation setting, credible ellipses for reduced free-orientation MEG in the locally SVD-defined two-dimensional MEG-sensitive subspace, and credible ellipsoids for free-orientation EEG. These dimension-matched credible regions form the basis for empirical coverage analysis and calibration assessment across modalities and source models.

We then use this framework to conduct an extensive simulation benchmark of calibration performance. BMN+sLORETA and γ\gamma-MAP+S-FLEX are evaluated under three noise specifications: oracle noise, baseline-estimated noise, and adaptively learned noise. For each method and noise setting, we assess calibration before and after post-hoc recalibration, including matched, pooled-mismatch, and fixed recalibration variants. The experiments are carried out in fixed-orientation and reduced free-orientation MEG settings, and they vary the signal-to-noise level, the number of true active sources, and the subject-specific head model. Performance is quantified using localization accuracy, absolute posterior uncertainty, and calibration metrics that capture overall miscalibration, signed bias, maximal underconfidence, and maximal overconfidence. This design allows us to compare dense and sparse priors, fixed- and free-orientation source models, different noise-estimation regimes, and different recalibration regimes on unseen data. Altogether, the proposed methods and benchmarking framework provide a common basis for studying reconstruction accuracy, posterior uncertainty, and UC for Bayesian M/EEG inverse solvers. Finally, we illustrate the proposed uncertainty summaries using the standard auditory condition of the Brainstorm CTF MEG dataset.

References (35)