SlowGuess/NeurIPS_2023_OCR huggingface dataset:
In order to show that the visual analysis in the case study (5.6) is consistent across the patients in our clinical dataset, we plot six groups of t-SNE figures (shown in Fig. 8). In each group, the samples are from the same brain region of two patients, and the patients involved in these six examples include all the patients in the clinical dataset. For each group, the left and right are plotted with the representations before and after channel background subtraction. Overall, in each group of experiments, channel background subtraction shows a similar effect, indicating that the effect of channel background subtraction is consistent across patients.
Figure 8: Six visualization examples as a supplement and improvement to the visual analysis of channel background subtraction.
D.2 Confusion Matrix of Brain Region Enhancement
The confusion matrix of multi-classification on all the patients are shown in Fig. 9. Note that the total number of classes in the confusion matrix is different for different patients. This is because the number and positions of electrodes implanted in each patient are different when the SEEG signal is collected, resulting in different brain regions involved by the SEEG data of different patients, which is also one of the reasons for domain shift.
patient 1
patient 2
patient 3
patient 4
patient 5
patient 6
Figure 9: Confusion matrix of brain region enhancement from the multi-classification results of all patients in the clinical dataset.
Table 5: Average performance with standard deviation of patient-independent seizure detection tasks on MAYO. The v indicates the first in a column,  $\underline{\mathbf{v}}$  indicates the second, and  $*\mathrm{v}$  indicates the third.
Dataset
Model	MAYO
Pre.	Rec.	F1	F2
TCN	CDANN	16.13 ± 5.80	68.14± 4.17	24.74 ± 7.67	37.84 ± 8.74
CORAL	17.01 ± 5.14	64.08 ± 3.97	25.73 ± 6.63	38.30 ± 7.31
GroupDRO	17.26 ± 5.10	64.25 ± 2.32	26.02 ± 6.43	38.68 ± 6.82
MLDG	18.88 ± 4.22	61.38 ± 4.65	27.96 ± 4.92	40.39 ± 4.78
MMD	15.79 ± 4.77	67.41 ± 7.21	24.45 ± 6.28	37.68 ± 7.34
MTL	16.13 ± 4.72	51.87 ± 11.96	22.56 ± 5.11	31.74 ± 5.72
SANDMask	16.47 ± 4.84	*68.66± 12.66	25.00 ± 6.62	38.15 ± 8.64
SD	15.29 ± 5.08	60.70 ± 3.01	23.10 ± 6.38	34.67 ± 6.69
SelfReg	9.42 ± 3.80	58.65 ± 14.87	15.50 ± 5.55	26.29 ± 7.81
TRM	16.94 ± 4.82	59.60 ± 5.18	24.47 ± 5.30	35.67 ± 5.36
VREx	16.74 ± 5.18	60.41 ± 3.59	25.06 ± 6.57	36.87 ± 7.01
IB_ERM	17.27 ± 5.10	64.29 ± 2.30	26.04 ± 6.44	38.71 ± 6.82
IB_IRM	16.75 ± 5.19	60.45 ± 3.60	25.08 ± 6.58	36.90 ± 7.03
MiniRocket	CDANN	16.22 ± 1.94	15.44 ± 8.29	15.14 ± 5.49	15.20 ± 7.20
CORAL	*47.61± 14.14	25.30 ± 9.35	27.57 ± 10.35	25.46 ± 9.55
GroupDRO	41.99 ± 15.59	34.02 ± 13.71	35.98 ± 14.05	34.49 ± 13.70
MLDG	10.32 ± 3.16	50.04 ± 12.47	15.35 ± 5.36	24.70 ± 7.85
MMD	22.34 ± 10.38	21.82 ± 8.95	19.58 ± 6.87	20.33 ± 7.49
MTL	21.67 ± 7.15	46.11 ± 12.08	27.72 ± 7.38	35.03 ± 7.90
SANDMask	4.32 ± 5.24	33.33 ± 0.00	7.40 ± 8.25	13.14 ± 11.81
SD	37.57 ± 7.52	30.90 ± 6.21	32.46 ± 6.00	31.10 ± 5.76
SelfReg	31.09 ± 2.33	14.46 ± 6.28	18.02 ± 6.85	15.65 ± 6.53
TRM	35.97 ± 7.11	40.34 ± 8.15	35.51 ± 5.86	37.15 ± 5.92
VREx	38.63 ± 7.60	33.92 ± 8.63	33.37 ± 6.66	32.88 ± 7.15
IB_ERM	35.02 ± 7.18	43.92 ± 7.49	36.79 ± 6.25	39.62 ± 5.65
IB_IRM	36.27 ± 7.56	43.22 ± 6.55	37.36± 5.92	39.57 ± 4.71
BENDR	23.26 ± 4.23	45.02 ± 8.14	25.90 ± 5.47	30.23 ± 6.01
Franceschi et al.	34.21 ± 4.96	40.98 ± 7.29	33.94 ± 6.33	35.15 ± 6.72
SICR	10.18 ± 6.38	4.56 ± 2.72	6.10 ± 3.75	5.06 ± 3.04
SEEG-Net	45.41± 9.96	45.62 ± 9.56	*43.54± 8.84	*44.22± 8.98
PPI	49.85± 6.93	69.67± 2.82	54.35± 4.72	61.07± 4.69
Table 6: Average performance with standard deviation of patient-independent seizure detection tasks on FNUSA. The v indicates the first in a column,  $\underline{\mathbf{v}}$  indicates the second, and  $*\mathrm{v}$  indicates the third.
Dataset
Model	FNUSA
Pre.	Rec.	F1	F2
TCN	CDANN	32.71 ± 6.42	69.62± 2.77	43.09 ± 5.61	54.88 ± 3.58
CORAL	33.87 ± 6.25	65.46 ± 3.33	43.63 ± 5.78	53.84 ± 4.44
GroupDRO	33.24 ± 6.43	62.14 ± 2.99	41.90 ± 5.24	51.27 ± 3.47
MLDG	32.81 ± 6.61	56.81 ± 2.41	40.41 ± 5.43	48.24 ± 3.71
MMD	32.87 ± 6.48	*69.38± 1.55	43.51 ± 5.98	55.30 ± 4.28
MTL	32.70 ± 6.44	53.10 ± 11.03	38.48 ± 6.63	44.78 ± 7.54
SANDMask	32.16 ± 6.31	59.46 ± 11.63	39.62 ± 5.99	48.59 ± 7.87
SD	34.30 ± 6.11	65.54 ± 1.85	43.77 ± 5.08	53.88 ± 3.16
SelfReg	25.35 ± 7.72	66.75 ± 16.60	35.87 ± 9.95	48.79 ± 12.41
TRM	34.32 ± 6.17	62.26 ± 4.01	43.39 ± 5.10	51.93 ± 3.76
VREx	33.17 ± 6.37	61.75 ± 2.59	41.84 ± 5.25	51.11 ± 3.42
IB_ERM	34.34 ± 6.15	62.94 ± 3.88	42.93 ± 4.93	52.22 ± 3.55
IB_IRM	34.26 ± 6.14	63.06 ± 2.77	43.10 ± 5.05	52.44 ± 3.33
MiniRocket	CDANN	48.73 ± 12.53	36.97 ± 9.74	38.26 ± 6.56	37.02 ± 8.43
CORAL	68.46 ± 7.01	46.55 ± 11.81	52.50 ± 8.63	48.36 ± 10.57
GroupDRO	69.79± 5.37	48.74 ± 11.65	55.31 ± 8.35	50.83 ± 10.35
MLDG	34.67 ± 10.16	63.56 ± 16.37	37.88 ± 5.75	46.75 ± 7.83
MMD	69.33 ± 6.50	46.63 ± 15.10	50.04 ± 8.88	47.06 ± 12.62
MTL	56.85 ± 5.25	59.71 ± 10.71	*56.93± 6.94	58.28± 9.00
SANDMask	12.56 ± 4.47	33.33 ± 4.02	18.14 ± 4.72	24.88 ± 3.59
SD	68.74 ± 11.63	50.59 ± 12.30	53.26 ± 6.88	50.92 ± 10.09
SelfReg	61.18 ± 17.04	33.26 ± 11.38	39.29 ± 10.66	34.99 ± 10.86
TRM	66.32 ± 12.14	53.63 ± 12.07	53.50 ± 5.78	52.68 ± 9.35
VREx	65.23 ± 9.83	55.20 ± 9.33	54.34 ± 5.36	53.91 ± 7.58
IB_ERM	66.34 ± 12.17	53.41 ± 12.38	53.17 ± 5.82	52.40 ± 9.57
IB_IRM	64.67 ± 11.99	54.02 ± 11.29	53.69 ± 5.41	53.00 ± 8.55
BENDR	40.45 ± 7.02	37.22 ± 6.44	34.42 ± 6.23	34.01 ± 6.10
Franceschi et al.	43.28 ± 5.90	50.56 ± 8.39	44.03 ± 7.11	48.97 ± 7.68
SICR	23.51 ± 14.12	7.16 ± 5.66	9.79 ± 7.87	8.01 ± 6.37
SEEG-Net	*69.39± 9.23	53.75 ± 7.62	60.02± 8.05	*55.99± 7.73
PPI	71.73± 4.06	70.81± 2.14	70.61± 2.82	70.55± 2.28
Table 7: Average performance with standard deviation of patient-independent seizure detection tasks on clinical dataset. The v indicates the first in a column,  $\underline{\mathbf{v}}$  indicates the second, and  $*\mathrm{v}$  indicates the third.
Dataset
Model	Clinical
Pre.	Rec.	F1	F2
TCN	CDANN	1.42 ± 0.51	44.20 ± 13.85	2.72 ± 0.98	6.08 ± 2.21
CORAL	1.59 ± 0.64	47.24 ± 2.12	3.03 ± 1.20	6.64 ± 2.53
GroupDRO	1.53 ± 0.60	47.13 ± 1.40	2.91 ± 1.12	6.35 ± 2.35
MLDG	28.85 ± 9.34	6.68 ± 3.92	2.55 ± 0.58	2.58 ± 0.89
MMD	1.90 ± 0.70	46.84 ± 8.69	3.26 ± 1.16	6.59 ± 2.52
MTL	1.43 ± 0.56	9.19 ± 0.59	2.30 ± 0.85	3.73 ± 1.18
SANDMask	1.34 ± 0.34	*47.22 ± 4.77	2.60 ± 0.65	5.95 ± 1.40
SD	1.52 ± 0.60	46.46 ± 3.56	2.91 ± 1.13	6.38 ± 2.38
SelfReg	0.92 ± 0.62	44.48 ± 5.04	1.76 ± 1.18	3.94 ± 2.52
TRM	1.53 ± 0.60	47.34 ± 1.42	2.91 ± 1.12	6.35 ± 2.35
VREx	10.98 ± 5.60	42.17 ± 8.25	2.78 ± 0.67	5.33 ± 1.25
IB_ERM	1.53 ± 0.60	47.34 ± 1.42	2.91 ± 1.12	6.35 ± 2.35
IB_IRM	1.52 ± 0.60	45.65 ± 2.69	2.89 ± 1.13	6.31 ± 2.38
MiniRocket	CDANN	2.09 ± 0.83	45.27 ± 15.67	3.98 ± 1.58	8.68 ± 3.47
CORAL	1.68 ± 0.66	42.54 ± 19.84	3.20 ± 1.30	7.08 ± 3.04
GroupDRO	1.37 ± 0.62	46.95 ± 7.15	2.64 ± 1.19	6.03 ± 2.63
MLDG	0.52 ± 0.91	15.58 ± 21.61	1.01 ± 1.75	2.29 ± 3.92
MMD	5.10 ± 5.16	39.97 ± 19.12	3.95 ± 1.19	7.55 ± 2.90
MTL	12.57 ± 9.03	45.79 ± 15.03	4.02 ± 3.79	5.15 ± 2.87
SANDMask	1.49 ± 2.48	44.87 ± 10.27	2.59 ± 4.19	4.73 ± 7.06
SD	6.40 ± 2.66	39.73 ± 14.38	9.43 ± 4.26	15.29 ± 7.22
SelfReg	16.33 ± 6.81	42.06 ± 14.84	*14.51 ± 8.98	16.61 ± 8.87
TRM	5.00 ± 3.44	33.31 ± 11.40	7.81 ± 5.22	12.51 ± 7.75
VREx	7.47 ± 4.73	44.50 ± 10.18	11.37 ± 6.68	*17.11 ± 8.94
IB_ERM	4.94 ± 2.78	43.01 ± 13.13	8.12 ± 4.46	13.79 ± 7.10
IB_IRM	8.56 ± 5.49	44.63 ± 11.52	11.18 ± 6.41	15.06 ± 7.38
BENDR	2.48 ± 0.91	28.99 ± 6.80	3.58 ± 1.44	5.79 ± 2.33
Franceschi et al.	2.62 ± 1.02	44.74 ± 8.79	4.26 ± 2.03	9.65 ± 3.91
SICR	*25.34± 15.68	29.22 ± 20.08	9.19 ± 4.89	9.80 ± 4.41
SEEG-Net	20.06 ± 5.56	32.81 ± 8.50	20.82± 5.70	22.92± 5.96
PPI	29.76± 5.45	47.59± 5.16	30.92± 3.45	35.51± 2.35