# A Non-Invasive Fetal QRS Complex Detection Method Based on a Multi-Feature Fusion Neural Network
## 3 Multi-Feature Fusion Neural Networks
### Late Fusion  
The cross-modal attention mechanism dynamically allocates different weights to each modality by learning the correlations between modalities, thus better-integrating information for specific tasks. This study utilizes a multimodal attention model that accepts four types of input data: time-domain data processed by a Long Short-Term Memory (LSTM) model, frequency-domain data handled by a 1D-CNN model, nonlinear feature data analyzed by an FCN model, and all feature data processed by a ShuffleNet model. Initially, each model processes its input data, which are then concatenated along the feature dimension. Through a multi-head attention layer, features are integrated and weighted for attention, facilitating the interaction and integration of information between different features [47; 48]. The final classification result is output through a fully connected (FC) layer with an output dimension of two.  
1. Using LSTM for Time-Domain Signals: ECG signals are time-domain signals, making LSTM networks suitable for processing them [49]. The LSTM model used in this study consists of an LSTM layer and an FC layer, designed to process sequential signals with an input dimension of 1 \(\times\) 60. The output of this network is four feature values.
2. Using 1D-CNN for Frequency-Domain Signals: The 1D-CNN network used here includes two convolutional layers, ReLU activation functions, a max pooling layer, and two FC layers, effectively extracting and classifying local features from frequency-domain data [50]. The input to this network is sixty values, and the output is four values.
3. Using DNN for Feature Value Signals: Given the small amount of feature value data extracted from each segment of the ECG signal, this study uses an FC neural network model to analyze feature value signals. The network consists of four FC layers, each followed by a ReLU activation function, automatically extracting valuable features for classification tasks. The input to this network is sixty values, and the output is four values.  
Figure 4: The network diagram for feature-level fusion.  
Using ShuffleNet for All Modal Data: ShuffleNet is a lightweight deep neural network architecture designed for efficient computation and parameter usage [51]. Given that the time-frequency domain signals are 24 \(\times\) 60, significantly larger than the signals from the first three modalities, ShuffleNet was chosen for its ability to quickly analyze such data. The output of this network is four feature values.  
The network diagram for late fusion based on the cross-modal attention algorithm is shown in Figure 5. Since the LSTM network is suitable for processing time-domain signals, it can capture the temporal dependencies within ECG signals. The 1D-CNN can efficiently extract local features from frequency-domain signals. The DNN model can automatically extract valuable information from a small amount of feature value data. ShuffleNet, due to its lightweight design, can quickly process larger size time-frequency domain signals. Finally, the multimodal attention model can comprehensively utilize the characteristics of various types of data, achieving the efficient and accurate classification of ECG signals. The combination of these specialized networks, alongside the cross-modal attention mechanism, allows the model to dynamically allocate computational resources based on the importance of different features. This design ensures that high classification accuracy is achieved without excessive computational overhead, striking a balance between accuracy and efficiency.