SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Figure 2: Left: Sample paths generated from the time-dependent OU process and synthetic paths from PCF-GAN. Right: The marginal distribution comparison at  $t \in \{10, 20, 30, 40, 50, 60\}$ .
4.2 PCF-GAN: learning with PCFD and sequential embedding
In order to effectively learn the distribution of high-dimensional or complex time series, using solely the EPCF loss as the GAN discriminator fails to be the best approach, due to the computational limitations imposed by the sample size  $k$  and the order  $m$  of EPCFD. To overcome this issue, we adopt the approach [41, 25], and train a generator that matches the distribution of the embedding of time series via the auto-encoder structure. Figure 3 illustrates the mechanics of our model.
To proceed, let us first recall the generator  $G_{\theta_g} : \mathcal{Z} \to \mathcal{X}$  and introduce the embedding layer  $F_{\theta_f}$  which maps  $\mathcal{X}$  to  $\mathcal{Z}$  (the noise space). Here  $\theta_f$  is the model parameters of the embedding layer and will be learned from data. To this end, it is natural to optimize the model parameters  $\theta_g$  of the generator by minimising the generative loss  $L_{\mathrm{generator}}$ , which is the EPCFD distance of the embedding between true distribution  $\mathbf{X}$  and synthetic distribution  $G_{\theta_g}(\mathbf{Z})$ ; in formula,
$$
L _ {\text {g e n e r a t o r}} \left(\theta_ {g}, \theta_ {M}, \theta_ {f}\right) = \operatorname {E P C F D} _ {\theta_ {M}} \left(F _ {\theta_ {f}} \left(G _ {\theta_ {g}} (\mathbf {Z})\right), F _ {\theta_ {f}} (\mathbf {X})\right)). \tag {7}
$$
Encoder  $(F_{\theta_f})$  -decoder  $(G_{\theta_g})$  structure: The motivation to consider the auto-encoder structure is based on the observation that the embedding might be degenerated when optimizing  $L_{\mathrm{generator}}$ . For example, no matter whether true and synthetic distribution agrees or not,  $F_{\theta_f}$  could be simply a constant function to achieve the perfect generator loss 0. Such a degeneracy can be prohibited if  $F_{\theta_f}$  is injective. In heuristic terms, the "good" embedding should capture essential
Figure 3: Visualization of the PCF-GAN architecture
information about real time series of  $\mathbf{X}$  and allows the reconstruction of time series  $\mathbf{X}$  from its embedding  $F_{\theta_f}(\mathbf{X})$ . This motivates us to train the embedding  $F_{\theta_f}$  such that  $F_{\theta_f} \circ G_{\theta_g}$  is close to the identity map. If this condition is satisfied, it implies that  $F_{\theta_f}$  and  $G_{\theta_g}$  are pseudo-inverses of each other, thereby ensuring the desired injectivity. In this way,  $F_{\theta_f}$  and  $G_{\theta_g}$  serve as the encoder and decoder of raw data, respectively.
To impose the injectivity of  $F_{\theta_f}$ , we consider two additional loss functions for training  $\theta_f$  as follows:
Reconstruction loss  $L_{\mathrm{recovery}}$ : It is defined as the  $l^2$  samplewise distance between the original and reconstructed noise by  $F_{\theta_f} \circ G_{\theta_g}$ , i.e.,  $L_{\mathrm{recovery}} = \mathbb{E}[|Z - F_{\theta_f}(G_{\theta_g}(\mathbf{Z}))|^2]$ . Note that  $L_{\mathrm{recovery}} = 0$  implies that  $F_{\theta_f}(G_{\theta_g}(\mathbf{z})) = \mathbf{z}$ , for any sample  $\mathbf{z}$  in the support of  $\mathbf{Z}$  almost surely.
Regularization loss  $L_{\mathrm{regularization}}$ : It is proposed to match the distribution of the original noise variable  $\mathbf{Z}$  and embedding of true distribution  $\mathbf{X}$ . It is motivated by the observation that if the perfect generator  $G_{\theta}(\mathbf{Z}) = \mathbf{X}$  and  $F_{\theta_f} \circ G_{\theta_g}$  is the identity map, then  $\mathbf{Z} = F_{\theta_f}(\mathbf{X})$ . Specifically,
$$
L _ {\text {r e g u l a r i z a t i o n}} = \operatorname {E P C F D} _ {\theta_ {M} ^ {\prime}} \left(\mathbf {Z}, F _ {\theta_ {f}} (\mathbf {X})\right), \tag {8}
$$
where we distinguish  $\theta_M^\prime$  from  $\theta_{M}$  in  $L_{\mathrm{generator}}$ . The regularization loss effectively stabilises the training and resolves the mode collapse [41] due to the lack of infectivity of the embedding.
Training the embedding parameters  $\theta_{f}$ : The embedding layer  $F_{\theta_f}$  aims to not only discriminate the real and fake data distributions as a critic, but also preserve injectivity. Hence we optimise the
embedding parameter  $\theta_{f}$  by the following hybrid loss function:
$$
\max  _ {\theta_ {f}} \left(L _ {\text {g e n e r a t o r}} - \lambda_ {1} L _ {\text {r e c o v e r y}} - \lambda_ {2} L _ {\text {r e g u l a r i z a t i o n}}\right), \tag {9}
$$
where  $\lambda_{1}$  and  $\lambda_{2}$  are hyper-parameters that balance the three losses.
Training the EPCFD parameters  $(\theta_{M},\theta_{M}^{\prime})$  : Note that  $L_{\mathrm{generator}}$  and  $L_{\mathrm{regularization}}$  have trainable parameters of EPCFD, i.e.,  $\theta_{M}$  and  $\theta_M^\prime$  . Similar to the basic PCF-GAN, we optimize  $\theta_{M}$  and  $\theta_M^\prime$  by maximising the EPCFD to improve the discriminative power.
$$
\max  _ {\theta_ {M}} L _ {\text {g e n e r a t o r}}, \quad \max  _ {\theta_ {M} ^ {\prime}} L _ {\text {r e g u l a r i z a t i o n}} \tag {10}
$$
By doing so, we enhance the discriminative power of  $\mathrm{EPCFD}_{\theta_M}$  and  $\mathrm{EPCFD}_{\theta_M'}$ . Consequently, this facilitates the training of the generator such that the embedding of the true data aligns with both the noise distribution and the reconstructed noise distribution.
Differentiability of EPCFD with respect to parameters of the embedding layer and generators are guaranteed by Theorem 3.6, as long as  $F_{\theta_f} \circ G_{\theta_g}$  satisfies the Lipschitz condition thereof. Let us also stress on two key advantages of our proposed PCF-GAN. First, it possesses the ability to generate synthetic time series with reconstruction functionality, thanks to the auto-encoder structure in PCF-GAN. Second, by virtue of the uniform boundedness of PCFD shown in Lemma 3.5, our PCF-GAN does not require any additional gradient constraints of the embedding layer and EPCFD parameters, in contrast to other MMD-based GANs and Wasserstein-GAN. It helps with the training efficiency and alleviates the vanishing gradient problem in training sequential networks like RNNs.
We provide the pseudo-code for the proposed PCF-GAN in Algorithm 1.
Algorithm 1 PCF-GAN.
1: Input:  $\mathbb{P}_d$  (real time series distribution),  $\mathbb{P}_z$  (noise distribution),  $\theta_M, \theta_M', \theta_f, \theta_g$  (model parameters for EPCFD, critic  $F$  and generator  $G$ ),  $\lambda_1, \lambda_2 \in \mathbb{R}^+$  (penalty weights),  $b$  (batch size),  $\eta \in \mathbb{R}$  (learning rate),  $n_c$  the iteration number of discriminator per generator update, .  
2: while  $\theta_M, \theta_M', \theta_M, \theta_c, \theta_g$  not converge do  
3: for  $i \in \{1, \dots, n_c\}$  do  
4: # train the unitary linear maps in EPCFD  
5: Sample from distributions:  $X \sim \mathbb{P}_d, Z \sim \mathbb{P}_z$ .  
6: Generator Loss:  $L_{\text{generator}} = \operatorname{EPCFD}_{\theta_M}(F_{\theta_f}(X), F_{\theta_f}(G_{\theta_g}(Z)))$   
7: Update:  $\theta_M \gets \theta_M + \eta \cdot \nabla_{\theta_M} L_{\text{generator}}$   
8: Regularization Loss:  $L_{\text{regularization}} = \operatorname{EPCFD}_{\theta_M'}(Z, F_{\theta_f}(X))$   
9: Update:  $\theta_M' \gets \theta_M' + \eta \cdot \nabla_{\theta_M'}(L_{\text{regularization}})$   
10: # train the embedding  
11: Reconstruction Loss:  $L_{\text{recovery}} = \mathbb{E}[|Z - F_{\theta_f}(G_{\theta_g}(Z))^2]$   
12: Loss on critic:  $L_c = L_{\text{generator}} - \lambda_1 \cdot L_{\text{recovery}} - \lambda_2 \cdot L_{\text{regularization}}$   
13: Update:  $\theta_f \gets \theta_f + \eta \cdot \nabla_{\theta_c} L_c$   
14: end for  
15: # train the generator  
16: Sample from distributions:  $X \sim \mathbb{P}_d, Z \sim \mathbb{P}_z$ .  
17: Generator Loss:  $L_{\text{generator}} = \operatorname{EPCFD}_{\mathcal{M}}(F_{\theta_f}(X), F_{\theta_f}(G_{\theta_g}(Z)))$   
18: Update:  $\theta_g \gets \theta_g - \eta \cdot \nabla_{\theta_g} L_g$   
19: end while
To validate its efficacy, we apply our proposed PCF-GAN to a broad range of time series data and benchmark with state-of-the-art GANs for time series generation using various test metrics. Full details on numerics (dataset, evaluation metrics, and hyperparameter choices) are in Appendix C. Additional ablation studies and visualisations of generated samples are reported in Appendix D.
Baselines: We take Recurrent GAN (RGAN)[12], TimeGAN [45], and COT-GAN [43] as benchmarking models. These are representatives of GANs exhibiting strong empirical performance for time series generation. For fairness, we compare our model to the baselines while fixing the generators and embedding/discriminator to be the common sequential neural network (2 layers of LSTMs).
Dataset: We benchmark our model on four different time series datasets with various characteristics: dimensions, sample frequency, periodicity, noise level, and correlation. (1) Rough Volatility: High-frequency synthetic time series data with low noise-to-signal. (2) Stock: The daily historical data on ten publicly traded stocks from 2013 to 2021, including as features the volume and high, low, opening, closing, and adjusted closing prices. (3) Beijing Air Quality [47]: An UCI multivariate time series on hourly air pollutants data from different monitoring sites. (4) EEG Eye State [38]: An UCI dataset of a high frequency and continuous EEG eye measurement. We summarise the key statistics of the datasets in Table 1.
Table 1: Summary statistics for four datasets
Dataset	Dimension	Length	Sample rate	Auto-cor (lag 1)	Auto-cor (lag 5)	Cross-cor
RV	2	200	-	0.967	0.916	-0.014
Stock	5	20	1day	0.958	0.922	0.604
Air	10	24	1hour	0.947	0.752	0.0487
EEG	14	20	8ms	0.517	0.457	0.418
Evaluation metrics: The following three metrics are used to assess the quality of generative models. For time series generation/reconstruction, we compare the true and fake/reconstructed distribution by  $G_{\theta_g} \circ F_{\theta_f}$  via the below test metrics. (1) Discriminative score [45]: We train a post-hoc classifier to distinguish true and fake data. We report the classification error on the test data. The better generative model yields a lower classification error, as it means that the classifier struggles to differentiate between true and fake data. (2) Predictive score [45, 12]: We train a post-hoc sequence-to-sequence regression model to predict the latter part of a time series given the first part from the generated data. We then evaluate and report the mean square error (MSE) on the true time series data. The lower MSE indicates better the generated data can be used to train a predictive model. (3) Sig-MMD [9, 42]: We use MMD with the signature feature as a generic metric on time series distribution. Smaller the values, indicating closer the distributions, are better. To compute three evaluation metrics, we randomly generated 10,000 samples of true and synthetic (reconstructed) distribution resp. The mean and standard deviation of each metric based on 10 repeated random sampling are reported.
5.1 Time series generation
Table 2 indicates that PCF-GAN consistently outperforms the other baselines across all datasets, as demonstrated by all three test metrics. Specifically, in terms of the discriminative score, PCF-GAN achieves a remarkable performance with values of 0.0108 and 0.0784 on the Rough volatility and Stock datasets, respectively. These values are  $61\%$  and  $39\%$  lower than those achieved by the second-best model. Regarding the predictive score, PCF-GAN achieves the best result across all four datasets. While COT-GAN surpasses PCF-GAN in terms of the Sig-MMD metric on the EEG dataset, PCF-GAN consistently outperforms the other models in the remaining three datasets. Additionally, to assess the fitting on auto-correlation, cross-correlation and marginal distribution, we include the corresponding numerical results in Table 4 in Appendix D.4. For a qualitative analysis of generative quality, we provide the visualizations of generated samples for all models and datasets in Appendix D without selective bias. Furthermore, to showcase the effectiveness of our auto-encoder architecture for the generation task, we present an ablation study in Appendix D.
Table 2: Performance comparison of PCF-GAN and baselines. Best for each task shown in bold.
Task	Generation	Reconstruction
Dataset	Test Metrics	RGAN	COT-GAN	TimeGAN	PCF-GAN	TimeGAN (R)	PCF-GAN(R)
RV	Discriminative	.0271±.048	.0499±.068	.0327±.019	.0108±.006	.5000±.000	.2820±.082
Predictive	.0393±.000	.0395±.000	.0395±.001	.0390±.000	.0590±.003	.0398±.001
Sig-MMD	.0163±.004	.0116±.003	.0027±.004	.0024±.001	3.308±1.34	.0960±.050
Stock	Discriminative	.1283±.015	.4966±.002	.3286±.063	.0784±.028	.4943±.002	.3181±.038
Predictive	.0132±.000	.0144±.000	.0139±.000	.0125±.000	.1180±.012	.0127±.000
Sig-MMD	.0248±.008	.0029±.000	.0272±.006	.0017±.000	.7587±.186	.0078±.004
Air	Discriminative	.4549±.012	.4992±.002	.3460±.025	.2326±.058	.4999±.000	.4140±.013
Predictive	.0261±.001	.0260±.001	.0256±.000	.0237±.000	.0619±.004	.0289±.000
Sig-MMD	.0456±.015	.0128±.002	.0146±.026	.0126±.005	.4141±.078	.0359±.012
EEG	Discriminative	.4908±.003	.4931±.007	.4771±.008	.3660±.025	.5000±.000	.4959±.003
Predictive	.0315±.000	.0304±.000	.0342±.001	.0246±.000	.0499±.001	.0328±.001
Sig-MMD	.0602±.010	.0102±.002	.0640±.025	.0180±.004	.0700±.021	.0641±.019
5.2 Time series reconstruction
As TimeGAN is the only baseline model incorporating reconstruction capability, for reconstruction tasks we only compare with TimeGAN. The reconstructed examples of time series using both PCF-GAN and TimeGAN are shown in Figure 4; see Appendix D for more samples.
Visually, the PCF-GAN achieves better reconstruction results than TimeGAN by producing more accurate reconstructed time series samples. Notably, the reconstructed samples from PCF-GAN preserve the temporal dependency of original time series for all four datasets, while some reconstructed samples from TimeGAN in EEG and Stock datasets are completely mismatched. This is further quantified in Table 2 on the reconstruction task, where the reconstructed samples from PCF-GAN consistently outperform those from TimeGAN in terms of all test metrics.
Figure 4: Examples of time series reconstruction using PCF-GAN and TimeGAN.
5.3 Training stability and efficiency
Figure 5 demonstrates the training progress of the PCF-GAN on RV dataset. Compared to the fluctuating generator loss typically observed in traditional GANs, the PCF-GAN yields better convergence by leveraging the autoencoder structure. This is achieved by minimising reconstruction and regularisation losses, which ensures the injectivity of  $F_{\theta_f}$  and enables production of a semantic embedding throughout the training process. The decay of generator loss in the embedding space directly reflects the improvement in the quality of the generated time series. This is particularly useful for debugging and conducting hyperparameter searches. Furthermore, decay in both recovery and regularisation loss signifies the enhanced performance of the autoencoder.
Figure 5: Training curves for PCF-GAN of real (left) and generated (right) time series distributions on the Rough Volatility dataset at different training iterations. Plotted by a moving average over a window with 500 iterations.
By leveraging the effective critic  $F_{\theta_f}$ , we achieve enhanced performance with a moderate increase in parameters (ranging from 1200 to 6400) within  $\theta_M$  of EPCFD. The training of these additional parameters is highly efficient in PCF-GAN, while still outperforming all baseline models. Specifically, our algorithm is approximately twice as fast as TimeGAN (using three extra critic modules) and three times as fast as COT-GAN (with one additional critic module and the Sinkhorn algorithm). However, it takes 1.5 times as long as RGAN due to the extra training required on  $\theta_M$ .
6 Conclusion & Broader impact
Conclusion We introduce a novel, principled and efficient PCF-GAN model based on PCF for generating high-fidelity sequential data. With theoretical support, it achieves state-of-the-art generative performance with additional reconstruction functionality in various tasks of time series generation.
Limitation and future work In this work, we use LSTM-based networks for the autoencoder and do not explore other sequential models (e.g., transformers). The suitable choice of network architecture for the autoencoder may further improve the efficacy of the proposed PCF-GAN on more complicated data, e.g., video and skeletal human action sequence, which merits further investigation. As a distance metric on time series, PCFD can be flexibly incorporated with other advanced generators of time
series GAN models, hence may further improve the performance. For example, one can replace the average cross-entropy loss used in [17, 39] and the Wasserstein distance in [36] by PCFD, with some simple modifications on the discriminators. Furthermore, although we establish the link between PCFD and MMD, it is interesting to design efficient algorithms to compute the kernel specified in Appendix B.3.
Broader impact Like other GAN models, this model has the potential to aid data-hungry algorithms by augmenting small datasets. Additionally, it can enable data sharing in domains such as finance and healthcare, where sensitive time series data is plentiful. However, it is important to acknowledge that the generation of synthetic data also carries the risk of potential misuse (e.g. generating fake news).
The research of SL is supported by NSFC (National Natural Science Foundation of China) Grant No. 12201399, and the Shanghai Frontiers Science Center of Modern Analysis. This research project is also supported by SL's visiting scholarship at New York University-Shanghai. HN is supported by the EPSRC under the program grant EP/S026347/1 and The Alan Turing Institute under the EPSRC grant EP/N510129/1. LH is supported by University College London and the China Scholarship Council under the UCL-CSC scholarship (No. 201908060002). SL and HN are supported by the SJTU-UCL joint seed fund WH610160507/067. HN and HL are supported by the Ecosystem Leadership Award under the EPSRC Grant OobfJ22/100020 and The Alan Turing Institute in part. HN is grateful to Jiajie Tao and Zijiu Lyu for proofreading the paper.
[37] Jinfu Ren, Yang Liu, and Jiming Liu. EWGAN: Entropy-based Wasserstein GAN for imbalanced learning. In Proceedings of the AAAI conference on artificial intelligence, volume 33, pages 10011-10012, 2019.
[38] Oliver Roesler, Lucas Bader, Jan Forster, Yoshikatsu Hayashi, Stefan Heßler, and David Suendermann-Oeft. Comparison of eeg devices for eye state classification. Proc. of the AIHLS, 2014.
[39] Ali Seyfi, Jean-Francois Rajotte, and Raymond Ng. Generating multivariate time series with CCommon Source Coordinated GAN (COSCI-GAN). Advances in Neural Information Processing Systems, 35:32777-32788, 2022.
[40] Bharath K Sriperumbudur, Arthur Gretton, Kenji Fukumizu, Bernhard Schölkopf, and Gert RG Lanckriet. Hilbert space embeddings and metrics on probability measures. The Journal of Machine Learning Research, 11:1517-1561, 2010.
[41] Akash Srivastava, Lazar Valkov, Chris Russell, Michael U Gutmann, and Charles Sutton. VEEGAN: Reducing mode collapse in GANs using implicit variational learning. Advances in Neural Information Processing Systems, 30:3310-3320, 2017.
[42] Csaba Toth and Harald Oberhauser. Bayesian learning from sequential data using Gaussian processes with signature covariances. In International Conference on Machine Learning, pages 9548-9560. PMLR, 2020.
[43] Tianlin Xu, Li Kevin Wenliang, Michael Munn, and Beatrice Acciaio. COT-GAN: Generating sequential data via causal optimal transport. Advances in Neural Information Processing Systems, 33:8798-8809, 2020.
[44] Yasin Yazici, Chuan-Sheng Foo, Stefan Winkler, Kim-Hui Yap, Georgios Piliouras, and Vijay Chandrasekhar. The unusual effectiveness of averaging in GAN training. In International Conference on Learning Representations, 2019.
[45] Jinsung Yoon, Daniel Jarrett, and Mihaela Van der Schaar. Time-series generative adversarial networks. Advances in Neural Information Processing Systems, 32:5509-5519, 2019.
[46] Kösaku Yosida. Functional analysis. Sixth edition, volume 123 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer-Verlag, Berlin-New York, 1980.
[47] Shuyi Zhang, Bin Guo, Anlan Dong, Jing He, Ziping Xu, and Song Xi Chen. Cautionary tales on air-quality improvement in beijing. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 473(2205):20170457, 2017.
[48] Robert J Zimmer. Essential results of functional analysis. University of Chicago Press, 1990.
In Appendix A, we collect some notations and properties for paths and unitary feature of a path. Appendix B gives a thorough introduction to the distance function via the path characteristics function. Detailed proofs for the theoretical results on PCFD are provided. Appendix C discusses experimental details and Appendix D presents supplementary numerical results.
A.1 Paths with bounded variation
Definition A.1. Let  $X:[0,T]\to \mathbb{R}^d$  be a continuous path. The total variation of  $X$  on the interval  $[0,T]$  is defined by
$$
\operatorname {T o t. V a r}. (X) := \sup  _ {\mathcal {D} \subset [ 0, T ]} \left\{\sum_ {\ell} \left| X _ {t _ {\ell}} - X _ {t _ {\ell - 1}} \right| \right\} \tag {11}
$$
where the supremum is taken over all finite partitions  $\mathcal{D} = \{t_{\ell}\}_{\ell = 0}^{N}$  of  $[0,T]$ . When  $\mathrm{Tot.Var.}(X)$  is finite, say that  $X$  is a path of bounded variation (BV-path) on  $[0,T]$  and denote  $X\in \mathrm{BV}\left([0,T];\mathbb{R}^d\right)$ .
BV-paths can be defined without the continuity assumption, but we shall not seek for greater generality in this work. It is well-known that
$$
\| X \| _ {\mathrm {B V}} := \| X \| _ {C ^ {0} ([ 0, T ])} + \operatorname {T o t. V a r.} (X)
$$
defines a norm (the BV-norm). There is a more general notion of paths of finite  $p$ -variation for  $p \geq 1$  (see [29]), where the case  $p = 1$  corresponds to BV-paths discussed above. We restrict ourselves to  $p = 1$ , as this is sufficient for the study of sequential data in practice as piecewise linear approximations of continuous paths.
Definition A.2. (Concatenation of paths) Let  $X:[0,s] \to \mathbb{R}^d$  and  $Y:[s,t] \to \mathbb{R}^d$  be two continuous paths. Their concatenation denoted as the path  $X \star Y:[0,t] \to \mathbb{R}^d$  is defined by
$$
(X \star Y) _ {u} = \left\{ \begin{array}{l l} X _ {u}, & u \in [ 0, s ], \\ Y _ {u} - Y _ {s} + X _ {s}, & u \in [ s, t ]. \end{array} \right.
$$
Definition A.3 (Tree-like equivalence). A continuous path  $X:[0,T]\to \mathbb{R}^d$  is called tree-like if there is an  $\mathbb{R}$ -tree  $\mathcal{T}$ , a continuous function  $\phi :[0,T]\to \mathcal{T}$ , and a function  $\psi :\mathcal{T}\rightarrow \mathbb{R}^{d}$  such that  $\phi (0) = \phi (T)$  and  $X = \psi \circ \phi$ .
Let  $\overleftarrow{X}:[0,T]\to \mathbb{R}^d$  denote the time-reversal of continuous path  $X$ , namely that  $\overleftarrow{X}(t) = X(T - t)$ . We say that  $X$  and  $Y$  are in tree-like equivalence (denoted as  $X\sim_{\tau}Y$ ) if  $X\star \overleftarrow{Y}$  is tree-like.
An important example is when path  $X$  is a time re-parameterisation of  $Y$ . That is, for  $X \in \mathrm{BV}\left([0,T];\mathbb{R}^d\right)$ , take a nondecreasing surjection  $\lambda :[0,T] \to [T_1,T_2]$ , and take  $X(t) = Y(\lambda (t))$ .
A.2 Matrix groups and algebras
The unitary group and symplectic group are subsets of the space of  $m \times m$  matrices:
$$
U (m) := \left\{A \in \mathbb {C} ^ {m \times m}: A ^ {*} A = A A ^ {*} = I _ {m} \right\},
$$
$$
S p (2 m, \mathbb {C}) := \left\{A \in \mathbb {C} ^ {2 m \times 2 m}: A ^ {*} J _ {m} A = J _ {m} \right\}.
$$
where  $J_{m} \coloneqq \left( \begin{array}{cc}0 & I_{m}\\ -I_{m} & 0 \end{array} \right)$  and  $I_{m}\in \mathbb{C}^{m\times m}$  is the identity. Their corresponding Lie algebras are