## 2 Materials and Methods  
### Data Collection and Processing  
We conducted a single-center retrospective observational study using 508 cases of 4 s ECG segments collected from 131 patients in the emergency room of Anam Hospital from January 2021 to December 2022. ECG rhythms were acquired from patient monitors using Vital Recorder 1.15.2, a free research tool designed for the automatic recording of high-resolution, time-synchronized physiological data [22] (accessed 1 January 2021 at [[https://vitaldb.net/vital-recorder/](https://vitaldb.net/vital-recorder/)]([https://vitaldb.net/vital-recorder/](https://vitaldb.net/vital-recorder/))). For each cardiac arrest patient, ECG rhythms were continuously recorded from their arrival and connection to the ECG monitor, to either the cessation of cardiopulmonary resuscitation due to death or transfer to the intensive care unit following successful resuscitation. This retrospective study was approved by the Institutional Review Board of Korea University Anam Hospital (IRB No. 2019 AN0006). Informed consent was waived due to the fact that the data were anonymized before analyses. All methods were conducted in accordance with relevant guidelines and regulations. The ECG segments contained complex noise induced by patient movements, muscle activity and data transmission quality. Therefore, a preprocessing step was performed to enhance the quality of the ECG segments. In this study, we applied Butterworth filters, which are commonly used in the field of biomedical engineering, to remove noise while preserving important features of the ST segment and QRS complex. The cutoff frequencies were set from 0.05 Hz to 150 Hz [23; 24]. Body and electrode movements, as well as breathing, can induce low-frequency noise components. To remove such baseline wandering, we applied the asymmetrically reweighted penalized least squares (arPLS) method to the ECG segments. This technique improves accuracy by automatically adjusting weights iteratively and can be applied to data with various spectral characteristics [25]. Missing values in the ECG segments were filled using the backward-forward interpolation technique. Each ECG segment comprised 1000 values recorded at 250 Hz over 4 s. This 4 s interval was chosen based on clinical and practical considerations. International resuscitation guidelines recommend reassessing the cardiac arrest rhythm every 2 min, with rhythm checks to be completed within 10 s [26]. In Anam Hospital's emergency room, emergency medicine specialists typically took 6-8 s to confirm initial rhythm or reassess during resuscitation. However, it was observed that noise from chest compressions could persist for 1-2 s after their cessation. Therefore, extracting 4 s ECG segments was determined to be the optimal choice. This duration allowed for the acquisition of both compression-affected and non-compression ECG segments, ensuring a uniform data length for all patients while accounting for the brief period of residual noise after compression cessation. A skilled clinician interpreted and labeled the ECG segments recorded through Vital Recorder. The ECG segments were initially categorized into five primary rhythm types across two phases, resulting in ten categories. The five primary rhythm types included asystole, pulseless electrical activity (PEA), ventricular fibrillation (VF), pulseless ventricular tachycardia (pVT) and pulse-generating rhythm (indicating ROSC). Each rhythm type was extracted in a 1:1 ratio between compression-affected and non-compression ECG segments. The clinician selected a representative 4 s segment from the same CPR cycle for each rhythm. Compression-affected ECG segments were recorded during chest compressions, while non-compression ECG segments were extracted during compression pauses or immediately after ROSC declaration.