# Robust U-Nets for Fetal R-Peak Identification in Electrocardiography
## 1 Introduction
Unlike sequence modeling approaches (e.g., CNN-LSTMs or Transformers), U-Net's encoder-decoder structure provides synergistic capabilities critical for fetal ECG analysis. First, the contracting path captures long-range context to distinguish fetal QRS complexes from noise. Second, the incorporation of skip connections mitigates overfitting, facilitating accurate segmentation of small objects even with limited training data [13]. In addition to its success in 2D tasks, this architecture has shown superior noise robustness in analogous 1D applications, achieving a 96.03% F1-score at <6 dB SNR in adult ECG [17] and reducing false-positive predictions by 10% versus E-D CNN without skip connections in Holter ECG signals [18; 19]. Critically, U-Net's inherent design enables effective training with limited annotated samples--a necessity in fetal ECG analysis where large-scale labeled datasets are scarce--while Transformer-based models typically require massive data volumes to achieve comparable performance due to their lack of spatial inductive biases and higher parameter complexity [20; 21]. Therefore, the U-Net architecture is uniquely suited to our target of fetal R-peak detection in noise-dominated recordings. In this work, motivated by these findings, we propose a novel deep-learning-based method that uses the U-Net architecture to accurately detect fetal R-peaks from low SNR FECG signals, thereby addressing the strong demand for extracting high SNR FECG signals and the limitations of PTA-based peak detection methods with FECG signals. The architecture of the proposed fetal R-peak detection method is adapted from the conventional 2D U-Net model to accommodate 1D time-series tasks. The Abdominal and Direct Fetal Electrocardiogram Database (A&D FECGDB) provides the gold standard direct FECG signals, which are treated as the FECG signals extracted by the NIFECG method in this study. In addition, the synthetic fetal ECG signals provided in the Fetal ECG Synthesis Database (FECGSYN) are also used. The robustness of the proposed algorithm is validated using both real recordings and synthetic recordings. The real recordings consist of three datasets with SNRs ranging from 0 to 10 dB, generated by introducing additional noise to the original A&D FECGDB. Additionally, synthetic fetal ECG signals from the Fetal ECG Synthesis Database (FECGSYN) are also utilized. In addition, the relationship between the choice of matching window size and performance deviation is investigated to assess the algorithm's prediction accuracy. Ten existing peak detection methods are applied and compared with our proposed method to validate its robustness and efficacy. The remainder of this paper is organized as follows. Section 2 provides a detailed description of the proposed U-Net-based method for fetal R-peak detection. Section 3 outlines the dataset utilized and the evaluation metrics applied and introduces ten existing peak detection methods for comparison. Section 4 offers a comprehensive evaluation of the performance of the proposed method, examining the impact of key thresholds on the performance and the noise robustness of the method. Section 5 compares the proposed method with ten existing peak detection methods and explores the impact of matching window size on the performance. A comprehensive analysis of the robustness and the predicted peak locations accuracy is performed. Finally, Section 6 presents the conclusions.