## 3 Proposed Approach
### Datasets
Manual labels for AF and non-AF subjects were obtained from 34 patients (18 in AF, 16 not in AF). In total, there were 1280 and 152 window segments belonging to the NSR and AF classes, respectively. Finally, a single window segment in either modality contained a raw ECG/PPG signal lasting 30 s and containing 50 Hz \(\times\) 30 = 1500 sampling points. Figure 2a,e represent NSR rhythms for ECG and PPG, respectively, where NSR is observed as a rhythm maintaining a steady rate with no abnormalities. Figure 2b,f represent AF rhythms for ECG and PPG, respectively, where AF is observed as an irregular rhythm exhibiting unsteadiness and rapid fluctuations. We further leveraged the ability of HRV/PRV to non-invasively assess the functioning of the cardiovascular autonomic nervous system (ANS). Multiple studies have reported the utility of HRV/PRV in reflecting the sympathetic and parasympathetic activity of the ANS in response to stressors and abnormalities [56]. It is worth mentioning that the primary criterion considered for almost all HRV/PRV indices is the interval between two successive heartbeats. This interval is known as the NN interval or the RR interval. For ease of reference, we use the term NN interval synonymously with RR interval when mentioning HRV/PRV indices throughout this work. We employed the peak detection method, as outlined in [57] with respect to QRS complexes for 30 s ECG signals and [58] with respect to the pulsatile components for 30 s PPG signals to extract the NN intervals from both modalities. We ensured the use of dynamic peak detection algorithms with relatively low computational demand to yield good accuracy, and we used the series of NN intervals detected to derive the six HRV/PRV features mentioned previously. HRV/PRV indices belong to the time-domain, frequency-domain, and non-linear categories [59]. Time-domain indices quantify the statistical properties relating to the intervals between successive heartbeats over a period of time. Frequency-domain indices estimate the absolute or relative amounts of signal energy within the component bands. Finally, non-linear indices capture the unpredictability, fractality, and complexity associated with a series of heartbeat intervals [60]. In this work, we considered only six HRV/PRV indices in total from the time domain and non-linear domain, as relatively longer signal segments (\(\leq\)1 min) are required for reliable frequency-domain outcomes [61]. Although longer signals can be extracted from MIT-BIH AF-DB, this limitation is introduced by the UMass-DB signals. As the available PPG dataset consisted mostly of labeled non-contiguous 30 s segments, there was insufficient energy content for accurate power spectrum analysis. For the time-domain indices, we chose the recommended robust median absolute deviation of the NN intervals (madNN), the madNN divided by the median of the absolute differences of their successive differences (mcvNN), the count of pairs of adjacent NN intervals differing by more than 20 ms over the window (pNN20), and the count of pairs of adjacent NN intervals differing by more than 50 ms over the window (pNN50) [62; 63]. For the non-linear indices, we opted for the suggested Shannon entropy (SHAN) and Correlation Dimension(CD). SHAN quantifies the complexity of the NN interval series distribution based on information theory, and CD relates to chaos theory to measure the number of correlations present in the signal [64]. We hypothesize that combining the raw signals with a holistic semantic representation of a series of consecutive heartbeats/NN intervals allows for a more robust transferable  
Figure 2: Examples of 30 s signals represented as amplitude in millivolts (\(y\)-axis) against time in seconds (x-axis). approach. To observe initial differences in the HRV and PRV metrics between the NSR and AF instances, hypothesis testing was conducted. The Shapiro-Wilk test of normality revealed deviations from the Gaussian distribution across all HRV metrics from both classes and the PRV metrics for the NSR class.