SlowGuess/NeurIPS_2023_OCR huggingface dataset:
We use the Adam optimizer with a learning rate of  $10^{-3}$  for Chambon and  $10^{-4}$  with a weight decay of  $1 \times 10^{-3}$  for DeepSleepNet. The batch size is set to 128 and the early stopping is done on a validation set corresponding to  $20\%$  of the subjects in the training set with a patience of 10 epochs. For all methods, we optimize the cross entropy with class weight, which amounts to optimizing for the balanced accuracy (BACC).
Various metrics are commonly used in the field such as Cohen's kappa, F1-score, or Balanced Accuracy (BACC) [36, 6]. We report here the BACC score as it is a metric well adapted to unbalanced classification tasks such as sleep staging. We also report in some experiments the gain the balanced accuracy, when using CMMN, of the  $20\%$  worst performing domains/subjects in the target domain denoted as  $\Delta$  BACC@20 in the following.
$^{2}$ https://github.com/PythonOT/convolitional-monge-mapping-normalization
Datasets \Norm.	None [7]	Sample [6]	Session [5]	CMMN
MASS→MASS	73.9 ± 1.4	75.1 ± 1.0	76.0 ± 2.4	76.2 ± 2.2
Phys.→Phys.	68.8 ± 2.8	69.2 ± 2.7	69.4 ± 3.0	71.7 ± 2.4
SHHS→SHHS	55.1 ± 12.5	61.2 ± 3.8	60.8 ± 2.6	64.3 ± 2.7
MASS→Phys.	55.9 ± 3.1	58.4 ± 2.4	57.5 ± 2.0	62.3 ± 1.5
MASS→SHHS	45.8 ± 3.3	41.8 ± 3.6	37.4 ± 3.6	47.6 ± 4.0
Phys.→MASS	63.8 ± 3.9	64.0 ± 2.7	63.7 ± 2.3	68.3 ± 2.5
Phys.→SHHS	53.9 ± 3.2	45.6 ± 2.1	47.9 ± 1.8	51.6 ± 1.8
SHHS→MASS	48.7 ± 4.8	57.0 ± 2.8	51.8 ± 6.4	64.5 ± 2.8
SHHS→Phys.	52.6 ± 4.2	55.0 ± 2.7	52.4 ± 4.1	58.3 ± 1.7
Mean	57.6 ± 4.3	58.6 ± 2.6	57.4 ± 3.1	62.7 ± 2.4
Table 1: Balanced accuracy (BACC) for different normalizations and different train/test dataset pairs (left). Boxplot for all normalization approaches on the specific pair SHHS  $\rightarrow$  MASS (right). CMNN outperforms other normalizations.
Filter size and sensitivity analysis for CMMN Our method has a unique hyperparameter that is the size of the filter  $F$  used. In our experiments, we observed that, while this parameter has some impact, it is not critical and has quite a wide range of values ([8, 512]) that leads to systematic performance gains. We provide in supplementary material a sensitivity analysis of the performance for different adaptation scenarios (pairs of datasets). It shows that the value  $F = 128$  is a good trade-off that we used below for all experiments.
4.2 Comparison between different normalizations
We now evaluate the ability of CMMN to adapt to new subjects within and across datasets and also between two sessions of the same subject.
Classical normalizations We first compare CMMN to several classical normalization strategies. We compare the use of raw data [7] letting the neural network learn the normalization from the data (None), standard normalization of each 30 s samples [6] that discard global trend along the session (Sample) and finally normalization by session that consists in our case to perform normalization independently on each domain (Session) [5]. We train the Chambon neural network on the source data of one dataset and evaluate on the target data of all other datasets for different splits.
The BACC for all dataset pairs and normalization are presented in the Table 1. The three classical normalizations have similar performances with a slight edge for Sample on average. All those approaches are outperformed by CMMN in 8 out of 9 dataset pairs with an average gain of  $4\%$  w.r.t. the best performing Sample. This is also visible on the Boxplot on the right where the BACC for all subjects/domains (i.e., points) is higher for CMMN. Since the very simple Sample normalization is the best-performing competitor, we used it as a baseline called No Adapt in the following.
Domain specific normalization We have shown above that the CMMN approach allows to better cope with distribution shifts than standard data normalizations. This might be explained by the fact that CMMN normalization is domain/subject specific. This is why we now compare to several existing domain-specific normalizations. To do this we adapt the method of Liu et al. [11] which was designed for image classification. We implemented domain-specific convolution layers (Conv), batch normalization (Norm), or both (ConvNorm). In practice, we have one layer per domain that is trained (jointly with the predictor  $f$ ) only on data from the corresponding domain. The limit of domain-specific normalization is that all test domains must be represented in the training set. Otherwise, if a new domain arrives in the test set, no layer specific to that domain will have been trained.
To be able to compare these methods to CMMN, we use for this section the Physionet dataset for which two sessions are available for some subjects. The first sessions are considered as the training set where the domains are the subjects and the second sessions are split between the validation set (20%) and the test set (80%). The validation set is used to do the early stopping, and validate the kernel size of the subject-specific convolution for Conv and ConvNorm.
We can see in Table 2 that for cross-session adaptation, the gain with CMMN is smaller than previous results (1% BACC gain), which can be explained by the presence of subjects data in both domains resulting in a smaller shift between distribution. However, CMMN outperforms all other subject-specific normalizations which are struggling to improve the results (i.e., around 4% of BACC loss).
Normalization	BACC
No Adapt	73.7 ± 0.7
Conv [11]	67.5 ± 2.7
Norm [11]	69.4 ± 1.6
ConvNorm [11]	68.1 ± 1.3
CMMN	74.8 ± 0.6
BACC for between session of Physionet's subjects
Table 2: Balanced accuracy (BACC) for different subject-specific normalizations and CMMN (left). Boxplot for all normalization approaches (right). CMNN outperforms subject-specific normalizations.
Architecture	Chambon [6]	DeepSleepNet [7]
No Adapt	CMMN	No Adapt	CMMN
MASS→MASS	75.1 ± 1.0	76.2 ± 2.2	73.3 ± 1.7	73.1 ± 2.6
Phys.→Phys.	69.2 ± 2.7	71.7 ± 2.4	66.5 ± 2.5	69.4 ± 2.5
SHHS→SHHS	61.2 ± 3.8	64.3 ± 2.7	58.7 ± 2.3	60.1 ± 3.5
MASS→Phys.	58.4 ± 2.4	62.3 ± 1.5	50.1 ± 2.4	54.5 ± 1.2
MASS→SHHS	41.8 ± 3.6	47.6 ± 4.0	38.3 ± 2.6	47.8 ± 2.4
Phys.→MASS	64.0 ± 2.7	68.3 ± 2.5	59.5 ± 1.0	62.1 ± 1.9
Phys.→SHHS	45.6 ± 2.1	51.6 ± 1.8	45.2 ± 2.2	48.6 ± 1.6
SHHS→MASS	57.0 ± 2.8	64.5 ± 2.8	51.2 ± 5.9	56.8 ± 6.1
SHHS→Phys.	55.0 ± 2.7	58.3 ± 1.7	48.6 ± 5.8	54.7 ± 6.8
Mean	58.6 ± 2.6	62.7 ± 2.4	54.6 ± 2.9	58.6 ± 3.2
Table 3: Balanced accuracy (BACC) for different train/test dataset pairs and for different architectures (Chambon/DeepSleepNet). CMMN works independently of the network architecture.
4.3 Study of the performance gain: neural architecture and human subjects
Previous experiments have shown the superiority of CMMN over all the other normalizations. In this section, we study the behavior of CMMN on different neural network architectures and study which subject gains the most performance gain.
Performance of CMMN with different architectures In addition to Chambon that was used in the previous experiments, we now evaluate CMMN considering a different network architecture: DeepSleepNet [7]. The results for both architectures are reported in Table 3, where CMMN is consistently better for both architectures. Notably, the only configuration where the gain is limited is MASS  $\rightarrow$  MASS with DeepSleepNet because MASS is the easiest dataset with less variability than other pairs. Finally, we were surprised to see that DeepSleepNet does not perform as well as Chambon on cross-dataset adaptation, probably due to overfitting caused by a more complex architecture.
Performance gain on low-performing subjects In medical applications, it is often more critical to have a model that has a low failure mode, rather than the best average accuracy. As a first step toward studying this, we report two scatter plots reported in Table 4 plotting the BACC for individual target subjects without adaptation as a function of the BACC with CMMN, for different architectures and dataset pairs. First, the majority of the subjects are above the axis  $x = y$ , which means that CMMN improves their score. But the most interesting finding is the large improvement for the low-performing subjects that can gain from 0.3 to 0.65 BACC.
We also provide in Table 4 the  $\Delta$  BACC@20, that is the average BACC gain on the  $20\%$  lowest performing subjects without adaptation. On average, both architectures increase by  $7\%$  the BACC on those subjects, when it is only increased by  $4\%$  for all subjects. Some  $\Delta$  BACC@20 are even greater
Archi	Chambon [6]	DeepSleepNet [7]
MASS→MASS	3.3 ± 3.6	1.8 ± 3.8
MASS→Phys.	6.4 ± 4.1	9.7 ± 2.5
MASS→SHHS	7.5 ± 2.8	11.7 ± 2.6
Phys.→MASS	6.9 ± 2.8	3.6 ± 2.1
Phys.→Phys.	5.9 ± 3.0	6.9 ± 4.5
Phys.→SHHS	7.6 ± 4.6	4.5 ± 1.7
SHHS→MASS	15.0 ± 5.3	9.5 ± 6.8
SHHS→Phys.	6.5 ± 3.4	9.9 ± 6.3
SHHS→SHHS	4.2 ± 3.7	3.6 ± 4.0
Mean	7.0 ± 3.7	6.8 ± 3.8
Table 4:  $\Delta$ BACC@20 for different train/test dataset pairs and for different architectures (Chambon/DeepSleepNet) (left). Scatter plot of balanced accuracy (BACC) with No Adapt as a fuction of BACC with CMMN and the dataset pair SHHS  $\rightarrow$  MASS with Chambon (center) and on the dataset pair MASS  $\rightarrow$  Physionet with DeepSleepNet (right). CMMN leads to a big performance boost on the low-performing subjects.
Adapt	BACC	ΔBACC@20
No Adapt	DANN	CMMN	CMMN+DANN	DANN	CMMN	CMMN+DANN
MASS->Phys.	59.2 ± 6.1	60.9 ± 1.0	62.9 ± 0.8	62.9 ± 1.2	2.0 ± 5.9	5.3 ± 5.8	5.5 ± 6.2
MASS->SHHS	44.5 ± 6.0	44.3 ± 2.1	50.3 ± 4.2	49.9 ± 1.9	4.2 ± 7.1	7.6 ± 2.9	10.4 ± 5.9
Phys.-MASS	65.3 ± 1.4	65.2 ± 0.7	68.9 ± 1.0	69.1 ± 1.0	0.4 ± 1.3	6.3 ± 2.0	5.6 ± 2.7
Phys.-SHHS	43.1 ± 6.3	45.4 ± 2.6	50.0 ± 4.3	49.9 ± 2.4	2.8 ± 5.3	8.2 ± 5.7	9.7 ± 6.1
SHHS->MASS	59.9 ± 3.4	59.4 ± 1.1	66.5 ± 2.5	66.3 ± 0.9	0.4 ± 2.8	13.4 ± 3.0	12.6 ± 2.7
SHHS->Phys.	57.1 ± 3.9	57.2 ± 2.2	61.6 ± 3.1	59.4 ± 2.6	4.1 ± 3.7	10.0 ± 6.9	10.9 ± 5.7
Mean	54.9 ± 4.5	55.4 ± 1.6	60.0 ± 2.7	59.6 ± 1.7	2.3 ± 4.4	8.5 ± 4.4	9.1 ± 4.9
Table 5: Balanced accuracy (BACC) and  $\Delta$  BACC@20 for different train/test dataset pairs and for different adaptation methods. CMMN outperforms DANN and CMMN+DANN on average on all subjects. Combining CMMN DANN improves the lower-performing subjects.
than  $10\%$  on some dataset pairs. These results show the consistency of the method on all subjects but also the huge impact on the more challenging ones.
4.4 Complementarity of CMMN with Domain Adaptation
We have shown in the previous experiments that CMMN is clearly the best normalization in many settings. But the main idea of CMMN is to adapt the raw signals to a common barycentric domain. Interestingly, many Domain Adaptation (DA) methods also try to reduce the discrepancies between datasets by learning a feature representation that is invariant to the domain. In this section, we compare the two strategies and investigate if they are complementary.
We implement the celebrated DA method DANN [18] that aims at learning a feature representation that is invariant to the domain using an adversarial formulation. Note that this DA approach is much more complex than CMMN because it requires to have access to the target data during training and a model needs to be trained for each new target domain. The choice of hyperparameters for DA methods is not trivial in the absence of target labels. But since we have access to several target domains, we propose to select the weight parameters for DANN using a validation on  $20\%$  of the target subjects [43]. Note that this is not a realistic setting since in real applications the target domains are usually not labeled, yet it is a way to compare the two approaches in a configuration favorable for DA. We focus on cross-dataset adaptation where many shifts are known to exist: different sensors (SHHS vs Physionet/MASS), doctor scoring criteria (SHHS/MASS vs Physionet), or brain activity (SHHS vs MASS vs Physionet).
We report in Table 5 the BACC and  $\Delta$ BACC@20 for all dataset pairs and all combinations of CMMN and DANN with Chambon. First, we can see that the best approaches are clearly CMMN and CMMN+DANN. CMMN is better in BACC on 4/6 dataset pairs and CMMN+DANN is better in  $\Delta$ BACC@20 on 4/6 dataset pairs. First, it is a very impressive performance for CMMN that is much simpler than DANN and again does not use target data when learning the predictor  $f$ . But it also illustrates the interest of CMMN+DANN especially for low-performing subjects.
Table 6: BACC for different PSD targets for the mapping.
Target PSD	None	Barycenter	Powerlaw	Whitening
MASS→MASS	75.1 ± 1.0	77.1 ± 1.3	75.6 ± 2.4	73.2 ± 6.4
MASS→Physionet	58.4 ± 2.4	62.6 ± 2.0	63.1 ± 1.5	63.2 ± 1.0
MASS→SHHS	41.8 ± 3.6	50.4 ± 8.0	51.9 ± 3.0	52.4 ± 2.4
Physionet→MASS	64.0 ± 2.7	68.0 ± 1.5	66.7 ± 2.5	65.9 ± 2.6
Physionet→Physionet	69.2 ± 2.7	72.3 ± 1.8	66.9 ± 16.5	71.3 ± 1.9
Physionet→SHHS	45.6 ± 2.1	52.5 ± 1.9	53.9 ± 1.7	54.0 ± 2.4
SHHS→MASS	57.0 ± 2.8	65.9 ± 3.2	59.0 ± 13.9	59.0 ± 13.8
SHHS→Physionet	55.0 ± 2.7	62.0 ± 3.2	56.5 ± 13.1	55.9 ± 12.8
SHHS→SHHS	61.2 ± 3.8	63.5 ± 3.2	63.6 ± 2.6	62.4 ± 2.8
Mean	58.6 ± 2.6	63.8 ± 2.9	61.9 ± 6.4	61.9 ± 5.1
4.5 Different PSD targets
CMMN has shown a significant boost in performance for different adaptations in various settings. The method consists of learning a barycenter, and mapping all domains to this barycenter to obtain a homogeneous frequency spectrum. Mapping to the barycenter is one way to achieve this, but it is reasonable to evaluate the optimality of this choice by comparing to alternatives. For example, the classical method called spectral whitening is equivalent to OT mapping towards a uniform PSD, which is equivalent to a white noise PSD. In this part, we propose to compare the mapping to different PSD targets: barycenter (classic CMMN), white noise PSD (whitening), or a non-uniform power-law. The last PSD target is a mathematical distribution that describes a functional relationship between frequency and magnitude, where magnitude is inversely proportional to the power of the frequency  $P(f) = af^{a - 1}$ . Below we selected  $a = 0.659$  for the experiment.
The table Table 6 gives the BACC score of the mapping for the different PSD targets and shows the importance of the reference PSD. First, we can see that mapping to a PSD increases the score significantly w.r.t. to raw data. Second, the mapping to the Wasserstein barycenter (i.e., CMMN) is not always the better performer (only 5/9), but overall, CMMN gives better results (2% higher) and with less variance. The robustness of the chosen PSD target, coupled with the fast computation of the barycenter, makes CMMN a strong and easy-to-compute normalization method for time series.
We proposed in this paper a novel approach for the normalization of bio-signalsthat can adapt to the spectral specificities of each domain while being a test-time adaptation method that does not require retraining a new model. The method builds on a new closed-form solution for computing Wasserstein barycenters on stationary Gaussian random signals. We showed that this method leads to a systematic performance gain on different configurations of data shift (between subjects, between sessions, and between datasets) and on different architectures. We also show that CMMN benefits greatly the subjects that had bad performances when trained jointly without sacrificing performance on the well-predicted subjects. Finally, we show that CMMN even outperforms DA methods and can be used in conjunction with DA for even better results.
Future work will investigate the use of CMMN for other biomedical applications and study the use of the estimated filters  $\mathbf{h}_k$  as vector representations of the subjects that can be used for interpretability. Finally, we believe that a research direction worth investigating is the federated estimation of CMMN with the objective of learning an unbiased estimator in the context of differential privacy [44, 45].
The authors thank Antoine Collas, Cédric Allain, and Nicolas Courty for their valuable comments on the manuscript, and Lina Dalibard for her help with Figure 1. Numerical computation was enabled by the scientific Python ecosystem: NumPy [46], SciPy [47], Matplotlib [48], Seaborn [49], PyTorch [50], and MNE for EEG data processing [40]. This work was partly supported by the grants ANR-20-CHIA-0016 and ANR-20-IADJ-0002 and ANR-23-ERCC-0006-01 from Agence nationale de la recherche (ANR).
[1] S. Stevens and G. Clark, "Chapter 6 - polysomnography," in *Sleep Medicine Secrets*, D. STEVENS, ed., pp. 45-63. Hanley & Belfus, 2004.
[2] C. O'Reilly, N. Gosselin, and J. Carrier, “Montreal archive of sleep studies: an open-access resource for instrument benchmarking and exploratory research,” Journal of sleep research 23 (06, 2014).
[3] A. L. Goldberger, L. A. Amaral, L. Glass, J. M. Hausdorff, P. C. Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H. E. Stanley, "PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals," circulation 101 no. 23, (2000) e215-e220.
[4] G.-Q. Zhang, L. Cui, R. Mueller, S. Tao, M. Kim, M. Rueschman, S. Mariani, D. Mobley, and S. Redline, “The national sleep research resource: Towards a sleep data commons,” Journal of the American Medical Informatics Association (08, 2018) 572–572.
[5] A. Apicella, F. Isgrò, A. Pollastro, and R. Prevete, “On the effects of data normalisation for domain adaptation on EEG data,” arXiv:2210.01081 [cs.LG].
[6] S. Chambon, M. Galtier, P. Arnal, G. Wainrib, and A. Gramfort, “A deep learning architecture for temporal sleep stage classification using multivariate and multimodal time series,” arXiv:1707.03321 [stat.ML].
[7] A. Supratak, H. Dong, C. Wu, and Y. Guo, “DeepSleepNet: A model for automatic sleep stage scoring based on raw single-channel EEG,” IEEE Transactions on Neural Systems and Rehabilitation Engineering 25 no. 11, nov1998–2008.
[8] M. Perslev, S. Darkner, L. Kempfner, M. Nikolic, P. Jennum, and C. Igel, “U-Sleep: resilient high-frequency sleep staging,” npj Digital Medicine 4 (04, 2021) 72.
[9] Y. Li, N. Wang, J. Shi, J. Liu, and X. Hou, "Revisiting batch normalization for practical domain adaptation," arXiv preprint arXiv:1603.04779 (2016).
[10] O. Chehab, A. Defossez, J.-C. Loiseau, A. Gramfort, and J.-R. King, "Deep recurrent encoder: A scalable end-to-end network to model brain signals," arXiv:2103.02339 [q-bio.NC].
[11] S. Liu, X. Li, Y. Zhai, C. You, Z. Zhu, C. Fernandez-Granda, and Q. Qu, "Convolutional normalization: Improving deep convolutional network robustness and training," arXiv:2103.00673 [cs.CV].
[12] X. Wei, A. A. Faisal, et al., “2021 BEETL competition: Advancing transfer learning for subject independence and heterogenous eeg data sets,” in Proceedings of the NeurIPS 2021 Competitions and Demonstrations Track, D. Kiela, M. Ciccone, and B. Caputo, eds., vol. 176 of Proceedings of Machine Learning Research, pp. 205–219. PMLR, 06–14 dec, 2022.
[13] R. Csaky, M. V. Es, O. P. Jones, and M. Woolrich, “Group-level brain decoding with deep learning,” arXiv:2205.14102 [cs.LG].
[14] R. J. Kobler, J. ichiro Hirayama, Q. Zhao, and M. Kawanabe, "SPD domain-specific batch normalization to crack interpretable unsupervised domain adaptation in EEG," arXiv:2206.01323 [cs.LG].
[15] H. Phan, E. Heremans, O. Y. Chén, P. Koch, A. Mertins, and M. De Vos, “Improving automatic sleep staging via temporal smoothness regularization,” in ICASSP 2023 - 2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 1-5. 2023.
[38] J. B. Stephansen, A. N. Olesen, et al., “Neural network analysis of sleep stages enables efficient diagnosis of narcolepsy,” Nature Communications 9 no. 1, (Dec, 2018).
[39] S. Appelhoff, M. Sanderson, et al., "MNE-BIDS: Organizing electrophysiological data into the BIDS format and facilitating their analysis," Journal of Open Source Software 4 no. 44, (2019) 1896.
[40] A. Gramfort, M. Luessi, et al., “MEG and EEG data analysis with MNE-Python,” Frontiers in Neuroscience 7 no. 267, (2013) 1-13.
[41] E. Eldele, Z. Chen, C. Liu, M. Wu, C.-K. Kwoh, X. Li, and C. Guan, "An attention-based deep learning approach for sleep stage classification with single-channel EEG," IEEE Transactions on Neural Systems and Rehabilitation Engineering 29 (2021) 809-818.
[42] R. T. Schirrmeister, J. T. Springenberg, L. D. J. Fiederer, M. Glasstetter, K. Eggensperger, M. Tangermann, F. Hutter, W. Burgard, and T. Ball, "Deep learning with convolutional neural networks for EEG decoding and visualization," Human Brain Mapping (Aug, 2017).
[43] T. Salvador, K. Fatras, I. Mitliagkas, and A. Oberman, "A reproducible and realistic evaluation of partial domain adaptation methods," arXiv:2210.01210 [cs.CV].
[44] K. Wei, J. Li, M. Ding, C. Ma, H. H. Yang, F. Farokhi, S. Jin, T. Q. Quek, and H. V. Poor, "Federated learning with differential privacy: Algorithms and performance analysis," IEEE Transactions on Information Forensics and Security 15 (2020) 3454-3469.
[45] P. Kairouz, H. B. McMahan, et al., "Advances and open problems in federated learning," Foundations and Trends® in Machine Learning 14 no. 1-2, (2021) 1-210.
[46] C. R. Harris, K. J. Millman, et al., "Array programming with NumPy". https://www.nature.com/articles/s41586-020-2649-2. Number: 7825 Publisher: Nature Publishing Group.
[47] P. Virtanen, R. Gommers, et al., "SciPy 1.0: fundamental algorithms for scientific computing in python", https://www.nature.com/articles/s41592-019-0686-2. Number: 3 Publisher: Nature Publishing Group.
[48] J. D. Hunter, "Matplotlib: A 2d graphics environment", Conference Name: Computing in Science & Engineering.
[49] M. L. Waskom, "seaborn: statistical data visualization," https://joss.theoj.org/papers/10.21105/joss.03021.
[50] A. Paszke, S. Gross, et al., "PyTorch: An imperative style, high-performance deep learning library," in Advances in Neural Information Processing Systems, vol. 32. Curran Associates, Inc. https://proceedings.neurips.cc/paper/2019/bit/ bdbca288fee7f92f2bfa9f7012727740-Abstract.html.
[51] J. A. Hobson, "A manual of standardized terminology, techniques and scoring system for sleep stages of human subjects: A. Rechtschaffen and A. Kales (editors). (public health service, u.s. government printing office, washington, d.c., 1968, 58 p., $4.00)," Electroencephalography and Clinical Neurophysiology 26 (1969) 644.
[52] C. Iber, S. Ancoli-Israel, A. Chesson, and S. Quan, “The AASM manual for the scoring of sleep and associated events: Rules, terminology and technical specifications,” Westchester, IL: American Academy of Sleep Medicine (01, 2007).
A.1 Proof of the convolutional Wasserstein barycenter
PROOF. Consider  $K$  centered stationary Gaussian signals of covariance  $\pmb{\Sigma}_k\mathbf{p}_k$  (respectively PSD  $\mathbf{p}_k$ ) with  $k\in [K]$ , the Wasserstein barycenter of the  $K$  signals is a centered stationary Gaussian signal of PSD  $\bar{\mathbf{p}}$  with:
$$
\bar {\boldsymbol {\Sigma}} = \frac {1}{K} \sum_ {k = 1} ^ {K} \left(\bar {\boldsymbol {\Sigma}} ^ {\frac {1}{2}} \boldsymbol {\Sigma} _ {k} \bar {\boldsymbol {\Sigma}} ^ {\frac {1}{2}}\right) ^ {\frac {1}{2}} \tag {8}
$$
The signals are supposed to be stationary. Therefore the covariance matrix is a Toeplitz circulant matrix. The circulant matrix can be diagonalized by the Discrete Fourier Transform (DFT)  $\Sigma = \mathbf{F}\mathrm{diag}(\mathbf{p})\mathbf{F}^*$ , with  $\mathbf{F}$  and  $\mathbf{F}^*$  the Fourier transform operator and its inverse, and  $\mathbf{p}$  the Power Spectral Density (PSD) of the signal. The above equation becomes:
$$
\bar {\mathbf {p}} = \frac {1}{K} \sum_ {k = 1} ^ {K} \left(\bar {\mathbf {p}} ^ {\odot \frac {1}{2}} \odot \mathbf {p} _ {k} \odot \bar {\mathbf {p}} ^ {\odot \frac {1}{2}}\right) ^ {\odot \frac {1}{2}} \tag {9}
$$
The matrix square root and the inverse become element-wise square root and inverse. The equation becomes easier, and the term can be managed to isolate  $\bar{\mathbf{p}}$ :
$$
\bar {\mathbf {p}} = \frac {1}{K} \sum_ {k = 1} ^ {K} \left(\bar {\mathbf {p}} ^ {\odot \frac {1}{2}} \odot \mathbf {p} _ {k} \odot \bar {\mathbf {p}} ^ {\odot \frac {1}{2}}\right) ^ {\odot \frac {1}{2}}
$$
$$
\bar {\mathbf {p}} = \frac {1}{K} \sum_ {k = 1} ^ {K} \bar {\mathbf {p}} ^ {\odot \frac {1}{2}} \odot \mathbf {p} _ {k} ^ {\odot \frac {1}{2}}
$$