ANALYSIS OF MEG SIGNALS OF WRIST MOVEMENT WITH LSTM-BASED REGRESSION MODEL - KHOMIAK, ANDRII (Herald of Khmelnytskyi National University. Technical sciences, 2025)
This article describes the methodological framework for the development and evaluation of a magnetoencephalographic (MEG) signal regressor based on a Long Short-Term Memory (LSTM) network, applied to the analysis of time-series data from wrist movement tasks. The study provides a detailed account of the model’s architecture, which is constructed from sequence input, LSTM, and dense layers designed to process multi-channel temporal data. It outlines the data preprocessing pipeline, which includes the standardization of features for each MEG channel using a StandardScaler and the specific formulation of input-target sequences necessary for time-series forecasting. The training and optimization protocols are specified in detail, including the use of the Adam optimizer, a Mean Squared Error (MSE) loss function, and a ReduceLROnPlateau learning rate scheduler to dynamically adjust learning based on validation performance. To ensure numerical stability, particularly when training on long sequences, gradient clipping was implemented. The model’s predictive performance was quantitatively assessed using MSE to measure prediction error and the Coefficient of Determination (R²) to determine the proportion of explained variance. These metrics were evaluated across distinct training, validation, and test datasets to assess the model’s learning capacity, its ability to generalize to unseen data, and to monitor for potential overfitting. Finally, the paper considers the application of the latent representations learned by the LSTM regressor. These internal representations, which encapsulate critical temporal features of the MEG signals, are proposed as a source of data-driven features for subsequent, more complex classification tasks, such as distinguishing between different brain states or experimental conditions.