Research
Estimating the Event-Related Potential from Few EEG Trials
Overview Research area: Computational neuroscience and machine learning for biosignal processing — specifically, deep learning methods for estimating event-related potentials (ERPs) from electroenceph
- arXiv
- 2511.23162
- Published
- 2025-11-28
- Authors
- Anders Vestergaard Nørskov, Kasper Jørgensen, Alexander Neergaard Zahid, Morten Mørup
AI summary
Overview
Research area: Computational neuroscience and machine learning for biosignal processing — specifically, deep learning methods for estimating event-related potentials (ERPs) from electroencephalography (EEG).
Technical level: Intermediate. The paper assumes familiarity with EEG/ERP concepts, basic signal processing, and autoencoder architectures, though the core idea is accessible to anyone who understands averaging.
Scope: The paper introduces EEG2ERP, a transformer-based autoencoder that maps a small number of EEG trials to a clean, subject-specific ERP estimate, with calibrated uncertainty, and demonstrates zero-shot generalization to unseen subjects across three public datasets spanning EEG, MEG, and brain-computer interface applications.
What This Paper Is About
ERPs are tiny, stimulus-locked brain responses buried in noisy EEG recordings. The standard way to recover them is to average many repeated trials together — often 30 to 100 or more — so that random noise cancels out and the underlying brain response emerges. But collecting that many clean trials is impractical for children, clinical patients, and older adults, and it makes brain-computer interfaces slow to use.
This paper asks whether a deep learning model can produce a high-quality ERP estimate from only a handful of trials by learning the multivariate structure of EEG signals across subjects and tasks. The authors build EEG2ERP on top of an existing contrastive-learning autoencoder and add a dedicated uncertainty estimator, then test it against conventional and robust averaging methods in a challenging zero-shot setting where the test subjects were never seen during training.
Key Contributions
-
The first deep learning framework that maps EEG signals directly to their associated ERP. Rather than improving on averaging heuristics, EEG2ERP reformulates ERP estimation as a learned denoising/regression problem, taking an average of K input trials and predicting the ERP that would result from N trials, where K is much smaller than N.
-
Uncertainty-aware estimation via bootstrapped targets and a separate variance decoder. Training targets are bootstrapped ERP averages, which naturally express sampling variability, and a dedicated decoder branch predicts per-channel, per-time-point standard deviations under a Gaussian likelihood. This yields a confidence band alongside every ERP estimate.
-
A split-half evaluation protocol that avoids optimistic bias. Input and target trials come from disjoint halves of each subject's data, so the model cannot "cheat" by sharing single-trial noise between predictor and target. This also equalizes signal-to-noise ratio and prevents latency jitter from being shared across predictor and target, making the evaluation more sensitive to whether the method genuinely handles variability.
-
Demonstration across three datasets and two modalities, including BCI. The method is validated on ERP CORE (over 50,000 trials, 40 subjects, six paradigms, 14 conditions), the Wakeman-Henson EEG and MEG face-perception datasets, and the large P300 Speller BCI dataset — all under zero-shot subject generalization.
Main Findings
-
Large gains in the few-trial regime. On ERP CORE at K=5 trials, EEG2ERP achieved an R² of 31.7% against the held-out target ERP, while simple averaging scored -382.1%, tanh-weighted robust averaging -234.1%, and dynamic time warping (DTW) -124.9%. Similar gaps appear at K=1 and at 10% of trials.
-
EEG2ERP beats simple averaging even with all trials available. On ERP CORE with 100% of trials, EEG2ERP reached 47.7% R² versus 34.4% for simple averaging and 47.1% for weighted averaging. Only DTW (50.6%) edged it out.
-
Robust averaging wins at high trial counts, but only there. DW and similar robust estimators overtake EEG2ERP when hundreds of trials are available (e.g., 68.8% vs. 38.5% on the Wakeman-Henson EEG channel at 100% of trials), indicating that the deep learning approach is complementary rather than a wholesale replacement.
-
Uncertainty estimates are well calibrated. Predicted variances tracked true variances across subject-task pairs — low predicted uncertainty corresponded to low actual error, and vice versa — making the confidence bands genuinely informative rather than cosmetic.
-
Zero-shot generalization to unseen subjects works. Across all datasets, models trained on one group of subjects produced useful ERPs for held-out subjects, confirming that the learned representations capture generalizable subject- and task-level structure rather than memorizing training subjects.
-
Physiologically meaningful spatial patterns are recovered. Topographic maps for an unseen subject in the N170 face paradigm show that EEG2ERP recovers the characteristic N170 scalp distribution from as little as one or five trials, while simple averaging degrades severely.
-
Latent representations improve with more input trials. Subject and task latent spaces were more separable and more useful for classification at K=5 than at K=1, as reported in the paper's appendices.
Methodology in Plain English
The starting point is an existing autoencoder called CSLP-AE, which compresses EEG signals into two separate latent spaces — one capturing who the subject is, and one capturing what task they are doing. EEG2ERP keeps this split-latent design but changes the job the network does.
Training. Each subject's trials are divided into two halves. From the input half, the model draws a random bootstrap sample of K trials and averages them; from the target half, it draws a bootstrap sample of the full trial count and averages those as the target. The model learns to map one to the other. The number K is sampled with probability proportional to 1/k, so the model spends most of its training time on the hardest cases — very few trials — much like noise scheduling in diffusion models. The trial count itself is fed in as a positional embedding so the model knows how noisy its input is.
Architecture. A transformer encoder compresses the input into the subject and task latents, and the decoder produces two outputs: the estimated ERP and a per-point standard deviation. Because the encoder infers subject and task representations implicitly, the model needs no explicit labels at inference and can handle unseen subjects.
Loss. Three terms are combined. The reconstruction loss is a Gaussian negative log-likelihood rather than a plain squared error, which lets the model learn the noise variance alongside the signal. The contrastive loss pulls representations of the same subject (or same task) together and pushes different ones apart. The latent permutation loss randomly shuffles subject and task latents and requires the decoder to still reconstruct the ERP, which forces the two latent spaces to stay disentangled. Variance annealing — gradually shifting from a fixed variance of one toward the predicted variance — stabilizes early training.
Evaluation. Performance is measured by RMSE and R² between the model's estimate and a reference ERP computed from the held-out half of the trials, averaged over 200 bootstrapped input samples. This many-trial average is treated as a strong empirical benchmark, not as ground truth.
Baselines. The model is compared against simple trial averaging, two robust averaging methods (tanh-weighting and DTW), latency-correction algorithms (Woody's algorithm and RIDE), spatial filtering (xDAWN, on the BCI data), and two template-based approaches (a global grand-average template and a task-conditioned nearest-neighbor search).
Why This Matters
Impact on research. ERP reliability is tightly bound to trial count — guidelines recommend 30 or more trials for early components and over 60 for later ones like the P3. This paper shows that a learned model can produce usable ERP waveforms, with uncertainty bands, from five trials or fewer, which could reshape how ERP studies are designed and how much data is considered the minimum for a valid analysis.
Real-world applications:
- Clinical and psychiatric research. Patient populations often cannot tolerate long testing sessions or produce enough artifact-free trials. Reliable ERPs from few trials make biomarker studies in depression, schizophrenia, and neurological disorders more feasible.
- Developmental neuroscience. Child ERP guidelines already recommend minimizing trial counts. EEG2ERP directly supports this by improving estimate quality at very low trial numbers.
- Brain-computer interfaces. In P300 spellers, each additional trial adds seconds of waiting. Better single-trial and few-trial ERP estimation translates directly into faster, less fatiguing communication for users with severe motor impairment.
- Audiology and hearing technology. The WS Audiology co-author affiliation points toward using cortical ERP measures for hearing-aid fitting and validation, where test time is a practical constraint.
Industry relevance. Any product or service that depends on extracting evoked responses from EEG — BCIs, neurodiagnostic tools, cognitive assessment platforms, and hearing-device manufacturers — benefits from reducing the data required to get a trustworthy signal. The released code and the demonstrated generalization across unseen subjects lower the barrier to deployment.
Future Directions
-
Closing the gap at high trial counts. EEG2ERP is beaten by DTW when hundreds of trials are available. A hybrid or ensembled approach that uses the learned model in low-trial regimes and robust averaging in high-trial regimes could dominate across the entire range.
-
Extending and validating on clinical populations. All three datasets come from healthy participants in controlled paradigms. Whether the approach holds up in patient groups, with higher artifact rates and atypical waveforms, is untested.
-
Broader component and paradigm coverage. The current work centers on ERP CORE's six paradigms. Generalization to paradigms with different timing, jitter structure, or overlapping components — and to less common ERP measures — remains open.
-
Improving uncertainty quantification and downstream inference. Because the model outputs calibrated uncertainty, a natural next step is to propagate those uncertainties into the statistical tests and effect-size estimates that ERP researchers actually report, rather than treating the denoised waveform as a point estimate.
Target Audience
This paper is most useful for computational neuroscientists and machine learning researchers working on EEG or MEG signal processing who want to understand how deep learning can move beyond averaging-based ERP extraction. It is also valuable for ERP methodologists and clinical researchers who depend on ERP amplitude and morphology as dependent variables, for BCI engineers interested in reducing calibration and classification time, and for practitioners in neurotechnology industries where rapid evoked-response measurement has commercial value. Readers should have some grounding in EEG/ERP concepts and be comfortable with autoencoder and contrastive learning terminology; the paper is not an entry-level introduction to either field.
Authors’ abstract
Event-related potentials (ERP) are measurements of brain activity with wide applications in basic and clinical neuroscience, that are typically estimated using the average of many trials of electroencephalography signals (EEG) to sufficiently reduce noise and signal variability. We introduce EEG2ERP, a novel uncertainty-aware autoencoder approach that maps an arbitrary number of EEG trials to their associated ERP. To account for the ERP uncertainty we use bootstrapped training targets and introduce a separate variance decoder to model the uncertainty of the estimated ERP. We evaluate our approach in the challenging zero-shot scenario of generalizing to new subjects considering three different publicly available data sources; i) the comprehensive ERP CORE dataset that includes over 50,000 EEG trials across six ERP paradigms from 40 subjects, ii) the large P300 Speller BCI dataset, and iii) a neuroimaging dataset on face perception consisting of both EEG and magnetoencephalography (MEG) data. We consistently find that our method in the few trial regime provides substantially better ERP estimates than commonly used conventional and robust averaging procedures. EEG2ERP is the first deep learning approach to map EEG signals to their associated ERP, moving toward reducing the number of trials necessary for ERP research. Code is available at https://github.com/andersxa/EEG2ERP