Manuscript Offprint
arXiv:2611.06979Uncertainty calibration in Bayesian M/EEG source imaging
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:
-
How can uncertainty and calibration be assessed for fixed- and free-orientation sources?
-
How can voxel-wise marginal posterior degeneracy in sparse Bayesian learning (SBL) be mitigated to support meaningful UQ and UC?
-
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?
-
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 -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 -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 -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.
2.1. Source Reconstruction
2.1.1. Orientation-aware problem formulation
We consider the linear forward model for M/EEG measurements:
where denotes the sensor measurement at time , is the unknown source current vector at time , is the lead-field matrix, and is additive sensor noise at time , where is the number of sensors, is the number of source locations, and is the local source dimension. Concatenating all time points yields
We assume temporally independent zero-mean Gaussian sensor noise with isotropic covariance,
where denotes the sensor-noise variance. In the synthetic-data setting described here, this variance is induced by the scaling described in Section 3.1.
To treat fixed- and free-orientation source models within a unified formulation, we represent the source vector at each time point in block form:
where is the local source block at cortical location i. The parameter d specifies how many source coefficients are assigned to a single location:
In the fixed-orientation setting, each source location contributes a single scalar coefficient along the prescribed normal vector to the cortical surface. In the free-orientation EEG setting, each source location is represented by a three-dimensional current vector. In the free-orientation MEG setting, we retain the two locally most MEG-sensitive source directions obtained from the singular-value decomposition of the three-component lead-field block. This yields an effective two-dimensional representation whose local subspace need not coincide with the cortical tangent plane.
Accordingly, the lead-field matrix takes the form
The orientation-specific constructions of L are given in Supplementary Section S1.4.
With this notation, the stacked forward model becomes
The primary goal of M/EEG source imaging is to recover the unknown source matrix from the sensor data , given the lead-field matrix . Since typically , the inverse problem is severely ill-posed and requires regularization. In this work, we focus on Type-II Bayesian learning methods with Gaussian likelihoods and Gaussian source priors, in which source and, possibly, noise variance hyperparameters are learned from data by marginal-likelihood optimization [2, 3, 7, 11, 38, 43, 44]. Conditional on learned hyperparameters, these models yield closed-form Gaussian posterior distributions characterized by posterior means together with posterior covariance matrices, which form the basis of the subsequent uncertainty analysis.
2.1.2. Full posterior distribution
We consider a Gaussian likelihood together with a zero-mean Gaussian source prior. Let denote the hyperparameters governing the source-prior covariance and let denote the hyperparameters governing the sensor-noise covariance. For fixed values of these hyperparameters, Bayes' theorem yields
The additive Gaussian noise model introduced above defines the Gaussian likelihood. The source prior is also assumed to be Gaussian,
It follows that, conditional on fixed or learned hyperparameters, the posterior is Gaussian in all inverse models considered below. The specific covariance parameterizations and hyperparameter-learning rules are introduced separately for each inverse solver in the next subsection. After the hyperparameters have been fixed or estimated, we suppress them from the notation and use the shorthand
with the understanding that, for settings in which a hyperparameter is prescribed rather than learned, the corresponding fixed value is used in place of its estimate.
Under the standard assumptions of temporal independence of both the source prior and the sensor-noise model, and conditional on fixed or learned hyperparameters, the posterior distribution factorizes over time:
where
Here denotes the posterior mean at time , whereas is the posterior covariance at a single time point. In the models considered here, the source and sensor-noise models are temporally i.i.d. Therefore, once the hyperparameters have been fixed or learned from the data, the posterior covariance is identical for all . Thus, the posterior mean varies across time, whereas the posterior covariance remains static.
Equivalently, the posterior over the vectorized source matrix is Gaussian:
with
and
Here denotes the direct sum, i.e. a block-diagonal matrix with identical diagonal blocks and zeros elsewhere:
This block-diagonal structure reflects posterior independence across time points under the model assumptions.
Although the full posterior is defined over the entire source matrix , the factorization in (5) shows that source reconstruction at a given instant is fully characterized by the single-time posterior
Therefore, in the following subsection, the inverse solvers are formulated at each time point, while the subsequent uncertainty quantification and calibration analysis is based on temporally aggregated posterior summaries derived from the full posterior over , as detailed in Supplementary Section S1.2.
2.1.3. Inverse solvers
We consider two Type-II Bayesian inverse methods: -MAP (Champagne) and Bayesian minimum norm (BMN) [38]. Both methods estimate source variance hyperparameters through Type-II marginal-likelihood maximization, with the sensor-noise variance either prescribed or jointly estimated. Under the homoscedastic noise model, joint estimation proceeds through alternating convex-bounding updates, following Cai et al. [3] for -MAP with S-FLEX. The corresponding update rules and posterior mean and covariance expressions are presented separately for each method.
-MAP with S-FLEX. In voxel-space -MAP, prior-level source pruning sets the corresponding posterior means and variances to zero, implying certainty about inactivity conditional on the fitted model. To mitigate this degeneracy, we incorporate sparse basis field expansions [14, 15], representing the source vector as
where is the spatial basis operator and contains the basis coefficients, grouped into blocks of dimension .
In analogy to the S-FLEX basis fields of Haufe et al. [15], we construct the scalar spatial basis from isotropic, three-dimensional Gaussian bell-shaped profiles centered at source locations in anatomical space and sampled on the cortical source grid. Their width is parameterized relative to the source-grid spacing. The Gaussian kernel and its normalization, together with the orientation-specific constructions of , are detailed in Supplementary Sections S2.1 and S2.2.
With , the coefficient-space model is
with prior
where is the variance of coefficient group . In the fixed-noise formulation, the sensor-noise covariance is treated as known. The marginal data covariance in coefficient space is
The variance hyperparameters are estimated by minimizing the Type-II negative log-marginal likelihood, up to constants and a positive scaling factor:
In the fixed-noise setting, this objective is minimized over while is held fixed. Conditional on the current hyperparameters, the coefficient posterior is Gaussian, with
We seek to minimize the Type-II objective using convex-bounding (CB) updates [3, 38]. Because the objective is nonconvex in the variance hyperparameters, global optimality is not guaranteed, and the iterations may converge to a local stationary point [11]. Let denote the -th posterior-mean block at iteration , and let denote the corresponding block of . The grouped variance update is
The numerator is the time-averaged posterior-mean energy of coefficient group k, and the denominator measures its sensitivity through the effective forward operator.
After convergence, the posterior is evaluated at the estimated hyperparameters and mapped to source space:
With S-FLEX, pruning acts on the basis coefficients. The posterior covariance at source location i is
where contains the rows of associated with that location. Consequently, setting removes the contribution of the -th coefficient group, but contributions from other retained basis functions may still yield nonzero posterior variances at source . The rank properties of the resulting covariance are discussed in Supplementary Section S2.3.
Adaptive noise learning for -MAP with S-FLEX. Following the joint Type-II framework of Cai et al. [3], we extend the fixed-noise formulation to jointly estimate the coefficient variances and sensor-noise variance. Under the homoscedastic white-noise assumption,
The Type-II objective in Eq. (7) is minimized jointly over and .
The source and noise variances are updated alternately. At iteration , the source variances are obtained from Eq. (8), using the posterior mean and marginal data covariance evaluated at and . The posterior is then recomputed with and . The resulting intermediate covariance and posterior-mean residual are
The common noise variance is subsequently updated by the CB rule
Iterations terminate when the relative changes in the source and noise variance hyperparameters fall below a prescribed tolerance. The posterior is evaluated at the converged hyperparameters and transformed to source space using Eq. (9).
Bayesian minimum norm (BMN) with sLORETA normalization. BMN uses a single shared source-variance hyperparameter [38]. We incorporate sLORETA-based depth normalization through , where is the normalization matrix.
The ridge parameter is scaled relative to the positive eigenvalues of :
For fixed-orientation sources, is diagonal with
For multicomponent sources, is block diagonal with
The weights are subsequently normalized by a common geometric factor, whose global scaling is absorbed by .
With , the model becomes
For fixed , the shared variance is estimated by minimizing Eq. (7) under the parameterization and , with .
Conditional on , the posterior in normalized source coordinates is Gaussian, with
The CB update for the shared variance is
After convergence, the posterior is evaluated at the estimated variance and transformed to physical source coordinates:
Adaptive noise learning for BMN with sLORETA normalization. The BMN formulation of Sekihara and Nagarajan [38] estimates the shared source variance by expectation maximization. Here, we adopt alternating convex-bounding updates for joint source and noise variance estimation, with the aim of improving convergence speed in practice.
Under , the Type-II objective in Eq. (7) is minimized jointly over and . The alternating procedure follows that of adaptive -MAP with S-FLEX, with and . At iteration , the shared source variance is updated using Eq. (11), evaluated at and .
The posterior is then recomputed at and , and the noise variance is updated using Eq. (10), with
The same convergence criterion is used, and the final posterior is transformed to physical source coordinates through .
2.2. Uncertainty Quantification
Given the time-invariant posterior covariance structure established above, uncertainty quantification can be formulated naturally for the temporally aggregated source vector
This aggregation provides a compact summary of source activity over the analysis window while retaining a closed-form Gaussian posterior, which forms the basis for the source-wise credible regions and subsequent calibration analysis.
Because is a linear transformation of , its posterior is again Gaussian:
with
Hence, temporal averaging preserves Gaussianity and scales the posterior covariance by the factor 1/T. Equivalently, posterior standard deviations scale by . In practice, the analysis window used for temporal averaging should be chosen based on domain knowledge. In event-related potential or field (ERP/ERF) experiments, the averaging window should capture individual positive or negative source-level components to avoid cancellation between components of opposite sign. Alternatively, for non-time-locked activity, posterior uncertainty may be evaluated at individual time samples or for coefficients obtained through suitable linear spatial or temporal transformations, such as Fourier transforms.
2.2.1. Source-wise marginal posterior summaries
The full posterior contains dependencies across source locations and source components. For uncertainty quantification, we obtain local posterior summaries by marginalizing the multivariate Gaussian posterior to each source block (see Supplementary Section S1).
We partition the posterior mean according to the N source locations:
and write the posterior covariance in block form as
The diagonal block describes local posterior uncertainty at source i, while off-diagonal blocks encode dependence between source locations.
For the temporally aggregated posterior in Eq. (12), the mean retains this block structure:
Its local covariance block is
The resulting aggregated posterior marginal at source is
These local marginals form the basis for the dimension-matched credible regions and calibration analysis below.
2.2.2. Dimension-matched credible regions
For a Gaussian source-wise marginal posterior with positive-definite covariance , the squared Mahalanobis distance from the posterior mean follows a chi-square distribution with degrees of freedom [1]. The credible region at nominal credibility is therefore
where denotes the -quantile of the chi-square distribution with degrees of freedom. The local source dimension determines both the geometry of the region and its probability threshold.
Free-orientation EEG (). For full Cartesian free-orientation EEG, and . Evaluating Eq. (13) with and threshold gives a credible ellipsoid in Cartesian source coordinates.
Reduced free-orientation MEG (). For reduced free-orientation MEG, the local coordinates span the MEG-sensitive subspace defined in Supplementary Section S1.4, Eq. (S6), with and . Evaluating Eq. (13) with and threshold gives a credible ellipse in these coordinates.
Fixed orientation (d = 1). For the fixed-orientation representation defined in Supplementary Section S1.4, Eq. (S5), uncertainty concerns the signed current amplitude along the prescribed surface normal. Writing and using , Eq. (13) with d = 1 reduces to the credible interval
where denotes the -quantile of the standard normal distribution.
SVD-defined directional marginal for free-orientation sources. To visualize free-orientation source dynamics, we project the local posterior onto a source-specific direction , defined by the leading left singular vector of the uncentered posterior-mean trajectory over a prespecified reference interval and held fixed throughout the epoch. In the auditory MEG analysis, this yields signed source time courses and pointwise credible intervals at selected cortical locations, complementing the joint credible regions used for calibration assessment.
Conditional on the observed data, the directional marginal is
The construction and the corresponding credible intervals are detailed in Supplementary Section S1.3.
2.3. Uncertainty Calibration
The previous subsection introduced aggregated source-wise credible regions at nominal credibility level . Ideally, such regions should be calibrated in the sense that their nominal credibility agrees with their actual coverage probability. More precisely, a source-wise credible-region procedure is said to be calibrated if, for every ,
where the probability is taken with respect to the data-generating mechanism and the induced posterior procedure. In practice, however, model mismatch, shrinkage effects, and hyperparameter learning may induce systematic discrepancies between nominal credibility and actual coverage. As a result, posterior credible regions can be miscalibrated even when they are derived from a closed-form Gaussian posterior.
We first assess calibration empirically by comparing nominal credibility levels with the observed coverage of the corresponding credible regions. We then consider post-hoc recalibration as a separate procedure for correcting systematic deviations from the nominal coverage levels.
2.4. Empirical calibration assessment
2.4.1. Empirical coverage and calibration curve
For each source location , let denote the corresponding aggregated ground-truth source quantity expressed in the same local coordinate system as the credible region .
The empirical coverage at nominal level is defined by
where denotes the indicator function.
Evaluating over a grid of nominal credibility levels
yields the empirical calibration curve
Perfect calibration corresponds to the diagonal relation
If the empirical calibration curve lies above the diagonal, the posterior credible regions are underconfident, meaning that they cover the ground truth more often than intended. If the curve lies below the diagonal, they are overconfident, meaning that they cover the ground truth less often than intended.
This definition applies uniformly across all settings considered in this work. The resulting calibration curve provides the primary coverage-based description of uncertainty calibration, while we derive scalar summary calibration metrics from this curve later in the evaluation section.
2.4.2. Run-wise calibration curves
Let
index completed simulation runs generated under a fixed experimental setting. For each run , source , and nominal credibility level , we obtain an aggregated credible region together with the corresponding aggregated ground-truth source block . The run-wise empirical coverage is defined by
Thus, each run yields its own empirical calibration curve
These run-wise curves are used both for evaluating the variability of calibration across independent simulations and, in the post-hoc procedure described below, for learning and evaluating recalibration maps on disjoint sets of runs.
2.5. Post-hoc recalibration
After evaluating the original posterior credible regions, we examine whether systematic miscalibration can be corrected by a post-hoc recalibration step. Using calibration runs, we learn a monotone mapping between nominal credibility levels and empirical coverage. This mapping is then applied to unseen test runs to obtain calibrated credibility levels. All post-calibration results reported in this work are obtained by this external recalibration of the empirical calibration curve.
2.5.1. Calibration and test split
The available runs are partitioned into two disjoint sets,
where the training runs are used to estimate the recalibration map and the test runs are reserved for final evaluation. The concrete numbers of training and test runs are specified later in the simulation setup.
This separation ensures that the recalibration map is learned independently of the runs used for final calibration evaluation.
2.5.2. Isotonic recalibration from training runs
Empirical coverage is evaluated on a discrete grid of nominal credibility levels
At each level , the mean training coverage is obtained by averaging the run-wise coverages:
This curve serves as an empirical estimate of the calibration behavior of the estimator under the chosen setting.
To obtain a monotone recalibration map, we fit an isotonic regression function
where
The monotonicity constraint is consistent with the nestedness of credible regions, which implies that empirical coverage is non-decreasing in the nominal credibility level. Thus, the isotonic fit provides a monotone representation of the empirical calibration relationship, which is subsequently inverted numerically to obtain recalibrated credibility levels.
The fitted function estimates the empirical relationship between an input credibility level and its resulting coverage. To determine which input level is required to achieve a desired target coverage c, we consider the generalized inverse
whenever the defining set is nonempty.
For each target nominal level , we therefore obtain the recalibrated level
for attainable target levels. These adjusted levels are subsequently used in the construction of post-hoc recalibrated credible regions.
Remark 2.1. For a target credibility level , recalibration replaces the original threshold by , where . Thus,
When , define
The same region is the level- credible region of . Its center, principle directions, and axis ratios are unchanged, while its axis lengths are multiplied by relative to . This equivalence holds at each credibility level separately and may equivalently be regarded as a credibility-dependent rescaling of the posterior covariance.
2.5.3. Application to held-out runs
The recalibration map estimated from the training runs is applied to the held-out runs . For each test run and each nominal level , we evaluate both the original empirical coverage
and the post-calibration empirical coverage
Averaging over the held-out runs yields the mean pre- and post-calibration curves
which summarize calibration behavior on unseen runs before and after isotonic recalibration.
The scalar summary metrics used to quantify these calibration curves are introduced later in the evaluation section, together with the remaining source localization and uncertainty metrics.
3. Experimental Setup
This section presents the experimental protocol used to benchmark the considered inverse solvers, as summarized in Figure 1. We first describe the generation of synthetic datasets, followed by the noise specifications and evaluation criteria used in the simulation study.
3.1. Synthetic data generation
Synthetic datasets are generated from sparse source activity, forward projection to sensor space, and additive noise obtained by rescaling Gaussian white-noise realizations. The simulation framework supports fixed- and free-orientation configurations for EEG and MEG, including reduced two-dimensional MEG and full Cartesian three-dimensional EEG representations.

Figure 1: Unified workflow for simulation-based source reconstruction, posterior uncertainty estimation, calibration learning, and out-of-sample evaluation. In Stage 1, synthetic cortical activity is generated, the forward model is prepared, and sensor-space measurements are simulated under homoscedastic Gaussian noise. Source reconstruction is performed using BMN + sLORETA and -MAP + S-FLEX under oracle, baseline, and adaptive noise-learning models. Posterior means and covariances are used to construct credible intervals for fixed M/EEG, credible ellipses for free MEG, and credible ellipsoids for free EEG. In Stage 2, calibration operators are learned from repeated calibration runs using empirical coverage estimation and inverse isotonic recalibration. In Stage 3, the learned calibration is applied to held-out evaluation runs. Calibration metrics (MAD, MOD, MUD, and MSD) and reconstruction and uncertainty metrics (UNC and EMD) are computed in parallel and summarized through comparative visualizations.
The numerical simulation results presented here are based on MEG. Details of the head model, channel selection, and lead-field subset construction are provided in Section 3.4.1.
The simulated source time courses are designed to resemble event-related potentials (ERPs) in EEG and event-related fields (ERFs) in MEG. Each epoch comprises pre-stimulus and post-stimulus intervals, with post-stimulus event-related activity defined relative to the pre-stimulus baseline [21].
For each simulation run, active source locations are sampled uniformly without replacement. At each selected location, a scalar ERP/ERF-like waveform is generated independently. The simulator selects an interval within the post-stimulus period, generates white noise over that interval, and applies a fourth-order Butterworth band-pass filter over the prescribed frequency band. The filtered segment is multiplied by a Hanning window, normalized by its peak absolute value, and rescaled by an amplitude drawn from a clipped log-normal distribution. The segment is inserted into the full epoch, with zero activity outside its selected interval. All inactive source locations are assigned zero activity.
Source coefficients are expressed in the orientation coordinates defined in Supplementary Section S1.4. Using the prescribed unit cortical normal and the retained local MEG basis defined there, the waveform at each active source is represented as
Thus, the simulated activity at each location follows a single waveform with a time-invariant orientation. For reduced free-orientation MEG, this construction is equivalent to projecting the three-dimensional cortical-normal source into the retained local basis:
Stacking the source coefficients over locations and time gives . The noise-free sensor data are obtained from the forward model in Eq. (1):
where the lead field and source coefficients use the same orientation representation.
The observed sensor data are
where has independent standard normal entries. For , the noise scale is
This choice fixes the realized signal-to-noise ratio through
Larger values of therefore correspond to cleaner sensor data. The boundary cases and are handled separately, yielding noise-free and noise-only observations, respectively.
The scale is determined separately for each simulation run. In the oracle-noise setting, the same run-specific scale is supplied to the inverse solver as its assumed noise level. The baseline and adaptive noise specifications are described in Section 3.2.
For each run, the ground-truth source coefficients are also temporally averaged using the same aggregation applied to the posterior summaries. These quantities provide the reference values for evaluating credible-region coverage and recalibration performance.
3.2. Noise Specification
For a fixed source reconstruction method, posterior uncertainty depends not only on the source prior but also on how the sensor-noise covariance is specified. In the present study, this aspect is treated as part of the experimental design. We therefore consider three noise-specification settings: oracle noise, baseline noise, and adaptive noise learning. The oracle setting uses ground-truth information from the simulation, whereas baseline estimation and adaptive noise learning are applicable to real ERP/ERF data. In the oracle and baseline settings, the noise covariance is specified before inversion. In the adaptive setting, the noise parameters are estimated jointly with the source hyperparameters using the Type-II procedure described in Section 2.1.3.
In the synthetic framework described in Section 3.1, sensor noise is generated as additive Gaussian white noise followed by -dependent scaling. In each run, the simulated noise is , with defined in Section 3.1. Because depends on the realized , the scaled noise is not exactly Gaussian. We use as the run-specific nominal variance in the Gaussian inverse model.
3.2.1. Oracle noise
In the oracle setting, the inverse solver is supplied with the same run-specific scale used to generate the sensor data. Its assumed noise covariance is
This setting uses the known simulation scale; baseline noise instead estimates a variance from the pre-stimulus data, whereas adaptive noise learning updates its noise parameter jointly with the source parameters.
3.2.2. Baseline noise
In the baseline setting, the sensor-noise variance is estimated from the pre-stimulus portion of the noisy sensor data. Let
denote the restriction of the sensor data to the pre-stimulus interval. Since the simulated source activity is zero during this interval, the baseline segment contains only sensor noise.
For each sensor , we compute the sample variance across the pre-stimulus time points. The scalar baseline variance is then defined by
and the corresponding noise covariance supplied to the inverse solver is
Unlike the oracle setting, the baseline specification does not use the true simulation noise variance. It therefore represents a data-driven noise estimate obtained independently of the post-stimulus source reconstruction.
3.2.3. Adaptive noise learning
In the adaptive setting, the sensor-noise variance is estimated jointly with the source hyperparameters from the observed data. Consistently with the homoscedastic noise model used throughout the repeated benchmark, both inverse methods assume
with a single common sensor-noise variance .
For -MAP+S-FLEX, the grouped source-variance hyperparameters and the common noise variance are updated alternately using the Type-II convex-bounding procedure described in Section 2.1.3. For BMN+sLORETA, the shared source variance and the same type of common sensor-noise variance are learned jointly. The corresponding Type-II objectives and update rules are given in Section 2.1.3.
3.3. Evaluation Metrics
We evaluate the considered source reconstruction methods from three complementary perspectives: source localization accuracy, uncertainty magnitude, and uncertainty calibration. Since the uncertainty analysis in this work is based on temporally aggregated posterior summaries, the uncertainty-related metrics below are formulated in terms of aggregated source quantities.
3.3.1. Source localization metric: Earth Mover's Distance
To assess spatial localization accuracy while accounting for the geometry of the cortical source space, we employ the Earth Mover's Distance (EMD) [14, 35]. The EMD measures the minimum transport cost required to transform the reconstructed source distribution into the ground-truth source distribution, with the spatial distances between source locations defining the transport cost.
For all orientation settings, the nonnegative source mass at location is defined as the Euclidean norm of the temporally aggregated local source block,
This definition applies uniformly to ; for , the Euclidean norm reduces to the absolute value. In the reduced free-orientation MEG setting, contains the two dominant right singular vectors obtained from the SVD of the local lead-field block and therefore satisfies . Consequently, , so the source magnitude is identical in the reduced two-dimensional coordinates and in the corresponding representation in the retained three-dimensional source subspace.
To compare spatial distributions rather than total mass, these quantities are normalized as
Let denote the spatial location of source , and define the ground-cost matrix by
The EMD between the ground-truth and reconstructed source distributions is then defined as
subject to the mass-conservation constraints
Here, denotes the transport plan. Lower EMD values indicate better spatial agreement between the reconstructed and true source distributions. The optimization problem in Eqs. (25)–(26) is solved using the Python Optimal Transport (POT) package [5].
3.3.2. Uncertainty magnitude metric: UNC
To quantify the overall magnitude of posterior uncertainty, we compute UNC, defined as the mean posterior standard deviation across all source locations. This metric summarizes how diffuse or concentrated the posterior uncertainty is over the source space.
In the fixed-orientation case, the aggregated posterior variance at source location is the scalar quantity , so the corresponding posterior standard deviation is . In the free-orientation case, the aggregated local posterior covariance block is with for reduced free-orientation MEG and for free-orientation EEG. We summarize this local uncertainty by the root mean marginal variance
Equivalently, since the posterior covariance is static over time, the aggregated covariance is obtained from the pointwise covariance by scaling with .
Using these local standard deviations, UNC is defined by
Larger values of UNC indicate greater overall posterior uncertainty.
3.3.3. Uncertainty calibration metrics
Using the calibration curve introduced in Section 2.4.1, we quantify calibration performance by four scalar summary metrics. For the nominal credibility levels defined there, let denote the corresponding empirical coverage.
Mean absolute deviation.
This measures the average magnitude of deviation between empirical and nominal coverage. Lower values indicate better overall calibration.
Mean signed deviation.
This metric captures the average signed deviation of the calibration curve from the diagonal. Positive values indicate a tendency toward empirical overcoverage, whereas negative values indicate a tendency toward empirical undercoverage.
Maximum underconfidence deviation. In the reported experiments, maximum underconfidence deviation (MUD) quantifies the largest empirical overcoverage, i.e. the largest positive excess of empirical coverage over nominal coverage. We therefore use the positive-part definition
Large MUD values indicate the presence of conservative credible regions whose empirical coverage is much higher than intended.
Maximum overconfidence deviation. Maximum overconfidence deviation (MOD) quantifies the largest empirical undercoverage, i.e. the largest positive excess of nominal coverage over empirical coverage. We use
Large MOD values indicate the presence of overconfident credible regions whose empirical coverage falls much below the nominal level.
3.4. Simulation Study Design
The simulation study was designed to evaluate source-reconstruction accuracy, posterior uncertainty, and empirical uncertainty calibration under controlled variation of head geometry, signal-to-noise level, source sparsity, source orientation, and noise specification. It comprises two complementary components. First, a repeated benchmark was generated from subject-specific MEG forward models and provided the data for the calibration curves, run-level metric distributions, and parameter-sweep analyses. Second, a separate fixed-orientation EEG realization was generated for the illustrative source- and time-resolved multipanel described below.
Each repeated simulation followed the same sequence: source generation, forward propagation, sensor-noise addition, Bayesian source reconstruction, posterior uncertainty estimation, post-hoc uncertainty recalibration, and performance evaluation. The default configuration was evaluated for both fixed-orientation MEG and reduced free-orientation MEG. All analyses are reported for the free-orientation source model, whereas fixed-orientation results are provided in the supplement. Fixed- and reduced free-orientation simulations followed the same overall design but were generated independently and were therefore not paired run by run.
Pre- and post-calibration results were always evaluated on the same held-out test runs. Recalibration maps were estimated independently for every estimator, orientation model, noise specification, uncertainty diagnostic, and calibration strategy.
3.4.1. Experimental settings and parameter ranges
The repeated benchmark used realistic subject-specific volume-conductor models derived from the publicly available CamCAN dataset [40]. Forward models were constructed for four subjects from their T1-weighted anatomical images using MNE-Python [9]. A minimum source-to-inner-skull distance of 3 mm was imposed, and boundary-element method (BEM) forward solutions were computed for both fixed and free dipolar source orientations. Before source-space restriction, each forward model contained 4686 cortical locations and 204 MEG gradiometer channels.
To obtain a computationally controlled benchmark while preserving subject specific cortical geometry, 642 locations were selected in each hemisphere, yielding cortical locations per subject. This source subset was sampled once for each head model using the fixed subset seed 0 and was then held constant across all calibration runs, evaluation runs, estimators, noise specifications, and uncertainty analyses for that subject. The same restricted source ordering and cortical coordinates were used for source generation, sensor simulation, inverse estimation, posterior evaluation, and Earth Mover's Distance (EMD) computation.
Synthetic activity was generated with the ERP/ERF-type source simulator described above. The simulated interval was s, stimulus onset was at , the sampling frequency was Hz, and the waveform-generating filter band was Hz. Source amplitudes followed a clipped log-normal distribution with median 20 nAm, logarithmic standard deviation 0.2, and support restricted to [2.5, 50] nAm. Additive sensor noise was generated as Gaussian white noise and scaled according to the prescribed value.
The general simulation framework supports local source dimensions , corresponding to fixed orientation, reduced free-orientation MEG, and free-orientation EEG, respectively. The benchmark reported here used the fixed-orientation and reduced free-orientation MEG models.
Run-level randomization and reproducibility. Each calibration or evaluation run was indexed by a distinct reproducible run seed. Conditional on the fixed head model and its fixed source subset, the run seed determined (i) the active source locations, sampled uniformly without replacement; (ii) the stochastic ERP/ERF waveform at each active source, including its post-stimulus temporal placement, duration, filtered Gaussian driving sequence, and amplitude draw; and (iii) the Gaussian sensor-noise realization. The source and sensor simulators used separate random-number-generator instances initialized reproducibly from the run index. Calibration and evaluation sets used disjoint collections of run seeds. Within one run and one orientation setting, the same source realization, forward model, and noisy sensor data were supplied to both inverse-estimator families and to the three noise-specification analyses. Therefore, estimator and noise-model comparisons within a run were based on identical simulated data, whereas fixed- and reduced free-orientation experiments used independent realizations.
Source variance hyperparameters were initialized to one, and, in the adaptive noise-learning variants, the noise variance was initialized to one in the normalized optimization scale. Hence, the run-to-run variability reported in the figures originates from the simulated source support, source waveforms, amplitudes, noise realizations, and head geometry rather than from random solver initialization.
Inverse-solver and spatial-basis settings. Two estimator families were compared: BMN with sLORETA depth compensation and -MAP with S-FLEX integration. Each estimator was evaluated with adaptive noise learning and with a pre-specified variance under the oracle and baseline noise settings. In the repeated benchmark, the Gaussian S-FLEX kernel used mm. The maximum iteration counts used in the repeated benchmark were 300 for the BMN+sLORETA and 1000 for the -MAP+S-FLEX solvers, with convergence tolerance .
The principal experimental factors were the head model, the number of active sources, the signal-to-noise parameter, and the run seed. The parameter grids were
with default values and NNZ = 5. For each of the head models, independent simulations were reserved for learning a recalibration map and independent simulations were reserved for final evaluation. Thus, every curve or box distribution reported at one fixed evaluation condition contains run-level observations.
Condition-specific evaluation and calibration training. Calibration curves at the default configuration used and NNZ = 5. In the SNR sweep, was varied while NNZ = 5 was held fixed; in the source-number sweep, NNZ was varied while was held fixed. Evaluation summaries were formed separately at every displayed parameter value.
Calibration regimes. The calibration regimes differed exclusively in the calibration simulations used to estimate ("train") the inverse-isotonic credibility map. For every combination of inverse estimator, noise specification, orientation model, uncertainty geometry, and calibration strategy, a separate map was learned from the designated calibration runs. Calibration and evaluation runs were disjoint, and every mode was evaluated on the same held-out runs per head, yielding run-level observations at each fixed test condition.
Pre-calibration. In this mode, no isotonic model was fitted. Credible intervals or ellipses were constructed directly at the requested nominal credibility level from the raw posterior mean and covariance. It therefore required no calibration runs and served as the uncorrected reference.
Post-oracle. For each head model and each test condition, one head-specific isotonic map was fitted using independent calibration runs from the same head, the same , and the same NNZ value as the evaluation runs. At the default setting this means same-head training at and NNZ = 5; in the SNR and NNZ sweeps, a new matched map was learned at every displayed parameter value. The map was then applied to 25 held-out runs from that head. This mode represents the best-case post-hoc recalibration condition because both anatomy and data-generating condition are matched.
Post-pooled-mismatch. For each held-out test head, one isotonic map was learned from the other three head models using calibration runs pooled across the complete -by-NNZ grid. The map was then applied to the 25 held-out runs of the excluded head. This strategy jointly tests transfer across experimental conditions and across subject-specific head geometry. It is denoted by "post-mismatch" in the retained figure legends.
Post-fixed. For each head model, one isotonic map was learned from the 10 same-head calibration runs at the default configuration , NNZ = 5, and was then kept fixed when evaluating every value in the SNR or NNZ sweep. Consequently, post-fixed coincides with post-oracle at the default value and quantifies condition mismatch away from that value: SNR transfer in the sweep and sparsity transfer in the NNZ sweep.
Illustrative fixed-orientation EEG realization. A separate simulation was constructed for the representative source-level multipanel reported with the simulation results. Unlike the CamCAN-based MEG benchmark, this realization used the MNE fsaverage anatomy, a cortical source space based on third-order icosahedral subdivision (ico3) with 642 locations per hemisphere, a three-layer EEG boundary-element model, and a 64-channel BioSemi montage [9]. Average referencing reduced the effective inverse sensor dimension from 64 to 63.
The source model was fixed-normal and contained two bilateral auditory generators, one in each hemisphere, with NNZ = 2 and . A single reproducible realization was generated using source and noise seeds equal to 42. Both BMN+sLORETA and -MAP+S-FLEX were fitted with adaptive common-noise learning. For this illustrative realization, , the S-FLEX kernel width was mm, and the post-convergence relative -threshold was 0.2. This kernel width is specific to the illustrative fsaverage ico3 experiment in analogy to the 20-mm width used in the repeated CamCAN benchmark.
3.5. Real-data study design
The real-data study used the Brainstorm CTF auditory MEG dataset distributed through MNE-Python [8, 9, 26, 39]. The dataset comprises two auditory acquisition runs from one participant, recorded with a CTF 275 system at a sampling rate of 2400 Hz. The recordings contain 274 MEG axial gradiometer channels and 26 MEG reference channels. Each run included frequent standard tones and less frequent deviant tones presented at variable interstimulus intervals. We analysed the standard condition to examine the posterior source structure around the M100 (N100m), the auditory evoked-field component occurring approximately 100 ms after stimulus onset and corresponding to the auditory N100 response in EEG. This component provides a well-characterized auditory cortical response for source analysis without requiring a standard-deviant contrast.
Data preparation followed the MNE-Python implementation of the Brainstorm auditory workflow [26]. The two CTF recordings were concatenated, and the temporal offset between the digital trigger and the acoustic stimulus was corrected from the recorded audio channel. Previously identified bad segments and noisy channels were excluded, and signal-space projection (SSP) was applied to attenuate ocular and saccade-related artifacts. Epochs were extracted from -100 to 500 ms and baseline-corrected with respect to the pre-stimulus interval. Following the reference workflow, the first 40 accepted standard epochs from each acquisition run were combined, giving an evoked response based on 80 trials. The data were resampled to 600 Hz and low-pass filtered at 40 Hz. The subsequent inverse analysis was restricted to the interval from -100 to 300 ms.
The MNE-Python workflow [26] was retained through the construction of the sensor-level evoked response, the empty-room noise covariance, the subject-specific anatomical model, and the cortical forward operator. At the source-estimation stage, however, the two Bayesian inverse methods investigated in this study, BMN+sLORETA and -MAP+S-FLEX, replaced the reference inverse estimator. Both methods were applied to the same measured response, cortical geometry, and forward operator. The covariance estimated from the separate empty-room recording was used as a common input for sensor whitening in both methods.
The subject-specific free-orientation forward solution supplied with the dataset was restricted from its original oct6 source space to the nested oct5 grid, resulting in cortical locations. After application of the two signal-space projection (SSP) projectors, the effective rank of the whitened sensor model was . At each cortical location, the whitened three-component lead-field block was reduced to its two dominant MEG-sensitive components by the source-wise singular-value decomposition method. The inverse model consequently contained reduced source coefficients. BMN+sLORETA and -MAP+S-FLEX used the same reduced lead field, source ordering, whitened sensor response, and fixed covariance model.
For BMN, depth-dependent sensitivity differences were compensated using the sLORETA normalization with . For -MAP+S-FLEX, the Gaussian width was chosen relative to the cortical sampling density as , where denotes the median within-hemisphere nearest-neighbor distance. The -MAP+S-FLEX hyperparameters were initially estimated over the complete cortical grid. After full-grid convergence, coefficient groups with were removed to exclude negligible basis components from the final source reconstruction. The posterior mean and covariance used for the cortical maps and directional credible intervals were computed from the retained groups.
For cortical visualization, the activity associated with source was summarized over the M100 response interval ms using the root-mean-square amplitude of the local two-dimensional posterior mean,
Mesh local maxima were identified from the complete cortical activity map, and the strongest maximum was selected independently in each hemisphere. The same cortical index was used to extract the local posterior mean, the corresponding covariance block, and the directional posterior interval.
The directional posterior at each selected source was defined using the SVD-based coordinate introduced in the Methods. Specifically, the uncentered local posterior-mean trajectory over the prespecified reference interval ms was decomposed by singular-value decomposition, and the first left singular vector was adopted as the dominant local orientation. The direction was estimated once and held fixed over the complete epoch, so that the resulting scalar posterior time course represents temporal variation along a common source-specific coordinate.
Because the leading singular vector is identifiable only up to sign, its polarity was chosen so that the projected posterior mean at 100 ms was non-negative. This deterministic convention affects only the displayed sign; it does not alter the projected posterior variance, interval width, or zero-containment decision.
4. Results
4.1. Results on Simulated Data
The simulation study jointly evaluates spatial reconstruction, the magnitude of posterior uncertainty, and the empirical calibration of posterior credible regions.
4.1.1. Default-setting calibration under adaptive noise learning
Figure 2 shows the calibration curves derived from joint credible-ellipse containment in the default setting and NNZ = 5. In panel A, the BMN+sLORETA curve lies above the diagonal over most nominal levels. Its local regions therefore contain the simulated current vector more often than their nominal credibility would suggest. Post-oracle recalibration substantially reduces this conservative deviation. Post-mismatch recalibration also removes much of the raw overcoverage but overshoots the correction at intermediate credibility levels, resulting in undercoverage.
For -MAP+S-FLEX, panel B shows a smaller raw deviation over much of the range, with overcoverage at some nominal levels and undercoverage at others. Both post-oracle and post-mismatch recalibration bring the curve closer to the diagonal, although residual curvature remains. Because the raw curve crosses the identity line, its miscalibration cannot be described by a single global inflation or contraction of posterior uncertainty. Since MAD does not distinguish overcoverage from undercoverage, we also report MSD, MOD, and MUD.
4.1.2. Sensitivity to signal quality and source number
Figures 3 and 4 examine reduced free-MEG sensitivity to SNR and source number, respectively. Both sweeps use the default-setting benchmark, with 100 held-out evaluation runs per condition.
At the default condition, the median BMN+sLORETA MAD decreases from 0.285 (pre) to 0.029 (post-oracle) and 0.052 (post-mismatch); the post-oracle median for -MAP+S-FLEX is 0.031.

Figure 2: Calibration curves derived from reduced free-MEG joint two-dimensional credible ellipses under adaptive noise learning, at and . A: BMN+sLORETA. B: -MAP+S-FLEX. Lines show mean empirical coverage over 100 evaluation runs; color-matched bands show plus or minus one run-level standard deviation. The dotted diagonal indicates ideal calibration (empirical coverage equal to nominal credibility). Pre denotes the raw results; post-oracle uses calibration simulations matched in head model, SNR, and NNZ; post-mismatch uses pooled-mismatch calibration simulations.
In Figure 3, posterior uncertainty decreases as the sensor data become cleaner, with the strongest contraction observed for BMN+sLORETA. EMD changes only modestly across the SNR range for both estimators. BMN+sLORETA retains predominantly conservative raw coverage throughout the sweep, while post-oracle recalibration substantially reduces the calibration error at all evaluated SNR levels.
For -MAP+S-FLEX, the raw calibration error also decreases toward the cleaner-data regimes, although mixed signed deviations remain. Post-oracle recalibration consistently reduces MAD and the dominant coverage deviations. The post-fixed and post-oracle corrections remain similar over much of the SNR range, whereas post-mismatch leaves larger residual deviations and can introduce undercoverage at some SNR levels.
Figure 4 shows that increasing the number of active generators affects the two estimators differently. BMN+sLORETA EMD decreases moderately with increasing NNZ, whereas -MAP+S-FLEX shows a modest increase. UNC increases for both methods as the number of active generators grows,

Figure 3: Reduced free-MEG SNR sweep with adaptive noise learning and NNZ = 5. The sweep uses the same benchmark and inverse-solver settings as the default configuration. The left column shows BMN+sLORETA and the right column -MAP+S-FLEX results. Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively. Each box contains 100 run-level observations at one value. Calibration regimes are pre, post-oracle, post-mismatch, and post-fixed. Post-fixed and post-oracle coincide at the default condition .
with a substantially larger absolute uncertainty scale for BMN+sLORETA.
BMN+sLORETA remains predominantly conservative before recalibration throughout the NNZ grid, while post-oracle recalibration substantially reduces this bias. -MAP+S-FLEX retains smaller raw calibration errors with both positive and negative signed deviations, and recalibration further reduces their magnitude. The post-fixed and post-oracle corrections remain similar over much of the NNZ grid, whereas post-mismatch shows larger residual deviations.
4.1.3. Noise-specification comparisons in reduced free-MEG
Supplementary Figure S1 shows the oracle-noise calibration curves at the default setting. The curves closely resemble those obtained with adaptive noise learning for both estimators. In both settings, BMN+sLORETA shows predominantly conservative raw coverage, whereas -MAP+S-FLEX exhibits smaller, mixed-sign deviations; post-oracle recalibration improves coverage for both estimators.
The oracle-noise sweeps (Supplementary Figures S2 and S3) show the same broad EMD and UNC trends as the adaptive-noise sweeps. Increasing SNR reduces UNC for both estimators and is accompanied by a modest decrease in EMD, particularly for -MAP+S-FLEX. Increasing NNZ raises UNC for both methods, while BMN+sLORETA EMD decreases and -MAP+S-FLEX EMD increases moderately. The raw calibration errors differ quantitatively from the adaptive-noise case, but post-oracle recalibration substantially reduces the dominant error throughout both sweeps. MSD, MOD, and MUD show that residual signed errors are condition dependent.
Supplementary Figures S5 and S6 show the corresponding baseline-noise sweeps. Their reconstruction and uncertainty trends closely follow the oracle-noise results, including the estimator-specific EMD response to NNZ. Post-oracle recalibration remains effective across the tested conditions, with residual differences between calibration regimes most clearly reflected in the signed and maximum-deviation metrics.
Across the default setting and parameter sweeps, oracle, baseline, and adaptive noise specifications yielded similar reconstruction and uncertainty trends within each estimator, although residual calibration errors differed. The adaptive and baseline noise variance estimates were close to the data-generating variance, which may partly explain these similarities.

Figure 4: Reduced free-MEG source-number sweep with adaptive noise learning and . The sweep uses the same benchmark and inverse-solver settings as the default configuration. The column arrangement and panel pairs A–L match Figure 3. NNZ takes values 1, 3, 5, 10, 100 and denotes the number of active sources. Each box contains 100 evaluation runs at one NNZ value. Calibration regimes are pre, post-oracle, post-mismatch, and post-fixed. Post-fixed and post-oracle coincide at the default condition NNZ = 5.
4.1.4. Fixed-orientation companion results
The fixed-orientation results retain the main calibration patterns observed in reduced free-MEG: BMN+sLORETA is predominantly conservative before recalibration, whereas -MAP+S-FLEX shows smaller, mixed-sign deviations. Post-oracle recalibration improves coverage in both settings. At the default condition, the BMN+sLORETA post-mismatch and post-oracle curves remain close over much of the nominal range for fixed orientation, whereas post-mismatch recalibration produces residual undercoverage at some intermediate credibility levels in reduced free-MEG.
The EMD trends also differ: EMD decreases with increasing SNR under fixed orientation but changes only modestly in reduced free-MEG. With increasing NNZ, the -MAP+S-FLEX EMD remains comparatively stable for fixed orientation but increases moderately in reduced free-MEG. These comparisons are descriptive rather than controlled estimates of an orientation effect, since the coverage targets and simulation realizations differ. Further fixed-orientation results are reported in Supplementary Section S3.1.
Fixed-orientation EEG reconstruction example. Figure 5 complements the repeated calibration experiments with a source- and time-resolved EEG example. This example illustrates local reconstruction and uncertainty, while we refer to the previous sections for a comprehensive quantitative assessment of reconstruction quality, uncertainty, and empirical calibration. The highlighted 120–160 ms interval contains the response around the predominant peak at 140 ms, and the sensor and source topographies are evaluated at that latency.
Panel (b) shows that BMN+sLORETA distributes reconstructed activity broadly over the cortex while strongly attenuating the time courses at the two generating locations. Its local credible intervals are centered on those attenuated means. Panel (c) shows a more focal -MAP+S-FLEX reconstruction and closer recovery of the signed waveform deflections, particularly around the highlighted response. Note that the cortical maps use separate physical-amplitude scales.
4.2. Results on Auditory MEG Data
The measured auditory MEG data provide a real-data evaluation in a setting with strong prior anatomical and physiological expectations for the cortical origin of the auditory response [20, 28, 33]. The comparison can

Figure 5: Fixed-orientation EEG reconstruction with adaptive noise learning on the fsaverage ico3 cortex (N = 1284), using a BioSemi64 montage, a three-layer boundary-element model, two bilateral auditory generators, and . (a) Simulated EEG channels in gray, sensor RMS in red, and signed scalp-potential topography at 140 ms. The shaded interval denotes 120–160 ms. (b) BMN+sLORETA posterior means at the two generating locations, with the corresponding ground-truth waveforms shown as dashed curves and pointwise 95% posterior credible intervals. (c) Corresponding -MAP+S-FLEX reconstruction. Cortical maps show fixed-normal source-activity RMS over 120–160 ms in nAm; cyan markers indicate the generating locations. Separate color scales are used for the two cortical maps.
therefore assess whether the reconstructed activity is consistent with the expected bilateral auditory-cortical pattern, together with the evoked sensor response and the reported local uncertainty. Unlike in the simulations, however, the exact subject-specific latent source amplitudes are not known, so empirical coverage cannot be quantified directly.
Figure 6, panel (a), shows a pronounced response in the M100 range and an opposite-polarity field pattern at 100 ms. In panel (b), BMN+sLORETA produces comparatively weak signed directional responses at the selected hemispheric sources, with broad intervals that include zero throughout the displayed response. Panel (c) shows stronger response-window deflections and a more focal -MAP+S-FLEX reconstruction. The intervals exclude zero around parts of the main positive response. BMN+sLORETA exhibits substantially smaller posterior mean amplitudes than -MAP+S-FLEX, while their uncertainty intervals have comparable widths, resulting in a more pronounced response relative to uncertainty for -MAP+S-FLEX.
The two estimators peak at different cortical vertices, for which time courses are displayed. Their curves therefore summarize estimator-specific hemispheric responses. For both, the reconstructed patterns, however, reproduce well-established activations of auditory-cortical sources.


(b)

(c)
Figure 6: Measured auditory MEG and reduced free-orientation posterior summaries. (a) Evoked sensor fields, sensor RMS, and signed magnetic-field topography at 100 ms. (b) BMN+sLORETA signed directional posterior means and pointwise 95% credible intervals for the projected directional response at the selected left- and right-hemisphere sources, together with the cortical source-activity RMS map. (c) Corresponding -MAP+S-FLEX summaries. The curves are one-dimensional projections of the local vector posterior onto the fixed, source-specific leading SVD direction. Cortical color bars show source RMS in nAm and use separate ranges. The shaded response interval marks the response window.
5. Discussion
The present study systematically evaluates whether posterior uncertainty from empirical-Bayesian M/EEG inverse imaging is empirically meaningful for the target source quantity, rather than treating posterior variance only as a by-product of regularization or prior specification. We hypothesized that joint adaptive learning of source and noise hyperparameters could reduce the dependence of uncertainty estimates on externally specified variance parameters and lead to near-calibration.
We found that empirical-Bayesian hyperparameter learning alone does not make raw posterior credible regions uniformly calibrated. Joint source and noise hyperparameter learning nevertheless yielded reconstruction and uncertainty trends similar to those obtained with oracle and baseline noise specifications, without requiring access to the data-generating noise variance. This illustrates that a covariance specification yielding a plausible posterior mean can still produce overconfident or underconfident credible regions. In the default setting, -MAP+S-FLEX exhibited comparatively small raw calibration errors. Post-hoc recalibration using isotonic regression substantially improved empirical calibration for both reconstruction methods across the considered noise specifications.
Residual calibration errors depend on estimator structure, the geometry of the target uncertainty region, and the correspondence between calibration and evaluation conditions. The present work provides methods and tools for empirically assessing posterior credible-region calibration and, when necessary, improving it using independent simulations.
5.1. Interpretation of the main findings
Spatial reconstruction, posterior uncertainty, and empirical calibration answer distinct questions. A smaller UNC indicates smaller average local posterior uncertainty, but only the relation between posterior error and posterior scale determines coverage. Similarly, a lower EMD concerns the spatial distribution of the posterior mean and need not imply better calibration of the local current vector. In the reported comparisons, EMD and UNC are calculated from the original fitted moments and are held fixed across recalibration regimes. The calibration metrics instead change when recalibration modifies the credibility thresholds used to construct the reported regions.
SESAMEEG characterizes uncertainty in source number and locations through Monte Carlo approximation of their posterior, while source strengths are treated analytically conditional on the dipole configuration [23]. Here, we focus on Type-II Bayesian learning and assess uncertainty in local source currents within distributed empirical-Bayesian models whose posterior means and covariances are available in closed form conditional on fitted hyperparameters and, where applicable, selected coefficient support. Our results show that analytically available conditional posterior summaries do not by themselves ensure empirical calibration, motivating systematic coverage assessment and post-hoc recalibration.
The dense and sparse estimators exhibit markedly different default-setting uncertainty profiles. BMN+sLORETA ties the source variance across locations, whereas -MAP+S-FLEX estimates source-specific variance components [3, 38, 43]. At the default condition, BMN+sLORETA has larger UNC and predominantly conservative raw coverage, whereas -MAP+S-FLEX has lower EMD, substantially smaller UNC, and lower raw MAD (Figure 3). Post-oracle recalibration brings the two estimators to comparable median MAD values despite their different posterior scales. This reinforces that posterior concentration and empirical calibration are distinct properties. The fixed-orientation sweeps show the same broad contrast in uncertainty magnitude (Supplementary Figures S8, S11, and S14). Nevertheless, dense posterior support is not a mathematical guarantee of overcoverage, and sparsity is not a guarantee of calibration. The observed behavior depends jointly on the fitted mean, local covariance, evaluated truth, and the distribution of active and inactive locations.
In a conventional sparse formulation, coefficient pruning can lead to zero marginal posterior variance at individual source locations. Because retained S-FLEX basis functions overlap spatially, they can contribute nonzero uncertainty to locations whose corresponding coefficients are inactive and can therefore alleviate such voxel-wise marginal degeneracy. S-FLEX does not, however, restore source-space directions excluded by sparse coefficient selection. The joint source covariance remains confined to the span of the retained basis functions and can therefore remain globally rank deficient even when individual local covariance blocks are non-degenerate. In reduced free-orientation MEG, the basis must additionally respect the varying local orientation frames on the cortical surface. Thus, the relevant methodological questions concern how basis construction, normalization, spatial support, and coefficient selection determine local uncertainty geometry and the global rank structure. A systematic analysis of these properties goes beyond the present study and warrants a dedicated methodological investigation.
The oracle- and baseline-noise calibration curves closely resemble those obtained under adaptive noise learning (Figure 2; Supplementary Figures S1 and S4). Their similar coverage patterns are consistent with the controlled stationary Gaussian-noise simulations, in which the pre-stimulus interval is representative of the simulated noise process. Source-prior structure, plug-in hyperparameter estimation, and reconstruction bias may nevertheless contribute to residual calibration errors.
The reduced free-MEG sweeps show broadly consistent SNR- and source-number-dependent reconstruction and uncertainty trends across adaptive, oracle, and baseline noise specifications, although the magnitude and sign of residual calibration errors differ. Joint learning of source and noise variances may also permit compensation between their effects. Consequently, the calibration properties of adaptively learned posteriors should be evaluated empirically rather than inferred from evidence-maximization alone.
The SNR and source-number sweeps show systematic condition dependence in both orientation settings. Increasing SNR consistently contracts posterior uncertainty, with the strongest absolute reduction for BMN+sLORETA. In the fixed-orientation setting, EMD also decreases with increasing SNR, whereas the reduced free-MEG EMD trajectories vary more modestly. Increasing NNZ raises posterior uncertainty in both orientation settings. BMN+sLORETA EMD decreases with source number in both cases, whereas the -MAP+S-FLEX response is comparatively flat in the fixed-orientation setting and shows a modest increase in the reduced free-MEG setting. Post-oracle recalibration reduces the dominant calibration errors across these conditions, while the signed and maximum-deviation metrics reveal residual condition dependence.
Recalibration transfer is condition dependent. The pooled-mismatch setting differs not only in head geometry but also in the breadth and size of its calibration set. Post-oracle recalibration is more effective across the tested conditions, although it can still leave larger residual errors or introduce undercoverage in parts of the parameter range. However, as SNR and sparsity profiles are often unknown, the practical value of the post-oracle calibration findings is limited – they primarily serve as a hypothetical upper bound for calibration performance.
The reduced free-MEG credible ellipse describes joint uncertainty in the retained two-dimensional current vector, whereas fixed-orientation scalar intervals concern a different coverage event. Their empirical coverage should therefore be interpreted relative to the corresponding target. When the prescribed cortical-normal constraint is correct, it reduces model flexibility; when inaccurate, it can introduce model-specification bias [27]. Across the evaluated SNR and source-number ranges, the two orientation settings show broadly comparable reconstruction and calibration trends. However, their different coverage targets and independently generated simulation realizations preclude interpreting the observed differences as a controlled causal effect of orientation dimensionality.
The fixed-orientation EEG example (Figure 5) shows strongly attenuated BMN+sLORETA posterior mean waveforms at the generating locations, whereas -MAP+S-FLEX recovers the highlighted responses more closely. Although the posterior uncertainty intervals have comparable widths, -MAP+S-FLEX exhibits larger mean deflections relative to uncertainty. In the displayed pointwise intervals, the BMN+sLORETA responses remain compatible with zero, whereas -MAP+S-FLEX shows several positive and negative deflections whose intervals exclude zero.
A similar contrast is observed in the measured auditory MEG data (Figure 6). -MAP+S-FLEX produces a more focal spatial pattern and larger M100-aligned posterior mean deflections, whereas BMN+sLORETA yields a broader reconstruction and substantially smaller mean responses, with uncertainty intervals of comparable width. The predominant activations in bilateral auditory cortices are consistent with the known neuroanatomy and physiology of auditory responses [20, 28, 33].
5.2. Additional technical considerations
Shrinkage and calibration. Both BMN+sLORETA and -MAP+S-FLEX employ zero-mean source priors, which can shrink posterior means toward zero. For a fixed posterior uncertainty scale, shrinkage may increase coverage at inactive locations while reducing coverage at truly active sources. Because inactive sources dominate the simulated source grids, aggregate calibration can mask substantial active-source errors. The predominantly conservative BMN+sLORETA coverage and mixed-sign deviations of -MAP+S-FLEX cannot be attributed to shrinkage alone. Establishing its contribution requires separate calibration analyses for active and inactive sources.
A simple Gaussian shrinkage model provides insight into the different coverage behavior of active and inactive sources. For a zero-mean Gaussian prior, the posterior mean is attenuated by a factor , whereas the posterior standard deviation scales with . At a truly inactive source, this difference yields conservative coverage in the scalar model. At an active source, the standardized estimation error additionally contains a bias term proportional to , which can lead to undercoverage for sufficiently large source amplitudes. In M/EEG reconstruction, however, source leakage, the structure of the learned covariance matrices, and support selection complicate this relationship. Thus, shrinkage provides a possible explanation for the predominantly conservative BMN+sLORETA coverage, but its contribution requires further analysis conditional on source activity and amplitude.
Bayesian uncertainty and resampling. Resampling repeated, approximately exchangeable ERP/ERF trials can estimate the sampling variability of a source estimator. It is a legitimate alternative or complement to Bayesian posteriors. For sparse estimators, perturbing the data can change the resulting source support; a source-wise resampling distribution can consequently contain both a point mass at zero and nonzero estimates, or several regimes associated with competing source locations.
Conversely, an empirical-Bayesian Gaussian posterior conditional on fitted hyperparameters does not automatically integrate uncertainty in support selection. The attraction of the Bayesian formulation here is the availability of conditional local uncertainty from a single fitted dataset without requiring a trial-resampling ensemble. Comparisons with selection-aware resampling procedures are a possible subject of future work.
Meaning of the reported recalibration. The reported procedure remaps credibility thresholds within a nested family of regions. Accordingly, the EMD and UNC values shown here remain those of the original fitted posterior. In particular, a calibration map for a given credibility level and raw posterior does not by itself define a unique new multivariate posterior distribution. If a separate recalibrated distribution is constructed, its second moments can differ from those of the original Gaussian posterior even when its credible regions retain the original local geometry. At a fixed credibility level, the threshold adjustment can be represented as a rescaling of the corresponding Gaussian credible region. However, level-dependent adjustments do not generally correspond to a single recalibrated Gaussian covariance matrix. The empirical interpretation of a remapped level is relative to the data-generating distribution represented by the calibration runs; independent validation remains necessary, as in other post-hoc uncertainty-calibration procedures [19].
Other target quantities. The same Gaussian propagation principle extends from temporal averages to fixed linear targets such as regional averages, condition contrasts, and spatial or spectral projections [1]. Both the mean and the covariance must be transformed. The simple 1/T covariance scaling for a temporal average assumes conditionally independent time points with equal marginal covariance; temporally correlated posteriors require cross-time covariance terms. Nonlinear targets, including current magnitude and orientation, generally require transformed distributions, posterior sampling, or approximations. Calibration behavior must then be defined and evaluated separately for the new target, as it is not inherited from scalar or vector-valued sources.
5.3. Limitations and future directions
Several limitations apply. First, the reported posteriors are conditional on point estimates of variance hyperparameters and, where applicable, a selected coefficient support. For sparse SBL-type solutions, S-FLEX can redistribute retained uncertainty across cortical locations but does not restore discarded source-space directions. The resulting estimates may therefore miss uncertainty components associated with these directions. Fully Bayesian hierarchical inference that accounts for hyperparameter and support uncertainty offers a possible extension [18, 22], although computational cost and approximation error must be considered.
Although the present experiments compare adaptive, oracle, and baseline noise specifications, alternative hyperparameter-selection criteria and hierarchical variance models were not systematically evaluated. Future work should compare noise estimates from baseline segments and empty-room recordings, held-out predictive criteria, hierarchical variance models, and calibration-aware hyperparameter-selection procedures, with calibration and evaluation data kept strictly separate.
The fixed- and reduced free-orientation benchmarks were generated independently rather than paired run by run and evaluate different coverage targets. Consequently, comparisons between the two settings remain descriptive.
The simulated data cover a controlled family of source and noise conditions, including Gaussian sensor noise, four head models, prescribed SNR and NNZ grids, and a restricted family of event-related source dynamics. These choices permit interpretable comparisons but do not represent structured environmental or physiological artifacts, broader forward-model errors, correlated or spatially extended sources, nonstationary noise, or the full range of temporal source dynamics encountered in measured data. Future evaluations should therefore broaden the data-generating distribution and include dedicated noise-misspecification experiments.
Whole-grid performance aggregation can also mask practically important local errors. In sparse simulations, inactive locations dominate the source count, so an apparently satisfactory aggregate curve need not imply satisfactory coverage at active, deep, or weak sources. Future work should examine calibration conditional on activity, amplitude, depth, and anatomical region and should distinguish uncertainty in the current at a prescribed cortical location from uncertainty in source location or spatial support. Such analyses would connect the reported credible intervals and ellipses more directly to source-detection and localization decisions.
The recalibration maps themselves inherit the scope of their training distribution. Post-oracle recalibration is effective in the tested conditions but requires accurately matched simulation conditions, which may be unavailable in practice. Post-fixed and post-mismatch transfer can leave larger residual errors away from their representative conditions.
Larger and more heterogeneous simulation libraries or regularized condition-dependent calibration models may improve transfer. However, a global one-dimensional calibration map cannot generally guarantee calibration across source locations, amplitudes, orientations, or individual runs.
Although the mathematical framework accommodates fixed orientation, reduced free-orientation MEG, and full three-dimensional free-orientation sources, the principal vector-valued calibration benchmark in the present study is reduced free-orientation MEG. Empirical calibration of full three-dimensional EEG credible ellipsoids therefore remains to be established. More generally, the current credible regions quantify uncertainty in a source coefficient or local current vector at a prescribed cortical location; they are not credible regions for the unknown source location, spatial support, orientation, or complete spatio-temporal activation pattern. Future work should address spatial credible sets, uncertainty in current magnitude and orientation, and simultaneous temporal uncertainty.
Finally, the measured-data analysis contains one auditory MEG dataset. This setting nevertheless provides a particularly informative real-data example because the neuroanatomy and physiology of auditory responses are well characterized: MEG studies have consistently localized the M100 response to auditory cortex in or around Heschl's gyrus, while direct intracranial recordings provide complementary evidence for the functional organiza-tion of Heschl's gyrus and adjacent auditory cortex [20, 28, 33]. However, the subject-specific source currents are unobserved, so empirical coverage cannot be evaluated directly.
Future real-world investigations should include multiple subjects, tasks, and acquisition systems, together with forward-matched simulations and explicit comparison with established invasive and multimodal evidence. An important downstream direction is to propagate calibrated source uncertainty into uncertainty-aware decoding, source classification, and clinical decision rules.
Although the present study focuses on Type-II empirical-Bayesian inverse solvers with conditionally Gaussian posteriors, the calibration framework is not inherently restricted to this setting. The same coverage assessment and post-hoc recalibration can also be applied to Type-I Bayesian approaches, fully Bayesian hierarchical models, and non-Gaussian inverse models whenever posterior credible regions or reliable posterior samples can be constructed for the chosen target. The broader methodological point is the separation of three questions that should not be conflated in source imaging: where the posterior places the activity, how much uncertainty it assigns, and whether the stated credibility of that uncertainty is empirically trustworthy.
6. Conclusion
We presented a unified framework for uncertainty quantification and empirical calibration in Bayesian M/EEG source imaging, covering fixed- and free-orientation source models and dense and sparse empirical-Bayesian inverse methods. Across different noise specifications, -MAP+S-FLEX achieved lower source localization error, lower posterior uncertainty, and smaller raw calibration errors than BMN+sLORETA in the principal default-setting comparison. Post-hoc isotonic recalibration substantially improved agreement between empirical and nominal coverage for both methods, although its effectiveness depended on the correspondence between calibration and evaluation conditions. All code and data used in this study are made openly available. Analyses were implemented within an accompanying extendable open-source Python package supporting the future development and benchmarking of calibrated M/EEG inverse modeling approaches.
Acknowledgments
The first author would like to express his particular gratitude to Ali Hashemi for his valuable theoretical insights and code-related advice concerning the formulation and implementation of Champagne algorithm.
Code Availability Statement
The core software implementing the inverse solvers, uncertainty-quantification methods, simulation workflows, and calibration analyses used in this study is publicly available as part of the CaliBrain package at https://github.com/braindatalab/CaliBrain.
References
[1] T. W. Anderson. An Introduction to Multivariate Statistical Analysis. John Wiley & Sons, Hoboken, NJ, USA, 3 edition, 2003.
[2] C. Cai, M. Diwakar, D. Chen, K. Sekihara, and S. S. Nagarajan. Robust empirical bayesian reconstruction of distributed sources for electromagnetic brain imaging. IEEE Transactions on Medical Imaging, 39(3): 567–577, 2019.
[3] C. Cai, A. Hashemi, M. Diwakar, S. Haufe, K. Sekihara, and S. S. Nagarajan. Robust estimation of noise for electromagnetic brain imaging with the Champagne algorithm. NeuroImage, 225:117411, 2021.
[4] A. M. Dale, A. K. Liu, B. Fischl, R. L. Buckner, J. W. Belliveau, J. D. Lewine, and E. Halgren. Dynamic statistical parametric mapping: Combining fmri and meg for high-resolution imaging of cortical activity. Neuron, 26(1):55–67, 2000. doi: 10.1016/S0896-6273(00)81138-1.
[5] R. Flamary et al. POT: Python optimal transport. Journal of Machine Learning Research, 22(78):1–8, 2021.
[6] K. Friston, L. Harrison, J. Daunizeau, S. Kiebel, C. Phillips, N. Trujillo-Barreto, R. Henson, G. Flandin, and J. Mattout. Multiple sparse priors for the m/eeg inverse problem. NeuroImage, 39(3):1104–1120, 2008. doi: 10.1016/j.neuroimage.2007.09.048.
[7] S. Ghosh, C. Cai, A. Hashemi, Y. Gao, S. Haufe, K. Sekihara, A. Raj, and S. S. Nagarajan. Structured noise champagne: An empirical bayesian algorithm for electromagnetic brain imaging with structured noise. Frontiers in Human Neuroscience, 19:1386275, 2025.
[8] A. Gramfort, M. Luessi, E. Larson, D. A. Engemann, D. Strohmeier, C. Brodbeck, R. Goj, M. Jas, T. Brooks, L. Parkkonen, and M. S. Hämäläinen. Meg and eeg data analysis with MNE-Python. Frontiers in Neuroscience, 7:267, 2013. doi: 10.3389/fnins.2013.00267.
[9] A. Gramfort, M. Luessi, E. Larson, D. A. Engemann, D. Strohmeier, C. Brodbeck, L. Parkkonen, and M. S. Hämäläinen. Mne software for processing meg and eeg data. NeuroImage, 86:446–460, 2014.
[10] M. S. Hämäläinen and R. J. Ilmoniemi. Interpreting magnetic fields of the brain: Minimum norm estimates. Medical & Biological Engineering & Computing, 32(1):35–42, 1994. doi: 10.1007/BF02512476.
[11] A. Hashemi, C. Cai, G. Kutyniok, K.-R. Müller, S. S. Nagarajan, and S. Haufe. Unification of sparse bayesian learning algorithms for electromagnetic brain imaging with the majorization-minimization framework. NeuroImage, 239:118309, 2021.
[12] A. Hashemi, Y. Gao, C. Cai, S. Ghosh, K.-R. Müller, S. S. Nagarajan, and S. Haufe. Efficient hierarchical bayesian inference for spatio-temporal regression models in neuroimaging. In Advances in Neural Information Processing Systems, volume 34, pages 24855–24870, 2021.
[13] A. Hashemi, C. Cai, Y. Gao, S. Ghosh, K.-R. Müller, S. S. Nagarajan, and S. Haufe. Joint learning of full-structure noise in hierarchical bayesian regression models. IEEE Transactions on Medical Imaging, 43(2):610–624, 2024.
[14] S. Haufe, V. V. Nikulin, A. Ziehe, K.-R. Müller, and G. Nolte. Combining sparsity and rotational invariance in eeg/meg source reconstruction. NeuroImage, 42(2):726–738, 2008.
[15] S. Haufe, V. V. Nikulin, A. Ziehe, K.-R. Müller, and G. Nolte. Estimating vector fields using sparse basis field expansions. In Advances in Neural Information Processing Systems 21, pages 617–624, Cambridge, MA, 2009. MIT Press.
[16] B. He, A. Sohrabpour, E. Brown, and Z. Liu. Electrophysiological source imaging: A noninvasive window to brain dynamics. Annual Review of Biomedical Engineering, 20:171–196, 2018. doi: 10.1146/annurev-bioeng-062117-120853.
[17] R. N. A. Henson, G. Flandin, K. J. Friston, and J. Mattout. A parametric empirical bayesian framework for fmri-constrained meg/eeg source reconstruction. Human Brain Mapping, 31(10):1512–1531, 2010. doi: 10.1002/hbm.20956.
[18] S.-C. Jun, J. S. George, W. Kim, J. Paré-Blagoev, S. Plis, D. M. Ranken, and D. M. Schmidt. Bayesian brain source imaging based on combined meg/eeg and fmri using mcmc. NeuroImage, 40(4):1581–1594, 2008. doi: 10.1016/j.neuroimage.2007.12.029.
[19] V. Kuleshov, N. Fenner, and S. Ermon. Accurate uncertainties for deep learning using calibrated regression. In Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2796–2804. PMLR, 2018. URL https://proceedings.mlr.press/v80/kuleshov18a.html.
[20] C. Liégeois-Chauvel, A. Musolino, and P. Chauvel. Localization of the primary auditory area in man. Brain, 114(1A):139–153, 1991. doi: 10.1093/oxfordjournals.brain.a101854.
[21] S. J. Luck. An Introduction to the Event-Related Potential Technique. MIT Press, Cambridge, MA, USA, 2 edition, 2014.
[22] F. Lucka, S. Pursiainen, M. Burger, and C. H. Wolters. Hierarchical bayesian inference for the eeg inverse problem using realistic fe head models: Depth localization and source separation for focal primary currents. NeuroImage, 61(4):1364–1382, 2012. doi: 10.1016/j.neuroimage.2012.04.017.
[23] G. Luria, A. Viani, A. Pascarella, H. Bornfleth, S. Sommariva, and A. Sorrentino. The SESAMEEG package: a probabilistic tool for source localization and uncertainty quantification in M/EEG. Frontiers in Human Neuroscience, 18:1359753, 2024. doi: 10.3389/fnhum.2024.1359753.
[24] J. Mattout, C. Phillips, W. D. Penny, M. D. Rugg, and K. J. Friston. Meg source localization under multiple constraints: An extended bayesian framework. NeuroImage, 30(3):753–767, 2006. doi: 10.1016/j.neuroimage.2005.10.037.
[25] C. M. Michel and B. He. Eeg source localization. In Handbook of Clinical Neurology, volume 160, pages 85–101. 2019. doi: 10.1016/B978-0-444-64032-1.00006-0.
[26] MNE-Python contributors. Working with ctf data: The brainstorm auditory dataset. MNE-Python documentation (MNE 1.12.1), 2026. URL https://mne.tools/stable/auto_tutorials/io/60_ctf_bst_auditory.html. Accessed 2026-07-01.
[27] MNE-Python contributors. The role of dipole orientations in distributed source localization. MNE-Python documentation, 2026. URL https://mne.tools/stable/auto_tutorials/inverse/35_dipole_orientations.html. Accessed 2026-10-06.
[28] K. V. Nourski. Auditory processing in the human cortex: An intracranial electrophysiology perspective. Laryngoscope Investigative Otolaryngology, 2(4):147–156, 2017. doi: 10.1002/lio2.73.
[29] R. D. Pascual-Marqui. Standardized low-resolution brain electromagnetic tomography (sloreta): Technical details. Methods and Findings in Experimental and Clinical Pharmacology, 24(Suppl. D):5–12, 2002.
[30] R. D. Pascual-Marqui, C. M. Michel, and D. Lehmann. Low resolution electromagnetic tomography: A new method for localizing electrical activity in the brain. International Journal of Psychophysiology, 18(1): 49–65, 1994. doi: 10.1016/0167-8760(84)90014-X.
[31] C. Phillips, J. Mattout, M. D. Rugg, P. Maquet, and K. J. Friston. An empirical bayesian solution to the source reconstruction problem in eeg. NeuroImage, 24(4):997–1011, 2005. doi: 10.1016/j.neuroimage.2004.10.030.
[32] F. Pittau, F. Grouiller, L. Spinelli, M. Seeck, C. M. Michel, and S. Vulliemoz. The role of functional neuroimaging in pre-surgical epilepsy evaluation. Frontiers in Neurology, 5:31, 2014.
[33] M. Reite, M. Adams, J. H. Simon, P. Teale, J. Sheeder, D. Richardson, and R. Grabbe. Auditory m100 component 1: Relationship to heschl's gyri. Cognitive Brain Research, 2(1):13–20, 1994. doi: 10.1016/0926-6410(94)90016-7.
[34] V. Rimpiläinen, A. Koulouri, F. Lucka, J. P. Kaipio, and C. H. Wolters. Improved EEG source localization with Bayesian uncertainty modelling of unknown skull conductivity. NeuroImage, 188:252–260, 2019. doi: 10.1016/j.neuroimage.2018.11.058.
[35] Y. Rubner, C. Tomasi, and L. J. Guibas. The earth mover's distance as a metric for image retrieval. International Journal of Computer Vision, 40(2):99–121, 2000.
[36] G. S. Russell, R. Srinivasan, and D. M. Tucker. Bayesian estimates of error bounds for EEG source imaging. IEEE Transactions on Medical Imaging, 17(6):1084–1089, 1998. doi: 10.1109/42.746725.
[37] M.-a. Sato, T. Yoshioka, S. Kajihara, K. Toyama, N. Goda, K. Doya, and M. Kawato. Hierarchical bayesian estimation for meg inverse problem. NeuroImage, 23(3):806–826, 2004. doi: 10.1016/j.neuroimage.2004.06.037.
[38] K. Sekihara and S. S. Nagarajan. Electromagnetic Brain Imaging: A Bayesian Perspective. Springer International Publishing, 2015.
[39] F. Tadel, S. Baillet, J. C. Mosher, D. Pantazis, and R. M. Leahy. Brainstorm: A user-friendly application for meg/eeg analysis. Computational Intelligence and Neuroscience, page 879716, 2011. doi: 10.1155/2011/879716.
[40] J. R. Taylor, N. Williams, R. Cusack, T. Auer, M. A. Shafto, M. Dixon, L. K. Tyler, R. N. Henson, et al. The cambridge centre for ageing and neuroscience (CamCAN) data repository: Structural and functional mri, meg, and cognitive data from a cross-sectional adult lifespan sample. NeuroImage, 144:262–269, 2017.
[41] N. J. Trujillo-Barreto, E. Aubert-Vázquez, and P. A. Valdés-Sosa. Bayesian model averaging in eeg/meg imaging. NeuroImage, 21(4):1300–1319, 2004. doi: 10.1016/j.neuroimage.2003.11.008.
[42] R. S. Wabina and C. Silpasuwanchai. Neural stochastic differential equations network as uncertainty quantification method for EEG source localization. Biomedical Physics & Engineering Express, 9(2):025015, 2023. doi: 10.1088/2057-1976/aca20b.
[43] D. Wipf and S. S. Nagarajan. A unified bayesian framework for meg/eeg source imaging. NeuroImage, 44(3):947–966, 2009.
[44] D. P. Wipf, J. P. Owen, H. T. Attias, K. Sekihara, and S. S. Nagarajan. Robust bayesian estimation of the location, orientation, and time course of multiple correlated neural sources using meg. NeuroImage, 49(1):641–655, 2010.
Uncertainty calibration in Bayesian M/EEG source imaging
Supplementary Material
Ismail Huseynov, Mohammad Orabe, Srikantan Nagarajan, Stefan Haufe
Physikalisch-Technische Bundesanstalt Braunschweig und Berlin, Berlin, Germany
Technische Universität Berlin, Berlin, Germany
University of California San Francisco, Biomagnetic Imaging Laboratory, Department of Radiology and Biomedical Imaging, San Francisco, CA, United States
Charité - Universitätsmedizin Berlin, Berlin, Germany
S1. Gaussian Marginals and Linear Projections
The closure of the multivariate normal distribution under affine transformations and marginalization is standard [1]. The results are stated here to make explicit how the source-wise covariance blocks and temporally aggregated covariances used in the manuscript follow from the full Gaussian posterior.
Theorem S1.1 (Affine transformation of a Gaussian vector). Let satisfy
where is symmetric positive semidefinite. For a deterministic matrix and vector , define
Then
Theorem S1.2 (Gaussian marginal selected from a subvector). Let , and let contain any selected set of components of . Then is Gaussian. Its mean is the corresponding subvector of , and its covariance is the corresponding principal submatrix of .
Proof. Let be the selection matrix whose rows select the required components of . Then
The affine-transformation theorem with and gives
By construction, is the selected mean subvector and is the associated principal covariance submatrix.
S1.1. Application to source-wise posterior blocks
Let the single-time source vector be partitioned into N local blocks of dimension d,
and suppose
For source i, define the block-selection matrix
where is the th canonical basis vector in . Since , Gaussian marginalization gives
Thus, the local covariance is exactly the th diagonal block of the full posterior covariance; that is, off-diagonal source blocks do not affect the local marginal distribution, although they do encode cross-source dependence that would be required for a joint multi-source credible set.
S1.2. Temporal averaging
Stack the T source vectors as
Under the temporally independent posterior model used in the manuscript,
Define
The affine-transformation theorem yields
with
Applying once more gives the aggregated local marginal
The factor 1/T follows from posterior independence across time. If temporal posterior dependence is introduced, the covariance of the average must instead include all cross-time covariance terms.
S1.3. SVD-defined directional posterior marginals and credible intervals for free-orientation sources
At cortical location i, consider a free-orientation posterior represented in a local coordinate system of dimension d,
The reduced free-orientation MEG representation corresponds to , whereas a full free-orientation EEG representation corresponds to . For , the local posterior is already scalar and the construction below reduces to the conventional fixed-orientation credible interval without requiring an SVD-defined direction.
The full -dimensional credible ellipse or ellipsoid remains the dimension-matched posterior uncertainty summary. A one-dimensional directional marginal can additionally be defined by selecting a single source-specific axis from the temporal structure of the local posterior mean.
Let be a prespecified reference interval and define
The matrix is not temporally centered. Thus, its dominant direction is determined relative to the origin of the local source space, which represents the physical null state of zero source current, rather than relative to the temporal average of the response.
Let
be the thin singular value decomposition, where
Provided that , the leading left singular vector
defines the dominant orientation of the local posterior-mean trajectory over . The direction is estimated once and subsequently held fixed over the complete epoch, thereby defining a common scalar coordinate for the temporal posterior.
When the leading singular value is separated from the remaining singular spectrum, is uniquely identified up to sign. If the leading singular values are nearly equal, the local trajectory does not determine a well-separated dominant axis, and the corresponding directional coordinate may be sensitive to small perturbations. In such cases, the full -dimensional credible ellipse or ellipsoid remains the more appropriate uncertainty representation.
The sign of is intrinsically arbitrary and is therefore resolved by a deterministic convention specified in the corresponding study design. Replacing by reverses the displayed posterior mean but leaves the projected variance, interval width, and zero-containment decision unchanged.
If
maps the local source coordinates to physical three-dimensional source space, the corresponding physical directional axis is
For reduced free-orientation MEG, contains the two retained local MEG-sensitive basis vectors. For a free-orientation EEG representation already expressed in a three-dimensional orthonormal source frame, may be taken as the corresponding local basis, including the identity matrix when Cartesian source coordinates are used.
Define the directional source component by
Because a linear transformation of a Gaussian random vector is Gaussian,
where
Let denote the posterior credibility level and let be the -quantile of the standard normal distribution. The central pointwise directional credible interval is
Equivalently,
since
Consequently,
The resulting interval is a one-dimensional posterior marginal along the dominant local orientation. It is conditional on the fitted posterior, the selected cortical location, the reference interval , and the direction derived from the posterior mean. It therefore does not incorporate source-selection or direction-estimation uncertainty. Moreover, it is a pointwise temporal interval rather than a simultaneous credible band, and it does not replace the dimension-matched spatial credible ellipse or ellipsoid associated with the full free-orientation posterior.
S1.4. Lead-field representations for fixed and reduced free orientations
Let denote the Cartesian lead-field matrix, with local blocks .
Fixed orientation (d = 1). The current at source location i is constrained to the prescribed unit surface normal , expressed in the same coordinate frame as the source components of . Writing , where is the signed current amplitude, gives
The fixed-orientation lead-field matrix is
Reduced free-orientation MEG (d = 2). The retained local MEG subspace is defined by the singular value decomposition
where are the singular values. The two leading right singular vectors form the orthonormal basis
Representing the local current as yields the reduced lead-field block
The full reduced lead field is
The SVD-defined subspace need not coincide with the local cortical tangent plane.
In the main text, for the selected source dimension .
S2. S-FLEX basis construction and covariance properties
S2.1. Gaussian basis and grid-adaptive width
The spatial overlap induced by a Gaussian basis depends on its width relative to the source-grid spacing. For a fixed physical width, a finer grid generally produces greater overlap between neighboring basis functions. We therefore express the width relative to a characteristic within-hemisphere nearest-neighbor distance.
For source coordinates , let denote the Gaussian width. The kernel is
The scalar spatial basis is obtained by symmetric normalization:
This normalization preserves symmetry and rescales the kernel according to its local weight sums.
Let denote the set of source locations in the same cortical hemisphere as source i. Define
The within-hemisphere restriction excludes cross-hemisphere neighbors when estimating grid spacing, while the median reduces sensitivity to local mesh irregularities.
The basis width is parameterized as
where controls spatial overlap relative to the grid spacing. The unnormalized Gaussian weight at the characteristic distance is
Small values of yield a localized basis, whereas larger values increase spatial overlap. For distinct source locations, as . For every , all entries of the scalar basis remain strictly positive in exact arithmetic. Thus, the width controls its effective spatial extent without changing its full-support property.
S2.2. Orientation-specific S-FLEX operators
In the fixed-orientation setting, acts on scalar coefficients associated with the prescribed source orientations. For free-orientation EEG expressed in a common Cartesian frame, the basis acts componentwise:
In reduced free-orientation MEG, the retained coordinates depend on the source location. Thus, would treat distinct local frames as a common coordinate frame and is not appropriate. Let contain the orthonormal basis vectors of the retained MEG-sensitive subspace at source . The orientation-aware S-FLEX operator has blocks
where is the normalized scalar spatial basis. Equivalently,
This construction maps local coefficients into a common Cartesian frame, applies the spatial basis componentwise, and projects the result onto the retained local subspaces.
Although the scalar Gaussian weights are strictly positive, an off-diagonal orientation-aware block can be rank deficient when is singular. This alone does not imply a singular local posterior covariance: its rank depends on the combined retained basis blocks at that source, as analyzed in Section S2.3.
S2.3. Rank of the source-space posterior covariance
Let denote the set of retained coefficient groups, with . After removing the zero-variance coefficients, the source-space posterior covariance can be written as
where contains the retained basis columns and is their posterior covariance. Hence,
When , the full source-space covariance is therefore singular, even if all individual source components have positive marginal variances. The source currents remain restricted to the subspace spanned by the retained basis columns.
This global rank deficiency does not necessarily make each local covariance block singular. At source i,
where contains the corresponding rows of . If is positive definite, the local block is positive definite precisely when has row rank .
For fixed orientation and for free-orientation EEG in a common Cartesian frame, any nonempty active set gives row rank , since it contains a positive scalar multiple of . In reduced free-orientation MEG, row rank is lost at source precisely when there exists a nonzero such that for every . In other words, a direction in the retained local subspace at is orthogonal to all active local subspaces. This cannot occur when , since and .
S3. Supplementary Simulation Figures
The default setting is and NNZ = 5. Each calibration curve or boxplot distribution summarizes 100 held-out evaluation runs (25 per head model across four head models). Sweep conditions are evaluated separately. Recalibration maps are learned from independent calibration simulations for each orientation and noise specification. Post-fixed coincides with post-oracle at the default setting and is therefore shown only in the SNR and NNZ sweeps. Axis ranges may differ between metric panels.
S3.1. Fixed-orientation simulation results
Supplementary Figure S7 shows the fixed-orientation calibration curves under adaptive noise learning. BMN+sLORETA exhibits predominantly conservative coverage before recalibration, with post-oracle and post-mismatch

Figure S1: Reduced free-MEG calibration curves derived from joint two-dimensional credible-ellipse containment under oracle noise at and NNZ=5. A: BMN+sLORETA. B: -MAP+S-FLEX. Lines denote mean empirical coverage over 100 evaluation runs; color-matched bands denote plus or minus one run-level standard deviation. The dotted diagonal indicates perfect calibration.
corrections remaining close over much of the nominal credibility range. The -MAP+S-FLEX curve shows both overcoverage and undercoverage, with residual deviations near the upper credibility levels.
In the adaptive-noise SNR sweep (Supplementary Figure S8), both EMD and UNC decrease as SNR increases, with a stronger contraction of UNC for BMN+sLORETA. Post-oracle recalibration reduces the calibration deviations across the grid, whereas the transfer strategies leave larger residual errors. In the NNZ sweep (Supplementary Figure S9), BMN+sLORETA EMD decreases with source number, while -MAP+S-FLEX EMD remains comparatively stable. UNC increases with NNZ for both estimators. Raw calibration errors are more variable in the sparsest configurations.
The oracle-noise results (Supplementary Figures S10, S11, and S12) show similar estimator-specific trends. Post-oracle recalibration reduces the dominant calibration errors, although MSD and MOD indicate residual signed deviations under transfer. The baseline-noise calibration curves (Supplementary Figure S13) and parameter sweeps (Supplementary Figures S14 and S15) closely follow their oracle-noise counterparts. Differences between fixed- and

Figure S2: Reduced free-MEG SNR sweep under oracle noise, varying with NNZ = 5. Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.
free-orientation results cannot be attributed solely to orientation, since the coverage targets and simulation realizations differ.

Figure S3: Reduced free-MEG source-number sweep under oracle noise, varying NNZ ∈ {1,3,5,10,100} with . Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S4: Reduced free-MEG calibration curves derived from joint two-dimensional credible-ellipse containment under baseline noise at and NNZ = 5. A: BMN+sLORETA. B: -MAP+S-FLEX. Lines denote mean empirical coverage over 100 evaluation runs; color-matched bands denote plus or minus one run-level standard deviation. The dotted diagonal indicates perfect calibration.

Figure S5: Reduced free-MEG SNR sweep under baseline noise, varying with NNZ = 5. Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S6: Reduced free-MEG source-number sweep under baseline noise, varying NNZ ∈ {1, 3, 5, 10, 100} with . Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S7: Fixed-orientation calibration curves derived from scalar credible-interval containment under adaptive noise at and NNZ = 5. A: BMN+sLORETA. B: -MAP+S-FLEX. Lines denote mean empirical coverage over 100 evaluation runs; color-matched bands denote plus or minus one run-level standard deviation. The dotted diagonal indicates perfect calibration.

Figure S8: Fixed-orientation SNR sweep under adaptive noise, varying with NNZ = 5. Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S9: Fixed-orientation source-number sweep under adaptive noise, varying NNZ ∈ {1, 3, 5, 10, 100} with . Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S10: Fixed-orientation calibration curves derived from scalar credible-interval containment under oracle noise at and NNZ = 5. A: BMN+sLORETA. B: -MAP+S-FLEX. Lines denote mean empirical coverage over 100 evaluation runs; color-matched bands denote plus or minus one run-level standard deviation. The dotted diagonal indicates perfect calibration.

Figure S11: Fixed-orientation SNR sweep under oracle noise, varying with NNZ = 5. Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S12: Fixed-orientation source-number sweep under oracle noise, varying NNZ ∈ {1, 3, 5, 10, 100} with . Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S13: Fixed-orientation calibration curves derived from scalar credible-interval containment under baseline noise at and NNZ = 5. A: BMN+sLORETA. B: -MAP+S-FLEX. Lines denote mean empirical coverage over 100 evaluation runs; color-matched bands denote plus or minus one run-level standard deviation. The dotted diagonal indicates perfect calibration.

Figure S14: Fixed-orientation SNR sweep under baseline noise, varying with NNZ = 5. Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.

Figure S15: Fixed-orientation source-number sweep under baseline noise, varying NNZ ∈ {1, 3, 5, 10, 100} with . Panel pairs A–B, C–D, E–F, G–H, I–J, and K–L show EMD, UNC, MAD, MSD, MOD, and MUD, respectively, for BMN+sLORETA (left) and -MAP+S-FLEX (right). Calibration modes are pre, post-oracle, post-mismatch, and post-fixed.