Table 5: Ablation study of contrastive blocks. The ablation study of contrastive blocks is evaluated on the AD, TDBrain, and PTB datasets. We examine the effectiveness of each contrastive block. Besides, we progressively incorporate each block from the observation-level to all four levels. Here, O, S, R, and P denote the observation, sample, trial, and patient-level contrastive blocks, respectively.
Datasets	Fraction	Blocks	Accuracy	Precision	Recall	F1 score	AUROC	AUPRC
AD	100%	O	81.69±10.71	87.28±5.71	79.64±12.07	78.90±13.78	92.54±4.18	92.36±4.34
S	83.53±2.89	84.35±1.69	82.81±3.56	82.97±3.47	91.01±1.96	90.81±1.95
R	78.58±14.99	83.14±11.60	76.31±16.66	74.53±18.69	85.05±12.74	84.44±13.22
P	72.69±13.13	78.67±11.81	69.74±14.50	67.04±17.27	83.30±13.91	82.57±14.29
S+O	85.70±1.82	86.14±1.63	85.09±2.04	85.35±1.96	92.21±1.40	92.09±1.39
R+S+O	85.57±4.04	88.12±2.58	84.31±4.79	84.73±4.59	93.28±2.52	92.98±2.83
P+R+S+O	84.50±4.46	88.31±2.42	82.95±5.39	83.33±5.15	94.44±2.37	94.43±2.48
10%	O	86.35±9.25	87.09±9.04	85.55±9.92	85.70±10.10	92.62±8.99	92.77±8.72
S	77.30±3.63	78.45±3.75	76.26±3.91	76.36±3.92	85.43±3.61	84.63±3.76
R	77.83±17.59	83.45±14.35	75.41±19.62	72.08±23.45	83.51±16.90	83.27±17.00
P	71.41±15.31	76.91±15.56	68.70±16.46	66.54±17.74	76.11±16.98	76.06±16.19
S+O	82.73±2.05	84.33±2.71	81.51±2.07	81.98±2.11	90.02±2.47	90.02±2.40
R+S+O	91.19±3.14	91.74±3.01	90.70±3.34	90.98±3.25	95.86±2.63	95.86±2.67
P+R+S+O	91.43±3.12	92.52±2.36	90.71±3.56	91.14±3.31	96.44±2.84	96.48±2.82
1%	O	69.56±7.54	71.43±8.04	68.19±7.16	67.83±7.41	77.32±8.69	77.32±8.45
S	59.09±3.50	61.08±4.86	59.83±4.00	58.12±3.57	63.99±6.62	63.33±6.09
R	90.15±13.23	93.83±7.28	89.03±14.88	88.17±16.78	96.22±5.97	96.02±6.28
P	85.57±13.45	90.36±7.16	83.98±15.13	82.72±18.03	94.23±5.82	94.10±5.65
S+O	63.24±3.62	63.52±4.15	63.30±4.26	62.72±4.14	67.98±5.17	67.25±4.97
R+S+O	82.65±4.23	83.21±4.06	82.97±4.58	82.46±4.43	90.07±6.77	90.24±6.56
P+R+S+O	88.22±3.36	88.55±2.73	88.56±3.14	88.14±3.37	96.05±1.36	96.12±1.31
PTB	100%	O	85.27±1.73	84.21±1.25	77.74±4.01	79.78±3.37	88.13±2.23	84.76±2.14
S	84.30±2.56	84.00±2.16	75.68±5.69	77.74±5.13	88.66±2.05	84.80±2.15
R	88.63±1.43	88.42±1.45	82.46±2.35	84.72±2.12	89.29±3.96	86.21±4.96
P	88.85±3.22	88.74±2.30	82.78±6.11	84.75±5.38	94.32±1.81	90.61±2.81
S+O	84.38±2.34	84.33±1.18	75.49±5.69	77.69±4.76	90.37±2.59	86.57±4.32
R+S+O	85.32±1.93	84.82±1.78	77.54±4.58	79.64±3.94	92.34±1.85	88.75±1.98
P+R+S+O	86.36±1.44	87.18±1.28	77.87±2.55	80.79±2.44	93.41±2.35	89.09±1.64
10%	O	86.75±1.44	85.42±2.10	80.88±3.27	82.45±2.29	90.71±3.16	88.84±3.59
S	86.34±0.73	84.75±1.49	80.21±1.78	81.90±1.25	88.36±0.31	85.20±1.17
R	88.12±1.75	86.36±2.28	84.16±3.55	84.80±2.39	91.80±2.50	90.45±1.90
P	90.38±2.23	90.33±2.71	85.69±4.36	87.27±3.45	93.06±3.86	91.83±2.93
S+O	85.84±1.74	84.14±0.76	80.07±5.18	81.14±3.82	90.28±2.75	87.57±3.42
R+S+O	85.88±3.08	83.60±3.61	82.45±1.94	82.48±2.71	90.79±1.79	88.68±1.91
P+R+S+O	90.32±1.61	89.67±1.94	85.85±2.99	87.35±2.36	92.78±1.11	90.46±3.09
1%	O	85.73±1.59	83.79±2.15	79.53±3.14	81.09±2.54	90.15±2.32	88.85±2.64
S	77.63±1.72	72.36±2.41	69.41±2.53	70.38±2.29	79.09±2.21	75.07±1.88
R	86.28±1.97	84.02±2.85	82.06±2.08	82.61±1.97	90.50±0.99	88.32±1.40
P	91.55±2.45	90.28±3.27	88.45±3.22	89.25±3.13	95.12±2.58	94.80±2.04
S+O	81.78±1.07	77.65±1.34	77.17±2.14	77.20±1.43	86.65±2.38	82.12±1.95
R+S+O	80.71±2.28	76.79±2.03	80.51±1.67	77.84±2.13	88.76±1.38	85.00±2.23
P+R+S+O	86.62±3.90	82.99±4.52	85.36±5.73	83.89±4.96	93.78±3.82	91.94±4.96
TDBrain	100%	O	89.92±2.15	90.50±2.07	89.92±2.15	89.89±2.17	96.79±1.29	96.84±1.29
S	77.86±2.85	78.98±2.51	77.86±2.85	77.62±3.01	88.44±2.23	88.96±2.14
R	94.44±1.79	94.60±1.75	94.44±1.79	94.44±1.80	98.39±1.29	98.31±1.46
P	93.18±3.70	93.27±3.67	93.18±3.70	93.18±3.70	97.59±2.01	97.58±2.00
S+O	80.38±4.22	81.59±3.70	80.38±4.22	80.16±4.38	91.35±2.24	91.64±2.05
R+S+O	86.01±4.29	86.35±3.81	86.01±4.29	85.95±4.38	94.14±2.72	94.37±2.58
P+R+S+O	85.47±1.16	85.68±1.20	85.47±1.16	85.45±1.16	93.73±1.02	93.96±0.99
10%	O	85.34±4.38	86.03±3.97	85.34±4.38	85.25±4.48	93.18±3.52	93.24±3.53
S	74.02±2.09	74.62±2.01	74.02±2.09	73.86±2.17	81.92±3.25	81.76±3.42
R	92.96±8.22	93.02±8.20	92.96±8.22	92.96±8.23	96.14±5.80	95.93±6.08
P	89.38±14.69	89.58±14.72	89.38±14.69	89.36±14.69	93.23±11.81	93.52±11.10
S+O	74.92±2.57	76.60±3.07	74.92±2.57	74.54±2.55	84.51±3.07	84.40±3.07
R+S+O	81.90±4.74	83.55±4.02	81.90±4.74	81.61±4.99	91.21±3.52	90.73±3.72
P+R+S+O	79.28±4.64	79.83±4.83	79.28±4.64	79.19±4.62	88.39±4.13	88.38±3.96
1%	O	71.52±7.54	72.17±7.71	71.52±7.54	71.31±7.62	78.32±8.37	77.56±8.91
S	58.62±3.84	59.66±3.95	58.62±3.84	57.39±4.26	62.85±6.38	61.61±6.61
R	85.29±5.93	85.55±5.66	85.29±5.93	85.24±5.99	91.19±4.76	91.11±4.74
P	77.23±3.42	78.10±3.39	77.23±3.42	77.04±3.47	86.12±3.88	85.10±4.11
S+O	61.73±2.97	61.82±2.90	61.71±2.97	61.60±3.07	66.09±2.98	64.94±2.66
R+S+O	72.15±6.26	73.39±7.50	72.15±6.26	71.91±6.12	78.39±7.77	76.97±7.61
P+R+S+O	72.93±7.21	74.20±7.68	72.93±7.21	72.57±7.37	78.72±8.42	77.71±9.10