Source-linked AI summary
DenoFlow: Flow Matching for SSVEP Denoising under Real Physiological Artifacts
Zhentao He, Ziwei Wang, Dongrui Wu
TL;DR
EEG denoising for SSVEP faces missing clean training references and waveform-only objectives that do not constrain whether outputs remain decodable. DenoFlow learns and integrates a straight-path velocity field from the contaminated observation, with joint classifier supervision; across two public datasets and five decoders, it outperformed seven baseline denoisers on signal fidelity and decoding accuracy.
Problem
Public SSVEP datasets provide contaminated signals without clean counterparts, and waveform-only objectives do not constrain what downstream decoders receive.
Source: §1 · p. 1Method
DenoFlow regresses the velocity of a straight path from contaminated to clean trials, integrates it forward from the observation, and jointly trains a classifier to supervise the output.
Source: §1 · p. 2, §3.1 · p. 3Results
DenoFlow outperformed seven baseline denoising models on signal fidelity and downstream decoding accuracy across two public SSVEP datasets and five decoders.
Source: §1 · p. 2, §5 · p. 12Takeaways & Limitations
The reported comparisons show DenoFlow's advantage on both signal fidelity and downstream decoding accuracy in the evaluated SSVEP datasets and decoders.
Source: §5 · p. 12
Abstract
from arXiv · showhide
Electroencephalography (EEG)-based brain-computer interfaces (BCIs), particularly steady-state visual evoked potential (SSVEP) systems, are highly vulnerable to noise and artifacts, which severely degrade decoding accuracy. Although recent denoising approaches have shown promise, they are fitted without paired ground truth, can settle on reproducing their input, and are optimized on waveform distance alone, which says nothing about whether the output stays decodable. To address these issues, we propose DenoFlow, which casts SSVEP denoising as transport: instead of learning a direct map from a contaminated trial to a clean one, a field network regresses the velocity of the straight path between them, following the rectified-flow formulation, and denoising integrates that field forward from the observation. The field network is an encoder-decoder that sees the contaminated trial at every layer and the path position at its bottleneck, and a classifier trained alongside it supervises the integrated output. Because the observation itself is both the conditioning input and the starting point of the integration, the model never generates a trial from noise, and training reduces to regression, removing the adversarial min-max game. To obtain paired data on datasets with no ground truth, we injected physiological artifacts of the recorded electromyography (EMG) and electrooculography (EOG) signals under a controlled signal-to-noise target. Experiments on two public SSVEP datasets with five popular SSVEP decoders showed that DenoFlow outperformed seven baseline denoising models on both signal fidelity and downstream decoding accuracy. Code is available at https://github.com/wzwvv/DenoFlow.
1. Introduction
SSVEP decoding depends on EEG signals that are vulnerable to artifacts, while existing denoising approaches face gaps in clean training references and decoder-aware supervision. DenoFlow learns a path from contaminated to clean trials and integrates it from the observation, with joint classification supervision.
1. Introduction
- EEG artifacts include eye movements, muscle activity, cardiac artifacts, baseline drift, and electromagnetic interference, and must be suppressed for reliable decoding.SSVEP systems infer the attended target by matching EEG frequency and phase characteristics to visual stimuli.Source: §1 · p. 1
- Public SSVEP datasets lack clean counterparts, while models trained on synthetic perturbations transfer poorly to physiological artifacts.Direct mapping can reproduce the contaminated input, and waveform-only losses can suppress stimulus responses without constraining decoder output.Source: §1 · pp. 1–2
- DenoFlow regresses the velocity of the straight path between contaminated and clean trials, then integrates the field forward from the observation.A jointly trained classifier supplies a classification loss so that waveform distance is not the only factor shaping the trajectory.Source: §1 · p. 2, Figure 1 · p. 2
- The field network conditions on the contaminated trial at every encoder-decoder layer and receives path position at a Transformer bottleneck.The introduction also identifies controlled injection of recorded EMG and EOG artifacts as a way to create paired training data when datasets provide no clean reference.Source: §1 · p. 2
- DenoFlow outperformed seven baseline denoising models on signal fidelity and downstream decoding accuracy across two public SSVEP datasets and five decoders.The paper frames denoising as learning the path from a contaminated trial to its clean counterpart, then integrating the learned field forward from the observation.Source: §1 · p. 2
2. Related Work
EEG denoising spans signal-processing, discriminative deep-learning, and generative approaches, while SSVEP decoding uses correlation-based, training-based, and deep models. Both denoising and decoding remain challenged by artifact sensitivity and unconstrained output decodability.
2.1. EEG Denoising
- EEG denoising ranges from filtering and component methods to CNNs, RNNs, Transformers, Mambas, and generative models, but clean-reference and decoder-supervision gaps remain.Traditional methods rely on assumptions such as noise independence and signal stationarity; generative denoisers can reproduce inputs and optimize waveform similarity without constraining decodability.Source: §2.1 · pp. 2–3
- Flow matching regresses the velocity of a path between distributions and obtains samples by integrating the field; rectified flow uses a straight path.Unlike generation from Gaussian noise, denoising can start the path at the observed contaminated trial, which the model moves rather than inventing a trial from noise.Source: §2.1 · p. 3
2.2. SSVEP Decoding
- SSVEP decoding includes correlation-based CCA and its variants, training-based methods such as TRCA and TDCA, and deep CNN, recurrent, and hybrid models.Decoders remain sensitive to EEG noise and artifacts, and performance often degrades when signal quality is compromised.Source: §2.2 · p. 3
3. DenoFlow
DenoFlow treats SSVEP denoising as forward transport from a contaminated observation to a clean reference, using injected physiological artifacts to create paired training data. Its field network predicts path velocity, while integration and reconstruction and classification losses constrain the resulting signal.
3.1. Overview
- DenoFlow learns the straight path from contaminated to clean trials and integrates the predicted field forward from the observation, with classification supervision on the integrated output.The contaminated trial conditions the field throughout the path and is also the integration starting point.Source: §3.1 · p. 3
3.2. Physiological Artifact Injection
- Recorded EMG and EOG segments are injected into clean trials under a controlled signal-to-noise target to create paired references, including EMG-only, EOG-only, and mixed conditions.Segments are spatially spread across electrodes and masked; the mixed condition is about 3 dB harsher than single-source conditions.Source: §3.2 · pp. 3, 5
3.3. Network Architecture
- DenoFlow pairs a velocity-predicting field network with a classifier that supervises integrated outputs during training; at test time, denoising requires only the field network.The classifier is trained on reference trials and integrated outputs.Source: §3.3 · p. 5, §3.3.2 · p. 6
3.3.1. Field Network
- The field network receives the current path point, contaminated trial, and path position, with the contaminated trial available at every layer and path position encoded at the Transformer bottleneck.The encoder-decoder uses skip connections, and its output is a velocity field rather than a denoised trial.Source: §3.3.1 · p. 5
3.4.1. Velocity Regression
- The field network regresses the constant velocity of the straight path at a uniformly sampled position, with the flow loss averaged over trial entries.Resampling the path position at each step supervises the network throughout the path.Source: §3.4.1 · p. 6
3.4.2. Denoising by Integration
- Denoising uses Euler integration from the observation, and the number of inference steps can be changed independently of the training-step count.One step adds a single predicted residual; additional steps re-evaluate the field along the way.Source: §3.4.2 · p. 6
3.4.3. Signal Reconstruction Regularization
- A reconstruction loss directly constrains the integrated endpoint, which the downstream decoder receives, while the overall objective combines reconstruction, flow, and supervised classification losses.Gradients propagate through the training rollout, attributing integration error to the step where it arises.Source: §3.4.3 · p. 6, §3.4.4 · p. 6
3.4.5. Training Procedure
- Each mini-batch resamples both the path position and artifact segment; training integrates the field before updating the classifier and field network, while inference integrates the trained field.The training and inference recursions use separate Euler-step counts.Source: §3.4.5 · p. 6
4. Experiments and Results
The experiments compare DenoFlow with seven denoising models on two public SSVEP datasets using five decoders. The datasets and algorithms provide the evaluation scope for the reported results.
4.1. Datasets
- Experiments used the Nakanishi2015 SSVEP dataset, with 12 target stimuli and 10 subjects, and the Benchmark SSVEP dataset, with 40 visual stimuli and recordings from 35 healthy subjects.Source: §4.1 · p. 7
4.2. Algorithms
- Five decoders evaluate denoised trials alongside uncontaminated references and contaminated trials left untouched.The decoder set includes FBCCA, eTRCA, EEGNet, CCNN, and SSVEPNet.Source: §4.2 · p. 7
- DenoFlow is compared with seven representative denoising models retrained under the same protocol.The baselines include TOED-GAN, the only model designed for multi-channel SSVEP trials; other models were adapted to filter-bank multi-channel input.Source: §4.2 · p. 7
4.3. Implementation
The evaluation decodes denoised trials and measures both signal fidelity and classification accuracy. Experiments use within-subject chronological splits and a shared reference contamination condition unless otherwise stated.
4.3.1. Evaluation Tasks
- Denoised outputs are decoded, while signal fidelity is measured against the filtered uncontaminated reference.The contaminated trial is passed through each denoiser, and its output is evaluated.Source: §4.3.1 · p. 8
4.3.2. Evaluation Metrics
- Evaluation reports CC, RRMSE, SNRI, and classification accuracy, using mean and standard deviation over subjects.Higher CC and SNRI and lower RRMSE indicate better fidelity; negative SNRI means the trial is noisier after denoising.Source: §4.3.2 · p. 8
4.3.3. Parameter Settings
- Unless varied, contamination uses a mask fraction of 0.5 and γ = 0 dB, with one segment per artifact library and channel-gain spread σ = 0.3.The field network and classifier are trained for 300 epochs with Adam; both trade-off weights are 1, and denoising uses four integration steps.Source: §4.3.3 · p. 8
- Five-fold cross-validation is used for Nakanishi2015 and six-fold for Benchmark, with three filter-bank sub-bands per dataset.The bands are stacked along the channel dimension to form the network input.Source: §4.3.3 · p. 8
4.4. Denoising Results
DenoFlow leads the reported signal-fidelity and decoding comparisons across the two datasets and artifact types. Its decoding advantage is especially consistent on Benchmark, while severe contamination remains costly.
4.4.1. Signal Fidelity
- DenoFlow ranked first on every signal-fidelity metric under every artifact type on both datasets, with CC above 0.86 in each panel.Under EOG contamination, baselines lowered SNR by −5.88 dB on Nakanishi2015; DenoFlow was near zero there and uniquely raised the ratio on Benchmark.Source: §4.4.1 · p. 8, Table 4 · p. 9
4.4.2. Decoding Accuracy
- DenoFlow achieved the highest average decoding accuracy across all artifact types on both datasets, with all Benchmark comparisons against denoising methods significant after Holm correction.It was also the only approach that consistently outperformed the untouched contaminated trials under each artifact type on both datasets.Source: §4.4.2 · pp. 8–9
- The accuracy benefit generally grew with artifact-induced degradation; on Benchmark under EMG contamination, accuracy loss versus Ref. was 22.50% for EEGNet and 15.71% for eTRCA.The authors relate the smaller denoising gains for more robust decoders to their lower contamination impact.Source: §4.4.2 · p. 9
4.5. Effect of Noise Intensity
The noise-intensity analysis varies mask fraction and target ratio across 12 conditions per dataset. DenoFlow’s accuracy advantage over untouched contaminated trials grows with severity, but it does not fully restore reference performance.
4.5. Effect of Noise Intensity
- 72.79% to 38.04%: Benchmark accuracy for untouched contaminated trials fell from the mildest to the most severe condition, with γ changes having a larger effect than mask fraction.The two factors jointly amplified degradation; the decrease was approximately four times that observed on Nakanishi2015.Source: §4.5 · p. 9
- Less than 4% to more than 25%: DenoFlow’s accuracy improvement over Art. on Benchmark grew from the mildest to the most severe condition.Across 12 conditions, Benchmark accuracy range was 12.87% for DenoFlow versus 34.75% for Art.Source: §4.5 · p. 9
- DenoFlow did not fully restore reference performance on Benchmark: its gap from Ref. grew from 3.19% under the mildest condition to 16.06% under the most severe.Denoising reduced the cost of contamination without removing it.Source: §4.5 · p. 9
4.6. Ablation Study
The complete objective performed best across all four metrics, and removing any loss term significantly worsened every metric. Reconstruction loss contributed most to accuracy, while classification and flow-matching losses added complementary supervision.
4.6. Ablation Study
- The complete objective outperformed every single-term ablation on all four metrics, with all Holm-corrected p values below 10^-4.The ablation variants each removed one loss term while retaining the other two.Source: §4.6 · p. 9
- Removing reconstruction loss reduced accuracy by 3.25% and degraded all three signal-fidelity metrics.Reconstruction loss directly supervises the integrated output passed to downstream decoders.Source: §4.6 · p. 9
- Removing the classification and flow-matching losses also resulted in smaller but statistically significant degradations in signal fidelity; pointwise waveform reconstruction does not fully preserve task-relevant information or constrain the generation trajectory.Classification loss encourages the integrated output to retain discriminative information, whereas flow-matching loss supervises the learned velocity field throughout the integration path rather than only at its endpoint.Source: §4.6 · p. 10
4.7. Parameter Sensitivity Analysis
DenoFlow showed modest performance changes under the evaluated loss-weight variations and a stable region for integration steps. The default four training and four inference steps falls within that region.
4.7. Parameter Sensitivity Analysis
- Across the evaluated loss-weight settings, accuracy differed by at most 0.67%, while CC, RRMSE, and SNRI ranged by 0.0053, 0.0150, and 0.26 dB, respectively.No alternative weight setting consistently improved both fidelity and decoding accuracy.Source: §4.7 · pp. 10–11, Table 8 · p. 11
- Across the training and inference step grid, average accuracy ranged from 73.94% to 74.75%; one inference step performed worse, while S ≥ 2 formed a stable plateau.Training-step changes had little observable effect, and the default S_tr = 4, S = 4 lies in the plateau.Source: §4.7 · pp. 10–11, Figure 5 · p. 11
- Overall, DenoFlow remained stable under the evaluated loss-weight perturbations and integration-step configurations.The results indicate that performance did not depend on a narrowly tuned hyperparameter setting.Source: §4.7 · p. 11
4.8. Visualizations
The visualizations show denoised traces generally moving closer to the uncontaminated reference within artifact-masked intervals. The remaining deviations varied by artifact type and were concentrated where contamination was strongest.
4.8. Visualizations
- Within masked intervals, denoised traces generally followed the uncontaminated signal more closely than contaminated traces.The plots show uncontaminated, contaminated, and denoised signals in black, red, and blue, respectively; shading marks the artifact mask.Source: §4.8 · p. 11, Figure 6 · p. 12
- The reduction in deviation was most pronounced under EOG contamination and least pronounced under mixed EMG-EOG contamination.The mixed condition combines ocular activity with a broadband muscular component and contains approximately 3 dB more artifact power.Source: §4.8 · p. 11
- Residual differences between denoised and uncontaminated traces were generally concentrated where the contaminated trace deviated most strongly.The reported pattern suggests reconstruction error depended on local contamination magnitude and temporal structure rather than being uniform across masked intervals.Source: §4.8 · p. 12
5. Conclusion
DenoFlow treats SSVEP denoising as transport from a contaminated trial toward its clean counterpart, integrating a learned velocity field from the observation. Across two public datasets and five decoders, it outperformed seven baseline denoisers on signal fidelity and decoding accuracy.
5. Conclusion
- DenoFlow regresses the velocity of the straight path from a contaminated trial to its clean counterpart and integrates the field forward from the observation.The contaminated trial conditions the field network at every layer, and a jointly trained classifier supervises the integrated output.Source: §5 · p. 12
- On two public SSVEP datasets evaluated with five decoders, DenoFlow outperformed seven baseline denoising models on signal fidelity and downstream decoding accuracy.Training reduces to regression without the adversarial min-max game used by earlier generative denoisers.Source: §5 · p. 12
- Future work will explore online and cross-subject SSVEP decoding and lightweight denoising architectures for real-time deployment.Source: §5 · p. 12