Source-linked AI summary

Decoupling Time and Space: A Temporally Conditioned Refinement for EEG Source Imaging

Marco Morik, Jesse Palarus, Carmen Vidaurre, Klaus-Robert Müller, Shinichi Nakajima

arXiv:2610.06726v1cs.LG

TL;DR

EEG source imaging is an ill-posed spatial inverse problem, and existing approaches either discard temporal context or make joint spatiotemporal reconstruction computationally demanding. The paper decouples global temporal representation learning from per-time-point spatial refinement, and reports improved reconstruction in noisy and multi-source settings alongside better transfer across head geometries.

  • Problem

    EEG source recovery is ill-posed, while frame-by-frame methods discard temporal context and full spatiotemporal networks face accuracy and inference-cost trade-offs.

    Source: §I · p. 1, B. Robustness to Noise and Complex… · p. 5
  • Method

    The framework uses a factorized Transformer to encode global EEG temporal context and conditions per-time-point physics-informed source refinement.

    Source: §I · p. 2
  • Results

    Temporal conditioning improves reconstruction over unconditioned refiners, including noisy and multi-source conditions, while operator-mismatch training brings template-based reconstruction closer to subject-specific inversion on evaluated held-out heads.

    Source: §VI · p. 9
  • Takeaways & Limitations

    The framework supports investigation of spatially resolved source dynamics over relevant time windows, beyond downstream prediction.

    Source: §VI · p. 9

    The simulator uses simplified Gaussian patches, band-limited time courses, and additive noise, so the simulation-to-biological-reality gap remains the primary limitation.

    Source: §VI · p. 9

Abstract

from arXiv · show

Electroencephalography (EEG) offers millisecond temporal resolution, but inferring underlying neural sources is a severely ill-posed spatial inverse problem. While deep learning has advanced spatial reconstruction, current architectures face a critical dilemma: frame-by-frame models discard vital temporal context, whereas full 4D spatiotemporal networks introduce an architectural trade-off between reconstruction accuracy and inference cost. We propose a novel two-stream framework that explicitly decouples global temporal representation learning from per-time-point spatial refinement. A Transformer-based Temporal Condition Encoder processes the entire EEG sequence via factorized spatiotemporal attention, retaining sensor-resolved features. A fixed inverse then maps these features into source-indexed conditioning for a per-timestep Source-Space Transformer or volumetric convolutional refiner. Extensive evaluations on realistic synthetic data demonstrate that this temporal prior dramatically improves spatial localization, outperforming classical and spatiotemporal baselines, particularly in high-noise and multi-source regimes. Training across diverse leadfields and explicit operator mismatches improves transfer to unseen head geometries and brings template-based reconstruction closer to subject-specific inversion. Furthermore, we apply the model trained only on synthetic EEG data to real-world EEG. A logistic regressor fit on source power differences in eyes-open, eyes-closed conditions successfully decodes age groups.

I. INTRODUCTION

EEG source imaging is ill-posed, and existing methods trade temporal context against spatial resolution and inference cost. The paper proposes temporally conditioned refinement and evaluates its localization and transfer across head models.

I. INTRODUCTION

  • EEG source recovery is ill-posed because fewer sensors than candidate sources make the forward model underdetermined, and lead fields vary substantially across subjects.Reconstruction also depends on forward-model fidelity, noise, and imposed priors.Source: §I · p. 1
  • Frame-by-frame hybrid refiners discard temporal structure, while full spatiotemporal architectures trade reconstruction accuracy against inference cost and compromise spatial resolution or temporal context.Classical regularization and data-driven methods address parts of the problem, but deep-learning transfer under changed head models and noise requires explicit evaluation.Source: §I · pp. 1–2
  • Temporal conditioning improves spatial localization and robustness over classical and deep-learning baselines in low-SNR and complex multi-source settings.The framework decouples global temporal modeling from spatial reconstruction, using a factorized Transformer to extract long-range dependencies and a 3D Transformer to refine physics-informed initializations.Source: §I · p. 2
  • Training across varied head models and selecting simulation settings close to the target application are important for transfer across geometries.Operator-mismatch training is reported to bring template-based reconstruction closer to subject-specific inversion on held-out head geometries.Source: §I · p. 2

II. BACKGROUND AND RELATED WORK

Prior source-localization methods range from regularized inverse solutions to data-driven and physics-informed refiners. More recent sequence models add temporal context, but joint spatiotemporal source modeling is computationally demanding.

A. Classical Approaches to Source Localization

  • Distributed inverse methods estimate amplitudes across source locations using spatial or energy priors; MNE uses an ℓ2 penalty and can favor superficial sources without depth weighting.Extensions include dSPM, LORETA, sLORETA, and eLORETA, while ℓ1 regularization can promote sparse focal estimates.Source: A. Classical Approaches to Source… · p. 2

B. Deep Learning and Physics-Informed Approaches

  • Deep-learning methods replace hand-crafted priors with data-driven ones, while physics-informed refiners such as 3D-PIUNet refine eLORETA initializations but operate frame-by-frame.Framewise refiners discard EEG temporal structure.Source: B. Deep Learning and Physics-Informed… · p. 2

C. Spatiotemporal and Sequence Modeling

  • Sequence models and EEG foundation models use temporal modeling or factorized attention, but joint 4D source mapping is computationally demanding and representation models do not invert the biophysical forward model.Figure 1 describes a temporal-conditioning path that applies the encoder to the full EEG sequence and aligns its condition vectors with time points.Source: C. Spatiotemporal and Sequence Modeling · pp. 2–3, Figure 1 · p. 3

III. METHODS

The method combines a global temporal condition encoder with a per-time-point source refiner. A precomputed eLORETA inverse provides physics-informed source-space inputs for refinement.

III. METHODS

  • The two-stream framework uses a global Temporal Condition Encoder and a per-time-point Source Refiner to produce each timestep’s source prediction.The encoder processes the recording sequence, while the refiner operates on a given timestep.Source: §III · p. 3
  • The method maps the EEG slice and its temporal conditioning vector into source space with the precomputed eLORETA inverse before the refiner fuses them.The inverse is used for inversion, and both branches are scaled independently over their real source entries and feature/orientation components before refinement.Source: §III · p. 3

A. Factorized Temporal Condition Encoder

The temporal encoder preserves sensor-resolved features while attending across time and sensors. The Source-Space Transformer refines inverse estimates using tokens at source locations.

A. Factorized Temporal Condition Encoder

  • The Temporal Condition Encoder embeds the full EEG sequence, alternates temporal and sensor attention, and returns sensor- and time-resolved conditioning features.Its factorization reduces attention interactions per block to O(PM^2 + P^2M), compared with O((MP)^2) for flattened-grid attention.Source: A. Factorized Temporal Condition Encoder · p. 3

B. Source-Space Transformer (SoST)

  • The Source-Space Transformer uses one token per source location, global self-attention, and 3D positional encodings to refine inverse-initialized estimates.It supports irregular surface and volumetric source locations, and each token predicts three dipole components.Source: B. Source-Space Transformer (SoST) · p. 4

C. Physics-Informed Temporal Conditioning

The method maps sensor-resolved temporal features through a fixed inverse to create source-indexed conditioning for spatial refinement, and trains on synthetic EEG spanning source dynamics, noise, and head-model variation.

C. Physics-Informed Temporal Conditioning

  • Applying the fixed inverse to each sensor-resolved temporal feature yields source-indexed conditioning that the refiner concatenates with the spatial estimate.This gives each source location a temporal feature vector that can inform spatial refinement.Source: C. Physics-Informed Temporal… · p. 4

D. Biophysical Data Generation Pipeline

  • The training distribution imposes temporally stable source support while varying source extents, oscillatory courses, noise levels, and head geometries.The simulation provides labeled sensor/source pairs for training across varied noise and leadfields.Source: D. Biophysical Data Generation Pipeline · p. 4
  • Each simulated trial uses 1–20 fixed-location Gaussian source patches with sampled extents, orientations, and band-limited time courses, sometimes modulated by ERD/ERS-inspired envelopes.The sampled bands span delta, theta, alpha, mu, and beta rhythms.Source: D. Biophysical Data Generation Pipeline · p. 4
  • To improve robustness to head-model variability, training samples draw lead fields from a pool; for IBP2021, evaluation data use conductivities (0.332, 0.0113, 0.332) S m−1 while training and inverses use (0.300, 0.006, 0.300) S m−1.Operator-mix training ramps mismatches linearly over 10–30% of training, reaching 50% for (s, t(s)), 20% for (s, s), 10% for (s, s′), and 20% for (t, t).Source: D. Biophysical Data Generation Pipeline · p. 4
  • Noise combines projected oriented pink noise from random sources with sensor-space white Gaussian noise, with nominal training SNR sampled uniformly from −10 to 30 dB.The two components are independently scaled to portions of the target noise variance.Source: D. Biophysical Data Generation Pipeline · p. 4

IV. EXPERIMENTAL SETUP

The evaluation uses amplitude error, spatial and temporal transport distances, and orientation fidelity to characterize source reconstruction.

A. Evaluation Metrics

  • NMAE measures signed-vector amplitude error and normalizes it by the ground-truth L1 norm to account for global signal scaling.The metric is defined over source, time, and orientation components.Source: A. Evaluation Metrics · p. 5
  • NEMD uses normalized Earth Mover’s Distance, with spatial costs based on Euclidean source distances and temporal costs based on sample distances.Spatial NEMD transports time-averaged magnitudes, while Temporal NEMD transports source-averaged magnitudes.Source: A. Evaluation Metrics · p. 5
  • Weighted Cosine Error measures orientation fidelity using a cosine-based error, with cosine norms floored at 10^-8.NMAE and this error require nonzero target mass.Source: A. Evaluation Metrics · p. 5

B. Training Dynamics and Baseline Comparisons

The experiments compare SoST+TC with learned and classical source-imaging baselines, using distinct training and evaluation procedures for surface and volume models.

B. Training Dynamics and Baseline Comparisons

  • SoST+TC is benchmarked against SoST, DeepSIF, an LSTM source-imaging model, eLORETA, and adapted Deep CB; volume comparisons also include 3D-PIUNet.The volume experiments evaluate temporal-conditioning and no-conditioning variants.Source: B. Training Dynamics and Baseline… · p. 5
  • Training uses AdamW for 300 epochs with gradient clipping and cosine learning-rate decay, and each epoch contains 10,000 samples with 1,000 replaced on a rolling basis.For each 512-point sequence, 32 loss times are selected as either a contiguous window or indices sampled without replacement; the encoder sees the full sequence.Source: B. Training Dynamics and Baseline… · p. 5

V. EXPERIMENTS AND RESULTS

SoST+TC improves reconstruction accuracy over evaluated learned and classical baselines, with a modest latency increase, and its temporal conditioning benefits robustness across noise and source counts.

A. Qualitative and Quantitative Performance

  • At one active patch center on an unseen IBP2021 head at 5 dB SNR, SoST+TC follows the ground-truth magnitude trajectory more closely than SoST.The illustrated 0–500 ms interval comes from a 512-sample, 256 Hz record.Source: A. Qualitative and Quantitative… · p. 5, Figure 2 · p. 6
  • 21.7% lower NMAE than SoST on the surface source space accompanies a 3.1% increase in measured inference latency.Across the aggregate evaluation, SoST+TC outperforms the evaluated learned and classical baselines in reconstruction accuracy; SoST is comparable to 3D-PIUNet on volume, and conditioning also improves 3D-PIUNet.Source: A. Qualitative and Quantitative… · p. 5, Table II · p. 6
  • Operator-mismatch training further improves SoST+TC reconstruction results and is introduced primarily to address head-model generalization.Source: A. Qualitative and Quantitative… · p. 5

B. Robustness to Noise and Complex Source Settings

  • Across evaluated noise levels, SoST+TC reduces reconstruction errors relative to SoST and detects some spatial structure at −10 dB SNR.The evaluation spans −10 to 15 dB SNR and source counts from K = 1 to K = 10.Source: B. Robustness to Noise and Complex… · p. 5
  • As source count rises, SoST+TC’s spatial marginal NEMD increases but remains below compared baselines, while temporal NEMD remains comparatively low.The reported interpretation is that temporal and oscillatory signatures help disentangle spatially overlapping contributions.Source: B. Robustness to Noise and Complex… · p. 5

C. Role of conditioning vector

SoST+TC depends strongly on its time-step conditioning vector, and its reconstruction retains lower errors across the evaluated noise and source-count settings. Mixed geometry training reduces cross-dataset transfer loss, while operator mixing reduces the penalty of template-based inversion.

C. Role of conditioning vector

  • Zeroing the condition increases errors more than zeroing the initial source estimate, while time-shuffled conditioning primarily increases temporal NEMD.Spatial NEMD changes little under time shuffling, consistent with spatial structures being reconstructed at the wrong time points.Source: C. Role of conditioning vector · p. 6

D. Head Model Generalization

  • Mixed geometry training reduces cross-dataset transfer loss, though pooled-model errors remain higher than within-pool specialist errors.The pooled model retains good reconstruction accuracy on held-out heads from both datasets.Source: D. Head Model Generalization · p. 6
  • SoST+TC retains lower NMAE, spatial NEMD, and temporal NEMD errors across evaluated sensor-noise and source-count settings, with source counts drawn uniformly from 1–10 in SNR sweeps and SNR fixed at 5 dB in count sweeps.Source: Figure 3 · p. 7
  • Operator mixing reduces template-inverse NMAE and improves subject-specific inversion, substantially reducing dependence on a subject-specific inverse operator.Replacing a subject-specific inverse with an fsaverage template inverse introduces a mismatch not explicitly represented in matched-operator training.Source: D. Head Model Generalization · p. 7

E. Real-World Age Decoding on LEMON

The study tests whether source-space eyes-open/eyes-closed reactivity features support age-group decoding in LEMON, using source models trained only on synthetic EEG. SoST+TC decoding performance varies by frequency band, and the ten-participant test set limits precision and the evidence for reproducible spatial signatures or broad decoding advantages.

E. Real-World Age Decoding on LEMON

  • The test set comprised ten participants whose geometries were held out from source-model training, while source models were trained only on synthetic EEG.The logistic classifiers were fitted on 115 training participants.Source: E. Real-World Age Decoding on LEMON · pp. 7–8, Figure 6 · p. 8
  • Features were unadjusted eyes-open-minus-eyes-closed differences in log10 subject-mean power, representing the log ratio rather than absolute power in either condition.Each band used 516 template-source features.Source: E. Real-World Age Decoding on LEMON · p. 7
  • 100% balanced accuracy was achieved by SoST+TC for theta, alpha, and total 4-35 Hz power, versus 75% for beta.SoST+TC did not outperform SoST or scalp EEG in beta; the frequency profile depended on representation.Source: Figure 6 · p. 8, E. Real-World Age Decoding on LEMON · p. 8
  • Age contrasts were spatially heterogeneous, with positive and negative effects whose distribution and magnitude depended on reconstruction method.The maps describe age differences in state-dependent modulation rather than simply increased or reduced resting activity.Source: E. Real-World Age Decoding on LEMON · p. 8
  • The ten-participant test set provides limited precision, and larger independent samples are needed to establish reproducible spatial signatures or broad decoding advantages.The effect-size maps are descriptive and do not directly validate anatomical localization or temporal stability.Source: E. Real-World Age Decoding on LEMON · p. 8

VI. DISCUSSION AND CONCLUSION

Temporal conditioning improves reconstruction in noisy and multi-source settings, while operator-mismatch training reduces dependence on subject-specific inverses within the evaluated settings. Real-data age-group decoding provides evidence of downstream utility, but simulation-to-biology mismatch remains the primary limitation.

  • Temporal conditioning improves source imaging in noisy and multi-source conditions, and projecting it into source space retains anatomically indexed cues.Source: §VI · p. 9
  • Operator mixing improves reconstruction on held-out heads, bringing template-based reconstruction closer to subject-specific inversion without establishing unrestricted generalization.Source: §VI · p. 9
  • Source-power features from a synthetic-only model supported age-group discrimination in a ten-participant LEMON holdout, providing downstream-utility evidence rather than classification-superiority evidence.Source: §VI · p. 9
  • Simplified Gaussian patches, band-limited time courses, and additive noise constrain biological validity; coherent reconstructions may still be biased when real activity differs from learned priors.Temporal smoothness should not be treated as evidence of accuracy.Source: §VI · p. 9
  • Decoupled temporal conditioning improves reconstruction with modest measured incremental inference cost and supports investigation of spatially resolved source dynamics within relevant time windows.Source: §VI · p. 9
Loading 2610.06726v1…