{'fraction_non_alphanumeric': 0.037755806925136, 'fraction_numerical': 0.011700198601157067, 'mean_word_length': 4.66320293398533, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
PERCEPT: a new online change-point detection method using topological data analysis

Topological data analysis (TDA) provides a set of data analysis tools for extracting embedded topological structures from complex high-dimensional datasets. In recent years, TDA has been a rapidly growing field which has found success in a wide range of applications, including signal processing, neuroscience and network analysis. In these applications, the online detection of changes is of crucial importance, but this can be highly challenging since such changes often occur in a low-dimensional embedding within high-dimensional data streams. We thus propose a new method, called PERsistence diagram-based ChangE-PoinT detection (PERCEPT), which leverages the learned topological structure from TDA to sequentially detect changes. PERCEPT follows two key steps: it first learns the embedded topology as a point cloud via persistence diagrams, then applies a non-parametric monitoring approach for detecting changes in the resulting point cloud distributions. This yields a non-parametric, topology-aware framework which can efficiently detect online changes from high-dimensional data streams. We investigate the effectiveness of PERCEPT over existing methods in a suite of numerical experiments where the data streams have an embedded topological structure. We then demonstrate the usefulness of PERCEPT in two applications in solar flare monitoring and human gesture detection.


Introduction
Topological Data Analysis (TDA) is a thriving field at the intersection of statistics, machine learning, and algebraic topology, which has gained traction in recent years. TDA methods provide a set of tools for studying the shapes of complex high-dimensional datasets, by extracting its underlying low-dimensional geometric structures. TDA has found success in a wide range of applications, including signal processing (Perea and Harer, 2015), computational biology (Cang et al., 2015), time series analysis (Seversky et al., 2016), and neuroscience (Sizemore et al., 2019).
Despite promising developments in recent years, there has been little work on integrating topological structure for sequential change-point detection, which is a fundamental problem in many of the aforementioned applications. Change-point detection here refers to the detection of a possible change in signal distribution over time. Traditional change-point detection methods largely focus on likelihood ratio tests, which presume that observations are independently and identically distributed, both before and after the change (Page, 1954;Siegmund, 1985;Poor and Hadjiliadis, 2008;Basseville and Nikiforov, 1993;Tartakovsky et al., 2015). When the pre-and post-change distributions are known, one can apply the cumulative sum (CUSUM) detection rule, which has been proved to be optimal (Lorden, 1971;Moustakides, 1986). In practice, the post-change distribution is typically unknown, in which case one can sequentially estimate it and construct a generalized likelihood ratio test for change detection (Lai, 1998;Lau et al., 2018).
However, a key limitation with these traditional methods is that they may perform poorly for high-dimensional data with complex low-dimensional structure. This is because the distributions in such setting would typically be difficult to approximate well using parametric families, and the required density ratio would thus be difficult to estimate as well. One solution in this high-dimensional setting is to first extract the underlying low-dimensional structure from data, and then construct detection statistics based on the extracted information. CUSUM-type detection algorithms were proposed in Xie et al. (2020) and Jiao et al. (2018) to detect changes characterized by an unknown subspace structure in the covariance matrix. These methods work well when the true low-dimensional embedding is precisely the embedding used in the detection procedure, i.e., a linear subspace. In complex problems where the true embedding is nonlinear, however, this model misspecification may result in considerable deterioration in detection performance (Molloy and Ford, 2017). There is thus a need for a high-dimensional change detection method which can integrate a broader yet realistic framework for modeling low-dimensional structure.
In recent years, the rise of TDA methods suggests that, for many problems, the underlying data may have embedded topological structure which can be extracted via TDA. Indeed, in such problems, the extracted topology from TDA often captures intuitive features from highdimensional data which are interpretable for the practitioner. For example, in computer vision, topological features can represent segmented regions of a 3D shape (Beksi and Papanikolopoulos, 2016). Similarly, for time series, periodic signals can be captured by topological features via Taken's Embedding (Seversky et al., 2016). However, the integration of such structure for change detection has largely remained unexplored. A recent work (Islambekov et al., 2019) proposed a TDA detection approach for time series data, by converting this to a sequence of so-called Betti numbers (Edelsbrunner and Harer, 2008), which capture the number of k-dimensional holes on a topological surface. However, Betti numbers are known to provide a weak summary of topology (Ghrist, 2008) and thus may be insensitive to certain topological changes. Another recent work (Ofori-Boateng et al., 2021) utilized a richer topological summary called a persistence diagram (Edelsbrunner and Harer, 2008), which uniquely captures the topological features of the data at different spatial resolutions (more on this in Section 2.1). With persistence diagrams computed at each point in time, the method then makes use of the Wasserstein distance between diagrams from adjacent times as the detection test statistic. However, there are two limitations with this approach: (i) it relies on the Wasserstein distance, which may not fully capture the topological differences between two persistence diagrams; and (ii) its test statistic relies on information from only the immediate past, which can greatly reduce detection efficiency.
To address this, we propose a new non-parametric, topology-aware framework called PERsistence diagram-based ChangE-PoinT detection (PERCEPT). As in Ofori-Boateng et al. (2021), PERCEPT leverages the extracted persistence diagrams (which capture topological features of the data at each time) for change detection. However, instead of using the Wasserstein distance of diagrams from adjacent times, PERCEPT extends a recent non-parametric change detection method (Xie and Xie, 2021) to detect changes directly on the diagram point clouds. This yields two advantages: (i) it offers a distribution-based approach which amplifies changes in topological features; and (ii) its test statistic makes use of data within a past time window, which addresses information loss. We demonstrate the effectiveness of PERCEPT over existing methods in a suite of simulation experiments and in applications to solar flare monitoring and human gesture detection.
The rest of the paper is organized as follows. Section 2 provides preliminaries on persistent homology and motivations. Section 3 outlines the PERCEPT methodology.
Section 4 demonstrates the effectiveness of this method in numerical experiments. Section 5 applies the method to solar flare monitoring and human gesture detection.

Preliminaries and Motivation
We first provide a brief overview of TDA, then discuss two baseline methods, the Hotelling's T 2 statistic and the Wasserstein distance approach in Ofori-Boateng et al. (2021), for high-dimensional change-point detection. We then motivate the proposed PERCEPT method via an application to solar flare detection.

TDA Preliminaries
A primary tool in TDA is persistent homology, which extracts topological features (e.g., connected components, holes, and their higher-dimensional analogues) from point cloud data.
In what follows, we provide a brief overview of persistent homology, following Ghrist (2008) and Edelsbrunner and Harer (2008). For a given point cloud dataset, persistent homology provides a representation of this as a simplicial complex, defined as a set of vertices, edges, triangles, and their higher-dimensional counterparts. A common simplicial complex is the Rips complex, which depends on a single scale parameter . At a given radius > 0, the Rips complex contains all edges between any two points whose distance is at most , and contains triangular faces for any three points whose pairwise distances are at most . Figure   1 (adapted from Han et al., 2018) illustrates this for a toy dataset. Clearly, a single cannot capture all geometric structures embedded in the data. Thus, a sequence of scale parameters is used to build a sequence (or filtration) of simplicial complexes. This filtration provides a means for extracting topological structure from the data, e.g., zero-dimensional holes (or connected components), one-dimensional holes, and their higher-dimensional analogues.
Under this framework, suppose a topological feature appears in the filtration at some radius and disappears at a larger radius > . The pair ( , ) gives the persistence of the feature, with and being its birth and death, respectively. A prominent topological feature in the point cloud data would have long persistence, whereas a small or noisy topological feature would have short persistence. The persistence information from all topological features can be captured by an (untilted) persistence diagram (PD), a collection of points in R 2 where each feature is represented by a point ( , ), with is its birth time and is its death time. Figure 1 illustrates the persistent homology pipeline from point cloud data to a persistence diagram. We will distinguish this untilted PD from its tilted variant later.
We use a simple example to illustrate this translation of topological structure to a PD.
Figure 2 (left) shows the point cloud data generated from two disjoint circles with radii 1, and Figure 2 (right) shows the corresponding PD of this data. For the 0-d holes (black points), we observe many points with small persistence, but one point which persists for a long time. This last point with large persistence suggests the data has two connected components, which is indeed true. For the 1-d holes (red points), we observe two red points with large persistence, which reflects the two holes within the circles.

Existing Baseline Methods
A classic baseline approach for change detection in multivariate data is the parametric Hotelling's T 2 statistic (Hotelling, 1947). The Hotelling's T 2 statistic makes use of the mean  and covariance structure of data, and thus it can detect both the mean and covariance shifts. Given data x t ∈ R p at time t, t = 1, · · · , T , the Hotelling's T 2 statistic is defined as wherex is the sample mean vector, µ 0 and Σ 0 is the nominal mean vector and covariance matrix, respectively (this is typically given or estimated from reference data). The vanilla Hotelling's T 2 statistic is calculated using only data at the current time t, with all historical data discarded.
To compute the test statistic more efficiently, it can be coupled with the CUSUM scheme (Page, 1954), which makes use of a cumulative sum of the statistic over time. The resulting detection statistic S H t is then given by: where (x) + = max{x, 0},μ t−w,t denotes the sample average of the data vector {x t−w , . . . , x t }, andμ 0 and Σ 0 are the pre-change mean vector and covariance matrix estimated from historical data. Here, d H is a drift parameter that can also be trained using historical data. When the data is known to be concentrated on a linear subspace, one can adapt the Hotelling's T 2 test by first performing Principal Component Analysis (PCA), then using the resulting principal components as data within equation (2). With this, a change-point is then declared at time t if the statistic S H t exceeds a pre-specified threshold b.
The second baseline method, the Wasserstein distance approach in Ofori-Boateng et al.
(2021), integrates topology in the following way. The Wasserstein distance (of order 1) for two distributions P and Q on sample space Ω is defined as: Here, c(·, ·) is a metric on Ω (in our case, this is taken as the Euclidean norm), and Γ(P, Q) denotes the collection of all (Borel) probability measures on Ω × Ω with marginal distributions P and Q.
With this, the Wasserstein distance method is straight-forward. First, at each time t, the persistence diagram D t ∈ R 2 is computed from the data x t . Next, the Wasserstein distances D t+1 ) are computed between the PDs from adjacent time frames. One then declares a change-point at time t when the test statistic S W t exceeds some pre-specified threshold b.
We investigate these two baseline methods for a motivating solar flare monitoring application (more on this in Section 5). The data consists of image snapshots (232 × 292 pixels) of a solar flare, captured by the Solar Dynamics Observatory 1 at NASA. Figure 3a shows several snapshots of the flare before and after the true change-point at t * = 49, where the flare bursts become more pronounced and bright. However, such a change can be quite subtle visually, thus making monitoring a challenging task (Xie et al., 2012

Persistence Diagram-based Change Detection
We now introduce the proposed PERsistence diagram-based ChangE-PoinT (PERCEPT) monitoring method. We first describe the histogram binning for PDs, then show how the extracted histograms can be used for non-parametric change detection. We then present some supporting theory for PERCEPT, and discuss methodological developments on the bin and weight optimization.

Persistence Histogram Binning
The first step in PERCEPT is to construct the so-called persistence histograms, a novel histogram representation which captures persistence information from the computed PDs.
This histogram binning serves two purposes -it provides a robust way for filtering noise in the PD data, and allows us to leverage recent developments in histogram-based change detection methods within PERCEPT (shown next). To facilitate this, we assume all PDs are given in their tilted representation, where a feature is represented by a point ( , − ), with is its birth time and − is its persistence time. Figure 1 provides an illustration.
Assume, as before, that the PDs D t ∈ R 2 are computed for the data x t at each time t = 1, · · · , T . Further assume that the birth range for the PDs (i.e., the x-axis on D t ) is for the l-th bin. With this, we can now bin the point cloud data D t . Let f t,l be the sum of persistences for points in D t within the l-th bin, i.e.: and let ω t,l = f t,l / L l =1 f t,l be its corresponding proportion. The histogram frequencies and distribution of the PD D t can thus be represented by the vectors f t = (f t,1 , · · · , f t,L ) and ω t = (ω t,1 , · · · , ω t,L ), respectively. We will call ω t the persistence histogram of the PD D t . Figure 4a visualizes this binning procedure.
The breakpoints for the persistence histogram (i.e., b 1 , · · · , b L ) can be placed such that the bins have equal widths in the birth range using the "pre-change" PDs (i.e., the diagrams prior to the change), then kept the same throughout the procedure. Figure  histograms (which capture topology information) should be sufficiently different to capture this change. We will leverage this fact to formulate the following test statistic.

Test Statistic
The second step in PERCEPT is to use the extracted persistence histograms to construct a monitoring test statistic. The idea is as follows. Suppose the bins Then, at each time t, one can treat the observed persistence histograms f t as data sampled from an underlying discrete distribution with L levels. Let p pre denote this so-called persistence distribution (with L levels) prior to the change, and p post be the persistence distribution after the change. The goal of detecting topological changes can then be thought of as testing for differences between the persistence distributions p pre and p post . We thus desire a test which investigates the following hypotheses: To test (4), we extend a recent non-parametric test in Xie and Xie (2021) for detecting changes on discrete distributions. At the current time t, we search for all possible change points at time k < t within a fixed-sized window. To investigate whether time k is a change point, we will consider four consecutive time intervals (see Figure 4b): the first two intervals are immediately before time k, and the last two intervals are immediately after k. All four intervals have the same time length of (t − k)/2 . We call the first group of intervals (representing potential pre-change times) as "Group 1", and the latter group (representing potential post-change times) as "Group 2". We will discuss the choice of L in Section 3.5.
Suppose the histogram breakpoints b 1 , · · · , b L are given. Consider now the persistence histogram proportions within the two time intervals in Group 1 and the two intervals in Group 2; we denote this as ω t,k and ω weighted-2 statistic can then be defined as Here, Σ = diag{σ 1 . · · · , σ L } is the diagonal weight matrix, where σ l ≥ 0, l = 1, · · · , L. Note that, if time k were indeed a change point, the resulting test statistic χ t,k would likely be large, thus providing evidence for a change. A simple choice of Σ is the identity matrix, which assumes equal weights over persistence histogram bins. We introduce a strategy for optimizing this weight matrix at the end of the section.
With this in hand, an online detection procedure is then given by the stopping time: where b is a pre-specified threshold parameter. Here, T is the time at which the procedure raises an alarm indicating a change-point has occurred before time t, by taking the maximum statistic χ max t over all possible change-points k < t. A change is declared if and only if the test statistic χ max t exceeds a certain threshold, indicating the two persistence histograms are sufficiently different to declare a change in topology.
The threshold b in (6) can be set by controlling the false alarm rate to a desired pre-specified level, or, equivalently, by controlling the average run length (ARL, more on this later) to be above a pre-specified level. For the above weighted-l 2 statistic, theoretical approximations are available for the ARL as a function of threshold b (Xie and Xie, 2021): where p := p pre , m 0 and m 1 are two known constants, and ν(·) is a special function that is easy to calculate. Further details can be found in Xie and Xie (2021). With this approximation, one can then set the threshold b to bound the ARL E ∞ [T ], which then controls the false alarm rate.

Connection between EDD and Topology
We now provide an interesting connection between the expected detection delay (EDD) and topology, which sheds light on how PERCEPT may be useful for topological change detection. Consider the following definitions of EDD and Average Run Length (ARL), two fundamental metrics in online change-point detection. Let E ∞ denote the expectation under the probability measure when there is no change-point (i.e., the change-point equals to ∞), and let E 0 denote the expectation under the probability measure when the change happens at time 0. For a given stopping time T of a monitoring procedure, its ARL is defined as , the expected run length to false alarm when there is no change, and the EDD is defined as E 0 [T ], the number of samples needed to detect the change. Theoretically, the EDD is known to be linearly related to the log(ARL) (Tartakovsky et al., 2015).
Next, we introduce the bottleneck distance, a standard metric for topological distance (Ghrist, 2008). Suppose, for two point cloud datasets with different topologies, one computes its corresponding (untilted) PDs D 1 and D 2 , respectively. The extracted topological features in these PDs can then be compared via a matching η. This matching is performed in two steps: (i) it pairs each point in the first PD D 1 with a point in the second PD D 2 or a point on the diagonal line, and (ii) it pairs each point in D 2 with a point in D 1 or a point on the diagonal. The bottleneck distance (Ghrist, 2008) between the PDs D 1 and D 2 is then defined as: Here, the supremum is taken over all matched points in D 1 , and the infimum is taken over all possible matchings η. Clearly, a larger bottleneck distance indicates the extracted features from the first PD are quite different from that for the second PD (and vice versa).
This then suggests the topology for the first dataset is markedly different from that for the second dataset. This link between the bottleneck distance and topological differences is where b is the pre-specified detection threshold and Σ ii is the i-th diagonal entry of Σ. In other words, the larger the difference between the pre-and post-change persistence distributions p pre and p post , the smaller the EDD for PERCEPT. We can then show (technical details in Appendix C) that, under certain asymptotic approximations, this difference ||p pre − p post || 2 2 can be lower bounded by the bottleneck distance between a pre-change PD D pre and postchange PD D post , which quantifies differences in pre-and post-change topology. Hence, together with (7), this suggests that, for PERCEPT, the greater (or smaller) the topological difference is between pre-and post-change data, the smaller (or greater) its detection delay, which is as desired.

Persistence Cluster Binning
The persistence histogram binning approach (Section 3.1) can be viewed as partitioning the persistence space into vertical rectangular regions, which are then used to bin the persistence diagrams for monitoring. This may have two practical limitations. First, since persistences are summed within each bin, the procedure can distinguish topological features with different birth times, but not features with similar birth times but different persistences.
Second, the restriction of partitions to be vertical and rectangular may hamper the ability of this method in identifying regions of greatest change between the pre-and post-change distributions. To address this, we propose an alternate novel persistence clustering approach, which provides a more general partition of the persistence space.
Suppose we have training PDs for both pre-and post-change regimes. The idea is to find a clustering of these point clouds, so that the corresponding partition of the persistence space can discriminate well the pre-and post-change distributions. We construct these persistence clusters as follows. First, we perform k-means clustering (Lloyd, 1982) on the pre-change PD point clouds, which returns C pre cluster centers C pre = c 1 , · · · , c Cpre . We can do the same clustering on the post-change PDs to obtain C post cluster centers C post = c 1 , · · · , c Cpost .
Using both the pre-and post-change centers C = C pre ∪ C post , we then form a Voronoi diagram using centers C (Aurenhammer, 1991), i.e., a partition of R 2 to its closest point in C. Figure 5 visualizes this persistence clustering procedure. The number of clusters can be determined by the elbow method in k-means clustering (Ketchen and Shook, 1996).
With this, we then employ the same weighted-2 test statistic in (5) t,k as persistence histogram proportions, we take these as the proportions over persistence clusters. As Figure 5b shows, these persistence clusters may yield improved discrimination between the pre-and post-change distributions (compared to the earlier persistence histograms), particularly when there is a large amount of points (or features) captured in the persistence diagrams. When there is only a small number of features, however, the earlier persistence histogram approach should be used instead, since there may be insufficient data to fit the more complex persistence clusters. We will demonstrate this later in numerical experiments.

Weight Optimization
We now discuss the specification of the weights Σ = diag{σ 1 , · · · , σ L } in the test statistic (5). When no training data are available on both pre-and post-change regimes, a standard approach would be to set unit weights over all bins, i.e., σ l = 1. However, when such training data are available, we may be able to find a non-uniform choice of weights which amplifies the differences between the pre-and post-change distributions. In our implementation later, we adopt the weight optimization approach in Xie and Xie (2021), which aims to find weights Σ to maximize the worst-case weighted 2 distance. This can be formulated as: Here p pre,i and p post,i denote the i-th entry in the vector p pre and p post . The minimization in f (σ) is taken over all possible pre-and post-change distributions p pre and p post , within the probability simplex ∆, that are ρ-separable for a given ρ > 0. The choice of ρ depends on the scale of change that one wants to detect; in our experiments later, ρ is set to be 0.1.
For persistence histograms, the optimal number of bins L can be optimized simultaneously by selecting L which yields the highest f (σ) in (8). In practice, the training pre-and post-change data are required for estimating the persistence distributions p pre and p post .
Further details on this optimization can be found in Xie and Xie (2021). These optimized weights can then be used within the test statistic (5) for change detection.
In implementation, we have found that a small modification of (8) can yield noticeably improved performance. Note that when p pre,i /p post,i or p post,i /p pre,i is exceedingly larger from 1, and |p pre,i − p post,i | is small for some i, it may be difficult to pick out bin i as an important bin using the above formulation. However, such a bin i distinguishes the preand post-change distributions because their relative difference is large. Thus, we see that this optimization is distribution-dependent; when p pre , p post are extremely different from the uniform distribution, the above weights may not be ideal for distribution discrimination. In practice, we suggest using the relative difference of p pre and p post instead of the absolute difference in the above formulation, i.e., minimizing i σ (8).

Simulation Study
We now explore the performance of the proposed PERCEPT method in a suite of simulation studies where the underlying data is generated with topological structure. We investigate several challenging change scenarios, including topology changes, noise changes, and its scalability for higher-dimensional data.
Three baseline methods are used here for comparison. The first is the aforementioned parametric Hotelling's T 2 test, using the 15 extracted principal components from PCA on the original data. The second is the Wasserstein distance method proposed in Ofori-Boateng et al. (2021), which makes use of the Wasserstein distance between PDs in adjacent times.
Details on both methods can be found in Section 1. The third method is the maximum mean discrepancy (MMD) test (Gretton et al., 2012;Li et al., 2015), a widely used non-parametric change detection method. Given a class of functions F and two distributions p and q, the MMD distance between p and q is defined as MMD When F is a reproducing kernel Hilbert space (RKHS) associated with kernel function K(·, ·), this MMD statistic can be written as: In our implementation, we used the standard Gaussian radius basis function (RBF) kernel K(·, ·), where the kernel bandwidth is chosen using the so-called "median trick" (Bernhard The simulation set-up is as follows. We simulate data x 1 , · · · , x T with T = 400, and the change-point is set at time t * = 200. In other words, x 1 , · · · , x 200 are generated from the pre-change distribution, and x 201 , · · · , x 400 are generated from the post-change distribution. In our simulations, this point cloud data is generated with topological structure from two simple mgeometric shapes, the unit sphere and the ellipsoid (in varying dimensions). Under a quick inspection of the persistence diagrams, we decide to use the persistence clustering approach across all simulation studies. The goal is to have PERCEPT learn this topological structure from data, then make use of such structure to quickly identify change-points.

Shape Change
We first consider the case of geometric shape changes, where the pre-change data is sampled with noise from the unit two-dimensional (2-D) circle, and the post-change data is sampled with noise from a 2-D ellipse. Two noise settings are considered for this experiment: N (0, 0.05) and N (0, 0.10). Figure 6 shows the detection statistics from PERCEPT, Hotelling's T 2 and MMD under the two noise settings. We see that both PERCEPT and MMD are able to quickly detect the change-point: both monitoring statistics peak up immediately after the change-point at t = 200. The Hotelling's T 2 statistic, however, shows a relatively larger delay. This suggests that, by integrating topological structure, PERCEPT can yield improved performance over the Hotelling's T 2 . For the Wasserstein distance method, the statistic experiences a large spike at exactly t = 200 for the noise setting N (0, 0.05), but is unable to detect the change at the larger noise level N (0, 0.10).

Noise Change
Next, we consider the case of noise changes, where the pre-and post-change data are generated from the same unit 2-D circle (or ellipse), but with noise levels N (0, 0.05) and N (0, 0.10), respectively. Figure 7 shows the test statistics from PERCEPT and the Hotelling's T 2 for the circle and ellipse. We see that PERCEPT can quickly detect the underlying change: its pre-change test statistic is quite stable, and it peaks up quickly after the change-point at t = 200. The Wasserstein distance approach also seems to perform quite well here, although its pre-change statistic is noticeably more unstable, which may lead to increased false alarms (i.e., lower ARL). On the other hand, the Hotelling's T 2 statistic increases noticeably more slowly after the change, which suggests a larger detection delay.
For the MMD statistic, we see that while it peaks up after the change-point, its pre-change statistic is quite unstable and volatile, which again leads to increased false alarms.

Increasing Dimensionality
We now investigate how well these methods perform on data generated on higherdimensional geometric structures, namely, the 3-D and 4-D unit spheres and ellipsoids. We consider here the same noise change as in Section 4.2, and we compared the performance of PERCEPT with the classic parametric Hotelling's T 2 test, MMD statistics and Wasserstein distance. Figure 8a-b shows the detection statistics for the 3-D and 4-D spheres. We see that the proposed PERCEPT method consistently outperforms existing methods: its pre-change statistics are stable, and its post-change statistics peak up quickly after the change. Comparatively, the increase in the Hotelling-T 2 statistic is more subdued after the change (which results in greater detection delay), and the MMD statistic pre-change is noticeably more unstable (which results in increased false alarms). The Wasserstein distance approach is not able to detect the change. Furthermore, comparing with the 2-D results in Figure 7, the proposed method appears to yield improved performance to existing methods, which is unsurprising since it leverages the underlying low-dimensional topological structure in the high-dimensional data. Figures 8c-d show the detection statistics for the 3-D and 4-D ellipsoid. Again, we see that PERCEPT yields improved performance over the existing benchmarks, despite having slightly more unstable pre-change statistics. These experiments suggest that, by learning and integrating low-dimensional topological structure, the proposed method can efficiently detect changes in high-dimensional data.

ARL vs. EDD
Finally, we investigate the performance of these methods via the two metrics introduced in Section 3.3: the Average Run Length (ARL) and the Expected Detection Delay (EDD).
Recall that the ARL measures the expected run length to a false alarm when there is no change, the EDD measures the expected number of samples needed to detect a change.
We approximate the ARL and EDD of the compared methods using different thresholds b, under the 2-D circle experiment with Gaussian noise N (0, 0.05) for pre-change regime and Gaussian noise N (0, σ 2 ) for post-change regime, where σ 2 = 0.09, 0.10, 0.11. We adopted the experiments from Xie and Xie (2021), and details can be found in Appendix A. Figure 9 plots the log-ARL vs. EDD comparison for the compared methods in the 2-D circle experiment. Here, a method with large ARL and small EDD is desired, since this results in less false alarms and smaller detection delay. There are two interesting observations to note. First, for all noise levels and any fixed ARL level, we see that PERCEPT yields much lower EDD compared to the Hotelling's T 2 procedure, which suggests that the proposed method indeed yields improved detection performance by integrating topological structure.
Second, the proposed method appears to be much more robust to noise perturbations. As the noise level decreases, the EDD for the Hotelling's T 2 becomes noticeably larger for fixed ARL levels. This is because the noise change becomes smaller as we decrease the noise level of the post-change data. This is not surprising, since this change is difficult to detect without first identifying the underlying topological structure. In contrast, the EDD for PERCEPT is more stable and nearly remains the same as the noise level increases, which shows the robustness of PERCEPT. The relationship between ARL and EDD for the 4-D case is not shown here because it's computational expensive, but the same conclusion is expected from the earlier results.

Solar Flare Change Detection
We now demonstrate the effectiveness of PERCEPT in the earlier motivating problem on detecting changes in solar flares. A solar flare is an intense emission of radiation on the Sun's atmosphere, and the monitoring of such changes via satellite imaging is critical for predicting geomagnetic storms (Xie et al., 2012). This detection can be highly challenging, however, as noted in Section 2.2, due to the high dimensionality of image data and the subtlety of such a change. Recent work in image processing suggests a wide range of image features can be captured via topology (Bendich et al., 2011), which suggests our topology-aware approach may provide a potential solution. The data used here are T = 100 image snapshots taken by the SDO at NASA, where the true change-point is at t * = 49. Further details can be found in Section 2.2.
To apply PERCEPT, we need to first map the image data to a filtration, or a sequence of simplicial complexes (see 2.1 for details). We will make use of the so-called lower star filtration, which has shown success in capturing useful topological features in image data (Bendich et al., 2011). Let f (x) be a mapping from each pixel location x to its intensity value, and for a given , define the sublevel set of f as X( ) = {x|f (x) ≤ }. One can then form a simplicial complex from X( ) by first considering image pixels as vertices on a grid, then triangulating this grid by placing an edge between two points that are horizontally, vertically, or diagonally adjacent, and a triangular face for any three adjacent points forming a triangle. Figure 10a visualizes this mapping from image to simplicial complex. For a sequence 0 < 1 < 2 < · · · < m , the sublevel set filtration of the image is then defined as X i = X( i ), i = 1, · · · , m, which forms a sequence of nested simplicial complexes. This filtration can thus be used to construct a persistence diagram (Figure 10b) as described in Section 2.1. One can view this filtration pipeline as a way to extract important image topological features as a PD point cloud.
With the mapped PD in hand for each image, we can then proceed with the detection framework outlined in Section 3. A quick inspection of the computed PDs show only a small amount of points (or features), thus we decided to use persistence histograms instead of persistence clusters (see Section 3.4). Here, the histogram breakpoints b 1 , · · · , b L are chosen such that there is (roughly) an equal sum of persistences within each histogram bin in the first solar flare image. The Hotelling's T 2 is performed using the 30 extracted principal components from PCA on the image data, and the MMD test is performed on the image data directly, with the RBF kernel, and the bandwidth is chosen using the "median trick" as describe in Section 4. The Wasserstein distance approach is performed on the mapped PDs from lower star filtration. Figure 11 shows the proposed detection statistic χ max t using L = 10 histogram bins, the Hotelling's T 2 , the MMD test statistics and the Wasserstein distance over time. For PERCEPT, we note a sudden increase in the test statistic after the true change-point t * = 49 (vertical red dashed line), which suggests the proposed method is able to pick out the underlying topological change in the images with little detection delay. Comparatively, for the Hotelling's T 2 , the increase in its test statistic is much more subdued and gradual, which indicates a much larger detection delay. The MMD approach yields poor performance here: its pre-change statistics are highly volatile and unstable, and its post-change statistics experience a decrease after the change-point. The Wasserstein distance approach is not able to detect the change: there is no large change in statistics at the change-point. This shows that, by learning and integrating low-dimensional topological structure within a non-parametric change detection framework, the proposed approach can yield significant improvements over existing methods when such structure is indeed present for image data.
We also note that, despite the required mapping from images to PDs via the lower star filtration, PERCEPT is quite computationally efficient. This is due in large part to the availability of well-maintained packages for TDA algorithms. Here, using the Python package Ripser (Tralie et al., 2018), the computation time for performing the lower star filtration on 300 images is approximately 90 seconds on a standard desktop computer. Given this computed filtration, the detection statistic χ max t can then be evaluated with minimal additional computation, thus allowing for efficient topology-aware online detection.

Human Gesture Change Detection
Next, we investigate the performance of PERCEPT in a human gesture detection application. The detection of human body gestures is an important task in computer vision (Turaga et al., 2008), and has immediate applications in visual surveillance and sign language interpretation (Oh et al., 2011). One challenge for this detection lies in the high-dimensional time series data, and the low-dimensional embedding of human body gestures within such data. Recent developments in time series analysis suggest that many time series features can be captured via TDA (further details below), and thus PERCEPT may be promising for this task. To explore this, we will use the human gestures dataset from the Microsoft Research Cambridge-12 Kinect (Fothergill et al., 2012), which consists of time series observations of human skeletal body part movements, collected from 20 sensors on 30 people performing 12 distinct gestures. We study in particular the transition of gestures from a "bow" to a "throw" sequence, as shown in Figure 12a.
To apply PERCEPT, we need to first transform the multi-dimensional time series to point cloud data, on which the usual TDA pipeline (see Section 2.1) can then be performed.
A popular transformation for this is Taken's embedding (Gidea and Katz, 2017), which is widely used in TDA. Suppose we observe the d-dimensional time series {z k (t), t ≥ 0}, k = 1, · · · , d (here, d = 20 × 3 = 60, since each of the 20 body sensors return a 3-D coordinate). For each time t, define the point z t = (z 1 (t), · · · , z d (t)) as the cross-section of the multivariate time series. With a given window size w, Taken's embedding returns the point cloud representation Z t = {z i , · · · , z i+w−1 } at each time t. After this transformation from a d-dimensional time series to the point cloud Z t , one can then perform the standard TDA filtration in Section 2.1 to convert Z t to a persistence diagram D t . It can be shown (Gidea and Katz, 2017) that this embedding captures key periodicity and dynamic system information on the multivariate time series. Figure 12b provides a visualization of Taken's embedding. Here, we set the window size w to be approximately the periodicity of the gestures, which is based on prior knowledge.
With this, we can then apply PERCEPT for detecting gesture changes. A quick inspection shows that there are limited points in the computed PDs D t . Thus we use the persistence histograms in Section 3.1 rather than the persistence clusters in Section 3.4. We then used 60 frames from "bow" and "throw" sequences to choose the number of histogram bins and optimize weights. The Hotelling's T 2 is performed using the 30 extracted principal components from PCA on the embedded point cloud data Z t , and the MMD test is performed on the embedded point cloud data Z t directly, with the RBF kernel, and the bandwidth is chosen using the "median trick" as described in Section 4. The Wasserstein distance approach is performed on the mapped PDs from the Rips filtration. Figure 13 shows the proposed detection statistic χ max t using L = 2 histogram bins, the Hotelling's T 2 , the MMD test statistics, and the Wasserstein distance over time, with the vertical line indicating the true change-point (i.e., the transition from "bow" to "throw").
For PERCEPT, we see the test statistic is relatively stable pre-change and experiences a large jump immediately after the change. This suggests our method has a large ARL and small detection delay, which is as desired. The Hotelling's T 2 again experiences a much more subtle and gradual increase after the change, which indicates a large detection delay.
As before, the MMD method performs poorly: its pre-change statistic is highly unstable pre- change and experiences a notable decrease post-change, which suggests it is unable to detect the change at all. The Wasserstein distance is again not able to detect the change-point. The distance hits zero regularly, indicating the similar topological structure between the adjacent embedded point clouds, which shows the importance of using historical data for change-point detection. This demonstrates the advantages of a topology-aware non-parametric change detection framework: when such a low-dimensional structure exists and can be leveraged, one can achieve efficient monitoring performance even with high-dimensional data.

Conclusion
We have proposed a novel topology-aware, non-parametric monitoring framework called the Persistence Diagram-based Change-Point Detection (PERCEPT) method, which leverages tools from topological data analysis for change detection. The idea is to first extract the topological structure of the data via persistence diagrams, then leverage a non-parametric, histogram-based change detection approach on these diagrams to sequentially detect topological changes. A suite of simulation experiments and two applications show that, when the underlying change is topological in nature, the proposed PERCEPT approach yields noticeably improved detection performance over existing approaches.
Despite these promising results, there are several interesting future directions for refining PERCEPT for broader applications. First, we are exploring a more localized detection approach, which can pinpoint and monitor local changes (e.g., local translation/rotation shifts) in topology. Second, there has been recent work on two-parameter persistence (Wright and Zheng, 2020), particularly on its robustness in extracting topological structure in the presence of noise; integrating such ideas within PERCEPT would allow for a more robust topology-aware monitoring approach. Finally, we will investigate broader uses of PERCEPT in applications for which TDA has found recent success, particularly neuroscience (Wang et al., 2020(Wang et al., , 2022 and complex physical systems (Mak et al., 2018).

Appendices
A Experiments for approximating the ARL and EDD as we used in computing the ARL, and find the average detection delay over n sequences.

B Details on the lower star filtration
When a new vertex is added in the sublevel set, the topological change depends on whether the vertex is a maximum, minimum, regular, or a saddle of the function. Figure   14 visualizes a regular point and saddle point (in yellow), and the edges and faces in the sublevel sets (in blue). The topological features do not change after introducing a regular point, but the number of connected components decreases by one after introducing a saddle point.

C Connection on distributional & bottleneck distances
Here, we elaborate further on the connection between the difference between the preand post-change persistence distributions, p pre − p post 2 , and its corresponding bottleneck distance d B (D pre , D post ). Since the bottleneck distance is defined on the sampled PDs D pre and D post at a given time t, we will make this connection on the empirical pre-and post-change persistence distributionsp pre andp post at time t, respectively.
The following proposition provides a link between the empirical persistence distribution difference p pre −p post 2 and the bottleneck distance of its corresponding persistence diagrams In other words, as the number of histogram bins L goes to infinity, the distributional difference ||p pre −p post || 2 can be lower bounded by the bottleneck distance d B (D pre , D post ).
This, combined with Equation (7) of the main paper, suggests that the greater the topological difference is between pre-and post-change data, the smaller its detection delay, which is as desired.