## 3 Proposed Approach
### Datasets  
**ECG Dataset for Supervised Pre-Training**: The Massachusetts Institute of Technology-Beth Israel Hospital Atrial Fibrillation Database (MIT-BIH AF-DB) consists of 25 long-term two-channel ambulatory ECG recordings of human subjects with mostly paroxysmal atrial fibrillation [47]. Each recording is up to 10 h in duration and was sampled at 250 Hz by the associated recorders, with a typical bandwidth of approximately 0.1 to 40 Hz. This publicly available dataset is accessible through the PhysioBank repository, an online archive of well-characterized biomedical signals initiated by the United States National Institutes of Health [48]. The signals in the MIT-BIH AF-DB dataset have rhythm labels primarily corresponding to AF and NSR, but also include annotated instances of atrial flutter and AV junctional rhythm. The labels define the period of the signal between the start and end of a specific cardiac event. We considered the Lead 1 channel ECG, associated with the right ventricle and right atrium, and the labels for NSR and AF only. We extracted 30 s long non-overlapping segments from each individual recording, after downsampling to 50 Hz to match the sampling rate of the provided PPG dataset [49; 50]. The rationale for selecting the 30 s duration is twofold. First, it is ideal for rapid AF episode detection in a wearable monitoring context [51] and has shown considerably high accuracy in recent works. Second, a general arbitrary consensus among the electrophysiology community asserts that at least 30 s of an ECG signal is required to justifiably define brief episodes of isolated AF, even if it may not always correlate to prevailing longer or recurring AF arrhythmia [52]. Stationary signal check, heart rate check, and the signal-to-noise ratio check algorithms were utilized, as formulated in [53], to ascertain the signal quality of the ECG lead. All signals in the MIT-BIH AF-DB dataset passed the signal quality acceptance checks and were in agreement across the three algorithms. No additional filtering, replication, or augmentation procedures were applied to the raw signals at this point. In total, there were 11,737 and 5151 window segments belonging to the NSR and AF classes, respectively. **PPG Datasets for Downstream Classification**: For further analysis, we were granted access to a private database of PPG signals (UMass-DB), held by the authors of [50]. The work was conducted at the University of Massachusetts Medical School with 37 human subjects who were instructed to perform several kinds of movements replicating free-living conditions in the clinic [49]. The smart wrist-worn wearable Samsung Simband recorded the PPG signals at an original sampling frequency of 128 Hz. The PPG signals in the database version we were provided with were already preprocessed into 30 s labeled segments with a downsampled frequency of 50 Hz. As discussed in [43], the signal-to-noise ratio of the PPG signals is 1.5, 1.  
ratios of signals acquired from wearable PPG are not always consistent and depend on a number of external factors. In the interest of keeping the noise within the data input so that the model could learn while accounting for this natural variance in raw sensor values, we did not perform filtering and replication augmentations for this modality. After considering the original authors' annotations regarding signal quality and estimating the perfusion and skewness indices as per [54], we removed the poorest-quality PPG signals. In total, there were 192 and 54 window segments belonging to the NSR and AF classes, respectively. The second dataset was obtained from the AF subset of the MIMIC III database and made available through [55]. This dataset contained data from 34 critically ill adults in routine clinical care. Data were recorded using a bedside monitor at 125 Hz, which was then downsampled to 50 Hz to match the previous dataset. The data did not require additional preprocessing or filtering as previously performed [55].