D4PM: A Dual-branch Driven Denoising Diffusion Probabilistic Model with Joint Posterior Diffusion Sampling for EEG Artifacts Removal

Feixue Shao, Xueyu Liu, Yongfei Wu, Jianbo Lu, Guiying Yan, Weihua YangarXiv 2025 · DOI · arXiv

TL;DR

This paper introduces D4PM, a novel diffusion model designed to simultaneously remove multiple types of artifacts from EEG signals. By employing a dual-branch architecture and a joint posterior sampling strategy, D4PM effectively disentangles clean EEG from artifacts, achieving state-of-the-art performance in artifact removal, particularly for EOG artifacts.

What Problem Does This Paper Address?

Electroencephalogram (EEG) is a powerful tool for understanding brain activity, but its signals are often contaminated by artifacts from sources like eye movements (EOG), muscle activity (EMG), and heartbeats (ECG). These artifacts can obscure crucial neural information, making accurate analysis challenging. While traditional methods exist, they struggle with strong artifact-EEG correlations and single-channel data. More recent diffusion models show promise for EEG denoising, but they often lack temporal modeling for interpretability and tend to focus on single artifact types, ignoring the complexities of real-world mixed-artifact scenarios. This paper aims to bridge this gap by proposing a unified model capable of handling multiple artifact types simultaneously and offering improved interpretability.

Methods

The core of D4PM is a dual-branch driven denoising diffusion probabilistic model (DDPM). This architecture features two independent diffusion models trained in parallel: one for reconstructing clean EEG and another for modeling artifacts. Both branches are conditioned on the noisy EEG signal, noise levels, and artifact class labels. A key innovation is the Dual-FiLM (Feature-wise Linear Modulation) mechanism, which allows for class-aware multi-scale modeling and cross-path fusion within each branch, enhancing feature extraction.

To further improve reconstruction fidelity, D4PM employs a joint posterior sampling strategy. This approach treats artifact removal as a source separation problem, leveraging the relationship between clean EEG ($x$), artifacts ($x'$), and the observed noisy EEG ($y = x + x' \cdot \text{ASNR}$). During the reverse diffusion process, D4PM simultaneously predicts both $x$ and $x'$, and then enforces a data consistency constraint to ensure the reconstructed signals align with the observed noisy EEG. This collaborative sampling process allows the model to leverage complementary priors from both the EEG and artifact branches, leading to more accurate denoising.

Datasets

The authors utilized two public datasets: the EEGDe-noiseNet and the MIT-BIH Arrhythmia dataset. To create a more challenging and realistic benchmark, they constructed a mixed dataset by combining segments from these sources, specifically including 4514 EEG segments, 3400 EOG segments, 5598 EMG segments, and 3600 ECG segments. This mixed dataset was split into training (80%), validation (10%), and testing (10%) sets.

Key Insights and Ideas

  • Unified Multi-Artifact Removal: The most significant insight is the development of a single model capable of handling diverse artifact types (EOG, EMG, ECG) simultaneously. This moves beyond single-artifact specific models, which is crucial for practical applications.
  • Implicit Temporal Modeling for Interpretability: By using diffusion models with explicit conditioning on noise levels and artifact labels, D4PM implicitly captures temporal dynamics and structural patterns of both clean EEG and artifacts, offering better interpretability than some prior methods.
  • Collaborative Denoising via Joint Posterior Sampling: The integration of a joint posterior sampling strategy, which enforces data consistency between the predicted clean EEG and artifacts, is a clever way to leverage the complementary information from both branches and resolve the ill-posed nature of source separation.
  • Importance of Artifact Labels: The ablation studies highlight that explicitly incorporating artifact label embeddings significantly improves performance, underscoring the value of distinguishing between different artifact types.

Key Results

D4PM demonstrates state-of-the-art performance across various metrics, including Relative Root Mean Square Error (RRMSE), spectral RRMSE (RRMSEs), Correlation Coefficient (CC), and Signal-to-Noise Ratio (SNR).

  • EOG Artifact Removal: D4PM achieved a CC of 0.991 and an SNR of 20.987 on the mixed dataset, significantly outperforming all publicly available baselines, even under challenging SNR levels (-5 dB).
  • Mixed Dataset Performance: On the mixed dataset, D4PM consistently achieved the best or near-best results across all artifact types and metrics, showcasing its robust generalization capabilities. For instance, it achieved an average CC of 0.966 and an average SNR of 15.487 across EOG, EMG, and ECG.
  • Qualitative Results: Visualizations of denoised EEG signals show that D4PM effectively suppresses noise while preserving essential neural activity, even in the presence of large-amplitude artifacts.

Limitations and Future Work

  • Limitations: While D4PM shows strong performance, the paper notes that its training is conducted on a synthetically constructed mixed dataset. The performance on real-world mixed-artifact datasets with complex interactions might still present challenges. The paper also mentions that the model is trained under specific SNR ranges, and its performance at extreme SNR levels might warrant further investigation.
  • Future Work: The authors suggest exploring mixed-artifact modeling to further advance the practical deployment of this technology. They also mention the potential for extending their work to unseen and cross-domain samples, indicating a desire for even greater generalization capabilities.

Summary updated

Abstract

Artifact removal is critical for accurate analysis and interpretation of Electroencephalogram (EEG) signals. Traditional methods perform poorly with strong artifact-EEG correlations or single-channel data. Recent advances in diffusion-based generative models have demonstrated strong potential for EEG denoising, notably improving fine-grained noise suppression and reducing over-smoothing. However, existing methods face two main limitations: lack of temporal modeling limits interpretability and the use of single-artifact training paradigms ignore inter-artifact differences. To address these issues, we propose D4PM, a dual-branch driven denoising diffusion probabilistic model that unifies multi-type artifact removal. We introduce a dual-branch conditional diffusion architecture to implicitly model the data distribution of clean EEG and artifacts. A joint posterior sampling strategy is further designed to collaboratively integrate complementary priors for high-fidelity EEG reconstruction. Extensive experiments on two public datasets show that D4PM delivers superior denoising. It achieves new state-of-the-art performance in EOG artifact removal, outperforming all publicly available baselines. The code is available at https://github.com/flysnow1024/D4PM.
BibTeX
@misc{shao2025d,
  author = {Feixue Shao and Xueyu Liu and Yongfei Wu and Jianbo Lu and Guiying Yan and Weihua Yang},
  title = {{D4PM: A Dual-branch Driven Denoising Diffusion Probabilistic Model with Joint Posterior Diffusion Sampling for EEG Artifacts Removal}},
  year = {2025},
  eprint = {2509.14302},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.14302},
}
Figure