In order to validate the proposed approach, we used both a synthetically generated EEG dataset and a real EEG dataset. Each multivariate EEG signal is decomposed using both traditional MEMD and NA-MEMD to extract the IMFs. The resulting IMFs for each MEMD and NA-MEMD decomposition are used to train the corresponding LSTM surrogates. Finally, the performance of the LSTM surrogates is evaluated by using three different metrics that evaluate the estimation in time and frequency.
3.1. Synthetic EEG Generation with Temporal and Spatial Mixing
Each trial of the EEG dataset is generated by simulating multichannel brain activity with well-defined temporal and spatial components. The signals are constructed as follows:
Sampling frequency: Hz;
Duration: seconds;
Channels: ;
Time vector: with samples;
Noise level: Additive Gaussian noise with standard deviation .
Three frequency components are designed to simulate brain rhythms: a 10 Hz alpha wave (
), a 20 Hz beta wave (
), and a 6 Hz theta wave (
). These components are linearly combined across channels to simulate temporal mixtures:
To introduce spatial mixing, a
leadfield matrix
is considered as follows:
Finally, the synthetic EEG signals with additive noised are obtained by considering Equation (
3).
This synthetic configuration ensures both temporal dependencies and spatial cross-talk across channels, emulating key characteristics of real EEG signals. It provides a controlled environment to evaluate the decomposition and learning capabilities of MEMD-based and NA-MEMD-based surrogate models. The MEMD decomposition is obtained by using the Matlab 2023b toolbox described in [
13], and the NA-MEMD is obtained according to the methodology described in [
4]. A total of
IMFs are selected for the MEMD case, and a total of
IMFs are selected for the NA-MEMD case. For the NA-MEMD,
C noise channels are added with 2 times the amplitude of the additive noise of the EEG dataset.
In
Figure 3, an example is shown of one trial of the simulated EEG signals.
In
Figure 4, the IMF decomposition of the first four IMFs is shown for each EEG signal shown in
Figure 3.
To learn the mapping from EEG signals to their corresponding IMFs, we trained a bidirectional LSTM-based neural network in MATLAB by considering the MEMD and the NA-MEMD decompositions. The model is defined as follows:
Input Layer: sequenceInputLayer(inputSize);
Bidirectional LSTM Layer: bilstmLayer(hiddenSize, ‘OutputMode’,‘sequence’);
Fully Connected Layers: fullyConnectedLayer(outputSize), with optional ReLU activations;
Output Layer: regressionLayer().
Where inputSize = C, hiddenSize = 64, outputSize = M × C with for the MEMD and for the NA-MEMD. The architecture of the LSTM surrogate is defined through an empirical trade-off analysis between accuracy and computational cost. We initially tested networks with one bidirectional LSTM layer, varying the hidden size from 4 to 512 neurons in powers of two (4, 8, 16, 32, 64, 128, 256, 512). For each configuration, the MSE on the training data and the computational runtime are measured. As expected, smaller models exhibited faster runtimes but higher errors, while larger models achieved slightly lower errors at the cost of significantly increased training and inference times. A hidden size of 64 neurons is selected as the best trade-off, offering stable convergence, low error, and efficient execution.
In this work, the LSTM surrogate is trained in a full-sequence prediction setting. The input to the network corresponds to the entire multichannel EEG segment, and the output is the corresponding set of IMF sequences across the full time horizon. This is implemented using a bidirectional LSTM layer with the ‘OutputMode’ set to ‘sequence’, ensuring that predictions are generated at every time step of the input sequence. In contrast to one-step-ahead or multi-step-ahead forecasting approaches, our design directly reconstructs the complete IMF time series, consistent with the objective of mimicking the MEMD and NA-MEMD decompositions, which inherently provide full-length intrinsic mode functions rather than short-term forecasts.
For comparison, a DNN is also tested using the following configuration:
Input Layer: featureInputLayer(inputSize);
Fully Connected Layers: Two dense layers with hiddenSize units each, followed by ReLU activations:
- –
fullyConnectedLayer(hiddenSize), reluLayer();
- –
fullyConnectedLayer(hiddenSize), reluLayer().
Output Layer: fullyConnectedLayer(outputSize) followed by regressionLayer().
Where inputSize = C, hiddenSize = 128, and outputSize = 11 × C for the MEMD case or for the NA-MEMD case. The structure of the DNN surrogate is defined simply by considering one additional layer and double the number of hidden neurons than the LSTM surrogate.
The networks are trained using the trainNetwork function with the adam optimizer, a mini-batch size of 128, and a learning rate of . Training continued until convergence, with validation-based early stopping enabled. All models are trained to minimize the MSE between the predicted and ground-truth IMFs, which are the IMFs obtained from the MEMD decomposition.
In
Figure 6 is shown the predicted IMFs decomposition (first four of a total of
IMFs) based on an LSTM surrogate of the MEMD for the signals shown in
Figure 3.
In
Figure 7 is shown the PSD of the predicted IMFs based on an LSTM surrogate of the MEMD of
Figure 4.
In
Figure 8 is shown a zoom of IMF 3 of Channel 3 comparison between the original IMF (ground truth) and the predicted IMF decomposition based on an LSTM surrogate of the MEMD.
To assess the performance of the LSTM-based surrogates in replicating the MEMD and NA-MEMD decompositions, we used the following evaluation metrics:
MSE: This metric quantifies the average squared difference between the predicted IMF signals
and the reference MEMD/NA-MEMD IMFs
:
where
M is the number of IMFs. A lower MSE indicates a more accurate reconstruction.
SNR: This metric measures the relative strength of the true signal compared to the reconstruction error:
Higher SNR values reflect better signal preservation and lower distortion in the reconstructed output.
PSD Overlap: This metric assesses the similarity in frequency content between the true and predicted IMFs. It is computed by first estimating the power spectral densities
and
of the true and predicted signals using the Welch method, then normalizing them, and finally evaluating their overlap as:
A value closer to 1 indicates a high similarity in spectral distribution, demonstrating that the predicted IMF retains the same frequency characteristics as the original.
These metrics are computed for each IMF and averaged across all test samples and channels. Together, they provide complementary insights into both the precision (MSE), the perceptual quality (SNR), and frequency similarity (PSD Overlap) of the surrogate models.
In
Table 1 is shown a comparison of the training performance for one trial of the methods in terms of the MSE and SNR. It is worth noting that the data used for the comparison is the same data used for training the neural network.
It is worth mentioning that ↓ and ↑ symbols indicate that lower MSE and higher SNR are better. The proposed LSTM trained on NA-MEMD-preprocessed EEG signals achieves an MSE of 0.00337 and SNR of 12.68 dB, outperforming both a DNN and an LSTM trained on standard MEMD. The DNN had low SNR (0.02783 dB), meaning it poorly reconstructed the IMFs. The LSTM models, especially the one trained on NA-MEMD, achieved SNR above 12 dB, showing high-fidelity IMF reconstruction. This is due to the fact that the DNNs do not have sequence modeling, in contrast with the LSTM-based models. In addition, incorporating controlled noise channels in the decomposition stage leads to more robust and generalizable intrinsic mode representations for sequence learning. It can be seen that the DNN cannot describe the dynamic of the data, and therefore only the LSTM-based approaches are considered for the validation of the test data.
In
Table 2 is shown the comparison of the LSTM-based approaches by considering a total of 6 trials. The trials are generated by considering random frequency variations as follows: for the
wave, random frequencies between 8 Hz and 12 Hz, for the
wave, random frequencies between 18 Hz and 22 Hz, and for the
wave, random frequencies between 4 Hz and 8 Hz and also random noise. In this case, the neural networks are trained by considering one trial, and validated by considering five trials.
While the proposed LSTM-based surrogates show promising results, several limitations should be acknowledged. First, in contrast to MEMD, which adaptively determines the number of IMFs according to signal complexity, the surrogate network is constrained to a fixed output dimension (e.g.,
IMFs for MEMD and
IMFs for NA-MEMD). This may limit its flexibility when analyzing signals that naturally produce a different number of modes. Second, although the surrogate achieves very low error and high SNR on the training distribution (
Table 1), its performance decreases when tested on unseen signals with slightly different frequency content (
Table 2). Specifically, the SNR dropped from above 12 dB on the training set to around 7.6 dB on test signals, indicating reduced generalization to out-of-distribution data.
On the other hand, in
Table 3 is shown a computational time comparison.
In addition to improving signal fidelity, it can be seen from
Table 3 that the proposed LSTM surrogate models significantly reduce the computational burden associated with classical MEMD and NA-MEMD methods. The test is performed on a workstation Intel Core i5, 8th Gen with 32 GB RAM. The implementation settings are the same for all the methods, including the additive random noise, which is generated by using the same seed. The traditional MEMD required approximately 10.56 seconds per signal, while NA-MEMD took over 21 seconds due to the added complexity of noise-assisted decomposition. In contrast, the LSTM surrogate trained on NA-MEMD achieved a runtime of only 0.23 s, representing a speedup of over 90× compared to classical NA-MEMD. Similarly, the MEMD-based LSTM model achieved a 63× speedup. A DNN trained on MEMD targets delivered the fastest inference time (0.045 s), corresponding to a 234× speedup; however, this came at the cost of significantly reduced reconstruction quality, as reflected in its lower SNR and higher MSE.
These results highlight a critical trade-off; while simpler models like DNNs offer extremely fast execution, they fail to preserve temporal and frequency structures adequately. LSTM-based surrogates, on the other hand, strike a favorable balance between speed and accuracy, making them suitable for real-time EEG analysis tasks that require high-fidelity signal decomposition.
An analysis of the PSD overlap is also performed for the LSTM surrogate of the MEMD and NA-MEMD. In
Table 4 is shown the first 9 IMF PSD overlaps (of a total 11 IMF PSD overlaps) between the true and the LSTM-predicted MEMD.
Considering
Table 4, it can be computed that the mean PSD overlap for the LSTM-based MEMD surrogate is
. However, it can be seen that most IMFs in columns 3 to 5 show excellent overlap (
), indicating good learning of key frequency bands. It is worth mentioning that these IMFs contain the synthetic generated EEG signals. Later IMFs (e.g., 6 to 11) show lower overlap, possibly due to residual noise or over-decomposition.
An analysis of the PSD overlap is also performed for the LSTM surrogate of the NA-MEMD, as shown in
Table 5, where the first 9 IMF PSD overlaps are shown (of a total 13 IMF PSD overlaps).
Considering
Table 5, the mean PSD overlap for the LSTM-based NA-MEMD surrogate is approximately
. Similar to previous results, IMFs in columns 4 to 6 demonstrate high spectral consistency (overlap
), indicating that the model effectively learns and preserves the main frequency bands of the synthetic EEG signals—namely alpha, beta, and theta rhythms. These IMFs are the most relevant for the simulated signal content, and their accurate reconstruction confirms the surrogate’s fidelity in capturing meaningful temporal and spectral structures. In contrast, IMFs beyond the fifth component (i.e., columns 7 to 9) exhibit reduced overlap, which may reflect the presence of noise, over-decomposition, or less significant frequency contributions.
The obtained results also underline the novelty and contributions of this work. First, it is verified that sequence modeling architectures, such as the LSTM-based surrogates for MEMD and NA-MEMD, can faithfully emulate nonlinear decomposition methods. Unlike classical MEMD, which required 10.56 s per signal, the proposed LSTM surrogate achieved similar decomposition quality in only 0.86 s, corresponding to a 63× speedup. When trained with NA-MEMD outputs, the surrogate reached the best performance while reducing the NA-MEMD runtime from 21.03 s to just 0.23 s, a 90× improvement. Second, by incorporating noise-assisted decomposition in the training targets, the surrogate benefits from stabilized mode separation, producing more robust IMF reconstructions. Third, our comparative analysis between DNN and LSTM surrogates highlights a novel trade-off; while DNNs achieve extreme computational speed, they fail to preserve temporal and frequency structures (SNR = 0.03 dB), whereas LSTM surrogates maintain high signal fidelity with only a modest increase in runtime. Finally, the LSTM-based NA-MEMD surrogate shows consistent performance across channels, especially in the IMFs with more relevant information, suggesting that the temporal dependencies modeled by the LSTM architecture contribute to more stable and reliable frequency-domain reconstructions.