gracykgeometricflowregularizationlatent2025.md 122 KB


category: literaturenote citekey: gracykgeometricflowregularizationlatent2025 title: Geometric flow regularization in latent spaces for smooth dynamics with the efficient variations of curvature authors: "Gracyk, Andrew" year: 2025 date: 2025-00-00 2025 url: "https://arxiv.org/abs/2506.09679v1" zotero_key: JQE636X4 zotero_storage: 5GHB36P3 collections: transpordi_planeerimine folder: 001_artiklid firstAuthor: "Gracyk, Andrew"

status: converted

Geometric flow regularization in latent spaces for smooth dynamics with the efficient variations of curvature

Andrew Gracyk∗

Abstract

We design strategies in nonlinear geometric analysis to temper the effects of adversarial learning for sufficiently smooth data of numerical method-type dynamics in encoder-decoder methods, variational and deterministic, through the use of geometric flow regularization. We augment latent spaces with geometric flows to control structure. Our techniques rely on adaptations of curvature and Ricci flow. We invent new geometric flows or discover them neurally and non-parametrically. All of our flows are solved using physics-informed learning. Traditional geometric meaning is traded for computing ability, but we maintain key geometric invariants, the primary of which are maintained, intrinsically-low structure, canonicity or a lack of irregularity, nontriviality due to sufficient lower bounds on curvature, and distortion of volume element, that develop quality in the inference stage. Our primary contributions are fourfold. We develop a loss based on Gaussian curvature using closed path circulation integration for surfaces, bypassing automatic differentiation of the Christoffel symbols through use of Stokes' theorem. We invent a new parametric flow derived from a linear version of the Gauss equation and a Riemannian decomposition for a custom tensor defined with a normal Hessian and Weyl tensor proxies. We develop two strategies based on time differentiation of functionals, one with a special case of scalar curvature for conformally-changed metrics, and another with harmonic maps, their energy, and induced metrics. Our methods, while diminished analytically, maintain overall integral latent structure. We showcase that curvature flows and the formulation of geometric structure in intermediary encoded settings enhance learning and overall zero-shot and adversarial fidelity.

Key words. Robustness, adversarial learning, encoder, decoder, variational autoencoder, VAE, geometric flow, geometric AI, curvature, Ricci flow, PDE learning

1 Introduction

We will be studying the auxiliary qualities of PDE learning via mitigating the adversarial effects of irregular data, such as that which is out-of-distribution and noised, by availing the development of geometric structure in the latent stages in learning tasks. Our methods will emphasize computational efficiency in the training stage for scaling in moderate intrinsic dimensions primarily, but we will develop techniques that permit high-dimensional representations as well. By controlling the geometries in these intermediary stages, we will study how the development of these structures helps induce accommodating representations and their interconnections with zero-shot generalization and adversarial alleviation. In general, specific geometric qualities in variational and deterministic encoder-decoder settings have been demonstrated to help robustness [31] [32] [30] [26] [10] [41], inference capacity [36], sampling quality [12] [11] [5] [35] [37], online performance [13], identifiability [32] [4], clustering understanding [35], alignment [29], and anomaly detection [25]. Our methods are consistent with general strategies of manifold regularization [8]. In particular, our techniques are structured so that initial data is passed into local coordinates before it is mapped to the latent manifold regularizer subject to an intrinsic flow.

∗Partially supported by NSF Grant 1922758 hosted by the National Center for Supercomputing Applications, Urbana, Illinois, United States. Purdue Mathematics, effective as of August 2025; agracyk@purdue.edu.

Our overarching arguments are established so that we will attempt to present empirical justification that different geometric representations have different ambient outcomes in a beneficial way: canonical, structured representations facilitate robustness. This argument is counterposed to that in which we argue manifold representations themselves aid robustness. Indeed, the phenomenon that latent spaces can, but not necessarily always, naturally acquire Riemannian geometric structure, notably manifolds, on their own accord has been observed in certain settings, primarily [11]. A very simple example when a latent space is not a Riemannian manifold is when a Gaussian prior is learned exactly in a variational setting (although a simple counterargument to this is a true Gaussian prior is never learned in actuality). Another example of when a latent space is not formulated into an intrinsically-low manifold is Figure 3 of [21] at t = 0. In order to build off of such existing literature, we elaborate upon the paradigm for latent geometric learning through the perspective of the geometric flow.

We argue the parameterized geometric flow is a regularizer. One approach to regularize a latent space in a manifold-based approach is through projections, in which [32][31] study this aforementioned technique. Our approaches are similar, but differ: we do not enforce a preset manifold via projection, but instead, our latent spaces are imposed with a manifold structure upon in-distribution data such that the data naturally formulates this manifold. Thus, we maintain faithful geometric representations across the entire time frame of the ambient data, perfect for PDE-type data. This notion is consistent with the mesh-invariance archetype of neural operators [33], and our methods are aligned with mesh invariance over the time domain.

Curvature-type flows [42] [38] [40] [9] will be our means of operation, but we will develop new intrinsic geometric flows derivative of curvature flows that are relevant to the beneficial computational properties that Ricci flow encapsulates. The following are the theoretical properties of curvature flows that will aid us in our empirical studies:

• It is not true that ||g||F → 0 implies that curvature → 0. Since our flows are curvature-based, this will imply ∂tg is sufficiently large over the entire course of the flow. This property helps us in that a near-triviality metric is not learned in all settings. For example, if we take g to be small, then the entire flow and the overall manifold's measure would also remain small under a compact time interval of Ricci flow. Since this is not true, this helps ensure nondegeneracy. Consider the example

$$\tilde{g} = \epsilon^2 g{\mathbb{S}^d}, \operatorname{Ric}(\tilde{g}) = \operatorname{Ric}(\epsilon^2 g{\mathbb{S}^d}) = \operatorname{Ric}(g{\mathbb{S}^d}) = (d-1)g{\mathbb{S}^d} = \frac{(d-1)}{\epsilon^2}\tilde{g}. \tag{1}$$

We have denoted S d the d-sphere. Therefore, Ricci curvature is bounded below as the metric extinguishes (in fact it diverges). We have observed that an arbitrarily small metric is antithetical towards robustness, thus this property is valuable.

• The volume of the manifold expands or contracts heavily under curvature flows. Significant manifold deformation helps the learning task. In particular, the volume element under Ricci flow evolves according to

$$\frac{d}{dt}\sqrt{\det(g)} = -\operatorname{Ric}(g)_{ij}g^{ij}\sqrt{\det(g)}.$$ (2)

This result comes from Jacobi's formula. We also remark Ricijg ij is precisely scalar curvature. We require Ricijg ij ̸= 0. This property is valuable because a distortive geometry helps the learning task. A constant geometry means two distinct ambient times cannot be discerned as distinct in the latent space. We note that, with intrinsic flows, our geometries can displace in an immersion. By volume element distortion, there is greater representation capacity and flexibility. Latent representations can be conveyed by both immersion displacement and deformation itself. In our experiments, we found a geometry only displacing independent of the flow does not yield sufficiently good inference quality. We discovered this through our second fundamental form experiments without the use of our Γijkl diagonal term (see Appendix E).

We make some other remarks. Extrinsic flows would require differential equations on vectors orthogonal to the tangent space, up to scaling such as via mean curvature. To simulate such an evolution, one strategy would be to employ the use of neural ordinary differential equations. Aside from computing necessary normal vectors and scaling coefficients, neural ODEs are a little expensive in large scale settings. With our methods, computing tangent vectors is cheap, and simulating a Riemannian metric, aside from Ricci curvature computation, is generally easier. Hence, we have empirically found intrinsic flows actually work quite nicely. Our intrinsic geometric flows exert their own vector fields in our latent spaces. Curvature-based flows create their own manifold vector field, such as through vector fields

$$\xi = \mathcal{K}^{\sharp}(X) \in \Gamma(T\mathcal{M}), \quad \mathcal{K}^{\sharp} \in \Gamma(\text{End}(T\mathcal{M}))$$ (3)

$$\xi' = \left(\mathcal{K}^{\sharp}(X)\right)^{\perp} \in \Gamma(N\mathcal{M})$$ (4)

for correct X in our latent immersions. The musical isomorphism ♯ : T ∗M ∼=−→ TM maps the respective tensor from the cotangent bundle to a vector field in the tangent bundle. K♯ is a generalized vector field built on some idea of curvature, i.e. Ric♯ . Γ is the space of smooth vector fields on the manifold, and End denotes an endomorphism with the tangent bundle. Thus, our intrinsic flows behave similarly to extrinsic in certain ways.

Our methods pair with the manifold hypothesis, but this rather states datasets themselves lie on intrinsicallylow-structured manifolds in a high dimensional space, not that the latent spaces themselves formulate into manifolds. Again, we reference [11], and our arguments are not tailored such that whether or not geometries exist in these latent spaces, but rather that we can regulate the structure that developments to induce outcome.

Notation. We will use notation

$$\mathbb{E}[f(x,y)] = \mathbb{E}{x \sim p}[f(x,y)] \approx \frac{1}{N} \sum{i=1}^{N} f(x_i,y)$$ (5)

to denote a loss function. Our expectations are always taken with respect to training data. We remark empirical risk may not converge uniformly to true risk [6], so this notation is of greater analytic flavor over empirical. We will use the equivalence

$$\mathbb{E}[\mathbb{E}[f]] \propto \int \mathbb{E}[f]dt \approx \text{constant} \cdot \sum_{t_i} \mathbb{E}[f(\cdot, t_i)]$$ (6)

to denote a uniform expectation with respect to time up to constants over domain [0, T], where the approximation is due to an elementary Riemann sum equivalence. The rest of our notation is standard. We remark we will use Einstein notation heavily, but this notation is standard.

2 Setup

We will be learning geometric flows of a generalized form

$$\partial_t g + \mathcal{F}_K[g] = 0. \tag{7}$$

Here, we have denoted F a generalized differential operator that is relevant to curvature, denoted K, i.e.

$$\mathcal{F}_K[g] = \mathcal{A}_K g, \quad \mathcal{A}K \in \mathcal{A}{\text{nonlin,lin}}(L^2(\mathcal{M}, g)).$$ (8)

We have used A as notation for the set of nonlinear and linear bounded operators on Riemannian metric g,

$$\mathcal{A}_{\mathrm{nonlin,lin}}(L^2(\mathcal{M},g)) = \left{ \mathcal{A} : L^2(\mathcal{M}, \mathrm{Sym}^2(T^\mathcal{M})) \to L^2(\mathcal{M}, \mathrm{Sym}^2(T^\mathcal{M})) : \mathcal{A} \text{ is bounded and linear} \right} \tag{9}$$

$$\cup \ \left{ \mathcal{A} : L^2(\mathcal{M}, \operatorname{Sym}^2(T^\mathcal{M})) \to L^2(\mathcal{M}, \operatorname{Sym}^2(T^\mathcal{M})) : \mathcal{A} \text{ is bounded and nonlinear} \right}. \ \ (10)$$

We have not assumed our manifold is compact in this theoretical setting (in fact, for us, it will be a discrete point cloud immersed in a space with respect to training data). There are many variations of curvature,

Figure 1: We illustrate scenarios of noised data in our Navier-Stokes experiment. As is noticeable, the time-evolving manifold latent space makes a favorable impact. For the other two scenarios, time is used in the decoder and not the latent space. For our method without the geometric flow, we use an identical setup with heavy regularization, including dropout and latent noise. The baseline uses no regularization techniques.

Solution index 2795 so K is just a generalized notion of this. We will specifically be studying variations of Ricci curvature, but not Ricci curvature exactly.

For our ambient data, we will restrict our attention to PDEs whose image is a subset of R, i.e. ϕt ∈ R. We seek a mapping

$$\Gamma: (\phi_0, t) \in C(\mathcal{X}; \mathbb{R}) \cap W^{k, p}(\mathcal{X}; \mathbb{R}) \times [0, T] \to \phi_t \in C(\mathcal{X}; \mathbb{R}) \cap W^{k, p}(\mathcal{X}; \mathbb{R}), \tag{11}$$

or discretized, (12)

$$\Gamma^{\dagger}: \Phi \subseteq \left{ \tilde{\phi}_0 \in \mathbb{R}^N : \tilde{\phi}_0 = \phi0|{\Omega}, \phi_0 \in C(\mathcal{X}; \mathbb{R}) \cap W^{k,p}(\mathcal{X}; \mathbb{R}) \right} \times [0, T]$$ (13)

$$\longrightarrow \Phi' \subseteq \left{ \tilde{\phi}_t \in \mathbb{R}^N : \tilde{\phi}_t = \phit|{\Omega}, \phi_t \in C(\mathcal{X}; \mathbb{R}) \cap W^{k,p}(\mathcal{X}; \mathbb{R}) \right}. \tag{14}$$

Here, k and p are suitable choices of constants, and we have discretized the dynamics as vectors in R N and evaluated along the mesh in space and time

$$\Omega{\Delta x} \times \mathcal{T}{\Delta t} = \left{ (x_0 + k\Delta x, j\Delta t) : k \in \mathbb{N}^{\dim(\mathcal{X})}, j \in \mathbb{N}, (\max_j j)\Delta t = T \right} \subset \mathcal{X} \times \mathbb{R}^+.$$ (15)

We will take this mesh to be equispaced.

We will employ the Whitney immersion theorem in all of our experiments, and so all of our d−manifolds will be immersed in 2d − 1 Euclidean space unless otherwise stated, which are primarily are our Gaussian curvature experiment, which is restricted to surfaces, and the sphere experiment.

2.1 A learning task of limited measure and randomness

We provide reasoning that the nontrivial time derivative of the metric g has value. Consider the following geometric flow learned neurally

$$\int \mathbb{E}\left[ \left| \partialt g{\thetag} - \Lambda{\theta_\Lambda} \right|_F^2 \right] dt. \tag{16}$$

Here, gθg ,ΛθΛ are neural networks with zero constraints (except positive semi-definiteness). The issue with this learning task is there is no control on the measure or expansiveness of the geometric evolution.

There are a few remarks with this phenomenon, noticed in [22]. It is easier for the loss to be approximately satisfied if the values themselves are diminished in value, not just their differences. Thus, a small metric is generally learned naturally. This does not happen in classical PINNs, for example, because of boundary terms. It is necessary in the learning task that distinct points in the latent space are learned for the data, but this does not occur to sufficient extent to prevent degeneracy. Thus, a manifold with small metric is learned. We present evidence of this as well in Figures 2, 3. Moreover, the Riemannian metric gθg is learned with zero geometric significance. ΛθΛ can capture pure randomness, and thus more canonical geometry is lost as well.

Figure 2: We plot the 5 × 5 mean over the batch (which includes over the time interval) diagonal elements of a learned Riemannian metric with a geometric flow of the form ∂tg(u, t) = −Λ(u, t) (both are positive semi-definite) in the variational setting on Burger's equation data with respect to training iteration mod 20. We do not need to plot the off-diagonal, as these scale according to the diagonal by Cauchy-Schwarz. As we can see, values of the metric are fairly small, and so the manifold is not of large measure. Decoded coefficient here was 100, with metric and flow coefficients of 1.

Figure 3: We plot the 5×5 mean over the batch (which includes over the time interval) diagonal elements of a learned Riemannian metric with a geometric flow of the form ∂tg(u, t) = −Λ(u, t) in the encoder-decoder setting on Burger's equation data with respect to training iteration mod 20. Decoded coefficient here was 10, with metric and flow coefficients of 1.

3 Methods

Ultimately, we seek a series of functions such that ϕ˜ t ≈ (D ◦ E ◦ u)(ϕ˜ 0, t). Consequently, we begin by parameterizing three neural networks u : Φ×Θu → Σ ⊆ R d , E : Σ×[0, T]×ΘE → M ⊂ R D, D : R D ×ΘD → Φ , which act as (1) a manifold parameterizer mapping to local coordinates Σ; (2) an encoder mapping to the manifold immersed in R D; (3) a decoder mapping to the PDE solution respectively. Mapping PDE data directly onto a manifold without local coordinates presents challenges. Generally, a metric as well as tangent spaces are intrinsic, but we need to work with induced metrics. Thus, by parameterizing the manifold, we can perform the necessary calculations. A Ricci-type flow is placed upon the intermediary E step by constructing a fourth neural network

$$g: \Sigma \times [0,T] \times \Thetag \to \hat{\Gamma}(\mathrm{Sym}^2 T^* \mathcal{M}), \qquad \hat{\Gamma} \subseteq \mathcal{F}{\epsilon}(\Gamma) = \left{ \widetilde{g} \in \Gamma(\mathrm{Sym}^2 T^* \mathcal{M}) \mid ||\widetilde{g} - g_{\theta_g}|| < \epsilon \right}, \tag{17}$$

where the second equation is used to denote that our simulated Riemannian is near the true Riemannian metric in the function space in an ϵ-neighborhood, denoted Fϵ. We have used notation Γ(Sym ˆ 2T ∗M) to illustrate the space of approximate smooth symmetric 2-tensors on the tangent space of the manifold. In particular, our neural network approximates the true Riemannian metric such that

$$g_{\thetag,ij}(p) \approx g{ij}(p) = g_p \left(\frac{\partial}{\partial u^i}\Big|_p, \frac{\partial}{\partial u^j}\Big|_p\right), \qquad g \in \Gamma(\operatorname{Sym}^2 T^* \mathcal{M})$$ (18)

for tangent basis vector ∂/∂ui

We propose a physics-informed neural network (PINN) framework [43] [44] [39] for finding the metric solution g to the geometric flow. The L integral loss can be approximated via Monte-Carlo integration in a discrete-type objective

$$\mathbb{E}{t \sim U([0,T])} \left[ \mathbb{E}{u \sim \rho_u / \int \rho_u du} \left[ \left| \left| \partialt g{\theta_g}(u,t) + \mathcal{F}K[g{\theta_g}(u,t)] \right| \right|_F^2 \right] \right]$$ (19)

$$\propto \int{[0,T]} \int{\Sigma_{\thetau}} \sum{ij} (\partialt g{\theta_g,ij}(u,t) + \mathcal{F}K[g{\thetag}(u,t)]{ij})^2 \rho(u) du dt$$ (20)

$$\propto \sum_{(\tilde{\phi}_0^k, tk) \sim (\Phi \times [0, T])} \sum{ij} (\partialt g{\thetag, ij}(u{\theta_u}(\tilde{\phi}_0^k), t_k) + \mathcal{F}K[g{\thetag}(u{\theta_u}(\tilde{\phi}_0^k), tk)]{ij})^2. \tag{21}$$

Typically, in a PINN, the physics loss is evaluated uniformly with respect to its domain: this is not the case for us, and this is where ρ serves its purpose. ρ is a weighting function so that the physics loss is uniform with respect to input ϕ˜ 0 into u. In particular, we have

$$\rhou = (u{\thetau}){#} \mu{\Phi} = (u{\thetau}){#} \mathcal{U}{\Phi}, \qquad (u{\thetau}){#} : \mathcal{U}{\Phi{\text{supp}}(\mathcal{X})} \to \mathcal{M}^+(\Sigma)$$ (22)

as a pushforward of a measure between spaces equipped with the Borel sigma algebras σ. UΦsupp(X) denotes the set of discretized uniformly-sampled functions belonging to Φ supported on X , i.e. U is a uniform measure. By abuse of notation, we will denote ρ both the measure and the density. uθu is measurable because it is continuous (due to the activation). As we will see, we can restrict the domains of our network output uθu using last-layer sigmoid activation. This is beneficial because it prevents arbitrarily large domains of local coordinates, which diminish the geometric quality [21]. In a variational setting with KL divergence, this last-layer activation is not necessary from the matching with the Gaussian prior.

Our primary losses will be in a typical encoder-decoder fashion with loss of the form

$$\inf{\Theta} \int \mathbb{E}{\tilde{\phi}0} \left[ ||\mathcal{D}{\thetaD} \circ \mathcal{E}{\thetaD} \circ u{\theta_u}(\tilde{\phi}_0, t) - \tilde{\phi}_t||_2^2 + ||\text{geometric flow PDE}||_F^2 + ||g - J^T J||_F^2 \right] dt. \tag{23}$$

Here J is the Jacobian of the parametric map E with respect to local coordinates. Hence, J T J is the induced metric

$$[J^T J]_{ij} = \begin{cases} \langle \partial_i \mathcal{E}, \partialj \mathcal{E} \rangle{\mathbb{R}^D}, i \neq j \ \langle \partial_i \mathcal{E}, \partialj \mathcal{E} \rangle{\mathbb{R}^D} = ||\partial_i \mathcal{E}||_2^2, i = j \end{cases}$$ (24)

We will also consider variational settings [28] [27] [20] with KL divergence regularizing loss in latent spaces with noise introduced by encoding map u (see [22] for a more rigorous derivation of this loss; it relies on expectation equivalence and uses changes of variables). These losses will take the form

$$\inf{\Theta} \int \left[ \mathbb{E}{u \sim \tilde{q}} \left[ | \mathcal{D}{\theta{\mathcal{D}}} \circ \mathcal{E}{\theta{\mathcal{D}}} \circ u{\theta{u}}(\tilde{\phi}{0}, t) - \tilde{\phi}{t} |{2}^{2} \right] + \frac{\beta}{T} \mathbb{E}{\tilde{\phi}{0}} \left[ D{KL}(\tilde{q}(u|\tilde{\phi}_{0}) | p(u)) \right]$$ (25)

$$+ \mathbb{E}_{\tilde{\phi}_0} \left[ ||\text{geometric flow PDE}||_F^2 + ||g - J^T J||_F^2 \right] dt.$$ (26)

Here, ˜q is the encoding distribution in local coordinates which is outputted by u, and p = N d (u; 0, 1) is a Gaussian prior. Since the distributions are in local coordinates, the encoding E maps these distributions exactly to their manifold settings. It can be noted that

$$\frac{1}{T} \iiint \tilde{q}(u|\tilde{\phi}_0) \frac{\tilde{q}(u|\tilde{\phi}0)}{p(u)} d\rho(u) d\rho{\Phi} dt \tag{27}$$

$$= \frac{1}{T} \int \mathbb{E}_{\tilde{\phi}0} \left[ D{KL}(\tilde{q}(u|\tilde{\phi}_0)||p(u)) \right] dt \tag{28}$$

$$= \mathbb{E}_{\tilde{\phi}0} \left[ D{KL}(\tilde{q}(u|\tilde{\phi}_0)||p(u)) \right]$$ (29)

since the local coordinates are time-independent.

4 Contributions

4.1 Ricci flow on the sphere

This is a rather simple special case. Curvature is already uniformized as the sphere, and Ricci flow maintains the fact that the geometric structure over the entire flow is the same, except under Riemannian metric rescalings. In this case, we will normalize our data and rescale it under the correct radius subject to Ricci flow up to constants using

$$\mathcal{E}_{\mathbb{S}^d} = R(t) \times \frac{u}{||u||_2} = \sqrt{R^2 - C(d-1)t} \times \frac{u}{||u||_2}.$$ (30)

We find this method, over using a parametric map, is more expressive, since the parametric map of the sphere requires high order products of sinusoidal functions, which have an upper bound of 1. This implies many of the coordinates are trivialized over a large portion of the domain, since large scale of multiplication of small numbers produces an even smaller number.

4.2 Path integration with Gaussian curvature

We derive a special case for 2-manifolds using variations of Gaussian curvature [34] [45] under restrictions, as this allows closed path integration upon the curvature. Note that Ricci flow for 2-manifolds can be expressed using Gaussian curvature K, thus this section is exactly Ricci flow for 2-manifolds. Our geometric flow loss is motivated by the classical PDE

$$(\partial_t - K)g = 0. (31)$$

Our total geometric flow loss function in this setting is

$$\int \left( \mathbb{E}{\rho{\Sigma}} \left[ \sqrt{\det(g)} \sum{ij} \frac{\left( \partial{t} g \circ \partial{t} g - \widetilde{K}^{2} g \circ g \right){ij}}{\left( \partial{t} g \circ g - 2\widetilde{K} g \circ g \right){ij}} \right] + \mathbb{E}{(u{0},r) \sim \rho{\Sigma} \otimes \rho{r}} \left[ \oint \frac{\sqrt{\det(g)}}{g{11}} (\Gamma{11}^{2} du^{1} + \Gamma_{12}^{2} du^{2}) \right] dt. \tag{32}$$

The contour integral actually makes computation quite efficient; we can sample any ball, and the highest order computation needed is only the first order Christoffel symbols: no differentiation of Christoffel symbols is needed (which is second order). ◦ is the Hadamard (element-wise) product. Ke is an approximate surrogate for a Gaussian curvature estimation. Note that the element-wise division in the first term allows us to circumvent a change of variables, which is computationally laborious and makes the objective highly nontrivial.

Since we use Gaussian curvature, we examine

$$\lim_{||g||F \to 0} |K| = \lim{||g||F \to 0} \left| \frac{1}{\sqrt{\det(g)}} \left( \frac{\partial}{\partial u^2} \left( \frac{\sqrt{\det(g)}}{g{11}} \Gamma{11}^2 \right) - \frac{\partial}{\partial u^1} \left( \frac{\sqrt{\det(g)}}{g{11}} \Gamma_{12}^2 \right) \right) \right|. \tag{33}$$

Observe this form is indeterminant because of the denominators, and we do not immediately have |K| → 0, which is beneficial for us because this supports nondegeneracy.

4.3 A new flow derived with truncated Riemannian curvature and a linearlymodified Gauss equation

We develop a custom geometric flow based on the Riemannian tensor decomposition with the Weyl tensor omitted. In particular, the flow of this next section is not as much derived as it is invented, motivated by the Riemannian decomposition and a linear Gauss equation. We truncate Riemannian curvature and replace the Weyl tensor with a custom tensor (see Appendix E)

$$R{ijkl} = W{ijkl} + S{ijkl} + U{ijkl} \qquad \rightarrow \qquad \hat{R}{ijkl} = S{ijkl} + U{ijkl} + \Gamma{ijkl}. \tag{34}$$

We examine the Gauss equation [1]

$$\langle R(X,Y)Z,W\rangle = \langle \overline{R}(X,Y)Z,W\rangle + \langle \Pi(X,W),\Pi(Y,Z)\rangle - \langle \Pi(X,Z),\Pi(Y,W)\rangle, \tag{35}$$

or equivalently [2],

$$R{ijkl} = \overline{R}{ijkl} + \Pi{ik}\Pi{jl} - \Pi{jk}\Pi{il} = \Pi{ik}\Pi{jl} - \Pi{jk}\Pi{il}$$ (36)

in the setting that Rijkl = 0. Notice that this equation is quadratic in the second fundamental form h by the Gauss equation, but we will draw a connection from this equation but linearized. We will set the traceless extrinsic curvature tensor

$$\hat{H}{ij} = \Pi{ij} - \frac{H}{d}g_{ij}.\tag{37}$$

We will compute h with a Hessian surrogate in the normal bundle

$$\Pi{ij} = \left| \partial{ij} \mathcal{E} - \sum{kl} g^{kl} \langle \partial{ij} \mathcal{E}, \partial_k \mathcal{E} \rangle \partial_l \mathcal{E} \right|_2, \tag{38}$$

which is not that expensive to compute when a Jacobian transpose Jacobian proxy is used for the Hessian, which can be a valid approximation. The second part in the above expression derives because it is the projection onto the tangent plane. Alternatively, we can diminish the geometric quality and consider

$$\Pi{ij} = \left| \left| \partial{ij} \mathcal{E} \right| \right|_2, \tag{39}$$

although this is really just a Hessian norm. Here, H is mean curvature, which can be approximated up to a scaling [14]

$$H \propto \left| \Delta_g \begin{pmatrix} \mathcal{E}_1 \ \vdots \ \mathcal{E}_D \end{pmatrix} \right|_2, \qquad \mathcal{E} : \Sigma \subseteq \mathbb{R}^d \to \mathbb{R}^D, \qquad \Delta_g \mathcal{E}_k = \frac{1}{\sqrt{\det(g)}} \frac{\partial}{\partial u^i} \left( \sqrt{\det(g)} g^{ij} \frac{\partial \mathcal{E}_k}{\partial u^j} \right) \tag{40}$$

where the Laplace-Beltrami is element-wise. We develop our own geometric flow

$$\partialt g{ij} = H{ij} = g^{kl} H{ikjl} \tag{41}$$

$$= -\frac{\overline{R}}{(d-1)(d-2)}(g{ij}g{kl} - g{il}g{kj}) + \frac{1}{d-2}(g{ij}\hat{H}{kl} - g{il}\hat{H}{kj} - g{kj}\hat{H}{il} + g{kl}\hat{H}{ij}) + \Gamma_{ikjl},$$ (42)

and show it is expansive or contractive up to constants of choice. We have defined Γ in Appendix E, and we will treat R as constant and fixed. Thus, our geometric flow loss is

$$\mathbb{E}\left[ |\partialt g{ij} - \text{constant} \cdot H_{ij}|_F^2 \right]. \tag{43}$$

Theorem 2. The geometric flow of equation 134 is expansive or contractive in its volume element, i.e. ∂t p det(g) ̸= 0, if

$$-\frac{2\overline{R}}{d-2} + \sum{i} g^{ii} \hat{H}{ii} \neq 0, \tag{44}$$

assuming it is nonsingular.

Theorem 3. Suppose g ∈ Γ(Sym2T ∗M) for a manifold of intrinsic dimension 3 or greater, and that ||g||F → 0 with respect to some finite time. Then there exists a Riemannian metric g such that |g klHikjl| ̸→ 0.

Theorem 4. Consider the geometric flow

$$\partialt g{ii} = g^{jl} \left( -\frac{\overline{R}}{(d-1)(d-2)} (g{ij}g{il} - g{il}g{ij}) + \frac{1}{d-2} (g{ij}\hat{H}{il} - g{il}\hat{H}{ij} - g{ij}\hat{H}{il} + g{il}\hat{H}{ij}) \right). \tag{45}$$

Then this flow has vanishing diagonal, i.e. the right-hand side has zero diagonal for all time. In other words, the only diagonal contribution to the flow of equation 134 comes from Γijkl.

Proof. The proof is trivial by noting both terms on the right in the above are 0. We provide a less trivial proof in Appendix E that gives the same result.

4.4 Perelman's functional and non-parametric geometric flows with scalar curvature special cases

We propose considering the conformally changed metric

$$g(u,t) = \psi^{4/(d-2)}(u,t) \cdot g$$ (46)

with special case of scalar curvature [46]

$$R(\psi^{4/(d-2)}g) = \frac{4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi}{\psi^{(d+2)/(d-2)}}.$$ (47)

We derive a result based on Perelman's W [38] functional and conformally changed metrics. We also tie connections between Monte-Carlo integration and physics-informed methods, since their loss is of equivalence. By inducing a nonzero time derivative on this functional, a geometric flow is induced. This result is nonparametric because the geometric flow is not easily quantifiable, but is rather held using the data with neural networks. The loss we develop here is

$$\left| \text{positive constant} - \frac{d}{dt} \int_{\Sigma} \frac{4\frac{d-1}{d-2} \Delta_g \psi - R(g) \psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g(u,t))} \rho(u) du \right|. \tag{48}$$

In general, |ψ| → 0 causes scalar curvature to blow up, so its more effective that we control the time derivative rather than just ensure it is sufficiently large.

We demonstrate that this technique has close connections to Ricci-based flows on conformal metrics, but this strategy is lighter and more efficient than computing the Ricci tensor under a conformal rescaling. Both methods effectively require the Laplace-Beltrami computation, but the Ricci tensor would require many more derivatives of first and second order, while ours needs significantly fewer. Thus, the automatic differentiation task is greatly simplified.

Theorem 5. Suppose the loss

positive constant $$-\frac{d}{dt} \int_{\Sigma} \frac{4\frac{d-1}{d-2}\Delta_g \psi - R(g_0)\psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g)}\rho(u)du$$ (49)

is exactly satisfied, and that ψ is a bounded neural network with C∞ activation on Σ × [0, T]. Suppose gij ∈ C∞ with respect to time, and that the intrinsic dimension satisfies d ≥ 3. Then there is a constant δ > 0 such that ||g||F > δ for all t, i.e. ||g||F → 0 is impossible. Moreover, we can show this without using the relation between ψ and g.

4.5 Geometric flows with differentiating harmonic map energy

In this section, we work with extrinsic harmonic maps [24] [15]. Our loss function here is actually quite simple (computationally speaking). We construct a harmonic map with a neural network

$$\psi{\theta{\psi}}: \mathcal{M}_0 \to \mathcal{N}_t \subset \mathbb{R}^D \tag{50}$$

that is defined extrinsically so that it is embedded in the space. We develop a loss based on the energy

$$E(\psi)(t) = \int_{\Sigma} |d\psi|^2 du \qquad (51)$$

and its derivative so that it is sufficiently nonzero. Using the product rule under regularity conditions (see Appendix G, we are led to the loss function

$$\mathcal{L} = \left| \text{positive constant} - \left| \int{\Sigma} g^{ij}(u) \left( \left\langle \frac{\partial}{\partial t} \frac{\partial \psi(\varphi(u))}{\partial u^i}, \frac{\partial \psi(\varphi(u))}{\partial u^j} \right\rangle{\mathbb{R}^D} \right. \right.$$ (52)

$$+ \left\langle \frac{\partial \psi(\varphi(u))}{\partial u^i}, \frac{\partial}{\partial t} \frac{\partial \psi(\varphi(u))}{\partial u^j} \right\rangle_{\mathbb{R}^D} \right) \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d \bigg| . \tag{53}$$

Here, φ is the parametric map onto M0. We will set this to be the sphere, so we will map PDE data ϕ˜ 0 to a space u ∈ Σ then normalize it with ru/||u||2.

Theorem 6 (mostly formal aside from convergence rigor). The loss function of 52 has nontrivial dependence on Riemannian curvature. Moreover, suppose ψ is compactly supported on Σ and sufficiently smooth, including along the boundary, and suppose ψ → 0, ∂tψ → 0, ∂kψ → 0 pointwise for all k ∈ [dim(Σ)]. Then the loss of equation 52 cannot be exactly satisfied, i.e.

$$L > 0$$ , (54)

for any choice of positive constant.

5 Experiments

Throughout our experiments, we will use the Riemannian metric of the sphere on occassion, which is

$$ds^{2} = R^{2} \left( du{1}^{2} + \sin^{2} u{1} \left( du{2}^{2} + \sin^{2} u{2} \left( \dots \left( du{n-1}^{2} + du{n}^{2} \sin^{2} u_{n-1} \right) \right) \right) \right).$$ (55)

5.1 Navier-Stokes on the sphere

In this subsection, we consider learning an encoder-decoder sequence on the Navier-Stokes equation

$$\begin{cases} \partial_t v(x,t) + (v(x,t) \cdot \nabla)v(x,t) - \nu \nabla^2 v(x,t) = \frac{-1}{\rho} \nabla p(x,t) \ \nabla \cdot v = 0 \ (x,t) \in \mathcal{X} \times [0,T] \subseteq \mathbb{R}^2 \times [0,T] \end{cases}$$ (56)

Specifically, we learn the vorticity over an 80×80 mesh in R . Data was created using the Galerkin/Fourier spectral solver of [16] [17]. We will consider the special case of Ricci flow on the expanding sphere in this setting, and our manifold takes the form

$$\mathcal{E}_{\mathbb{S}^d} = \frac{(u+\xi)\sqrt{50^2 + 50(d-1)t}}{||u+\xi||_2}.$$ (57)

Here, ξ ∼ 0.375 · N d (0, 1) is a vector of Gaussian noise. By normalizing the point in space after the noise, we ensure the noise lies within the manifold and not around it. We have chosen d = 100. Here, we have denoted d the extrinsic dimension, since this manifold is not constructed with a parametric map. Our neural networks in this experiment are u = uθu , D = DθD , and S = SθS , which is the shifting network discussed in the Appendix. In the test setting, we take

$$\mathcal{E}{\mathbb{S}^d} = \frac{(u + \mathbb{E}{\xi}[\xi])\sqrt{50^2 + 50(d-1)t}}{|u + \mathbb{E}_{\xi}[\xi]|_2} = \frac{u\sqrt{50^2 + 50(d-1)t}}{|u|_2}.$$ (58)

We take a convolutional neural network for u and a vanilla multilayer perceptron for decoder D, which we found outperformed a transpose convolutional (deconvolutional) network. Our decoder used severe dropout (3 iterations with p = 0.325 and 1 iteration with p = 0.225). We chose a fairly high learning rate 5e−4 and fixed it.

For our baselines, we only construct u, D. We construct an autoencoder with an unrestricted latent stage. For two scenarios, we add: (1) no noise in the first setting; (2) the same exact noise we introduced into our manifold in the unrestricted latent space.

5.2 Burger's equation

The remainder of our experiments will be restricted to one dataset. This is to ensure we demonstrate all facets of our methods across a consistent datatset for comparison, and this narrow view allows us to deep-dive into the outcomes of our methods.

Figure 4: We illustrate our results on a single example of Burger's equation in the variational setting. The OOD scenario here is noise with σ = 1.5 is injected into 101 locations of the initial condition. We highlight this is only on a single example, so please refer to Table 2 for results across numerous data. We also highlight our Gaussian curvature experiment has intrinsic dimension d = 2, and extrinsic dimension D = 3. All other experiments have intrinsic dimension d = 3, and extrinsic dimension D = 5. As always, all hyperparameters are held as constant as possible across training, although the hyperparameter that is given a little bit of freedom is the loss scaling coefficients since each loss function has different terms.

We will consider the Burger's equation

$$\partialt \phi = \nu \partial{xx} \phi - \phi \partial_x \phi \tag{59}$$

such that (60)

$$(x,t) \in \mathcal{X} \times [0,T] = [0,1] \times [0,1]$$ (61)

$$\phi(x,0) = \sum_{i=1}^{3} \alpha_i \cos^{2i-1}(2\pi x), \alpha_i \sim U[-1,1].$$ (62)

For our baseline, we will consider extended encoder methods, meaning we take

$$\tilde{\phi}_t \approx \mathcal{D} \circ \mathcal{E} \circ u(\tilde{\phi}_0, t) \tag{63}$$

but without any restrictions on E. We consider this because it is a more similar architecture to ours, so we will investigate the geometric flow effects only. Also, this architecture generally has better out-ofdistribution robustness than a baseline encoder D ◦ E (see [22]).

We will exclusively consider vanilla multilayer perceptron architectures for this experiment, since this is the most typical architecture. Note that the architecture of [44] works well as well, but this architecture is a bit specialized, so we will not examine this. We will take all neural networks to be of the form

$$MLP(x) = W^{L}(\sigma \circ (W^{L-1}\sigma \circ \dots \circ (\sigma \circ (W^{1}x + b^{1}) + b^{2}) + \dots + b^{L-1}) + b^{L}.$$

$$(64)$$

We will take

$$\sigma(\cdot) = \tanh(\cdot) \tag{65}$$

for all experiments in any network in which the PDE data is passed. We remark it is common to normalize layers sometimes, such as in [7], but we will not do this. When we construct a metric g with a neural network gθg , we will always take

$$g(u,t) = (\mathcal{G}(u,t))^T \mathcal{G}(u,t) \tag{66}$$

to ensure positive semi-definiteness.

In table 2, we remark this is quite a large sample size. Data is gathered so that we examine the aggregate relative L 1 error every 10-th discrete time point in the 201-point mesh in time. All of our methods are trained until roughly 2e−4 decoded loss (MSE on the PDE learning) or until convergence (we remark the Gaussian curvature experiment was not trained as far, which was favorable and is likely attributable to its dimension differences, but in general we did not find this extremely important). We choose KL regularization coefficient β = 0.001. We remark that high batch size and low learning rate (2e−4) led to consistent results among retraining, especially among the baseline method (see Figure 13), thus it is a meaningful benchmark. The seed is set such that all data is the same among the comparisons, both the PDE data and the OOD data.

Table 1: Variational method errors by scenario with the means and standard deviations listed using an L 1 relative error metric. We illustrate our methods over 300 out-of-distributions data samples. Our OOD scenarios are: (1) noise with σ = 1.0 injected in all 201 locations; (2) noise with σ = 1.5 injected in all 201 locations; (3) noise with σ = 2.5 injected in all 201 locations; (4) noise with σ = 2.0 injected in 31 locations; (5) noise with σ = 3.0 injected in 11 locations; (6) noise with σ = 0.25 injected in all 201 locations; (7) initial data scaled by 1.4 with noise of σ = 1.5 injected in 101 locations; (8) a linear function of the form y0 + 2πj∆x/N injected everywhere; (9) noise with σ = 3.0 injected in the first 11 locations only. As a last remark, we found our VAE baseline was generally pretty consistent among retraining (see Figure 13). For example, we retrained the baseline VAE and repeated scenario 1 with a 0.727 mean.

| Scenario | Method [↓] | | | | | | | |------------|------------------|------------------------------------|--------------------------|------------------------|---------------|--|--| | | Path integration | Second
fundamental
form flow | Perelman's
functional | Harmonic
functional | Baseline | | | | Scenario 1 | 0.592 ± 1.270 | 0.555 ± 1.512 | 0.482 ± 0.962 | 0.522 ± 1.244 | 0.765 ± 2.704 | | | | Scenario 2 | 0.736 ± 1.498 | 0.735 ± 1.986 | 0.643 ± 1.188 | 0.699 ± 1.656 | 0.984 ± 3.217 | | | | Scenario 3 | 0.944 ± 1.714 | 0.961 ± 2.587 | 0.853 ± 1.376 | 1.032 ± 2.317 | 1.231 ± 3.442 | | | | Scenario 4 | 0.377 ± 0.771 | 0.361 ± 0.720 | 0.392 ± 1.504 | 0.389 ± 1.248 | 0.487 ± 1.971 | | | | Scenario 5 | 0.339 ± 0.902 | 0.343 ± 0.724 | 0.355 ± 1.432 | 0.334 ± 0.799 | 0.408 ± 1.482 | | | | Scenario 6 | 0.273 ± 0.514 | 0.182 ± 0.510 | 0.152 ± 0.302 | 0.245 ± 0.356 | 0.237 ± 0.881 | | | | Scenario 7 | 0.354 ± 0.621 | 0.348 ± 0.857 | 0.408 ± 1.146 | 0.387 ± 0.652 | 0.523 ± 2.263 | | | | Scenario 8 | 0.610 ± 0.377 | 1.113 ± 1.948 | 0.613 ± 0.331 | 0.727 ± 0.257 | 1.310 ± 2.675 | | | | Scenario 9 | 0.432 ± 1.120 | 0.420 ± 0.839 | 0.416 ± 0.912 | 0.417 ± 0.881 | 0.468 ± 1.491 | | |

Table 2: Training time by method (in seconds). We have used intrinsic dimension d = 3 for all experiments except the Ricci flow (d = 2), and for the Gaussian curvature (since Gaussian curvature only exists for d = 2).

| | Method | | | | | | | |-------------------------------------------------|---------------------|-------------------------------------|--------------------------|------------------------|-----------------------|-------------------------------|--| | | Path
integration | Second fun
damental
form flow | Perelman's
functional | Harmonic
functional | Ricci flow
(d = 2) | Baseline
(extended
VAE) | | | Training
time (100
descent
iterations) | 10.115 | 18.602 | 11.657 | 10.348 | 27.005 | 6.162 | |

Gaussian curvature experiment. We list details for our Gaussian curvature experiment. Empirically, we tried the change of variables strategy as in Appendix D. This loss function is extremely nontrivial to optimize, and this method is extremely suboptimal. Instead, we found our division by a nonzero function method much simpler and more effective.

Second fundamental form with its proxies. Note that we have set the diagonal of H, which was with our Γijkl proxy, such that all diagonal elements are nonnegative. This is because we have defined our curvature using a norm. There is nothing wrong this computationally or theoretically, but it is noteworthy. Also, we have approximated our Hessian using a Jacobian transpose Jacobian. This is a known approximation, and it reduces computational expense quite significantly. Here, we have initialized the metric at t = 0 with gsphere.

Perelman's functional experiment. For simplicity, we will set our baseline metric as the sphere g0 = gsphere. The sphere has scalar curvature

$$R = \frac{d(d-1)}{r^2}.\tag{67}$$

Here, r is the radius.

Harmonic map experiment. For our initial manifold M, we will map our data to any point in Euclidean space R d and we will normalize this data such that

$$u \to \frac{r \times u}{||u||_2} \tag{68}$$

for some radius r. ψ is our parametric map such that

$$\psi{\theta{\psi}} : \frac{r \times u}{||u||_2} \to \mathcal{N}_t \subset \mathbb{R}^D.$$ (69)

We set r = 2. We use a geometric flow loss of the form

$$\left| 0.5 - \int{\Sigma} \frac{d}{dt} \left( g^{ij}(u) \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} \right) \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d \right|^2 + \mathbb{E} \left[ \left| \left| \left| \psi(u, 0) \right| \right|_2 - 5 \right|^2 \right], \tag{70}$$

which yielded both consistent and favorable results.

6 Conclusions and limitations

We have developed mathematical, empirical, and efficient foundations for availing geometric properties in latent spaces as a means of regularization, primarily for variational autoencoders. Our experiments were considerably rigorous and deep. We have done our best to be as fair in our experiments as possible.

We have hypothesized that high curvature permits a high time derivative, thus a flow is nontrivial. While we have indeed shown empirical evidence of this, primarily Figure 8, we found initializing the geometry worked well in section 4.3. In Figure 11, we also found a nondegenerate flow was formed, and we did not initialize the geometry here. We have theoretically proven that functionals do not permit nontrivial cases. Consequently, we would like to highlight these notions as a last remark.

Our mathematical and empirical results are interesting, but our empirical results are not groundbreaking. This is to be expected: our geometries are naturally-formulated, and our OOD data are not restricted to manifold structures through means such as projections. Nonetheless, we provide contributions towards artificial intelligence under the geometric modality.

7 Acknowledgments

I would like to thank the SIAM applied mathematics community for helpful discussions and helping make this work the best it could be. I would also like to thank Michael Willis at University of California, Los Angeles for his differential geometry course, which helped immensely with this work.

References

Contents

1 Introduction 1
2 Setup
2.1
A learning task of limited measure and randomness
3
5
3 Methods 6
4 Contributions
4.1
Ricci flow on the sphere

4.2
Path integration with Gaussian curvature

4.3
A new flow derived with truncated Riemannian curvature and a linearly-modified Gauss
7
7
8
equation
4.4
Perelman's functional and non-parametric geometric flows with scalar curvature special cases
4.5
Geometric flows with differentiating harmonic map energy
8
9
10
5 Experiments
5.1
Navier-Stokes on the sphere
5.2
Burger's equation
11
11
11
6 Conclusions and limitations 14
7 Acknowledgments 15
A Baseline training 19
B A vanishing Ricci off-diagonal: geometric meaning versus computational gains 19
C A special case of the d-sphere 21
D Path integration with Gaussian curvature 22
E New flows with new curvature-derived tensors 24
F Discussion of new non-parametric geometric flows with special cases of Perelman's W-functional 28
G Energy functionals with harmonic maps 31
H Additional figures 34

A Baseline training

Figure 5: We compare curvature-type flows to alternative flows that are easy to compute, which are typically trivial in derivative order.

Algorithm 1: Geometric flow-regularized encoder-decoder training
 Data: A1 = {ϕ˜
                  0
                    }i
                      , A2 = {ϕ˜
                                tj
                                   }ij evaluated at (x1, . . . , xn, tj ) ∈ X × [0, T], uθu
                                                                                      , EθE
                                                                                           , DθD
 while Loss not converged do
     Sample N, A1, A2, t;
     Evaluate u(ϕ˜
                   0
     Map to manifold E(u);
     Evaluate ||g(u, t) + FK[g(u, t)]||2
                                       F
     Compute 
                 ∂kE(u, t), ∂lE(u, t)

     Decode point on manifold ˜d = D ◦ E;
     Evaluate || ˜d − ϕ˜
                      t||2
                        2
     Formulate total objective and take grad;
 end

B A vanishing Ricci off-diagonal: geometric meaning versus computational gains

In our experiments, it would notable to consider restricting both the metric and the Ricci tensor as diagonal for computational expense purposes. We provide the following result that this is not always meaningful. In particular, we show just because the metric is diagonal at some t ∈ [0, T], it is not necessarily diagonal for all τ > t due to the Ricci tensor.

Theorem 1. Let g, Ric ∈ Γ(T ∗M ⊗ T ∗M) be sufficiently smooth on [0, T], T > 0, and let g be diagonal at t = 0. Let g be subject to Ricci flow on [0, T]. Then Ric is not necessarily diagonal for some t, hence neither is g, over [0, T].

Proof. Let i ̸= k. We will use Einstein notation only if an index is repeated in lower and upper positions exactly once each. We begin by noting Hamilton's result of the time evolution of the Ricci tensor under Ricci flow [23]

$$\partialt \operatorname{Ric}{ik} = \Delta \operatorname{Ric}{ik} + 2g^{pr} g^{qs} R{piqk} \operatorname{Ric}{rs} - 2g^{pq} \operatorname{Ric}{pi} \operatorname{Ric}_{qk}. \tag{71}$$

Suppose necessarily that gij = Ricij = 0 as well as their spatial derivatives at t = 0, i.e. the Ricci tensor is identically 0 along the off-diagonal. We will show, even if this is true, ∆Ricik is not necessarily 0, nor is ∂tRicik. First, we compute ∆Ricik. First, note if the metric is diagonal, so is its inverse. Observe using the covariant derivative formula (see equation 84)

$$\Delta \operatorname{Ric}_{ik} = g^{jl} \nabla_j \nablal \operatorname{Ric}{ik} = g^{jl} \nabla_j (\partiall \operatorname{Ric}{ik} - \Gamma{il}^m \operatorname{Ric}{mk} - \Gamma{kl}^m \operatorname{Ric}{im})$$ (72)

$$= \sum{j} g^{jj} \nabla{j} (-\Gamma{ij}^{k} \operatorname{Ric}{kk} - \Gamma{kj}^{i} \operatorname{Ric}{ii})$$

$$(73)$$

$$= \sum{j}^{j} \left[g^{jj} \left(\partial{j} \left(-\Gamma{ij}^{\phantom{ij}k} \operatorname{Ric}{kk} - \Gamma{kj}^{\phantom{kj}i} \operatorname{Ric}{ii}\right) - \sum{m} \left(-\Gamma{ij}^{\phantom{ij}m} \Gamma{mj}^{\phantom{mj}k} \operatorname{Ric}{kk} - 2\Gamma{ij}^{\phantom{ij}m} \Gamma{kj}^{\phantom{kj}m} \operatorname{Ric}{mm} - \Gamma{kj}^{\phantom{kj}m} \Gamma{mj}^{\phantom{mj}i} \operatorname{Ric}{ii}\right)\right)\right]$$

$$(74)$$

Note the symmetry in the expression −Γij kRickk − Γkj iRicii. Now, we note the following: Γij k = 0 for diagonal metrics if i ̸= j ̸= k [19]. For the first term, j = i, k otherwise we get triviality. For the inner summation, we must have m = j, i, k, and j can run over any index. Hence,

$$= \sum_{j \in {i,k}} \left[ g^{jj} \partialj (-\Gamma{ij}{}^k \operatorname{Ric}{kk} - \Gamma{kj}{}^i \operatorname{Ric}_{ii}) \right]$$ (75)

$$+\sum{j} g^{jj} \sum{m \in {j,i,k} \text{ all distinct}} \left[ \Gamma{ij}{}^{m} \Gamma{mj}{}^{k} \operatorname{Ric}{kk} + 2\Gamma{ij}{}^{m} \Gamma{kj}{}^{m} \operatorname{Ric}{mm} + \Gamma{kj}{}^{m} \Gamma{mj}{}^{i} \operatorname{Ric}_{ii} \right] = (a).$$ (76)

Now, returning to equation 71, we have

$$\partialt \text{Ric}{ik} = (a) + \sum{p,q} 2g^{pp} g^{qq} R{piqk} \text{Ric}{pq} - 2g^{ik} \text{Ric}{ii} \text{Ric}_{kk} = (a) + \sumq 2(g^{qq})^2 g{qm} Rk{}^m{}{qi} \text{Ric}{qq} - 2g^{ik} \text{Ric}{ii} \text{Ric}_{kk}$$

$$= \langle a \rangle + \sum{q} \left[ \langle a^{qq} \rangle^{2} a \cdot \mathbf{P}, q \cdot \mathbf{P}; a \right] \quad 0 = \langle a \rangle + \sum{q} \left[ \langle a^{qq} \mathbf{P}, q \cdot \mathbf{P}; a \rangle \right] \quad 0 = \langle a \rangle$$

$$(77)$$

$$= (a) + \sum{q} 2 \left[ (g^{qq})^2 g{qq} Rk^{\ q}{}{qi} \operatorname{Ric}{qq} \right] - 0 = (a) + \sum{q} 2 \left[ \underbrace{g^{qq} Rk^{\ q}{}{qi} \operatorname{Ric}{qq}}{=(b)} \right] - 0 = (c). \tag{78}$$

We remark the diagonalization of g reduces the summation over m in 77 to a single term, which means that Rk q qi is not Einsten notation and does not reduce to a Ricci curvature term. In general, (c) is not identically 0. Observe it is possible terms involving a product of the Riemannian tensor and Ricci curvature appear in (a) and (b), but we need not do this computation. The first summation in (a) only runs over j = i, k, but the summation in (b) runs over any index. This is a guarantee that not all terms necessarily cancel out (specifically for intrinsic dimension > 2). We provide a non-rigorous mathematical argument why the result follows in the remark below.

Thus, the time derivative is nonzero, so the off-diagonal of Ric is not identically zero and we are done. In particular, we have

$$g{ij}(t) = g{ij}(0) - 2\int0^t (\operatorname{Ric}{ij}(0) + \int_0^\tau \partialt \operatorname{Ric}{ij}(\gamma) d\gamma) d\tau$$ (79)

$$= -2 \int{0}^{t} \int{0}^{\tau} \partial{t} \operatorname{Ric}{ij}(\gamma) d\gamma d\tau \tag{80}$$

$$= -2 \int_0^t \int_0^\tau \left[ \sum_j g^{jj} \summ \left[ \Gamma{ij}^m \Gamma{mj}^k \operatorname{Ric}{kk} + 2\Gamma{ij}^m \Gamma{kj}^m \operatorname{Ric}{mm} + \Gamma{kj}^m \Gamma{mj}^i \operatorname{Ric}{ii} \right] \right]$$ (81)

$$+\sum_{q} 2 \left[ g^{qq} Rk^{\ q}{\ qi} \operatorname{Ric}_{qq} \right] d\gamma d\tau \tag{82}$$

is not necessarily 0. We remark we also use smoothness, and so ∂tRicik is not only nonzero on a set of measure 0.

□

Remark. We develop a non-rigorous qualitative argument that the condition of (a) is nonzero. Note that all terms in (a) can be nonzero (this is only not true in certain circumstances, such as the Christoffel symbols are constant, thus differentiation yields 0). Thus, we can scale the metric nonlinearly, such as through gij → Fij (gij ), if the equation is not automatically nonzero for choice of metric. In general, for the equation x + y = 0, x, y ̸= 0, we can construct a nonlinear function f such that

$$f_1(x) + f_2(y) \neq 0,$$ (83)

where f1, f2 are transformations that all relate to f in some way, such as through the chain rule. For us, x is (a) and y is (c). We also remark our goal is to show there exists such a metric, not that the result holds for all metrics. A nonlinear scaling changes the intrinsic geometry in general.

Remark. Observe the quantity (a) has close connections to the Riemannian tensor if we were to differentiate the Christoffel symbols and rearrange the summations.

Remark. A key of this proof is the fact that the Laplacian of the Ricci tensor along the off-diagonal also depends on the diagonal elements. This is observable with the covariant derivative formula

$$\nablal A{ik} = \partiall A{ik} - \Gamma{il}{}^m A{mk} - \Gamma{kl}{}^m A{im}, \tag{84}$$

and since there are two summations over m. As we mentioned, we normally have Γil k = 0 for diagonal metrics if i ̸= l ̸= k [19], but in our proof, we also have summation over l, so we do not automatically get triviality.

C A special case of the d-sphere

Ricci flow upon a sphere has simple closed form. Since curvature of the sphere is already uniformized, Ricci flow upon the sphere has no curvature-steady state to evolve to other than itself. Regardless, contractive properties still exist, so the sphere shrinks until extinction in finite time. The radius of the sphere subject to Ricci flow takes the form

$$r(t) = \sqrt{R^2 - 2(d-1)t},\tag{85}$$

for initial radius R [40]. Moreover, the exact coordinate chart mapping from local coordinates to the sphere is known, and governed by the equations

$$\mathcal{E}{\mathbb{S}^d}^1 = r(t)\cos u^1, \mathcal{E}{\mathbb{S}^d}^i = r(t)\cos u^i \prod{j=1}^{i-1}\sin u^j, \mathcal{E}{\mathbb{S}^d}^{d+1} = r(t) \prod_{j=1}^{d}\sin u^j.$$ (86)

It is very important to note here that the manifold is embedded in R d+1 dimensional Euclidean space. Here, the local coordinates that parameterize the sphere u are still learned with a neural network. However, we will not work with the coordinate chart. As is observable, it requires high order sinusoidal products. These values are diminished for sin u j < 1 to some level. We will work directly with a point encoded in space and its normalization. We will take

$$\mathcal{E}_{\mathbb{S}^d} = r(t) \frac{u}{||u||_2} \tag{87}$$

directly.

Our objective function in this setting is greatly simplified, and the geometric flow loss is

$$\mathcal{L} = \mathbb{E}\left[\left|\left|\mathcal{D}{\theta{\mathcal{D}}}(\mathcal{E}{\mathbb{S}^d}(u{\theta_u}(\tilde{\phi}_0), t)) - \tilde{\phi}_t\right|\right|_2^2\right]. \tag{88}$$

We make some additional remarks. Now, the intrinsic nature of Ricci flow is reduced to an extrinsic parameterization. Rotational vector fields tangent to the sphere, and the translocation of the center of mass no longer exist.

We can reintroduce some expressivity into the parameterization by introducing a new neural network SθS : [0, T] × ΘS → R d+1. We have

$$\tilde{\mathcal{E}}^{i}{\mathbb{S}^{d-1}} = \mathcal{E}^{i}{\mathbb{S}^{d-1}} + \mathcal{S}^{i}{\theta{\mathcal{S}}},\tag{89}$$

where E˜ is the new sphere after the change of centers. Observe ES d−1 is the fixed sphere at the center and SθS is learned in training. We denote i as the i-th coordinate in R d+1. In particular, we can decompose the vector field and each particle that composes the manifold evolves according to

$$\begin{cases} \frac{dx(t)}{dt} = \xi_1(x(t)) + \xi_2(x(t)) + \xi_3(x(t)) \ x(t) = x(0) + \int_0^t (\xi_1 + \xi_2 + \xi_3)(x(\tau))d\tau \ (\xi_1 + \xi_2 + \xi_3) \in \Gamma(T\mathcal{M}) \oplus \Gamma(N\mathcal{M}) \end{cases}$$ (90)

which correspond to the rotation, translocation, and movement from the geometric flow. Since we cannot easily create rotation, the neural network SθS means each particle evolves to

$$x(t) = x(0) + \int_0^t (\xi_2 + \xi_3) d\tau. \tag{91}$$

D Path integration with Gaussian curvature

In this section, we utilize the relation

$$Ric = Kg$$ (92)

where K is Gaussian curvature, defined as [45]

$$K = \frac{1}{\sqrt{\det(g)}} \left( \frac{\partial}{\partial u^2} \left( \frac{\sqrt{\det(g)}}{g{11}} \Gamma{11}^2 \right) - \frac{\partial}{\partial u^1} \left( \frac{\sqrt{\det(g)}}{g{11}} \Gamma{12}^2 \right) \right). \tag{93}$$

Thus, our loss function in a learning setting starts out as

$$\mathbb{E}[||(\partial_t - K)g||_F^2]. \tag{94}$$

Note that this is exactly Ricci flow, since Ric = Kg for 2-manifolds [47].

We wish to apply Green's theorem to simplify K but there is a major issue because 1/ p det(g) scales K and we cannot immediately apply Green's theorem in this form. However, we will modify our loss function to allow this. Now, we have

$$\int \mathbb{E}\left[\sqrt{\det(g)}\Big|\Big|\partial_t g - Kg\Big|\Big|_F^2\right] dt \tag{95}$$

$$= \int \mathbb{E}\left[\sqrt{\det(g)}\sum_{ij}(\partialt g{ij} - Kg_{ij})^2\right]dt \tag{96}$$

$$= \int \mathbb{E}\left[\sum_{ij} (\sqrt[4]{\det(g)} \partialt g{ij} - \sqrt[4]{\det(g)} K g_{ij})^2\right] dt \tag{97}$$

$$=\iiint{\Sigma\times[0,T]} \sum{ij} (\sqrt[4]{\det(g)}\partialt g{ij} - \sqrt[4]{\det(g)}Kg_{ij})^2 \rho(u)du^1 du^2 dt$$ (98)

$$=\iiint{\Sigma\times[0,T]} \sum{ij} (\sqrt[4]{\det(g)}\partialt g{ij} - \sqrt[4]{\det(g)}Kg_{ij})^2 \rho(u)du^1du^2dt$$ (99)

$$= \iiint{\Sigma \times [0,T]} \sum{ij} (\sqrt{\det(g)} (\partialt g{ij})^2 - 2\sqrt{\det(g)} K g_{ij} \partialt g{ij} + \sqrt{\det(g)} K^2 g_{ij}^2) \rho(u) du^1 du^2 dt.$$ (100)

Now, the quadratic Gaussian curvature is problematic because this integral is nontrivial to evaluate and simplify. We propose a first-order Taylor surrogate

$$K^{2} \approx \widetilde{K}^{2} + 2\widetilde{K}(K - \widetilde{K}) = 2\widetilde{K}K - \widetilde{K}^{2}. \tag{101}$$

Here, Ke is a Gaussian curvature approximation that is linear in true Gaussian curvature. Now, Gaussian curvature is approximated linearly. Returning to our loss,

$$\iiint{\Sigma \times [0,T]} \sum{ij} (\sqrt{\det(g)} (\partialt g{ij})^2 - 2\sqrt{\det(g)} K g_{ij} \partialt g{ij} + \sqrt{\det(g)} K^2 g_{ij}^2) \rho(u) du^1 du^2 dt \tag{102}$$

$$= \iiint{\Sigma \times [0,T]} \sum{ij} (\sqrt{\det(g)} (\partialt g{ij})^2 - 2\sqrt{\det(g)} K g_{ij} \partialt g{ij} + \sqrt{\det(g)} [\widetilde{K}^2 + 2\widetilde{K} (K - \widetilde{K})] g_{ij}^2) \rho(u) du^1 du^2 dt \tag{103}$$

$$= \iiint{\Sigma \times [0,T]} \sum{ij} (\sqrt{\det(g)} (\partialt g{ij})^2 - 2\sqrt{\det(g)} \underbrace{(g_{ij} \partialt g{ij} - 2\widetilde{K} g{ij}^2) K}{(II)} - \sqrt{\det(g)} \underbrace{\widetilde{K}^2 g{ij}^2) \rho(u) du^1 du^2 dt}{(III) \ge 0} = 0.$$

It is of consideration to introduce the change of variables

$$d\psi{ij} = (g{ij}\partialt g{ij} - 2\widetilde{K}g_{ij}^2)du^1 \wedge du^2.$$ (105)

(104)

This leads to highly rigorous computation, and this route is not preferred. Instead, notice that not only is the integral zero but the integrand should be zero almost everywhere. Thus, it is valid to introduce

$$\iiint{\Sigma \times [0,T]} \sum{ij} (\sqrt{\det(g)} (\partialt g{ij})^2 - 2\sqrt{\det(g)} (g_{ij}\partialt g{ij} - 2\tilde{K}g{ij}^2)K - \sqrt{\det(g)}\tilde{K}^2 g{ij}^2)\rho(u)du^1 du^2 dt \qquad (106)$$

$$= \iiint{\Sigma \times [0,T]} \sum{ij} (\sqrt{\det(g)} \frac{(\partialt g{ij})^2}{(g_{ij}\partialt g{ij} - 2\tilde{K}g{ij}^2)} - 2\sqrt{\det(g)}K - \sqrt{\det(g)} \frac{\tilde{K}^2 g{ij}^2}{(g_{ij}\partialt g{ij} - 2\tilde{K}g_{ij}^2)})\rho(u)du^1 du^2 dt.$$

$$(107)$$

We have clearly assumed the denominator is nonzero. This is mathematically valid since

$$\mathbb{E}\left[\mathbb{E}\left[\sum_{ij}\left(\sqrt{\det(g)}(\partialt g{ij})^2 - 2\sqrt{\det(g)}(g_{ij}\partialt g{ij} - 2\widetilde{K}g{ij}^2)K - \sqrt{\det(g)}\widetilde{K}^2 g{ij}^2\right)\right]\right] = 0$$ (108)

$$\implies \left(\sqrt{\det(g)}(\partialt g{ij})^2 - 2\sqrt{\det(g)}(g_{ij}\partialt g{ij} - 2\widetilde{K}g{ij}^2)K - \sqrt{\det(g)}\widetilde{K}^2g{ij}^2\right) = 0 \quad \text{a.e.}$$ (109)

which follows by nonnegativity, thus division by a nonzero function is perfectly fine. As a side remark, since we used a Gaussian curvature proxy, this introduces error, so the nonnegativity is not guaranteed but holds with a sufficient error tolerance. Now the integration of Gaussian curvature is computable.

Thus, our Gaussian curvature with the product with the volume element is

$$\tilde{K} = \sqrt{\det(g)}K = \frac{\partial}{\partial u^2} \left(\frac{\sqrt{\det(g)}}{g{11}}\Gamma{11}^2\right) - \frac{\partial}{\partial u^1} \left(\frac{\sqrt{\det(g)}}{g{11}}\Gamma{12}^2\right). \tag{110}$$

Now, we will use Stokes' / Green's theorem. Observe

$$\iint_{B_r(x0)} \left( \frac{\partial}{\partial u^2} \left( \frac{\sqrt{\det(g)}}{g{11}} \Gamma{11}^2 \right) - \frac{\partial}{\partial u^1} \left( \frac{\sqrt{\det(g)}}{g{11}} \Gamma_{12}^2 \right) \right) du^1 du^2$$ (111)

$$= \oint_{\partial B_r(x0)} \frac{\sqrt{\det(g)}}{g{11}} \Gamma{11}^2 du^1 + \frac{\sqrt{\det(g)}}{g{11}} \Gamma{12}^2 du^2 = \oint{\partial B_r(x0)} \frac{\sqrt{\det(g)}}{g{11}} \left( \Gamma{11}^2 du^1 + \Gamma{12}^2 du^2 \right). \tag{112}$$

This allows us to bypass differentiation of the Christoffel symbols, increasing efficiency. Indeed, it is not hard to evaluate this line integral over arbitrary circles, and it is first order in its derivatives with the Christoffel symbols of the second kind. To compute this, we parameterize any circle

$$v^{1}(\omega) = u{0}^{1} + r\cos\omega, v^{2}(\omega) = u{0}^{2} + r\sin\omega$$ (113)

and make it discrete. We get

$$\oint_{\partial B_r(x0)} \frac{\sqrt{\det(g)}}{g{11}} \left( \Gamma{11}^2 du^1 + \Gamma{12}^2 du^2 \right) \approx \underbrace{\sum_{\gamma_i} \frac{\sqrt{\det(g(v(\omegai), t))}}{g{11}} \left( r\widetilde{\Gamma}_{11}^2 (-\sin \omegai) + r\widetilde{\Gamma}{12}^2 (\cos \omegai) \right) \Delta \omega}{\text{closed line path loss}}. \tag{114}$$

Our full discrete loss function is

$$\mathcal{L} = \text{closed line path loss}$$ (115)

$$+ \sum{(\tilde{\phi}{0}^{(i)}, t{i})} \sum{jk} \frac{\sqrt{\det(g(u(\tilde{\phi}{0}^{(i)}), t{i}))} \left(\partial{t}g{jk}^{2}(u(\tilde{\phi}{0}^{(i)}), t{i}) - g{jk}^{2}(u(\tilde{\phi}{0}^{(i)}), t{i})\tilde{K}^{2}\right)}{\left(g{ij}(u(\tilde{\phi}{0}), t{i})\partial{t}g{ij}(u(\tilde{\phi}{0}), t{i}) - 2\tilde{K}g{ij}^{2}(u(\tilde{\phi}{0}), t_{i})\right)}$$ (116)

We give some final remarks. We will assign our Gaussian curvature proxy as

$$\widetilde{K}_i \leftarrow \frac{1}{\text{Length}(\partial B_r(xi))} \oint{\partial B_r(x0)} \frac{\sqrt{\det(g)}}{g{11}} \left( \Gamma{11}^2 du^1 + \Gamma{12}^2 du^2 \right). \tag{117}$$

This can be evaluated with a Riemann sum using polar and the increment r∆θ. Note that the increment and length denominator have high cancellation. More specifically, Ke can be computed as, over a circle,

$$\widetilde{K}{i} = \frac{1}{2\pi r} \sum{i} \frac{\sqrt{\det(g{i})}}{g{11,i}} (\widetilde{\Gamma}{11}^{2}(-\sin\omega{i}) + \widetilde{\Gamma}{12}^{2}(\cos\omega{i})) r \Delta\omega{i} = \frac{1}{L} \sum{i} \frac{\sqrt{\det(g{i})}}{g{11,i}} (\widetilde{\Gamma}{11}^{2}(-\sin\omega{i}) + \widetilde{\Gamma}{12}^{2}(\cos\omega{i})), \tag{118}$$

where L is the number of increments in which the circle of domain 2π is divided.

Remark. We remark that this method of simplifying the computation of Gaussian curvature with Stokes' theorem is closely related to the Gauss-Bonnet theorem, which states

$$\iint{\mathcal{M}} K dA = 2\pi \chi(\mathcal{M}) - \oint{\partial \mathcal{M}} k_g ds. \tag{119}$$

Here, kg is geodesic curvature; however, our method is generally preferred because we do not need to compute a normal vector, which is typical to compute geodesic curvature.

We make some other remarks. Algebraically, our mathematics is fine, and division by a nonzero function is acceptable. It is important to distinguish that machine learning attempts to minimize, and the true output of the loss is not zero. Thus, the loss landscape is quite different, and the solution behavior across training will be nonuniform among these divisory scalings. Nonetheless, the same solution works if or if not the nonzero function has been divided, and for our purposes, the function division, while affective of the loss landscape, is unimportant for an overall final outcome.

As a last remark, note that our Gaussian curvature loss requires sampling ϵ-balls. We rely on an integral equivalence

$$\iiint \sqrt{\det(g)} K dA dt \approx \int \left(\frac{1}{N} \sum{i=1}^{N} \oint{\partial B_r(xi)} \frac{\sqrt{\det(g)}}{g{11}} \Gamma{11}^2 du^1 + \frac{\sqrt{\det(g)}}{g{11}} \Gamma_{12}^2 du^2\right) dt, \tag{120}$$

which is valid under a (non-rigorous) Monte Carlo-type argument.

E New flows with new curvature-derived tensors

In this section, we develop a custom geometric flow that is based off of Ricci flow, but as we will see, it is also quite different. Ricci flow is widely studied in literature for a variety of theoretical purposes. While some of these purposes apply to a machine learning context, many properties do not. As mentioned in the introduction, a crucial key for us is either contractive or expansive properties. We will derive a computationally-efficient flow and show it satisfies such a property. This flow we will derive has critical extrinsic definitions; however, the PDE will be associated on the Riemannian metric, and no use of vector fields or ordinary differential equations is required.

The all lower-indexed (0,4) Riemannian tensor Rijkl can be decomposed [23]

$$R{ijkl} = W{ijkl} + S{ijkl} + U{ijkl} \tag{121}$$

$$=W{ijkl} - \frac{R}{(d-1)(d-2)}(g{ik}g{jl} - g{il}g{jk}) + \frac{1}{d-2}(g{ik}\hat{R}{jl} - g{il}\hat{R}{jk} - g{jk}\hat{R}{il} + g{jl}\hat{R}_{ik}).$$ (122)

Here, Rˆ ij = Ricij − dRgij is the traceless part of the Ricci tensor. We will omit the Weyl tensor from out computation, and we will develop a new tensor that is derivative of

$$\widetilde{R}{ijkl} = S{ijkl} + U_{ijkl} \tag{123}$$

$$= -\frac{R}{(d-1)(d-2)}(g{ik}g{jl} - g{il}g{jk}) + \frac{1}{d-2}(g{ik}\hat{R}{jl} - g{il}\hat{R}{jk} - g{jk}\hat{R}{il} + g{jl}\hat{R}{ik}).$$ (124)

We will replace the traceless Ricci tensor, which is curvature-based, with a new curvature-type tensor derived from our second fundamental form proxy. From the Gauss equation, it is known

$$R{ijkl} = \overline{R}{ijkl} + \Pi{ik}\Pi{jl} - \Pi{jk}\Pi{il}, \qquad (125)$$

where h is the second fundamental form, which is defined by

$$h(X,Y) = \overline{g}(\overline{\nabla}_X \nu, Y), \tag{126}$$

for tangent vectors X, Y , ambient metric g, Levi-Civita connection ∇, and unit normal ν. In local coordinates, we get

$$\Pi{ij} = \overline{g}{ab} \nu^a \left( \frac{\partial^2 X^b}{\partial u^i \partial u^j} + \overline{\Gamma}_{cd}^{\ b} \frac{\partial X^c}{\partial u^i} \frac{\partial X^d}{\partial u^j} \right). \tag{127}$$

Clearly, the Gauss equation is quadratic in second fundamental form, but it is dependent on the second fundamental form nonetheless.

The second fundamental form is expensive to compute, so we will use a second fundamental form surrogate

$$\Pi{ij} = \left| \partial{ij} \mathcal{E} - \sum{kl} g^{kl} \langle \partial{ij} \mathcal{E}, \partial_k \mathcal{E} \rangle \partial_l \mathcal{E} \right|_2.$$ (128)

We will specifically restrict our manifolds embedded in Euclidean space, which implies that Rijkl = 0, and so we get the simplification

$$\Pi{ij} = \partial{ij} X \cdot \nu. \tag{129}$$

Here, X is the parametric map mapping from local coordinates to the embedded manifold. Thus, our motivation for the design of this new tensor is based on the Gauss equation. In particular, the second fundamental form has close connections to Ricci curvature, thus we conciliate this notions to define the following tensor

$$\widetilde{H}{ijkl} = -\frac{\overline{R}}{(d-1)(d-2)}(g{ik}g{jl} - g{il}g{jk}) + \frac{1}{d-2}(g{ik}\hat{H}{jl} - g{il}\hat{H}{jk} - g{jk}\hat{H}{il} + g{jl}\hat{H}_{ik}),$$ (130)

where we will set

$$\hat{H}{ij} = \Pi{ij} - \frac{H}{d}g_{ij},\tag{131}$$

where H is mean curvature. Thus, we have replaced the traceless part of the Ricci tensor with an extrinsic curvature tensor. Howeverm as we will show, this tensor is antisymmetric in the indices in which we will contract, so we will add a diagonal term

$$\Gamma{ijkl} = \frac{1}{d}\hat{H}{ij}\delta{ij}g{kl}$$ (diagonal only, constant in $k,l$ ). (132)

Our final tensor is

$$H{ijkl} = \underbrace{-\frac{\overline{R}}{(d-1)(d-2)}(g{ik}g{jl} - g{il}g{jk})}{\text{scalar curvature term}} + \underbrace{\frac{1}{d-2}(g{ik}\hat{H}{jl} - g{il}\hat{H}{jk} - g{jk}\hat{H}{il} + g{jl}\hat{H}{ik})}{\text{Ricci part}} + \underbrace{\frac{\Gamma{ijkl}}{\text{Weyl tensor replacement}}}_{\text{diagonal contribution}}$$ (133)

From this tensor, we can build the geometric flow

$$\partialt g{ij} = H{ij} = g^{kl} H{ikjl}. \tag{134}$$

Theorem 2. The geometric flow of equation 134 is expansive or contractive in its volume element, i.e. ∂t p det(g) ̸= 0, if

$$-\frac{2\overline{R}}{d-2} + \sum{i} g^{ii} \hat{H}{ii} \neq 0, \tag{135}$$

assuming it is nonsingular.

Proof. Observe

$$\partial_t \sqrt{\det(g)} = \frac{1}{2} \sqrt{\det(g)} g^{ij} \partialt g{ij} \tag{136}$$

$$=\frac{1}{2}\sqrt{\det(g)}g^{ij}H_{ij} \tag{137}$$

$$= \frac{1}{2} \sqrt{\det(g)} g^{ij} g^{kl} \left( -\frac{\overline{R}}{(d-1)(d-2)} (g{ij}g{kl} - g{il}g{kj}) + \frac{1}{d-2} (g{ij}\hat{H}{kl} - g{il}\hat{H}{kj} - g{jk}\hat{H}{il} + g{kl}\hat{H}{ij}) + \frac{1}{d} g^{ij} g{kl}\hat{H}{ij} \delta_{ij} \right)$$ (138)

$$= \frac{1}{2} \sqrt{\det(g)} \left( -\frac{\overline{R}}{(d-1)(d-2)} (d^2 - \delta_i^k \deltak^i) + \frac{1}{d-2} (dg^{kl} \hat{H}{kl} - \deltai^k g^{ij} \hat{H}{kj} - \deltak^i g^{kl} \hat{H}{il} + dg^{ij} \hat{H}{ij}) + \frac{1}{d} g^{ij} g^{kl} g{kl} \hat{H}{ij} \delta{ij} \right)$$ (139)

$$= \frac{1}{2}\sqrt{\det(g)} \left( -\frac{\overline{R}}{(d-1)(d-2)}(d^2 - d) + \frac{1}{d-2}(dg^{kl}\hat{H}_{kl} - \operatorname{Tr}_g(\hat{H}) - \operatorname{Tr}g(\hat{H}) + dg^{ij}\hat{H}{ij}) + \frac{1}{d}dg^{ij}\hat{H}{ij}\delta{ij} \right)$$ (140)

$$= \frac{1}{2}\sqrt{\det(g)}\left(-\frac{\overline{R}}{(d-1)(d-2)}(d^2-d) + \frac{1}{d-2}((H-H)+d(H-H)) + \sum{i}g^{ii}\hat{H}{ii}\right)$$ (141)

$$= \frac{1}{2}\sqrt{\det(g)}\left(-\frac{\overline{R}}{(d-1)(d-2)}2(d-1) + d\sum{i}g^{ii}\hat{H}{ii}\right) = \frac{1}{2}\sqrt{\det(g)}\left(-\frac{2\overline{R}}{d-2} + \sum{i}g^{ii}\hat{H}{ii}\right). \tag{142}$$

The first line is by Jacobi's formula.

□

Theorem 3. Suppose g ∈ Γ(Sym2T ∗M) for a manifold of intrinsic dimension 3 or greater, and that ||g||F → 0 with respect to some finite time. Then there exists a Riemannian metric g such that |g klHikjl| ̸→ 0.

Proof. Notice

$$|g^{kl}H{ikjl}| = \left| g^{kl} \left( -\frac{\overline{R}}{(d-1)(d-2)} (g{ij}g{kl} - g{il}g{kj}) + \frac{1}{d-2} (g{ij}\hat{H}{kl} - g{il}\hat{H}{kj} - g{jk}\hat{H}{il} + g{kl}\hat{H}{ij}) + \frac{1}{d}g{kl}\delta{ij}\hat{H}{ij} \right) \right|$$ (143)

$$= \left| -\frac{\overline{R}}{(d-1)(d-2)} (dg{ij} - g{il}\deltaj^l) + \frac{1}{d-2} (g{ij}g^{kl}(\Pi{kl} - \frac{H}{d}g{kl}) - \deltai^k \hat{H}{kj} - \deltaj^l \hat{H}{il} + d\hat{H}{ij}) + \frac{1}{d}g^{kl}g{kl}\delta{ij}\hat{H}{ij} \right|$$ (144)

$$= \left| -\frac{\overline{R}}{(d-1)(d-2)} (dg{ij} - g{ij}) + \frac{1}{d-2} (g{ij}g^{kl}\Pi{kl} - Hg{ij} - 2\hat{H}{ij} + d\hat{H}{ij}) + \delta{ij}\hat{H}_{ij} \right|. \tag{145}$$

Now taking the limit, and using an equivalence ||g|| → 0 =⇒ |gij | → 0,

$$\lim{|g{ij}| \to 0 \ \forall i,j} \left| -\frac{\overline{R}}{(d-1)(d-2)} (dg{ij} - g{ij}) + \frac{1}{d-2} (g{ij}g^{kl}\Pi{kl} - Hg{ij} - 2\hat{H}{ij} + d\hat{H}{ij}) + \hat{H}{ii} \right|$$ (146)

$$= \lim{|g{ij}| \to 0 \ \forall i,j} \left| \frac{1}{d-2} (g{ij}g^{kl}\Pi{kl} - Hg{ij} - 2\hat{H}{ij} + d\hat{H}{ij}) + \hat{H}{ii} \right| = \lim{|g{ij}| \to 0 \ \forall i,j} \left| \hat{H}{ij} + \hat{H}{ii} \right|$$ (147)

$$= \lim{|g{ij}| \to 0 \ \forall i,j} \left| \Pi{ij} + \Pi{ii} \right|. \tag{148}$$

In general, this is not identically zero and we have the result. □

Theorem 4. Consider the geometric flow

$$\partialt g{ii} = g^{jl} \left( -\frac{\overline{R}}{(d-1)(d-2)} (g{ij}g{il} - g{il}g{ij}) + \frac{1}{d-2} (g{ij}\hat{H}{il} - g{il}\hat{H}{ij} - g{ij}\hat{H}{il} + g{il}\hat{H}{ij}) \right). \tag{149}$$

Then this flow has vanishing diagonal, i.e. the right-hand side has zero diagonal for all time. In other words, the only diagonal contribution to the flow of equation 134 comes from Γijkl.

Proof. The proof is trivial by noting both terms in the equation are identically 0. Alternatively, we provide a less trivial proof using the Kronecker delta. Observe

$$g^{jl}\left(-\frac{\overline{R}}{(d-1)(d-2)}(g{ij}g{il}-g{il}g{ij})+\frac{1}{d-2}(g{ij}\hat{H}{il}-g{il}\hat{H}{ij}-g{ij}\hat{H}{il}+g{il}\hat{H}{ij})\right)$$ (150)

$$= \frac{R}{(d-1)(d-2)} (\deltai^j g{il} - \deltai^j g{il}) + \frac{1}{d-2} (\deltai^j \hat{H}{il} - \deltai^j \hat{H}{ij} - \deltai^l \hat{H}{il} + \deltai^j \hat{H}{ij}) = 0.$$ (151)

□

Remark. Intuitively, this theorem makes perfect sense, since we derived our tensor from antisymmetric terms that vanish upon contraction.

We will compute mean curvature as

$$H_{\text{approx}} \propto \left| \Delta_g \mathcal{E} \right| = \left| \begin{pmatrix} \Delta_g \mathcal{E}_1 \ \vdots \ \Delta_g \mathcal{E}D \end{pmatrix} \right|, \quad \text{or equivalently,} \quad \Delta{\Sigma} \mathcal{E}_i = -H n_i,$$ (152)

which is demonstrated in [48]. We have ignored constants, as sometimes the equation on the right is rescaled under conventions. This will be our approximation to mean curvature. Again, E is the parametric map, and the Laplace-Beltrami operator is applied element-wise.

F Discussion of new non-parametric geometric flows with special cases of Perelman's W-functional

We discuss use of functionals for our methods with Perelman's functional. First, we make the following remark about physics-informed neural networks (PINNs). We can simulate a physics loss by minimizing a PDE residual over a manifold which has a corresponding integral formulation of the form

$$||f||{L^{1}(\mathcal{M}{t}\times[0,T])} \propto \int{0}^{T} \int{\mathcal{M}{t}} |f|\tilde{\rho}dV{t}dt = \int{0}^{T} \int{\Sigma} |f\circ\mathcal{E}(u,t)|\rho(u)\sqrt{\det(g)}dudt$$ (153)

for suitable Radon-Nikodym derivative ρ with corresponding weighting function ˜ρ over the manifold, and the physics loss can be evaluated discretely with a collocation procedure. In a PINN setup, f is a PDE residual, but this need not be the case. Even moreso, we can simulate integration over a manifold with the same sampling procedure as a PINN by utilizing Monte-Carlo integration, i.e.

$$\lim_{N \to \infty} \frac{\int0^T \int{\Sigma} \sqrt{\det(g(u,t))} du dt}{N} \sum_{u_i \in U(\rho), 1 \le i \le N} |f(\mathcal{E}(u_i,t_i))| \sqrt{\det(g(u_i,t_i))} \stackrel{P}{\to} \int0^T \int{\mathcal{M}_t} |f(x)| \tilde{\rho} dV_t dt \quad (154)$$

by the (weak) law of large numbers, and we have smooth manifold map E : Σ → Mt and function over the manifold f : Mt → R . In practice, R T 0 R Σ p det(g(u, t))dudt is constant and irrelevant for machine learning purposes.

Perelman introduced the W-functional [38] [42]

$$W(f, g, \tau) = \int [\tau(R + ||\nabla f||^2) + f - n]udV$$ (155)

for function f, metric g, scale parameter τ , and u = (4πτ ) −n/2 e −f . Here, R is scalar curvature. Under Ricci flow as well as other conditions, it can be shown Ricci flow is a gradient flow and that d dtW ≥ 0 [42].

We propose considering the conformally changed metric

$$g(u,t) = \psi^{4/(d-2)}(u,t) \cdot g \tag{156}$$

with special case of scalar curvature [46]

$$R(\psi^{4/(d-2)}g) = \frac{4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi}{\psi^{(d+2)/(d-2)}}.$$ (157)

Observe there is an equivalent form

$$R = e^{-2\varphi}(R_g - 2(d-1)\Delta_g\varphi - (d-2)(d-1)g(d\varphi, d\varphi))$$ (158)

but this form is more expensive computationally due to the g(dφ, dφ) term, which requires many derivatives. Here, ∆g is the Laplace-Beltrami operator. Thus, we propose setting f as fixed and using this closed form scalar curvature in the functional of equation 155 and simulating the geometric flow, which is not necessarily Ricci flow, in a Monte-Carlo integration type objective. We solve

$$\frac{d}{dt}\mathcal{W}_{\text{modified}} \ge 0$$ (159)

with an objective of the form

$$\left| \text{positive const} - \frac{d}{dt} \mathcal{W}{\text{modified}}(0, g, 1) \right| = \left| \text{positive const} - \frac{d}{dt} \int{\mathcal{M}_t} R\tilde{\rho} dV_t \right|$$ (160)

$$= \left| \text{positive const} - \frac{d}{dt} \int_{\Sigma} \frac{4\frac{d-1}{d-2} \Delta_g \psi - R(g) \psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g)} \rho(u) du \right|$$ (161)

with a Monte-Carlo integration-type loss, where ψ = ψθψ is a neural network. Here, we compute

$$\frac{d}{dt} \int_{\Sigma} e^{-2\varphi} \frac{4\frac{d-1}{d-2}\Delta_g \psi - R(g)\psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g(u,t))} \rho(u) du$$ (162)

$$\approx \frac{d}{dt} \sum_{(u,t_i),(\tilde{\phi}_0^{(i)},t_i)\sim(\Phi,[0,T])} \frac{4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g(u,t))}$$ (163)

$$= \sum_{(u,t_i),(\tilde{\phi}_0^{(i)},t_i)\sim(\Phi,[0,T])} \frac{d}{dt} \left( \frac{4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g(u,t))} \right).$$ (164)

Note that the time derivative can be taken with automatic differentiation, and we assume exchange of differentiation and integration is valid. Although this objective forces the metric to undergo evolution (observe ψ = constant has loss ≫ 0), we do not have a closed form for the evolution, thus we describe the corresponding g as non-parametric. We remark we choose f = 0, but u and ˜ρ actually have some relation, and so we simplify the above. Lastly, we also remark knowing ρ is irrelevant, as this weighting matches uniform sampling with respect to training data ϕ0 ∼ Φ, as discussed in section 3.

We remark we also consider the loss

$$\mathcal{L} = \tanh\left(\pm \operatorname{scale} \cdot \frac{d}{dt} \operatorname{functional}\right). \tag{165}$$

We have found empirical success with this loss as well, so we will consider this as well over relu-type losses. Here, scale ∈ R is some real number.

We argue the computational strengths of this method. Note that our evaluation has the quantity

$$\partial_t \Delta_g \psi$$ (166)

as its most rigorous computational. Moreover, we have restricted our metric to be conformally changed. A more classical geometric flow would be that of Ricci flow written by the conformal change of the Ricci tensor

$$\partial_t g = -(d-2)(\operatorname{Hess}(\psi) - d\psi \otimes d\psi) - (\Delta \psi + (d-2)|\nabla \psi|^2). \tag{167}$$

Here, Hess is the Riemannian Hessian with elements

$$(\operatorname{Hess}(\psi)){ij} = \frac{\partial^2 \psi}{\partial u^i \partial u^j} - \Gamma{ij}^{\ k} \frac{\partial \psi}{\partial u^k}. \tag{168}$$

where we have used Einstein notation. ∆g˜ is the Laplace-Beltrami operator

$$\Delta_g \psi = \frac{1}{\sqrt{\det(g)}} \frac{\partial}{\partial u^i} \left( \sqrt{\det(g)} g^{ij} \frac{\partial \psi}{\partial u^j} \right). \tag{169}$$

Also, we have used

$$|\nabla \psi|^2 = g^{ij} \partial_i \psi \partial_j \psi, \tag{170}$$

and (dψ ⊗ dψ)ij = ∂iψ∂jψ. As is observable, this method requires far more differentiation and is overall more costly. Our method is more efficient, while non-parametric.

we provide a derivation of the product rule on the discretized functional as in section F. This section is mostly routine computation, but we provide the details for clarity. Recall we are interested in the quantity

$$\frac{d}{dt} \left( \frac{4\frac{d-1}{d-2}\Delta_g \psi - R(g)\psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g(u,t))} \right)$$ (171)

$$= \frac{d}{dt} \left( 4 \frac{d-1}{d-2} \Delta_g \psi - R(g) \psi \right) \left( \psi^{(d+2)/(d-2)} \right)^{-1} \sqrt{\det(g(u,t))}$$ (172)

$$+ \left(4\frac{d-1}{d-2}\Delta_g \psi - R(g)\psi\right) \frac{d}{dt} \left(\psi^{(d+2)/(d-2)}\right)^{-1} \sqrt{\det(g(u,t))}$$ (173)

$$+ \left(4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi\right) \left(\psi^{(d+2)/(d-2)}\right)^{-1} \frac{d}{dt} \sqrt{\det(g(u,t))}$$ (174)

$$= \left(4\frac{d-1}{d-2}\partial_t \Delta_g \psi - R(g)\partial_t \psi\right) \left(\psi^{(d+2)/(d-2)}\right)^{-1} \sqrt{\det(g(u,t))}$$ (175)

$$-\left(4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi\right)\left(\psi^{(d+2)/(d-2)}\right)^{-2}\left(\frac{d+2}{d-2}\psi^{(d+2)/(d-2)-1}\partial_t\psi\right)\sqrt{\det(g(u,t))}$$ (176)

$$+ \left(4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi\right)\left(\psi^{(d+2)/(d-2)}\right)^{-1}\left(\sqrt{\det(g(u,t))}\cdot\operatorname{Tr}\left(g^{-1}(u,t)\partial_t g(u,t)\right)\right). \tag{177}$$

The very last term is by Jacobi's formula. As an additional remark, our exchange of differentiation is supported by Clairaut's theorem (ψ is a neural network and it is continuous; we will allow invertibility of the metric, so the Laplace-Beltrami operator does not diverge, since it requires dividing by the volume element).

Theorem 5. Suppose the loss

positive constant $$-\frac{d}{dt} \int_{\Sigma} \frac{4\frac{d-1}{d-2}\Delta_g \psi - R(g_0)\psi}{\psi^{(d+2)/(d-2)}} \sqrt{\det(g)} \rho(u) du$$ (178)

is exactly satisfied, and that ψ is a bounded neural network with C∞ activation on Σ × [0, T]. Suppose gij ∈ C∞ with respect to time, and that the intrinsic dimension satisfies d ≥ 3. Then there is a constant δ > 0 such that ||g||F > δ for all t, i.e. ||g||F → 0 is impossible. Moreover, we can show this without using the relation between ψ and g.

Proof. Using continuity and piecewise linearity,

$$\lim_{|g|_F \to 0} \left| C - \left( 4 \frac{d-1}{d-2} \partial_t \Delta_g \psi - R(g) \partial_t \psi \right) \left( \psi^{(d+2)/(d-2)} \right)^{-1} \sqrt{\det(g(u,t))} \right|$$

$$\tag{179}$$

$$-\left(4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi\right)\left(\psi^{(d+2)/(d-2)}\right)^{-2}\left(\frac{d+2}{d-2}\psi^{(d+2)/(d-2)-1}\partial_t\psi\right)\sqrt{\det(g(u,t))}$$ (180)

$$+ \left( 4 \frac{d-1}{d-2} \Delta_g \psi - R(g) \psi \right) \left( \psi^{(d+2)/(d-2)} \right)^{-1} \left( \sqrt{\det(g(u,t))} \cdot \operatorname{Tr} \left( g^{-1}(u,t) \partial_t g(u,t) \right) \right)$$ (181)

$$= \left| C - \left( 4 \frac{d-1}{d-2} \partial_t \Delta_g \psi - R(g) \partialt \psi \right) \left( \psi^{(d+2)/(d-2)} \right)^{-1} \lim{|g|_F \to 0} \sqrt{\det(g(u,t))}$$ (182)

$$-\left(4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi\right)\left(\psi^{(d+2)/(d-2)}\right)^{-2}\left(\frac{d+2}{d-2}\psi^{(d+2)/(d-2)-1}\partialt\psi\right)\lim{|g|_F\to 0}\sqrt{\det(g(u,t))}$$ (183)

$$+\left(4\frac{d-1}{d-2}\Deltag\psi - R(g)\psi\right)\left(\psi^{(d+2)/(d-2)}\right)^{-1}\left(\lim{||g||_F\to 0}\sqrt{\det(g(u,t))}\cdot\operatorname{Tr}\left(g^{-1}(u,t)\partial_t g(u,t)\right)\right)\right|$$ (184)

$$= \left| C - \left( 4 \frac{d-1}{d-2} \Deltag \psi - R(g) \psi \right) \left( \psi^{(d+2)/(d-2)} \right)^{-1} \left( \lim{|g|_{F} \to 0} \sqrt{\det(g(u,t))} \cdot \text{Tr} \left( g^{-1}(u,t) \partial_t g(u,t) \right) \right) \right|.$$ (185)

It remains to show

$$\lim_{|g|_F \to 0} \left| \sqrt{\det(g(u,t))} \cdot \operatorname{Tr} \left( g^{-1}(u,t) \partial_t g(u,t) \right) \right| > 0$$ (186)

is not possible. Observe

$$\lim_{|g|_F \to 0} \left| \sqrt{\det(g(u,t))} \cdot \operatorname{Tr} \left( g^{-1}(u,t) \partial_t g(u,t) \right) \right| \tag{187}$$

$$\leq \lim{||g||{F} \to 0} \left| \sqrt{\prod{i} \lambda{i}} \cdot ||g^{-1}(u,t)||{F} ||\partial{t}g||_{F} \right|$$ (188)

$$\leq \lim{||g||{F} \to 0} \left| M \sqrt{\prod{i} \lambda{i}} \cdot \frac{\sqrt{d}}{\lambda_{1}} \right| \tag{189}$$

$$=0. (190)$$

Here, we have assumed a bound on the derivative of g using local smoothness. The bound on the metric inverse derives from a singular value bound (recall the connections between singular values and eigenvalues). Lastly, the trace norm is a simple application of Cauchy-Scwharz. Clearly if d > 2, the product outscales the negative first power eigenvalue and we have the equality with zero. Thus, it is impossible for the loss to be satisfied, which completes the proof that ||g||F → 0 is impossible if the loss is satisfied. □

As a last remark, observe that

$$\frac{4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi}{\psi^{(d+2)/(d-2)}}\sqrt{\det(g(u,t))}$$ (191)

$$=\frac{4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi}{\psi^{(d+2)/(d-2)}}\psi^{2d/(d-2)}\sqrt{\det(g_0(u))}$$ (192)

$$= \left(4\frac{d-1}{d-2}\Delta_g\psi - R(g)\psi\right)\psi\sqrt{\det(g_0(u))}.$$ (193)

Here we have noted

$$\psi^{-(d+2)/(d-2)} \cdot \psi^{2d/d-2} = \psi^{2d/(d-2)-(d+2)/(d-2)} = \psi. \tag{194}$$

Note that in our proof of the Theorem, we do not need to assume ψ → 0, only the restriction on g, but they are equivalent up to assumptions on g.

G Energy functionals with harmonic maps

In this section, we consider geometric flows induced by neural discovery of harmonic maps. The case of the harmonic map is very interesting because we pass our data through two manifolds. Our discussion derives from [24]. A harmonic map is a function between manifolds

$$\tilde{\psi}: \mathcal{M} \to \mathcal{N}$$ (195)

such that the critical point of the energy functional is satisfied. For our purposes, we will restrict manifold M = M0 as an initialized geometry with no temporal dependence, and we will take N = Nt to be time-evolving, thus our harmonic map is such that

$$\tilde{\psi}: \mathcal{M}_0 \to \mathcal{N}_t.$$ (196)

By abuse of notation, we will denote ψ˜ = ψ, as we will define ψ in a moment to be a composition of functions based on the harmonic map with respect to the local coordinate of M. It is known the harmonic map is the critical point in the first variation sense of the energy functional

$$E(\psi)(t) = \int_{\Sigma} |d\psi|^2 du.$$ (197)

In practice, this differential can be computed as

$$|d\psi|^2 = g^{ij}(u)h_{ab}(\psi(u))\partial_i\psi^a\partial_j\psi^b$$ (198)

for dψ ∈ C∞(T ∗M ⊗ f ∗T Nt). Thus, the energy functional in an intrinsic setting

$$E(\psi)(t) = \int_{\mathcal{N}t} |d\psi|^2 \star 1 = \int{\mathcal{N}t} g^{ij}(u) h{ab}(\psi(u)) \frac{\partial \psi^a}{\partial u^i} \frac{\partial \psi^b}{\partial u^j} \psi^b \text{Vol}_g$$ (199)

$$= \int{\Sigma} g^{ij}(u) h{ab}(\psi(u)) \frac{\partial \psi^a}{\partial u^i} \frac{\partial \psi^b}{\partial u^j} \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d.$$ (200)

Here, ⋆ is the Hodge star. Notice the above formulation is meaningless in an extrinsic setting, which is necessary for us. For example, the indices ab run over intrinsic dimension of Nt, which does not work for us. We will restrict our attention to the functional when ψ ∈ R D exists in an immersion and characterizes a parametric map. Thus, we take

$$\widetilde{E}(\psi)(t) = \int_{\mathcal{N}t} g^{ij}(u) \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} \text{Vol}_g$$ (201)

$$= \int{\Sigma} g^{ij}(u) \left\langle \frac{\partial \tilde{\psi}(\varphi(u))}{\partial u^i}, \frac{\partial \tilde{\psi}(\varphi(u))}{\partial u^j} \right\rangle{\mathbb{R}^D} \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d.$$ (202)

We have set φ to be the parametric map from Σ to M. We will denote

$$\psi(u) = \tilde{\psi} \circ \varphi(u) \tag{203}$$

for short. In a very typical setting, the time derivative of this energy is set to 0, which is based on the calculus of variations Euler-Lagrange problem. We will not work with the calculus of variations problem because, neurally, it is solved trivially. As we have demonstrated, triviality or near triviality are not ideal for us (see Figure 7). As in F, we will induce a flow by differentiating this in time and ensuring

$$\left| \frac{d}{dt} \int_{\mathcal{N}t} g^{ij}(u) \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d \right| > \delta > 0$$ (204)

for suffciently large δ. Under basic regularity conditions (which are frequently satisfied in machine learning context so we will allow these assumptions), we can exchange differentiation and integration. What follows is a very simple application of differentiating an inner product (in fact, this is not necessary but it makes automatic differentiation easier)

$$\left| \int{\Sigma} \frac{d}{dt} g^{ij}(u) \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d \right|$$ (205)

$$= \left| \int{\Sigma} g^{ij}(u) \left( \left\langle \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} + \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^j} \right\rangle_{\mathbb{R}^D} \right) \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d \right|$$ (206)

Thus, we will set our geometric flow loss

$$\mathcal{L} = \left| \text{positive constant} - \left| \int{\Sigma} g^{ij}(u) \left( \left\langle \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} + \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^j} \right\rangle_{\mathbb{R}^D} \right) \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d \right| \right|. \tag{207}$$

Theorem 6 (mostly formal, some informal regarding convergence). The loss function of 207 has nontrivial dependence on Riemannian curvature. Moreover, suppose ψ is compactly supported on Σ and sufficiently smooth, including along the boundary, and suppose ψ → 0, ∂tψ → 0, ∂kψ → 0 pointwise for all k ∈ [dim(Σ)]. Then the loss of equation 207 cannot be exactly satisfied, i.e.

$$\mathcal{L} > 0, \tag{208}$$

for any choice of positive constant.

Proof. First, we need to establish a second order derivative with respect to space in one term. This is so we can apply the Levi-Civita connection difference formula. To get this, we will apply integration by parts. Note that we have compact support over Σ, and that ψ(u) = ψ˜ ◦ φ(u) is a parametric map onto a manifold. It is vital that we have assumed smoothness here, otherwise the boundary term does not vanish (although it is still possible to prove nontrivial dependence on Riemannian curvature even if there is a nonzero boundary term). Applying integration by parts twice, ignoring constants, and after an application of Clairaut's theorem,

$$\int{\Sigma} g^{ij}(u) \left( \left\langle \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} + \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^j} \right\rangle_{\mathbb{R}^D} \right) \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d$$ (209)

$$\propto \int_{\Sigma} \langle \psi, \partial_t \Delta_g \psi \rangle \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d. \tag{210}$$

Here, the Laplace-Beltrami acts component-wise. It is very important to note that the Laplace-Beltrami is still taken with respect to g and not h even though ψ characterizes a manifold governed by h. This is because of the product with g ij . Now, we notice

$$\partial_t \Delta_g \psi = \frac{\partial}{\partial t} \left( \frac{1}{\sqrt{\det(g)}} \frac{\partial}{\partial u^i} \left( \sqrt{\det(g)} g^{ij} \frac{\partial \psi}{\partial u^j} \right) \right) \tag{211}$$

$$= \frac{\partial}{\partial t} \left( \frac{1}{2} \frac{\partial_i \det(g)}{\det(g)} g^{ij} \partial_j \psi + \partial_i g^{ij} \partialj \psi + g^{ij} \partial{ij} \psi \right). \tag{212}$$

We decompose the partials, and connect this decomposition to the Levi-Civita connection and its relations to curvature. Note that we can decompose the partial derivative

$$\frac{\partial}{\partial t} \frac{\partial^{2} \psi}{\partial u^{i} u^{j}} = \underbrace{\left(\frac{\partial}{\partial t} \frac{\partial^{2} \psi}{\partial u^{i} u^{j}}\right)^{\top}}{\text{tangent}} + \underbrace{\left(\frac{\partial}{\partial t} \frac{\partial^{2} \psi}{\partial u^{i} u^{j}}\right)^{\bot}}{\text{normal}} = \underbrace{\left(\frac{\partial}{\partial t} \frac{\partial^{2} \psi}{\partial u^{i} u^{j}}\right)^{\top}}{\text{tangent}} + \underbrace{\Pi(\partial{t}, \partial{u^{i} u^{j}})}{\text{normal}} \in \mathbb{R}^{D}$$ (213)

For evidence that this decomposition exists, we cite [18], page 126, which states that, if v ∈ TpM

$$v = v^{\top} + v^{\perp}, \tag{214}$$

and every derivative expression of ψ lives in v ∈ TpM. Now, note that the tangential component of the second partial has a corresponding form using the Levi-Civita connection

$$\left(\frac{\partial}{\partial t} \frac{\partial^2 \psi}{\partial u^i u^j}\right)^\top = \nabla_t \nabla_i \partial_j \psi, \tag{215}$$

since the Levi-Civita connection extends the idea of a derivative to the tangent bundle. More specifically, we have restricted the partials of our parametric map to the tangent bundle. Note that we have projected our partials into the tangent space, but the partials themselves lie in general Euclidean space before projection. Regardless, the Levi-Civita maps from the tangential component of ∂jψ to the tangent bundle, i.e. the directional derivative with respect to the tangent basis vector. In particular, we have used the affine connection definition

$$\nabla: \Gamma(T\mathcal{M}) \times \Gamma(T\mathcal{M}) \to \Gamma(T\mathcal{M}). \tag{216}$$

Thus, the equation is valid by the Gauss formula of the Gauss-Codazzi equations. Note that we include the Levi-Civita connection with respect to time since Σ × [0, T] is our domain. Now, we have

$$\int_{\mathcal{N}t} g^{ij}(u) \left( \left\langle \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^i}, \frac{\partial \psi}{\partial u^j} \right\rangle{\mathbb{R}^D} + \left\langle \frac{\partial \psi}{\partial u^i}, \frac{\partial}{\partial t} \frac{\partial \psi}{\partial u^j} \right\rangle_{\mathbb{R}^D} \right) \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d$$ (217)

$$\propto \int_{\Sigma} \langle \psi, \partial_t \Delta_g \psi \rangle \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d$$ (218)

$$= \int_{\Sigma} \left\langle \psi, \frac{\partial}{\partial t} \left( \frac{\partial_i \det(g)}{\det(g)} g^{ij} \partial_j \psi + \partial_i g^{ij} \partialj \psi + g^{ij} \partial{ij} \psi \right) \right\rangle \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d$$ (219)

$$= \int{\Sigma} \left( \left\langle \psi, \frac{\partial}{\partial t} \left( \frac{\partial{i} \det(g)}{\det(g)} g^{ij} \partial{j} \psi + \partial{i} g^{ij} \partial{j} \psi \right) \right\rangle + \left\langle \psi, g^{ij} \partial{t} \partial_{ij} \psi \right\rangle \right) \sqrt{\det(g)} du^{1} \wedge \ldots \wedge du^{d}$$ (220)

$$= \int{\Sigma} \left( \left\langle \psi, \frac{\partial}{\partial t} \left( \frac{\partial{i} \det(g)}{\det(g)} g^{ij} \partial{j} \psi + \partial{i} g^{ij} \partial{j} \psi \right) \right\rangle + \left\langle \psi, g^{ij} \left( \left( \frac{\partial}{\partial t} \frac{\partial^{2} \psi}{\partial u^{i} u^{j}} \right)^{\top} + \Pi(\partial{t}, \partial_{u^{i} u^{j}}) \right) \right\rangle \right) \sqrt{\det(g)} du^{1} \wedge \ldots \wedge du^{d}.$$ (221)

Notice the constant in front of integral changes due to the inner product sum meeting as one inner product. Now, there is a known Levi-Civita difference formula equivalence [3] [9] with manifold map

$$(\nabla_t \nabla_i \partial_j \psi)^{\alpha} - (\nabla_i \nabla_t \partialj \psi)^{\alpha} = R{\beta}{}^{\alpha}{}_{\gamma \delta} \partial_t \psi^{\gamma} \partial_i \psi^{\delta} \partial_j \psi^{\beta}. \tag{222}$$

We will use notation

$$[(\nabla_t \nabla_i \partial_j \psi)^{\alpha} - (\nabla_i \nabla_t \partialj \psi)^{\alpha}]{\alpha} = [R{\beta}{}^{\alpha}{}{\gamma\delta} \partial_t \psi^{\gamma} \partial_i \psi^{\delta} \partialj \psi^{\beta}]{\alpha}$$ (223)

to denote the vector concatenation over α. Thus,

$$\int{\Sigma} \left( \left\langle \psi, \frac{\partial}{\partial t} \left( \frac{\partial{i} \det(g)}{\det(g)} g^{ij} \partial{j} \psi + \partial{i} g^{ij} \partial{j} \psi \right) \right\rangle + \left\langle \psi, g^{ij} \left( \left( \frac{\partial}{\partial t} \frac{\partial^{2} \psi}{\partial u^{i} u^{j}} \right)^{\top} + \Pi(\partial{t}, \partial_{u^{i} u^{j}}) \right) \right\rangle \right) \sqrt{\det(g)} du^{1} \wedge \ldots \wedge du^{d}$$ (224)

$$= \int{\Sigma} \left( \left\langle \psi, \frac{\partial}{\partial t} \left( \frac{\partial{i} \det(g)}{\det(g)} g^{ij} \partial{j} \psi + \partial{i} g^{ij} \partial{j} \psi \right) \right\rangle + \left\langle \psi, g^{ij} \left( [R{\beta}{}^{\alpha}{}{\gamma \delta} \partial{t} \psi^{\gamma} \partial{i} \psi^{\delta} \partial{j} \psi^{\beta}]_{\alpha} \right) \right.$$ (225)

$$+ \left[ (\nabla_i \nabla_t \partialj \psi)^{\alpha} \right]{\alpha} + \Pi(\partialt, \partial{u^i u^j}) \right) \rangle \sqrt{\det(g)} du^1 \wedge \ldots \wedge du^d.$$ (226)

This shows the nontrivial dependence on curvature. To show the loss cannot be satisfied for any positive constant, we note that

$$\left| \left\langle \psi, \frac{\partial}{\partial t} \left( \frac{\partial_i \det(g)}{\det(g)} g^{ij} \partial_j \psi + \partial_i g^{ij} \partialj \psi \right) \right\rangle + \left\langle \psi, g^{ij} \left( [R{\beta}{}^{\alpha}{}_{\gamma\delta} \partial_t \psi^{\gamma} \partial_i \psi^{\delta} \partialj \psi^{\beta}]{\alpha} \right) \right| \right|$$ (227)

$$+ \left[ (\nabla_i \nabla_t \partialj \psi)^{\alpha} \right]{\alpha} + \Pi(\partialt, \partial{u^i u^j}) \right) \rangle \bigg| \to 0$$ (228)

over the entire domain. This is because each term is dependent on ψ, its time derivative, a spatial derivative, or both. Thus, by the pointwise convergence of each, the integration tends to 0, and we have the result. □

Remark. A more rigorous convergence analysis requires a desirable rate on a possible divergence of Riemannian curvature. Since this Riemannian curvature is with a product that converges at a quartic (cubic without the inner product) rate, and Ricci curvature is inversely quadratic in the sphere (see section 1), we generally have the result.

H Additional figures

Figure 6: We present uncurated (except the first) results on our heavily-regularized autoencoder on Navier-Stokes data using Ricci flow on the sphere. This figure illustrates in-distribution data with heavy dropout and latent Gaussian noise in the test setting, not training. We find a manifold with very highly-expanding volume element works best. We also remark training data heavily favored final time t = T in amount of data, which this data reflects. We remark the baseline autoencoder actually performs similarly in this test stage (which is partially because the data can get learned better in the sense of lower training loss without the regularization), but it is in robustness inference where our method shines, as is demonstrated in Figure 1. We also remark the regularization techniques with our method were found to be necessary, but not in a vanilla autoencoder.

Figure 7: We compare a geometric flow of the form ∂tg = −Λ to the steady geometric flow of [22], which produces both a more canonical geometry and one that is of large measure. We plot 3 trajectories with severely noised initial condition and sample discrete relative L 2 error at 5 select times along the time interval. As we can see, the more optimal geometry has more favorable outcomes.

Figure 8: We provide empirical evidence that curvature-based flows help support nondegeneracy. This figure represents the means (over the batch, so with respect to both PDE data and time) of the 2 × 2 Riemannian metric learned in our Gaussian curvature experiment with respect to training iteration. As we can see, our metrics are over threefold larger than that of the 2 experiment at the same training iteration, which is mod 20. Blue is the diagonal, and orange is the off-diagonal.

Figure 9: We provide a similar figure to that of 8 but on our custom geometric flow based on the Riemannian decomposition with the inexpensive second fundamental form. It is noteworthy that we have initialized our metric as g(u, 0) = 3gunit sphere here, which helped slightly. Blue is the diagonal, which corresponds to Γijkl, and green is the off-diagonal.

Figure 10: This figure goes hand-in-hand with 9 and metric belonging to the custom Riemannian decomposition experiment, but we instead initialize our metric at t = 0 with cos(u 1 )du1 ⊗ du3 in the (3, 1),(1, 3) off-diagonal. Note that this helps support a nondegenerate off-diagonal, but the diagonal is not as large.

Figure 11: We provide a similar figure to that of 8 but of our Perelman functional experiment with a conformally changed metric. As we can see, nondegeneracy is also supported in this experiment. Here, we have clipped ψ (not its derivatives) to be sufficiently large, which we have found works well. Since our baseline metric here is diagonal (the sphere), we only plot the diagonal.

Figure 12: We plot the means and standard deviations of the parametric map in the harmonic map experiment with respect to training iteration mod 20. The standard deviation especially helps show nontriviality, since the manifold can be immersed anywhere in space.

Figure 13: We plot the means and standard deviations of errors on a specific out-of-distribution setting with a vanilla VAE. With our hyperparameters (large batch size, low learning rate of 2e−4), results are consistent.

Figure 14: We demonstrate more uncurated (curated for complexity but not for inference quality) results on our Navier-Stokes experiment. We have found our method behaves significantly better with the geometric flow than without under reasonable noise. Eventually, if the OOD effect is so severe, our method outputs an entirely distinct solution to that that is the true data. We remark the OOD effect needs to be extremely severe to achieve this breaking point.