Title: Diffeomorphic interpolation for efficient persistence-based topological optimization
Venue: NeurIPS 2024
Accepted: yes
Keywords: Persistent Homology

Persistence Diagrams

Optimization

Topological Data Analysis
Abstract: Topological Data Analysis (TDA) provides a pipeline to extract quantitative and powerful topological descriptors from structured objects. 
This enables the definition of topological loss functions, which assert to which extent a given object exhibits some topological properties. 
One can then use these losses to perform topological optimization via gradient descent routines. 
While theoretically sounded, topological optimization faces an important challenge: gradients tend to be extremely sparse, in the sense that the loss function typically depends (locally) on only very few coordinates of the input object, yielding dramatically slow optimization schemes in practice. 

In this work, focusing on the central case of topological optimization for point clouds, we propose to overcome this limitation using diffeomorphic interpolation, turning sparse gradients into smooth vector fields defined on the whole space. 
In particular, this approach combines efficiently with subsampling techniques routinely used in TDA, as the diffeomorphism derived from the gradient computed on the subsample can be used to update the coordinates of the full and possibly large input object. We then illustrate the usefulness of our approach on black-box autoencoder (AE) regularization, where we aim at applying some topological priors on the latent spaces associated to fixed, black-box AE models without modifying their (unknown) architectures and parameters. We empirically show that, while vanilla topological optimization has to be re-run every time that new data comes out of the black-box models, learning a diffeomorphic flow can be done once and then re-applied to new data in linear time. Moreover, reverting the flow allows us to generate data by sampling the topologically-optimized latent space directly, allowing for better interpretability of the model.

Diffeomorphic interpolation for efficient persistence-based topological optimization

Abstract

Topological Data Analysis (TDA) provides a pipeline to extract quantitative topological descriptors from structured objects. This enables the definition of topological loss functions, which assert to what extent a given object exhibits some topological properties. These losses can then be used to perform topological optimization via gradient descent routines. While theoretically sounded, topological optimization faces an important challenge: gradients tend to be extremely sparse, in the sense that the loss function typically depends on only very few coordinates of the input object, yielding dramatically slow optimization schemes in practice. Focusing on the central case of topological optimization for point clouds, we propose in this work to overcome this limitation using diffeomorphic interpolation , turning sparse gradients into smooth vector fields defined on the whole space, with quantifiable Lipschitz constants. In particular, we show that our approach combines efficiently with subsampling techniques routinely used in TDA, as the diffeomorphism derived from the gradient computed on a subsample can be used to update the coordinates of the full input object, allowing us to perform topological optimization on point clouds at an unprecedented scale. Finally, we also showcase the relevance of our approach for black-box autoencoder (AE) regularization, where we aim at enforcing topological priors on the latent spaces associated to fixed, pre-trained, black-box AE models, and where we show that learning a diffeomorphic flow can be done once and then re-applied to new data in linear time (while vanilla topological optimization has to be re-run from scratch). Moreover, reverting the flow allows us to generate data by sampling the topologicallyoptimized latent space directly, yielding better interpretability of the model.

1 Introduction

Persistent homology (PH) is a central tool of Topological Data Analysis (TDA) that enables the extraction of quantitative topological information (such as, e.g., the number and sizes of loops, connected components, branches, cavities, etc) about structured objects (such as graphs, times series or

point clouds sampled from, e.g., submanifolds), summarized in compact descriptors called persistence diagrams (PDs). PDs were initially used as features in Machine Learning (ML) pipelines; due to their strong invariance and stability properties, they have been proved to be powerful descriptors in the context of classification of time series [42, 19], graphs [5, 23, 24], images [2, 25, 16], shape registration [7, 6, 36], or analysis of neural networks [22, 3, 26], to name a few.

̸

where ℓ is a user-chosen loss function that quantifies to what extent Dgm( X ) reflects some prescribed topological properties inferred from X . Under mild assumptions (see Section 2), the map L is differentiable generically and its gradients are obtained as a byproduct of the computation of Dgm( X ) . However, these approaches are limited in practice by two major issues: ( i ) the computation of X ↦→ Dgm( X ) scales poorly with the size of X (e.g., number of points n in a point cloud, number of nodes in a graph, etc), and ( ii ) the gradient ∇ L ( X ) tends to be very sparse : if X = ( x 1 , . . . , x n ) ∈ R n × d is a point cloud, ∇ L ( X ) i = 0 for only very few indices i ∈ { 1 , . . . , n } (the corresponding points are called the critical points of the topological gradient, see Section 2.1).

Related works. Several articles have studied topological optimization in the TDA literature. The standard, or vanilla , framework to define and study gradients obtained from topological losses was described in [4, 28], where the high sparsity and long computation times were first identified. To mitigate this issue, the authors of [34] introduced the notion of critical set that extends the usually sparse set of critical points in order to get a gradient-like object that would update more points in X . In [39], the authors used an average of the vanilla topological gradients of several subsamples to get a denser and faster gradient. On the theoretical side, the authors of [27] demonstrated that adapting the stratified structure induced by PDs to the gradient definition enables faster convergence.

Limitations. Despite proposing interesting ways to accelerate gradient descent, the approaches mentioned above are still limited in the sense that their proposed gradients are not defined on the whole space, but only on a sparse subset of the current observation X , which still prevents their use in different contexts, that we investigate in our experiments (Section 4). First, when the data has more than tens of thousands of points, the number of subsamples needed to capture relevant topological structures (when using [39]), as well as the critical set computations (when using [34]), both become practically infeasible . Second, when optimizing the topology of datasets obtained as latent spaces of a black-box autoencoder model (i.e., an autoencoder with forbidden access to its architecture, parameters, and training), then ( a ) the topological gradients of [39, 34] cannot be reused to process new such datasets, and topological optimization has to be performed from scratch every time that new data comes in, ( b ) this also impedes their transferability , as re-running gradient descent every time makes it very difficult to guarantee some stability for the final output, and finally ( c ) one cannot generate new data by sampling the optimized latent spaces directly, as it would require to apply the sequence of reverted gradients (which are not well-defined everywhere).

̸

Contributions and Outline. In this article, we propose to replace the standard gradient ∇ L ( X ) of ( ?? ) derived formally by a diffeomorphism v : R d → R d that interpolates ∇ L ( X ) on its non-zero entries, that is v ( x i ) = ∇ L ( X ) i for all i ∈ I := { j | ∇ L ( X ) j = 0 } and is, in some sense, as smooth as possible. More precisely, our contribution is three-fold:

We introduce a diffeomorphic interpolation of the vanilla topological gradient, which extends this gradient to a smooth and denser vector field defined on the whole space R d , and which is able to move a lot more points in X at each iteration,

t

t

= 0

t

= 1

t

= 2

t

= 3

t

= 5

births

deaths

t

0

1

2

2

3

5

We prove that its updates indeed decrease topological losses, and we quantify its smoothness by upper bounding its Lipschitz constant (again, in the context of topological losses),

We showcase its practical efficiency: we show that it compares favorably to the main baseline [34] in terms of convergence speed, that its combination with subsampling [39] allows to process datasets whose sizes are currently out of reach in TDA, and that it can successfully be used for the tasks mentioned above concerning black-box autoencoder models.

Section 2 provides necessary background in Topological Data Analysis and diffeomorphic interpolations. Section 3 presents our approach and its corresponding guarantees, and Section 4 showcases our experiments. Limitations and further research directions are discussed in Section 5.

2 Background

2.1 Topological Data Analysis

In this section, we recall the basic materials of Topological Data Analysis (TDA), and refer the interested reader to [20, 35] for a thorough overview. We restrict the presentation to our case of interest: extracting topological information from a point cloud using the standard Vietoris-Rips (VR) filtration. A more extensive presentation of the TDA machinery is provided in Appendix A.

Let X = ( x 1 , . . . , x n ) ∈ R n × d . The Vietoris-Rips filtration consists of building an increasing sequence of simplicial complexes ( K t ) t ≥ 0 over X by inserting a simplex σ = ( x i 1 , . . . , x i p ) whenever ∀ j, j ′ ∈ { 1 , . . . , p } , ∥ x i j -x i j ′ ∥ ≤ t . Each time a simplex σ is inserted, it either creates a topological feature (e.g., inserting a face creates a cavity, that is a 2 -dimensional topological feature) or destroy a pre-existing feature (e.g., the face insertion fills a loop, that is a 1 -dimensional feature, making it topologically trivial). The persistent homology machinary tracks the apparition and destruction of such features in the so-called persistence diagram (PD) of X , denoted by Dgm( X ) . Therefore, Dgm( X ) is a set of points in R 2 of the form ( t b , t d ) with t d ≥ t b , where each such point accounts for the presence of a topological feature inferred from X that appeared at time t b following the insertion of an edge ( x i 1 , x i 2 ) with ∥ x i 1 -x i 2 ∥ = t b and disappeared at time t d following the insertion of an edge ( x i 3 , x i 4 ) with ∥ x i 3 -x i 4 ∥ = t d . Figure 1 illustrates this construction. From a computational standpoint, computing the VR diagram of X ∈ R n × d that would reflect topological features of dimension d ′ ≤ d runs in O ( n d ′ +2 ) , making the computation quickly unpractical when n increases, even when restricting to low-dimensional features such as connected components ( d ′ = 0 ), loops ( d ′ = 1 ) or cavities ( d ′ = 2 ).

Topological optimization. PDs are made to be used in downstream pipelines, either as static features (e.g., for classification purposes) or as intermediate representations of X in optimization schemes. In this work, we focus on the second problem. We formally consider the minimization of objective functions of the form

Here, ℓ represents a loss function taking value from the space of PDs, denoted by D in the following. The space D can be equipped with a canonical metric, denoted by W and whose formal definition is not required in this work, for which a central result is that the map X ↦→ Dgm( X ) is stable (Lipschitz continuous) [17, 18, 38]. Therefore, if ℓ is Lipschitz continuous, so is L , hence it admits a gradient almost everywhere by Rademacher theorem. Building on these theoretical statements, one

can consider the 'vanilla' gradient descent update X k +1 := X k -λ ∇ L ( X k ) for a given learningrate λ > 0 and iterate it in order to minimize (1). Theoretical properties of this seminal scheme (and natural extensions, e.g., stochastic gradient descent) have been studied in [4, 27], where convergence (to a local minimum of L ) is proved.

From a computational perspective, deriving ∇ L ( X ) comes in two steps. Let µ := Dgm( X ) , written as µ = { ( b i , d i ) | i ∈ I } for some finite set of indices I . To each i ∈ I correspond four (possibly coinciding) points x i 1 , x i 2 , x i 3 , x i 4 in the input point cloud X . Intuitively, minimizing µ ↦→ ℓ ( µ ) boils down to prescribe a descent direction ( δb i , δd i ) ∈ R 2 to each ( b i , d i ) for i ∈ I , where δb i = ∂ℓ ∂b i ( µ ) and δd i = ∂ℓ ∂d i ( µ ) . Backpropagating this perturbation to X will move the corresponding points x i 1 , x i 2 , x i 3 , x i 4 in order to increase or decrease the distances ∥ x i 1 -x i 2 ∥ = b i and ∥ x i 3 -x i 4 ∥ = d i accordingly. This yields to the following formula:

where the notation x → ( b i , d i ) means that x ∈ X appears in (at least) one of the four points yielding the presence of ( b i , d i ) in the diagram µ = Dgm( X ) . A fundamental contribution of [28, §3.3] is to prove that the chain rule formula (2) is indeed valid 2 . Most of the time, a point x ∈ X will not belong to any critical pair ( σ b , σ d ) and the above gradient coordinate is 0 . Therefore, the gradient of L depends on very few points of X , yielding the sparsity phenomenon discussed in Section 1.

Examples of common topological losses. Let X = ( x 1 , . . . , x n ) ∈ R n × d be a point cloud and Dgm( X ) = { ( b i , d i ) | i ∈ I } be its PD. There are several natural losses that have been introduced in the TDA literature:

Topological simplification losses: typically of the form ∑ i ∈ ˜ I ( b i -d i ) 2 , where ˜ I ⊆ I . Such losses push (some of the) points in Dgm( X ) toward the diagonal ∆ = { b = d } , hence destroying the corresponding topological features appearing in X .

Topological augmentation losses [4]: similar to simplification losses, but typically attempting to push points in Dgm( X ) away from ∆ , i.e., minimizing -∑ i ∈ ˜ I ( b i -d i ) 2 , to make topological features of X more salient. As such losses are not coercive, they are usually coupled with regularization terms to prevent points in X going to infinity.

Topological registration losses [21]: given a target diagram D target , one minimizes W (Dgm( X ) , D target ) where W denotes a standard metric between persistence diagrams. This loss attempts to modify X so that it exhibits a prescribed topological structure.

2.2 Diffeomorphic interpolations

In order to overcome the sparsity of gradients appearing in TDA, we rely on diffeomorphic interpolations (see, e.g., [43, Chapter 8]). Let X = ( x 1 , . . . , x n ) ∈ R n × d , let I ⊆ { 1 , . . . , n } denote the set of indices on which ∇ L ( X ) is non-zero and let a i := ( ∇ L ( X )) i ∈ R d for i ∈ I . Our goal is to find a smooth vector field ˜ v : R d → R d such that, for all i ∈ I , ˜ v ( x i ) = a i . To formalize this, we consider a Hilbert space H ⊂ ( R d ) R d for which the map δ α x : f ↦→⟨ α, f ( x ) ⟩ R d = α T f ( x ) is continuous for any ( α, x ) ∈ R d × R d . Such a space is called a Reproducing Kernel Hilbert Space (RKHS) 3 . A crucial property is that there exists a matrix-valued kernel operator K : R d × R d → R d × d whose outputs are symmetric and positive definite, and related to H through the relation ⟨ k α x , k β y ⟩ H = α T K ( x, y ) β for all x, y, α, β ∈ R d , where k α x ∈ H is the unique vector provided by the Riesz representation theorem such that ⟨ k α x , f ⟩ = ⟨ α, f ( x ) ⟩ . Conversely, any such kernel K induces a (unique) RKHS H (of which K is the reproducing kernel). Now, we can consider the following problem:

that is, we are seeking for the smoothest (lowest norm) element of H that solves our interpolation problem. The solution ˜ v of this problem is the projection of 0 onto the affine set { v ∈ H | v ( x i ) =

a i , ∀ i ∈ I } . Observe that ˜ v belongs to the orthogonal of { v ∈ H | v ( x i ) = 0 , ∀ i ∈ I } , and thus of { v ∈ H | ⟨ k α i x i , v ⟩ H = 0 , ∀ i ∈ I, α i ∈ R d } , and therefore ˜ v ∈ span( { k α i x i | i ∈ I } ) . This justifies to search for ˜ v in the form of ˜ v ( x ) = ∑ i ∈ I K ( x, x i ) α i , and the interpolation that it must satisfy yields ˜ v ( x ) = ∑ i ∈ I K ( x, x i )( K -1 a ) i , where K is the block matrix ( K ( x i , x j )) i,j ∈ I and a = ( a i ) i ∈ I . See also [43, Theorem 8.8]. In particular, it is important to note that ˜ v inherits from the regularity of K and will typically be a diffeomorphism in this work. If K is the Gaussian kernel defined by K ( x, y ) := exp ( -∥ x -y ∥ 2 2 σ 2 ) I d for some bandwidth σ > 0 , a choice to which we stick to in the rest of this work, the expression of ˜ v reduces to

where ρ σ ( u ) := e -u 2 2 σ 2 , and α i := ( K -1 a ) i with K = ( ρ σ ( ∥ x i -x j ∥ ) I d ) i,j ∈ I . Note that ˜ v can be understood as the convolution of a with a Gaussian kernel, but involving a correction K -1 guaranteeing that after the convolution, the interpolation constraint is satisfied. We will call ˜ v the diffeomorphic interpolation associated to the vectors and indices { a i | i ∈ I } .

3 Diffeomorphic interpolation of the vanilla topological gradient

3.1 Methodology

Weaimat minimizing a loss function L : X ↦→ ℓ (Dgm( X )) as in (1), starting from some initialization X 0 , and assuming that L is lower bounded (typically by 0 ) and locally semi-convex. This assumption is typically satisfied by the topological losses ℓ introduced in Section 2.1. Gradient descents implemented in practice are (explicit) discretization of the gradient flow

where ∂L ( X ) := { v | L ( Y ) ≥ L ( X ) + v · ( Y -X ) + o ( Y -X ) for all X,Y } denotes the subdifferential of L at X . Note that a topological loss L is typically not differentiable everywhere, since the map X ↦→ Dgm( X ) is differentiable almost everywhere but not in C 1 , 1 . However, uniqueness of the gradient flow on a maximal interval [0 , + ∞ [ is guaranteed if L is lower bounded and locally semi-convex [15, §B.1].

In this work, we propose to use the dynamic described by the diffeomorphism ˜ v t introduced in (4) interpolating the current vanilla topological gradient ∇ L ( X t ) at each time t , formally considering solutions ˜ X of

Here, slightly overloading notation, ˜ v t ( ˜ X ( t )) denotes the n × d matrix where the i -th line is given by ˜ v t ( ˜ X ( t ) i ) . The flow at time T associated to (6) is the map

1.0

0.5

0.0

0.5

1.0

1.0

0.5

0.0

0.5

1.0

Point cloud

L

(

X

) (Vanilla)

v

(

X

) (Diffeo)

which can inverted by simply following the flow backward (i.e., by following ˜ v t instead of -˜ v t ). We now guarantee that at each time t , following ˜ v t instead of the vanilla topological gradient ∇ L ( X t ) still provides a descent direction for the topological loss L .

Proposition 3.1. For each t ≥ 0 , it holds that d L ( ˜ X ( t )) d t = -∥∇ L ( ˜ X ( t )) ∥ 2 ≤ 0 .

Moreover, it is also possible to upper bound the smoothness, i.e., the Lipschitz constant, of ˜ v :

Proposition 3.2. Let L be the simplification or augmentation loss computed with k = | ˜ I | PDpoints, as defined at the end of Section 2.1. Let ˜ v = ˜ v t be the diffeomorphic interpolation associated to the vanilla topological gradient at time t ≥ 0 . Then, one has, ∀ x, y ∈ R d and t ≥ 0 :

where C d = √ d · 2 3+ d +1 2 · π d -1 2 , κ ( K ) is the condition number of K , and Pers k (Dgm( ˜ X ( t ))) is the sum of the k largest distances to the diagonal in Dgm( ˜ X ( t )) .

The proof is deferred to Appendix B. This upper bound can be used to quantify how smooth the diffeomorphic interpolation is (as characterized with its Lipschitz constant) based on the parameters it is computed from. In the case of the Gaussian kernel, we found that our upper bound on the Lipschitz constant depends on the kernel bandwidth σ : indeed, the more spread the Gaussian function is, the more critical points can influence other data points potentially far from them, introducing unwanted distortions and larger Lipschitz constant. Similarly, if the condition number κ ( K ) is large, inverting the kernel matrix might introduce instabilities in Equation (4), and thus a larger Lipschitz constant as well. Finally, the total persistence also appears, as the more PD points one has to optimize, the more critical pairs will appear, and thus the more constrained Equation (3) is, leading to more complex diffeomorphic interpolation solutions with larger Lipschitz constants.

3.2 Subsampling techniques to scale topological optimization

As a consequence of the limited scaling of the Vietoris-Rips filtration with respect to the number of points n of the input point cloud X , it often happens in practical applications that computing the VR diagram Dgm( X ) of a large point set X ( a fortiori its gradient) turns out to be intractable. A natural workaround is to randomly sample s -points from X , with s ≪ n , yielding a smaller point cloud X ′ ⊂ X . Provided that the Hausdorff distance between X ′ and X is small, the stability theorem [18, 17, 8] ensures that Dgm( X ′ ) is close to Dgm( X ) . See [11, 12, 9] for an overview of subsampling methods in TDA.

However, the sparsity of vanilla topological gradients computed from topological losses strikes further when relying on subsampling: only a tiny fraction of the seminal point cloud X is likely to be updated at each gradient step. In contrast, using the diffeomorphic interpolation ˜ v (of the vanilla topological gradient) computed on the subsample X ′ still provides a vector field defined on the whole input space R d , in particular on each point of X and the update can then be performed in linear time with respect to n . This yields Algorithm 1. Figure 3 illustrates the qualitative benefits offered by the joint use of subsampling and diffeomorphic interpolations when compared to vanilla topological gradients. A larger-scale experiment is provided in Section 4.

Stopping criterion. A natural stopping criterion for Algorithm 1 is to assess whether the loss L ( X t ) = ℓ (Dgm( X t )) is smaller than some ε > 0 . However, computing Dgm( X t ) can be intractable if X t is large. Therefore, a tractable loss to consider is ˆ L ( X t ) := E [ ℓ (Dgm( X ′ t ))] , where

(a)

t

= 0

(b)

t

= 100

(Vanilla)

(c)

t

= 500

(Vanilla)

(d)

t

= 100

(Diffeo)

Full point cioudl

Vanilla gradient (neg)

Deformation

Chosen subsample

Fdll pxisr dkce1

Lkoes rs/ora.)l)

Vrxl gixt (reg)

Fvll poist cloel

(* s)

Vsalla psdit (oeg)

Full point cloud

Chosen subsample

(bau) sua(peb ejueA

Deformation

X ′ t is a uniform s -sample from X t . Under that perspective, Algorithm 1 can be re-interpreted as a kind of stochastic gradient descent on ˆ L , for which two standard stopping criteria can be used: ( a ) compute an exponential moving average of the loss on individual samples X ′ t over iterations, or ( b ) compute a validation loss, i.e., sample X ′ t, (1) , . . . , X ′ t, ( K ) and estimate ˆ L by K -1 ∑ K k =1 ℓ (Dgm( X ′ t, ( k ) )) . Empirically, we observe that the latter approach with K = n/s (more repetitions for smaller sample sizes to mitigate variance) yields the most satisfactory results (faster convergence toward a better objective X t ) overall, and thus stick to this choice in our experiments.

4 Numerical experiments

We provide numerical evidence for the strength of our diffeomorphic interpolations. PHrelated computations relies on the library Gudhi [40] and automatic differentiation relies on tensorflow [1]. The 'big-step gradient' baseline [34] implementation is based on oineus 4 . The first two experiments were run on a 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz , the last one on a 2x Xeon SP Gold 5115 @ 2.40GHz . Our code is publicly available at https: //github.com/tlacombe/topt .

Convergence speed and running times. We sample uniformly n = 200 points on a unit circle in R 2 with some additional Gaussian noise, and then minimize the simplification loss L : X ↦→ ∑ ( b,d ) ∈ Dgm( X ) | d | 2 , which attempts to destroy the underlying topology in X by reducing the death times of the loops by collapsing the points. The respective gradient descents are iterated over a maximum of 250 epochs, possibly interrupted before if a loss of 0 is reached ( Dgm( X ) is empty), with a same learning rate λ = 0 . 1 . The bandwidth of the Gaussian kernel in (4) is set to σ = 0 . 1 . We include the competitor oineus [34], as-even though relying on a fairly different construction-this method shares a key idea with ours: extending the vanilla gradient to move more points in X . We stress that both approaches can be used in complementarity: compute first the 'big-step gradient' of [34] using oineus , and then extend it by diffeomorphic interpolation. Results are displayed in Figure 4 5 . In terms of loss decrease over iterations , both 'big-step gradients" and our diffeomorphic interpolations significantly outperform vanilla topological gradients, and their combined use yields the fastest convergence (by a slight margin over our diffeomorphic interpolations alone). However, in terms of raw running times, the use of oineus involves a significant computational overhead, making our approach the fastest to reach convergence by a significant margin.

Subsampling. We now showcase how using our diffeomorphic interpolation jointly with subsampling routines (Algorithm 1) allows to perform topological optimization on point clouds with thousands of points, a new scale in the field. For this, we consider the vertices of the Stanford Bunny [41], yielding a point cloud X 0 ∈ R n × d with n = 35 , 947 and d = 3 . We consider a topolog-

1.0

0.5

0.0

0.5

1.0

1.0

0.5

0.0

0.5

1.0

Init.

1.0

0.5

0.0

0.5

1.0

1.0

0.5

0.0

0.5

1.0

Vanilla output

1.0

0.5

0.0

0.5

1.0

2

1

0

1

Diffeo output

1.0

0.5

0.0

0.5

1.0

1.0

0.5

0.0

0.5

1.0

Oineus output

0.5

0.0

0.5

1.0

6

4

2

0

2

4

6

Oineus+Diffeo output

Lossevolution throughiterations

Loss evolution over time,Vanilla vs Deformation

25

Vanilla

25

Vanilla

Deformation

Deformation

20

Oineus

Oineus+defo

20

Oineus+Deformation

Oineus

15

15

SSO7

SS07

10

10

5

5

C/W

0

0

50

100

150

200

250

0

10

20

30

40

50

60

70

Iteration

Time (s)

0

200

400

600

800

1000

Epoch

0.008

0.007

0.006

0.005

0.004

0.003

0.002

0.001

0.000

Loss

Evolution of loss over iterations

Vanilla

Diffeo

ical augmentation loss (see Section 2.1) for two-dimensional topological features, i.e., we aim at increasing the persistence of the bunny's cavity. The size of n makes the computation of Dgm( X 0 ) untractable (recall that it scales in O ( n 4 ) ); we thus rely on subsampling with sample size s = 100 and compare the vanilla gradient descent scheme and our scheme described in Algorithm 1. Results are displayed in Figure 5. Because it only updates a tiny fraction of the initial point cloud at each iteration, the vanilla topological gradient with subsampling barely changes the point cloud (nor decreases the loss) in 1,000 epochs. In sharp contrast, as our diffeomorphic interpolation computed on subsamples is defined on R 3 , it updates the whole point cloud at each iteration, making possible to decrease the objective function where the vanilla gradient descent is completely stuck. Note that a step of diffeomorphic interpolation, in that case, takes about 10 times longer than a vanilla step. An additional subsampling experiment can be found in Appendix C.

Black-box autoencoder models. Next, we apply our diffeomorphic interpolations to black-box autoencoder models. In their simplest formulation, autoencoders (AE) can be summarized as two maps E : R d → R d ′ and D : R d ′ → R d called encoder and decoder respectively. The intermediate space R d ′ in which the encoder E is valued is referred to as a latent space (LS), with typically d ′ ≪ d . In general, without further care, there is no reason to expect that the LS of a point cloud X , E ( X ) = { E ( x 1 ) , . . . , E ( x n ) } , reflects any geometric or topological properties of X . While this can be mitigated by adding a topological regularization term to the loss function during the training of the autoencoder [29, 4], this cannot work in the setting where one is given a black-box, pretrained AE. However, replacing ( E,D ) by ( φ ◦ E,D ◦ φ -1 ) for any invertible map φ : R d ′ → R d ′ yields an AE producing the same outputs yet changing the LS E ( X ) , without explicit access to the AE's model. Hence, we propose to learn such a φ with diffeomorphic interpolations: given some latent space E ( X ) , we apply T steps of our diffeomorphic gradient descent algorithm to X ↦→ ℓ (Dgm( X )) initialized at E ( X ) . We thus get a sequence of smooth displacements -˜ v 1 , . . . , -˜ v T of R d ′ that discretizes the flow (7) via φ : x 0 ↦→ x 0 -∑ T k =1 ˜ v k ( x k -1 ) where x k -x k -1 = -˜ v k ( x k -1 ) , and such that Dgm( φ ( E ( X ))) is more topologically satisfying. This fixed diffeomorphism φ can

5

-10

100

150

200

150

200

then be re-applied to any new data coming out of the encoder in a deterministic way. Moreover, any random sample from the topologically-optimized LS can be inverted without further computations by following ˜ v T , ˜ v T -1 , . . . , ˜ v 1 , which allows to push the new sample back to the initial LS, and then apply the decoder on it. Again, this cannot be achieved with baselines [39, 34].

In order to illustrate these properties, we trained a variational autoencoder (V AE) to project a family of datasets of images representing rotating objects, named COIL [32], to two-dimensional latent spaces. Given that every dataset in this family is comprised of 288 pictures of the same object taken with different angles, one can impose a prior on the topology of the corresponding LSs, namely that they are sampled from circles. However, the VAE architecture is shallow (the encoder has one fullyconnected layer (100 neurons), and the decoder has two (50 and 100 neurons), all layers use ReLu activations), and thus the learned latent spaces, although still looking like curves thanks to continuity, do not necessarily display circular patterns. This makes generating new data more difficult, as latent spaces are harder to interpret. To improve on this, we learn a flow φ as described above with an augmentation loss associated to the 1-dimensional PD point which is the most far away from the diagonal, in order to force latent spaces to have a significant one-dimensional topological feature, i.e., loop. As the datasets are small, we do not use subsampling, and we use learning rate λ = 0 . 1 , Gaussian kernels with bandwidth σ = 0 . 3 and an increase of at least 3 . in the topological loss (from an iteration to the next) to stop the algorithm 6 .

We provide some qualitative results in Figure 7 (see also Appendix C, Figure 10). In order to quantify the improvement, we also computed the Pearson correlation scores between the ground-truth angles θ i and the angles ˆ θ i computed from the topologically-optimized LSs with

where ˆ E [ φ ◦ E ( X )] := n -1 ∑ n i =1 φ ◦ E ( x i ) , and φ denotes our flow. In Table 1, we provide an average of these scores over 100 test sets obtained by randomly perturbing the training set with uniform noise of amplitude 0 . 05 . As expected, correlation becomes better after forcing the latent spaces to have the topology of a circle. This better interpretability is also illustrated in Figure 6, in which four angles are specified, which are mapped to the topologically-optimized LS, then pushed to the initial LS of the black-box VAE by following the reverted flow of our learned diffeomorphism φ , and finally decoded back into realistic, COIL -like images.

Optimized LS

Trajectories

Initial LS

Single-cell data. Wealso deployed our proposed topological correction of LSs from AEs on a realworld dataset of single cells. Specifically, we designed an experiment on single cell HiC (scHiC) data inspired from [27]. The dataset is comprised of single cells characterized by chromatin folding, that is, each cell is encoded by the spatial distance matrix of its DNA fragments. The dataset we focus on is taken from [31], in which it was shown that cells are sampled at different phases of the cell cycle. Thus, similar to COIL images, we expect latent embeddings of this dataset to exhibit a circular shape, that we can constrain with diffeomorphic topological optimization.

Specifically, we processed this single cell dataset of 1 , 171 cells with the stratum-adjusted correlation coefficient (SCC) with 500 kb and convolution parameter h = 1 on chromosome 10 . Then, we run kernel PCA on the SCC matrix to obtain a preprocessed dataset in R 100 , on which we applied the same VAE architecture than the one described above for COIL images. Finally, we optimized two losses, the first was the same augmentation loss than for the COIL images, the second was the following registration loss:

where Dgm( X ) contains the points of the PD of X with distance-to-diagonal at least τ = 1 , D target is a target PD with only one point p ∗ = [ -3 . 5 , 3 . 5] , and W is the 2-Wasserstein distance between PDs. We used σ = 0 . 2 for the augmentation loss and σ = 0 . 025 for the registration loss ( σ is set to a smaller value for the registration loss in order to mitigate the effects of matching instability), λ = 0 . 1 on 500 epochs, with subsampling of size s = 300 for computational efficiency (as computing VR diagrams without radius thresholding on 1 , 171 points already takes few minutes on a laptop CPU, which becomes hardly tractable if done repetitively as in gradient descent), and loss increase of 3 . as a stopping criterion. Qualitative results are displayed in Appendix C, Figure 11, and we also measured quantitative improvement with the correlation scores between latent space angles and repli scores 7 in Table 1, in which improvements can be observed. An additional experiment on the influence of the bandwidth parameter σ over these correlation scores, as well as over convergence, can also be found in Appendix C.

5 Conclusion

In this article, we have presented a way to turn sparse topological gradients into dense diffeomorphisms with quantifiable Lipschitz constants, and showcased practical benefits of this approach in terms of convergence speed, scaling, and applications to black-box AE models on several datasets. Several questions are still open for future work.

In terms of theoretical results, we plan on working on the stability between the diffeomorphic interpolations computed on a dataset and its subsamples. This requires some control over the locations of the critical points, which we expect to be possible in statistical estimation ; indeed sublevel sets of density functions are know to have stable critical points [10, Lemma 17]. We also plan to look at adaptive kernels whose parameters (like the bandwidth σ ) depend on the input point cloud σ = σ ( X ) (instead of using a fixed kernel and parameters at every iteration), and understand the convergence properties of our proposed diffeomorphic gradient descent. Finally, applying our diffeomorphic interpolation to sparse gradients computed with multiparameter persistent homology is another natural research direction, provided that differentiability properties have recently been proved in that setting [30, 37].

Concerning the AE experiment, we plan to investigate the limitations presented in the figure below: as the initial LSs (colored with the ground-truth angles) have zero (left) or two (right) loops, it is impossible to unfold them with diffeomorphisms; instead the optimized latent spaces either also exhibit no topology, or mixes different angles. In future work, we plan on investigating other losses or gradient descent schemes for diffeomorphic topological optimization, including stratified procedures similar to [27] that allow for local topological changes during training.

References

Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Jozefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dandelion Mané, Rajat Monga, Sherry Moore, Derek Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org.

Henry Adams, Tegan Emerson, Michael Kirby, Rachel Neville, Chris Peterson, Patrick Shipman, Sofya Chepushtanova, Eric Hanson, Francis Motta, and Lori Ziegelmeier. Persistence images: a stable vector representation of persistent homology. Journal of Machine Learning Research , 18(8):1-35, 2017.

Tolga Birdal, Aaron Lou, Leonidas Guibas, and Umut Simsekli. Intrinsic dimension, persistent homology and generalization in neural networks. In Advances in Neural Information Processing Systems 34 (NeurIPS 2021) , volume 34, pages 6776-6789. Curran Associates, Inc., 2021.

Mathieu Carrière, Frédéric Chazal, Marc Glisse, Yuichi Ike, Hariprasad Kannan, and Yuhei Umeda. Optimizing persistent homology based functions. In 38th International Conference on Machine Learning (ICML 2021) , volume 139, pages 1294-1303. PMLR, 2021.

Mathieu Carrière, Frédéric Chazal, Yuichi Ike, Théo Lacombe, Martin Royer, and Yuhei Umeda. PersLay: a neural network layer for persistence diagrams and new graph topological signatures. In 23rd International Conference on Artificial Intelligence and Statistics (AISTATS 2020) , pages 2786-2796. PMLR, 2020.

Mathieu Carrière, Steve Y. Oudot, and Maks Ovsjanikov. Stable topological signatures for points on 3d shapes. Computer Graphics Forum , 34(5):1-12, 2015.

Frédéric Chazal, David Cohen-Steiner, Leonidas Guibas, Facundo Mémoli, and Steve Oudot. Gromov-Hausdorff stable signatures for shapes using persistence. Computer Graphics Forum , 28(5):1393-1403, 2009.

Frédéric Chazal, Vin De Silva, and Steve Oudot. Persistence stability for geometric complexes. Geometriae Dedicata , 173(1):193-214, 2014.

Frédéric Chazal, Brittany Fasy, Fabrizio Lecci, Bertrand Michel, Alessandro Rinaldo, and Larry Wasserman. Subsampling methods for persistent homology. In 32nd International Conference on Machine Learning (ICML 2015) , volume 37, pages 2143-2151. PMLR, 2015.

Frédéric Chazal, Brittany Fasy, Fabrizio Lecci, Bertrand Michel, Alessandro Rinaldo, and Larry Wasserman. Robust topological inference: distance to a measure and kernel distance. Journal of Machine Learning Research , 18(159):1-40, 2018.

Frédéric Chazal, Brittany Fasy, Fabrizio Lecci, Alessandro Rinaldo, Aarti Singh, and Larry Wasserman. On the bootstrap for persistence diagrams and landscapes. Modelirovanie i Analiz Informatsionnykh Sistem , 20(6):111-120, 2013.

Frédéric Chazal, Brittany Fasy, Fabrizio Lecci, Alessandro Rinaldo, and Larry Wasserman. Stochastic convergence of persistence landscapes and silhouettes. Journal of Computational Geometry , 6(2):140-161, 2015.

Frédéric Chazal and Steve Yann Oudot. Towards persistence-based reconstruction in euclidean spaces. In Proceedings of the twenty-fourth annual symposium on Computational geometry , pages 232-241. ACM, 2008.

Chao Chen, Xiuyan Ni, Qinxun Bai, and Yusu Wang. A topological regularizer for classifiers via persistent homology. In The 22nd International Conference on Artificial Intelligence and Statistics , pages 2573-2582. PMLR, 2019.

Lenaic Chizat and Francis Bach. On the global convergence of gradient descent for overparameterized models using optimal transport. Advances in neural information processing systems , 31, 2018.

James R Clough, Nicholas Byrne, Ilkay Oksuz, Veronika A Zimmer, Julia A Schnabel, and Andrew P King. A topological loss function for deep-learning based image segmentation using persistent homology. IEEE transactions on pattern analysis and machine intelligence , 44(12):8766-8778, 2020.

David Cohen-Steiner, Herbert Edelsbrunner, and John Harer. Stability of persistence diagrams. Discrete & Computational Geometry , 37(1):103-120, 2007.

David Cohen-Steiner, Herbert Edelsbrunner, John Harer, and Yuriy Mileyko. Lipschitz functions have l p-stable persistence. Foundations of computational mathematics , 10(2):127-139, 2010.

Meryll Dindin, Yuhei Umeda, and Frederic Chazal. Topological data analysis for arrhythmia detection through modular neural networks. In Advances in Artificial Intelligence: 33rd Canadian Conference on Artificial Intelligence, Canadian AI 2020, Ottawa, ON, Canada, May 13-15, 2020, Proceedings 33 , pages 177-188. Springer, 2020.

Herbert Edelsbrunner and John Harer. Computational topology: an introduction . American Mathematical Soc., 2010.

Marcio Gameiro, Yasuaki Hiraoka, and Ippei Obayashi. Continuation of point clouds via persistence diagrams. Physica D: Nonlinear Phenomena , 334:118-132, 2016.

Thomas Gebhart and Paul Schrater. Adversary detection in neural networks via persistent homology. arXiv preprint arXiv:1711.10056 , 2017.

Christoph Hofer, Florian Graf, Bastian Rieck, Marc Niethammer, and Roland Kwitt. Graph filtration learning. In 37th International Conference on Machine Learning (ICML 2020) , volume 119, pages 4314-4323. PMLR, 2020.

Max Horn, Edward de Brouwer, Michael Moor, Bastian Rieck, and Karsten Borgwardt. Topological Graph Neural Networks. In 10th International Conference on Learning Representations (ICLR 2022) . OpenReviews.net, 2022.

Xiaoling Hu, Li Fuxin, Dimitris Samaras, and Chao Chen. Topology-preserving deep image segmentation. In Advances in Neural Information Processing Systems 32 (NeurIPS 2019) , pages 5657-5668. Curran Associates, Inc., 2019.

Théo Lacombe, Yuichi Ike, Mathieu Carrière, Frédéric Chazal, Marc Glisse, and Yuhei Umeda. Topological Uncertainty: monitoring trained neural networks through persistence of activation graphs. In 30th International Joint Conference on Artificial Intelligence (IJCAI 2021) , pages 2666-2672. International Joint Conferences on Artificial Intelligence Organization, 2021.

Jacob Leygonie, Mathieu Carrière, Théo Lacombe, and Steve Oudot. A gradient sampling algorithm for stratified maps with applications to topological data analysis. Mathematical Programming , pages 1-41, 2023.

Jacob Leygonie, Steve Oudot, and Ulrike Tillmann. A framework for differential calculus on persistence barcodes. Foundations of Computational Mathematics , pages 1-63, 2021.

Michael Moor, Max Horn, Bastian Rieck, and Karsten Borgwardt. Topological autoencoders. In 37th International Conference on Machine Learning (ICML 2020) , volume 119, pages 7045-7054. PMLR, 2020.

Soham Mukherjee, Shreyas Samaga, Cheng Xin, Steve Oudot, and Tamal Dey. D-gril: Endto-end topological learning with 2-parameter persistence. In CoRR . arXiv:2406.07100, 2024.

Takashi Nagano, Yaniv Lubling, Csilla Várnai, Carmel Dudley, Wing Leung, Yael Baran, Netta Mendelson-Cohen, Steven Wingett, Peter Fraser, and Amos Tanay. Cell-cycle dynamics of chromosomal organization at single-cell resolution. Nature , 547:61-67, 2017.

S. A. Nene, S. K. Nayar, and H. Murase. Columbia Object Image Library (COIL-100). In Technical Report CUCS-005-96 , 1996.

Arnur Nigmetov, Aditi S Krishnapriyan, Nicole Sanderson, and Dmitriy Morozov. Topological regularization via persistence-sensitive optimization. arXiv preprint arXiv:2011.05290 , 2020.

Arnur Nigmetov and Dmitriy Morozov. Topological optimization with big steps. Discrete & Computational Geometry , pages 1-35, 2024.

Steve Y Oudot. Persistence theory: from quiver representations to data analysis , volume 209. American Mathematical Society, 2015.

Adrien Poulenard, Primoz Skraba, and Maks Ovsjanikov. Topological function optimization for continuous shape matching. In Computer Graphics Forum , volume 37, pages 13-25. Wiley Online Library, 2018.

Luis Scoccola, Siddharth Setlur, David Loiseaux, Mathieu Carrière, and Steve Oudot. Differentiability and convergence of filtration learning with multiparameter persistence. In 41st International Conference on Machine Learning (ICML 2024) . PMLR, 2024.

Primoz Skraba and Katharine Turner. Wasserstein stability for persistence diagrams. arXiv preprint arXiv:2006.16824 , 2020.

Yitzchak Solomon, Alexander Wagner, and Paul Bendich. A fast and robust method for global topological functional optimization. In International Conference on Artificial Intelligence and Statistics , pages 109-117. PMLR, 2021.

The GUDHI Project. GUDHI User and Reference Manual . GUDHI Editorial Board, 3.6.0 edition, 2022.

Greg Turk and Marc Levoy. Zippered polygon meshes from range images. In Proceedings of the 21st annual conference on Computer graphics and interactive techniques , pages 311-318, 1994.

Yuhei Umeda. Time series classification via topological data analysis. Information and Media Technologies , 12:228-239, 2017.

Laurent Younes. Shapes and diffeomorphisms . Springer-Verlag, 2010.

A A more extensive presentation of TDA

The starting point of TDA is to extract quantitative topological information from structured objects-for example graphs, points sampled on a manifold, time series, etc. Doing so relies on a piece of algebraic machinery called persistent homology (PH), which informally detects the presence of underlying topological properties in a multiscale way. Here, estimating topological properties should be understood as inferring the number of connected components (topology of dimension 0 ), the presence of loops (topology of dimension 1 ), of cavities (dimension 2 ), and so on in higher dimensional settings.

Simplicial filtrations. Given a finite simplicial complex 8 K , a filtration over K is a map t ↦→ K t ⊆ K that is non-decreasing (for the inclusion). For each σ ∈ K , one can record the value t ( σ ) := inf { t | σ ∈ K t } at which the simplex σ is inserted in the filtration. From a topological perspective, the insertion of σ has exactly one of two effects: either it creates a new topological feature in K t (e.g., the insertion of an edge can create a loop, that is, a one-dimensional topological feature) or it destroys an existing feature of lower dimension (e.g., two independent connected components are now connected by the insertion of an edge). Relying on a matrix reduction algorithm [20, §IV.2], PH identifies, for each topological feature appearing in the filtration, the critical pair of simplices ( σ b , σ d ) that created and destroyed this feature, and as a byproduct the corresponding birth and death times t ( σ b ) , t ( σ d ) . 9 The collection of intervals ( t ( σ b ) , t ( σ d )) is a (finite) subset of the open half-plane { ( b, d ) ∈ R 2 | b < d } , called the persistence diagram (PD) of the filtration ( K t ) t . The distance of such a point ( t b , t d ) to the diagonal { b = d } , namely 2 -1 2 | t ( σ b ) -t ( σ d ) | , is called the persistence of the corresponding topological feature, as an indicator of 'for how long' could this feature be detected in the filtration ( K t ) t .

Note that if ( σ b , σ d ) is a critical pair for our filtration ( K t ) t , it holds that | σ b | = | σ d | +1 . The quantity | σ b | -1 is the dimension of the corresponding topological feature (e.g., loops, which are created by the insertion of an edge and killed by the insertion of a triangle, are topological features of dimension one). From a computational perspective, deriving the PD of a filtration ( K t ) t is empirically 10 quasilinear with respect to the number of simplices in K (which can still be extremely high in the case of Vietoris-Rips filtration-see below-where K = 2 V with | V | = n being typically quite large).

The Vietoris-Rips filtration. A particular instance of simplicial filtration that will be extensively used in this work is the Vietoris-Rips (VR) one. Given X = ( x 1 , . . . , x n ) ∈ R n × d a point cloud of n points in dimension d , one consider the simplicial complex K = 2 X and then the filtration ( K t ) t defined by

The corresponding persistence diagram will be denoted, for the sake of simplicity, by Dgm( X ) .

Note that for t < 0 , K t = ∅ , when t ≥ diam( X ) , K t = K , and there is always a point with coordinates (0 , + ∞ ) in Dgm( X ) accounting for the remaining connected component when t → ∞ . This is the unique point in Dgm( X ) for which the second coordinate is + ∞ (and is often discarded in practice, as it does not play any significant role). Intuitively, Dgm( X ) reflects the topological properties that can be inferred from the geometry of X ; this can be formalized by various results which state, roughly, that if the x i are i.i.d. samples from a regular measure µ supported on a submanifold M⊂ R d , then with high probability the topological properties of M are reflected in Dgm( X ) (see [13, 9]). From a computational perspective, note that the VR filtration only depends on X through the pairwise distance matrix ( ∥ x i -x j ∥ ) 1 ≤ i,j ≤ n , and thus the complexity of computing Dgm( X ) depends only linearly in d 11 . On the other hand, since Dgm( X ) scales (at least) linearly

-

1

.

00

-

0

.

75

-

0

.

50

-

0

.

25

0

.

00

0

.

25

0

.

50

0

.

75

1

.

00

-

1

.

00

-

0

.

75

-

0

.

50

-

0

.

25

0

.

00

0

.

25

0

.

50

0

.

75

1

.

00

Initial and final point cloud

init

final state

0

.

1

0

.

2

0

.

3

0

.

4

0

.

5

0

.

6

Birth

0

.

1

0

.

2

0

.

3

0

.

4

0

.

5

0

.

6

Death

Initial and final persistence diagrams

0

25

50

75

100

125

150

175

200

-

0

.

4

-

0

.

3

-

0

.

2

-

0

.

1

Evolution of the loss over iterations

with respect to the number of simplices in K , computing the whole VR diagram of a point cloud X ∈ R n × d can take up to O (2 n ) operations. Even if one restricts topological features of dimension d ′ ≤ d (e.g. d ′ = 1 if one only considers loops)-as commonly done-the complexity is of order O ( n d ′ +2 ) , which becomes quickly intractable if n is large, even if d ′ = 1 or 2 .

B Delayed proofs

Proof of Proposition 3.2. One has: ∥ ˜ v ( x ) -˜ v ( y ) ∥ 1 = ∥ ∑ i ∈ I ( K ( x, x i ) -K ( y, x i ))( -K -1 ∇ L ( ˜ X ( t ))) i ∥ 1 ≤ ∑ i ∈ I | ρ σ ( ∥ x -x i ∥ ) -ρ σ ( ∥ y -x i ∥ ) | · ∥ ( -K -1 ∇ L ( ˜ X ( t ))) i ∥ 1 , since we are using Gaussian kernels. As | ρ σ ( ∥ x -x i ∥ ) -ρ σ ( ∥ y -x i ∥ ) | ≤ C d,σ ∥ x -y ∥ 2 , with C d,σ = 2 d +1 2 π d -1 2 σ d -1 (see [2, Theorem 8]), it follows that ∥ ˜ v ( x ) -˜ v ( y ) ∥ 1 ≤ C d,σ ∥ x -y ∥ 2 · ∥ K -1 ∥ 1 · ∥∇ L ( ˜ X ( t )) ∥ 1 .

Let us upper bound the term ∥∇ L ( ˜ X ( t )) ∥ 1 . Let us start with the simplification loss, one has ∂ℓ ∂b i = 2( b i -d i ) and, writing b i = ∥ x i 1 -x i 2 ∥ 2 (for some critical points x i 1 , x i 2 ∈ ˜ X ( t ) ), one has ∂b i ∂x i 1 = x i 1 -x i 2 ∥ x i 1 -x i 2 ∥ 2 and ∂b i ∂x i 2 = -x i 1 -x i 2 ∥ x i 1 -x i 2 ∥ 2 . Similarly, one has ∂ℓ ∂d i = -2( b i -d i ) , and writing d i = ∥ x i 3 -x i 4 ∥ 2 provides the corresponding partial derivatives.

Applying (2), this gives:

where b, 1 → (resp. b, 2 → ) means that x appears as left point (resp. right point) in the computation of the birth filtration value b i of one of the k PD points ( b i , d i ) ∈ Dgm( ˜ X ( t )) associated to the loss, and similarly for death filtration values. A brutal majoration finally gives ∥∇ L ( ˜ X ( t )) ∥ 1 ≤ 2 √ d ∑ x ∈ ˜ X ( t ) ∑ x → ( b i ,d i ) | b i -d i | ≤ 8 √ d · Pers k (Dgm( ˜ X ( t ))) , as there are at most four points associated to every ( b i , d i ) ∈ Dgm( ˜ X ( t )) . One can easily see that the same bound applies to the augmentation loss.

Let us finally bound ∥ K -1 ∥ 1 , one has ∥ K -1 ∥ 1 = κ ( K ) / ∥ K ∥ 1 ≤ κ ( K ) . Indeed, as we are using Gaussian kernels, ∥ K ∥ 1 = max 1 ≤ i ≤ n ∑ n j =1 ρ σ ( ∥ x i -x j ∥ 2 ) ≥ 1 .

C Complementary experimental results and details

Subsampling and improving over [4]. We reproduce the experiment of [4, §5], see also Figure 8, but starting from an initial point cloud X 0 of size n = 2 , 000 instead of n = 300 . This makes the

1.0

0.5

0.0

0.5

1.0

1.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00

Init

1.0

0.5

0.0

0.5

1.0

1.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00

Vanilla, epoch 750

1.0

0.5

0.0

0.5

1.0

1.00

0.75

0.50

0.25

0.00

0.25

0.50

0.75

1.00

Diffeo, epoch 750

0

200

400

600

Epoch

0.3

0.2

0.1

0.0

0.1

0.2

Loss

Evolution of loss

Vanilla

Diffeo

I9

NY

(5

raw computation of Dgm( X k ) at each gradient step unpractical. Following Section 3.2 we rely on subsampling with sample size s = 100 and apply Algorithm 1. Results are summarized in Figure 9. While relying on vanilla gradients and subsampling barely changes the point cloud even after 750 epochs, the diffeomorphic interpolation gradient with subsampling manages to decrease the loss.

More extensive reports of running time and comments. On the hardware used in our experiments (the first two experiments were run on a 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz , the last one on a 2x Xeon SP Gold 5115 @ 2.40GHz .), we report the approximate following running times:

Small point cloud optimization without subsampling (see Figure 4, n = 200 points): one gradient descent iteration takes about 1 s for the vanilla topological gradient and our diffeomorphic interpolation. The use of oineus integrated in our pipeline raises the running time (per iteration) to 10 to 20 seconds. Note that the diffeomorphic interpolation and oineus may converge in less steps than the vanilla topological gradient, preserving a competitive advantage. We also believe that oineus has a significant room for improvement in terms of running times and may be a promising method in the future to be used jointly with our approach.

Iterating over the stanford bunny with subsampling ( n = 35 , 947 , s = 100 ) takes about 3 seconds per iteration for the vanilla topological gradient and 20 second for our diffeomor-

11

10

50

100

150

200

250

300

350

400

100

200

300

400

500

phic interpolation. The increase in running time with respect to the previous experiment mostly lies on instantiating and applying the n × d ( d = 3 ) vector field ˜ v (requires to compute ρ i ( x -x i ) for each new x ( n of them) and sampled x i ( | I | of them, which is typically very small), hence a ∼ O ( n ) complexity).

Training the VAE for the COIL and scHiC datasets are the most computationally expensive parts of this work: it takes about 3 hours per image (20 of them), and 3 hours also for the scHiC dataset. In contrast, performing the topological optimization take few dozen of minutes (less than one hour) for each image. Applying it is done in few seconds at most. Recall that our method is designed to handle pre-trained models (which may be way more sophisticated than the one we used!); and its running time does not depend on the complexity of the model.

Influence of the bandwidth σ . We reproduce the same experimental setting as in Figure 3, i.e., sample points uniformly on a circle of radius 1 plus additional noise ∼ N (0 , 0 . 05 I 2 ) , and consider minimizing the total persistence of the point cloud. We take σ ∈ { 0 , 0 . 1 , 0 . 2 , 0 . 3 , 0 . 5 , 0 . 7 , 1 , 2 , 3 , 4 , 5 } (with the convention that σ = 0 corresponds to the vanilla topological gradient) and learning rate λ = 0 . 1 . We also rely on a subsampling with batch size s = 50 . To quantify the variability of the scheme with respect to the randomness induced by the subsampling step, we run each gradient descent 50 times with a fixed initialization X 0 , up to a maximum of 200 iterations, stopped earlier if a loss of 0 (no topology left, global minimum has been reached) is measured.

Figure 12 displays the results of this illustrative experiment. We report the median of both running time and number of iterations to reach convergence (or reach the 200 iterations limit), along with the 10 and 90 percentiles. The conclusions are:

For σ = 0 (vanilla) and σ ≥ 3 , the gradient descent never converges in less than 200 steps. Since the radius of the diameter of the circle is 2 , it is not surprising that taking a bandwidth larger than that hinders convergence.

For σ ∈ (0 . 1 , 1] , the convergence occurs within the same order of magnitude (between 0 . 49 and 1 . 74 s), the best performance being reached at σ = 0 . 3 (recall that we used in the paper, testifying that we did not rely on hyperparameter tuning). It suggests that, on regular structure, the approach is smooth with respect to σ . Empirically, we observe that a good proxy is to take σ < median( {| x i -x j |} i,j ) . Note that even though in theory, σ → 0 should recover the vanilla topological gradients, one is limited by numerical accuracy when evaluating the Gaussian kernel.

The variation around the median over 50 runs is very small: the randomness of the samples at each iteration (hence of the trajectory) barely impacts the decrease of the loss and thus the convergence time.

Impact of and sampling on convergence

0

1

2

3

4

5

bandwidth

0.0

2.5

5.0

7.5

10.0

12.5

15.0

Total running time (s)

0

1

2

3

4

5

bandwidth

0

50

100

150

200

#Iterations to converge / stop

We also studied how the bandwidth σ influences the correlation scores of Table 1 in Figure 13. We observe oscillations for values that are roughly on the sides (very small or very large), and more stable scores for middle range values. Note that these oscillations could also come from how the correlation score itself is computed.

Cat

Pig

Vase

HOS

0.9

0.8

Score(correlation)

0.7

0.6

0.5

0.4

Kernel bandwidth

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer: [Yes]

Justification: Our abstract is quite extensive, and there is a clear 'Contribution and Outline' paragraph at the end of our introduction along with 'Related works' and 'Limitations' (of previous works) paragraphs.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: This is discussed in the Conclusion section.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: Our two theoretical results are followed by a proof. The first is pretty short and included in the main material, the second one is longer and technical and thus deferred to the appendix.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: We mentioned important hyper-parameters for our PoC experiments (learning rate λ , bandwidth σ , number of epochs, stopping criterion if any.). The code is available in the supplementary material as well.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [Yes]

Justification: Code is provided in the supplementary material with an (hopefully) clear Readme.md file which provides some ready-to-use quick start examples. It is also available as a public Github repository, see https://github.com/tlacombe/topt .

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: [Yes]

Justification: We hopefully provided the important experimental details to understand our experiments.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [Yes]

Justification: We did not report error bars in our PoC experiments as they were meant for illustrative purposes. We did report error bars in the form of standard deviations for our main experiments (topological correction of latent spaces of VAEs for images and single cells datasets). These were obtained by generating multiple test sets by adding noise to the training set.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: Hardware is mentioned in the first paragraph of Section 4, and we reported running times either in the plots or in the appendix.

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: We do not use sensitive nor closed datasets or other aspect that may enter in conflict with NeurIPS Code of Ethics.

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [No]

Justification: We do not expect that-in its current state-our article may have any negative societal impact. It is a work that introduced a novel method to perform topological optimization. This recent research field does not have direct applications that would have negative societal impact so far. Of course, it falls in the same pitfall as any machine learning related research problem, but we do not see something specific to our work that would be worth discussing.

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA]

Justification: We used a single generative model (V AE) to reproduce images from the COIL dataset and single cells from the Hi-C dataset. We trained it by ourselves.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: We used three non-synthetic datasets: the Stanford Bunny, the COIL dataset and the Hi-C dataset, for which we give the proper credits.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA]

Justification: No new asset.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA]

Justification: the article does not involve crowdsourcing nor research with human subjects.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA]

Justification: the article does not involve crowdsourcing nor research with human subjects.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a novel approach to topological optimization using diffeomorphic interpolation to tackle the sparsity and inefficiency of gradient descent in topological data analysis (TDA). The authors focus on optimizing point clouds by transforming sparse gradients into smooth vector fields. They achieve this by assigning exponentially decaying weights to each point with a gradient, allowing the influence to span the entire space. This approach enables a larger set of points to be optimized in each iteration, thereby accelerating convergence. The effectiveness of the method is demonstrated through experiments that showcase its fast convergence. Additionally, the method proves to be particularly efficient when combined with subsampling techniques, facilitating large-scale topological optimization.\n\nSTRENGTHS:\n1. In practical applications, optimizing topological loss is often slow. The proposed method significantly accelerates this process.\n2. Diffeomorphic interpolation is proven to provide a descent direction for the topological loss, with a provided smoothness bound.\n3. The proposed method is especially beneficial for subsampling techniques, leading to both faster convergence and reduced computation time.\n\nWEAKNESSES:\nThe authors describe three types of topological loss where the proposed method can be applied. However, the application to topological registration losses is not demonstrated in their experiments. My concern is that, in topological registration loss, the match between the output diagram and the target diagram is often unstable. Any mismatch could result in an increased registration loss. With diffeomorphic interpolation, this increment could be even larger, potentially making the overall optimization more unstable.\n\nQUESTIONS:\nThe experiments on convergence rate are only designed for simple topological situations. When the topological complexity increases, the optimization becomes unstable. Will the proposed method introduce additional instability to the optimization? In other words, could a convergence theorem for the proposed method be derived?\n\nLIMITATIONS:\nSee above.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-06-28"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nIn \"Diffeomorphic interpolation for efficient persistence-based topological optimization\", the authors provide a novel method to compute interpolations of gradients of persistence diagrams. This approach makes optimisation of point clouds w.r.t. loss functions defined on the associated persistence diagrams feasible, as it provides generalised gradients which smoothly vary over the underlying space. In summary, the authors use some form of Gaussian kernels and ideas from stochastic gradient descent to extend the standard gradients only defined on a few points to the entire  base space. They compare the running time of their algorithm favourably to other existing topological gradients, and perform qualitative experiments on synthetic data and the latent space of an autoencoder.\n\nSTRENGTHS:\n1. The paper presents a novel combination of topological gradients and diffeomorphic interpolation. The authors do a good job of embedding this approach into the existing literature and highlighting its differences and relevancy.\n2. The submission is technically sound and provides theoretical guarantees which are proven. The application to the latent space of variational auto encoders provides a nice and simple application adding to the theoretical contributions.\n3. The proposed method significantly enhances the applicability of optimisation of point clouds w.r.t. to topological loss functions. The idea to solve some of the problems of topological gradients using diffeomorphic interpolation is new and very good.\n(4. The gif is very nice :) )\n\nWEAKNESSES:\n1. There is no intuition provided behind theoretical result number 2. One can either just believe it, or read the very brief and technical derivation in the appendix; a brief summary and intuition in the main text would be great!\n2. While there are theoretical guarantees for the derivative of the loss at a single time point (and thus in the step-size -> 0 case), any guarantees which also apply in the case for discrete steps are missing. To the reviewer's understanding, the diffeomorphic interpolation of the loss function does not need to be continuous in t, even in the case of infinitesimal small step sizes. Thus the relevancy of the theoretical guarantees in practice is not clear.\n3. The choice of the bandwidth of the Gaussian kernel used for the diffeomorphic interpolation, a seemingly very important hyperparameter, is not discussed in the paper. The impact of different choices of sigma is not looked at in the experiments. (See the question section.)\n4. The experiments presented are either toy examples or very artificial. An application on a down-stream task relevant in some field of practice or real-world application would significantly enhance the strength of the paper. (This is a caveat applicable to much of the TDA literature in general though.)\n\nQUESTIONS:\n1. What is the intuition behind the proof of Theorem 2? (Cf. Weakness 1)\n2. What do the theoretical guarantees tell us in practice? Do they tell us something? Can you provide any guarantees on the evolution of the loss over a number of steps with a discrete step size? Or even in the continuous case? If not, what are the theoretical reasons these cases are so much harder?\n3. How did you choose the bandwidth in practice? If someone knows nothing about their dataset, what would be a good heuristic to choose sigma? Do we need to fix a global sigma or can we vary sigma locally?\n4. What is the impact of different choices of sigma on the results of the experiments? How sensitive are the experiments to varying sigma?\n5. In the bottom part of Figure 4, why is the loss of Oineus significantly larger than the loss of the other methods for small x values? \n6. In Figure 3, how did you pick the hyperparameters? Did you tune them for the diffeomorphic interpolation, or for the vanilla case? It might be the case that different hyperparameter regimes are optimal.\n7. In Figure 9, 3rd from the left: what are the purple points? 4th from the left: How can the large loss spikes for the diffeo algorithm be explained? How do the hyperparameter choices influence the loss stability?\n\nI would like to thank the authors in advance for their answers!\n\nComments:\n* Line 20: \"can be done once and then re-applied to new data in linear time\" -> What does that even mean?\n* ll 33: \"active line OR research\"\n* ll 37: \"yielding to the problem\"\n* ll 84: \"allows to process datasets whose sizes are currently out of reach in TDA,\" This claim is a bit bold: Subsampling and taking landmarks was a thing even before this paper. Maybe this applies to optimisation of point clouds in TDA:\n* ll 100: \"machinary\"\n*  section 2.2: The defintion of RKHS is really confusing. If I didn't know the definition beforehand, I would not have understood it there\n* ll 181: where does v live? can X and Y be any arbitrary point clouds? With which definitions? How can X be the argument on the left side of the definition, and still be referenced as all X in the set builder notation on the RHS?\n* ll 193: \"i-th line\"\n* ll 214: \"s-points\"\n* ll 476: The grammar of this sentence is confusing.\n* page 13, footnote 5: only non-empty simplices. footnote 8: \"deteriorate\"\n\nLIMITATIONS:\nAs detailed above, a discussion on hyperparameter choices, the stability of the algorithm, and the relevance of the guarantees in practice is missing. For possible negative societal impact: In Figure 5 the authors blow up a synthetic bunny and make the forgivable mistake to fail to mention that this experiment should not be performed on real-world bunnies...", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-05"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper proposes a novel way based on diffeomorphic interpolation to deal with the problem of sparse gradients when performing topological optimisation, which is relevant in the intersection between Topological Data Analysis (TDA) and ML.\n\nSTRENGTHS:\n(S1) The paper addresses a relevant problem in the TDA field\n\n(S2) The paper is comprehensive and well-written\n\n(S3) The paper proposes interesting applications of the proposed method\n\nWEAKNESSES:\n(W1) The experimental setup could be strengthen by providing a real-world application\n\nQUESTIONS:\n(Q1) In Figure 7, the initial LS is in blue and the final is in orange, while in Figure 6, the initial LS is in orange and the final is in orange, I find this confusing, is there a reason for it?\n\n(Q2) Can you please elaborate more on the importance of your suggested application to black-box autoencoder models, and how does your method compare to other topological optimisation techniques such as Oineus (as in the table in this section you have only compared your approach to the Vanilla, and you reported Oineus for the rest of the experiments)\n\n(Q3) The performance between Vanilla and Diffeo is very similar in the table in section Black-box autoencoder models (apart from Pig), have you ran your experiments multiple times and what is the mean and standard deviation? Also, do you have an explanation as to why your method outperforms Vanilla by a large margin for Pig?\n\n(Q4) Figure 3 is difficult to interpret. What is considered to be the expected end result of topological optimisation? The final shape after 100 iterations of your algorithm is very distorted, can you please add more details on how is that good?\n\n(Q5) What are some real-world uses of topological optimisation? Can you please elaborate on when one should care about this, and what possible applications are there\n\n(Q6) Do you see application in the real-world of your method, and how big datasets can your approach handle?\n\n(Q7) Can you please elaborate on how exactly your method offers better interpretability for the black-box autoencoder application?\n\n(Q8) How robust is your method to taking different samples and to different sampling strategies?\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2024-07-12"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a new topological optimization scheme mainly due to the sparsity of topological gradients. The authors introduce the notion of diffeomorphic interpolation and use this to create a smooth vector field over the whole space, which gives a gradient descent algorithm. The authors show some theoretical results which guarantee that the smoothness of the interpolation can be controlled. Further, the authors show numerical experimental evidence for the quick convergence of their method. The authors show, using experiments, that this scheme can be used to interpolate gradient on the whole space by considering a gradient on a small sample yielding expected results. The authors show that this framework can be used to infuse topological information in a pre-trained autoencoder model.\n\nSTRENGTHS:\n1. Overall, the paper is well-written and organized. \n\n2. The proposed method converges faster than its competitors, as shown in Figure 4.\n \n3. The idea of diffeomorphically interpolating the gradient on a subsample to the entire sample, to the best of my knowledge, is novel and quite useful in practice. \n\n4. The concept of inducing topological information into the latent space of a pre-trained autoencoder is also new to the best of my knowledge.\n\nWEAKNESSES:\n1. Section 3 is notation intensive. For example, Proposition 3.2, concepts like condition number are not defined earlier and hence, the expression can be moved to the appendix with the main text containing a line which says that the Lipschitz constant can be bounded which guarantees the smoothness. \n\n2. Proof of Proposition 3.1 can be moved to the appendix as it is not hard to see, given the way \\tilde v is defined/constructed to improve the readability. \n\n3. For the subsampling experiment, the comparison with vanilla topological gradient seems slightly unfair because there is no way for the network to update gradient over the whole space when a small percentage of points are being sampled for gradient update. Updating gradient over the whole space is not feasible, but is there a threshold on the number of points until which the vanilla gradient update is feasible and if the final output, in that case, is comparable to the output from diffeomorphic gradient descent? \n\nMinor: \n\nIn Algorithm 1, should it be “Set $X_k \\coloneqq X_{k-1} - \\lambda \\tilde v(X_{k-1})$\"?\n\nQUESTIONS:\nCan this method work for differentiable multiparameter vectorization methods?\n\nLIMITATIONS:\nYes, the authors have discussed limitations.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-12"}