Here, we will present the tools needed to build our method, including time-delay embedding, and an overview of the necessary topological tools. Specifically, we briefly introduce homology, persistent homology, and zigzag persistent homology. However, we will not go into detail and instead direct the interested reader to [
28,
29,
30] for more detail on homology, persistent homology, and zigzag persistent homology, respectively.
2.1. Homology and Persistent Homology
Homology is a tool from the field of algebraic topology that encodes information about shape in various dimensions. Zero-dimensional homology studies connected components, 1-dimensional homology studies loops, and 2-dimensional homology studies voids. Persistent homology is a method from TDA which studies the changing homology of a parameterized space.
For the purposes of this paper, we will focus on persistent homology applied to point cloud data. Here, we need only assume that a point cloud is a collection of points with a notion of distance; however, in practice, this distance often arises from a point cloud in Euclidean space inheriting the ambient metric. Given a collection of points, we will build connections between points based on their distance. Specifically, we will build simplicial complexes, which are spaces built from different dimensional simplices. A 0-simplex is a vertex, a 1-simplex is an edge, a 2-simplex is a triangle, and in general, a p-simplex is the convex hull of affinely independent vertices. Abstractly, a p-simplex can be represented by the set of vertices from which it is built. Therefore, a simplicial complex, , is a family of sets that is closed under taking subsets. That is, given a p-simplex, , in , any simplex consisting of a subset of the vertices of size , called a k-dimensional face of , is also in .
To create a simplicial complex from a point cloud, we use the Vietoris–Rips complex (sometimes just called the Rips complex). Given a point cloud,
X, and a distance value,
r, the Vietoris–Rips complex,
, consists of all simplices for which vertices have a maximum pairwise distance at most
r. Taking a range of distance values,
gives a set of simplicial complexes,
. Since the distance values strictly increase, we have a nested sequence of simplicial complexes
called a filtration. Computing
p-dimensional homology,
, for each complex in the filtration gives a sequence of vector spaces and linear maps,
Persistent homology tracks how homological features such as connected components and loops change through the filtration. Specifically, it records at what distance value a feature first appears and when a feature disappears or connects with another feature. These distance values are called the “birth” and “death” times, respectively. These birth and death times are represented as a persistence diagram, which is a multiset of the birth death pairs .
2.2. Time-Delay Embedding
In order to analyze time-series data using persistent homology, we will use a tool from nonlinear time-series analysis called the time-delay embedding. Here, we will give an intuitive overview of the method; however, we refer the interested reader to [
31] for more details.
Time-delay embedding is a method used to reconstruct an attractor of a dynamical system given only one observation function. This is done by taking the observation function,
, and two parameters, an embedding dimension
d and a delay (or lag)
. The reconstruction is then the point cloud
. Due to theoretical results from Takens [
32] and Whitney [
33], given that the right choices of parameters and some underlying assumptions are satisfied, this reconstruction is in fact an embedding. Thus, the reconstruction has the same topological structure as the attractor of the dynamical system. In practice, not all parameter choices are optimal, and while there are no theoretical guarantees on how to pick the best parameters, many heuristics for making reasonable parameter choices have been developed [
34,
35,
36,
37,
38,
39].
Significant work has been done in using persistent homology on time-delay embeddings. Specifically, in [
1], the authors provide a full theoretical analysis of persistent homology for time-series analysis. The authors show that maximum persistence of the persistence diagram computed from the time-delay embedding can be used to quantify periodicity. Additionally, they provide a description of how persistence diagrams change depending on the embedding dimension and the delay parameter. This work provides sound theoretical backing for the use of persistent homology on time-delay embeddings.
In existing methods combining TDA with time-series analysis, most works analyze a collection of time series by embedding each one into a point cloud using time-delay embedding. However, this can be computationally expensive and requires analysis of the collection of computed persistence diagrams. Instead, we will employ a generalized version of persistent homology to avoid these additional steps.
2.3. Zigzag Persistent Homology
Persistent homology requires a nested collection of simplicial complexes as in Equation (
1). Zigzag persistence is a generalization of persistent homology that can study a collection of simplicial complexes where the inclusions go in different directions. In particular, it can be used to study a group of point clouds simultaneously; however, it requires a choice of parameters for each point cloud which induces a simplicial complex. Specifically, the input to zigzag persistence is a sequence of simplicial complexes with maps,
where ↔ is either an inclusion to the left or to the right. While in general these inclusions can go in any direction in any order, for this paper, we will focus on a specific setup for the zigzag based on a collection of point clouds.
Given an ordered collection of point clouds,
, we can define a set of inclusions,
However, these are all still point clouds, which have uninteresting homology. Thus, we can compute the Vietoris–Rips complex of each point cloud for a fixed radius,
r. This results in the diagram of inclusions of simplicial complexes
Computing the 1-dimensional homology of each complex in Equation (5) will result in a zigzag diagram of vector spaces and induced linear maps,
Zigzag persistence tracks how homologically equivalent features appear and disappear through this zigzag. This means it records the range of the zigzag filtration where the same feature appears, specifically the “birth” and “death” relating to the locations in the zigzag rather than to the choice of
r. If a feature appears in
, it is assigned birth time
i, and if it appears at
, it is assigned birth time
. Similarly, if a feature last appears in
, it is assigned a death time
, while if it last appears in
, it is assigned a death time of
. A small example is shown in
Figure 1. In this example, there is a 1-dimensional feature that appears in
and disappears going into
; thus, it appears in the zigzag persistence diagram as the point
. Additionally, there is one connected component that exists through the zigzag, corresponding to the 0-dimensional persistence point
. By default, we assume all features die at the end of the zigzag, rather than having persistence points of the form
as in standard persistence. There is one additional connected component that first appears in
, corresponding to the 0-dimensional persistence point
Note that we can easily generalize this idea to use a different radius for each Rips complex, . For the unions, we choose the maximum radius between the two individual point clouds, , to ensure the inclusions hold.
2.4. Bifurcations Using Zigzag (Buzz)
We can now present our method, Bifurcations using ZigZag (BuZZ), for combining the above tools to detect changes in dynamical systems, specifically changes that appear as a change in circular structure in the solution. We will focus on Hopf bifurcations [
40], which are seen when a fixed point loses stability and a limit cycle is introduced. These types of bifurcations are particularly topological in nature, as the solution to the dynamical system changes from a small cluster to a circular structure and sometimes reduces back to a cluster. While persistent homology has been used to study Hopf bifurcations [
41,
42,
43,
44], none of the existing methods use zigzag persistence.
The necessary data for our method is a collection of time series for a varying input parameter value, as shown in
Figure 2a. This particular example is a collection of time series given by
for
(going from top to bottom). Each time series is then embedded using time-delay embedding (shown in
Figure 2b using
and
). While in general the delay could be varied for each time series, the embedding dimension needs to be fixed so each time series is embedded in the same space. For the sake of interpretability and visualization, we will use a dimension of
throughout this paper. Sorting the resulting point clouds based on the input parameter value, the zigzag filtration can be formed from the collection of point clouds, as shown in
Figure 2c. Lastly, computing zigzag persistence gives a persistence diagram, as shown in
Figure 2d, encoding information about the structural changes moving through the zigzag.
With the right choices of parameters, the 1-dimensional persistence point with the longest lifetime in the zigzag persistence diagram will have birth and death times corresponding to the indices in the zigzag where the Hopf bifurcation appears and disappears. Lastly, mapping the birth and death times back to the parameter values used to create the corresponding point clouds will give the range of parameter values where the Hopf bifurcation occurs.
Note that there are several parameter choices that need to be selected during the course of the BuZZ method: first, the dimension
d and delay
converting each time series into a point cloud. Fortunately, there is a vast literature from the time-series analysis literature for this, which leads to standard heuristics, some of which are published in [
34,
35,
36,
37,
38,
39]. The second and more difficult parameter to choose is the radius (or radii) for the Rips complexes. In this paper, the given examples are simple enough that the choice of radii in the BuZZ method can be tuned by the user. In the tuning process, the user should select a radius that allows points in the circular structure to be connected but not so large that it fills in the circle or makes the Rips complexes too large to be computationally feasible. However, in future work, we would like to create new methods and heuristics for choosing these radii.
2.5. Algorithms
While zigzag persistence has been in the literature for a decade, it has not often been used in application, and thus, the software that computes it is not well developed. A C++ package with python wrappers, Dionysus 2 (
https://www.mrzv.org/software/dionysus2/), has implemented zigzag persistence; however, it requires significant preprocessing to create the inputs. We have developed a python package (
https://github.com/sarahtymochko/BuZZ) that, provided the collection of point clouds and radii, will perform all the necessary preprocessing to set up the zigzag diagram as shown in Equation (5) to pass as inputs to Dionysus.
Dionysus requires two inputs, a list of simplices,
simplex_list, and a list of lists,
times_list, where
times_list[i] consists of a list of indices in the zigzag where the simplex,
simplex_list[i], is added and removed. A small example is shown in
Figure 3. Looking at that example, the two vertices and one edge in
appear at time 0 and disappear at time 1. There are two edges and a triangle in
that appear at time 0.5 (recalling that
is time
) and disappear at time 1. Lastly, the one vertex in
appears at time 0.5 and never disappears in the zigzag sequence; therefore, by default, we set death time to be 2, which is the next index beyond the end of the zigzag sequence. This is done to avoid persistence points of the form
, as our zigzag sequences are always finite and these points have no additional meaning. Note that there are other special cases that can occur. If a simplex is added and removed multiple times, then the corresponding entry in
times_list has more than two entries, where the zero and even entries in the list correspond to when it appears and the odd entries correspond to when it disappears. An example with this special case is shown in
Figure 4 and will be described in more detail later.
If we are using a fixed radius across the whole zigzag, these inputs can be computed rather easily. In this setting, we only need to compute the Rips complex of the unions, , which can be done using the Dionysus package, and the list of simplices can be created by combining lists of simplices for all i, removing duplicates. Next, we will outline how to construct the times list. Starting with the set of simplices in , we can split them into three groups: (a) simplices for which all 0-dimensional faces are in , (b) simplices for which all 0-dimensional faces are in , or (c) simplices for which some 0-dimensional faces are in and some are in . Because of the construction of the zigzag, all simplices in group (a) appear at time , since also includes backwards and disappears at time , since the union is the last time that simplices in are included. Similarly, all simplices in group (b) appear at time , since this is the first time simplices are included and disappear at time , since also includes forward . Lastly, all simplices in group (c) exist only at , so they appear at time and disappear at . Note that the first case needs to be treated separately, since in , all vertices in group (a) will appear at 0.
Using a varied radius, as described in
Section 2.3, complicates the above procedure. Using the same radius, we are guaranteed that all simplices in group (a) are in both
and
and similarly for group (b); thus, we only need to compute
. However, with a changing radius, this is no longer true. In the example shown in
Figure 4, the edge
appears in both
and
since
and
, but it is not in
. Thus, its corresponding list in
times_list is
. Thus, the inputs to Dionysus can be computed using the same method as above except the Rips complex needs to be computed for each point cloud, not just the unions, and additional checks need to be done to make sure a simplex being added did not already appear and disappear once before. If it did, the entry in
times_list needs to be extended to account for the newest appearance and disappearance.
Because of the additional Rips complex computations and the checks for the special case, the case of a changing radius is significantly more computationally expensive than the case of a fixed radius. In both cases, there is the computational cost of the zigzag persistence computation as well. The computational complexity of zigzag persistence is
, where
n is the number of simplices in the entire filtration and
m is the number of simplices in the largest single complex [
45]. Thus, the most computationally expensive step is computing the zigzag persistence computation itself. To alleviate this as much as possible, a radius for the Rips complexes should be selected so that it is as small as possible without breaking the circular structure and thus breaking the topology. Additionally, it needs to be chosen so that, in the union of point clouds, no small circles are created in the region between the ring-like structures, which would cause the larger circular structures to no longer be homologically equivalent. A unifying method for choosing such an
r is outside of the scope of this paper and the subject of future work.