Neural Feature Geometry Evolves as Discrete Ricci Flow

## Abstract

Abstract Deep neural networks learn feature representations via complex geometric transformations of the input data manifold. Despite the models’ empirical success across domains, our understanding of neural feature representations is still incomplete. In this work we investigate neural feature geometry through the lens of discrete geometry.
Since the input data manifold is typically unobserved, we approximate it using geometric graphs that encode local similarity structure. We provide theoretical results on the evolution of these graphs during training, showing that nonlinear activations play a crucial role in shaping feature geometry in feedforward neural networks. Moreover, we discover that the geometric transformations resemble a discrete Ricci flow on these graphs, suggesting that neural feature geometry evolves analogous to Ricci flow. This connection is supported by experiments on over 20,000 feedforward neural networks trained on binary classification tasks across both synthetic and real-world datasets. We observe that the emergence of class separability corresponds to the emergence of community structure in the associated graph representations, which is known to relate to discrete Ricci flow dynamics. Building on these insights, we introduce a novel framework for locally evaluating geometric transformations through comparison with discrete Ricci flow dynamics. Our results suggest practical design principles, including a geometry-informed early-stopping heuristic and a criterion for selecting network depth. 1 1 1 Code available at https://github.com/Weber-GeoML/Ricci-Flow_Feature-Geometry

## 1 Introduction

Deep neural networks have achieved remarkable success across diverse domains. Yet, a comprehensive theoretical understanding of why these models generalize and perform so well in practice remains elusive. To address this challenge, recent works have investigated how the geometry (Baptista et al., 2024; Ansuini et al., 2019; Cohen et al., 2020) and topology (Magai and Ayzenberg, 2022; Naitzat et al., 2020) of neural feature representations evolve as data propagates through network layers. Beyond advancing interpretability and explainability, such analyses also provide practical benefits, offering principled guidance for model and hyperparameter selection.

In this work we adopt a geometric perspective to analyze how deep neural networks evolve feature representations. Since the underlying manifold is not directly observable, we approximate its geometry by constructing geometric graphs from local similarity structure in the data. To the best of our knowledge, no prior work has provided theoretical results on how the geometry of such graphs evolves as data manifolds propagate through network layers. We provide initial theoretical insights by proving that, in the wide regime, deep linear networks preserve feature geometry, whereas non-linear activations, such as ReLU, enable genuine geometric transformations.

Among the geometric concepts available for studying these transformations, Ricci curvature and its associated Ricci flow stand out as fundamental tools from Riemannian geometry. Originally introduced by Hamilton (1982), the Ricci flow intuitively describes the smoothing of a manifold’s geometry through the evolution of its metric tensor. Famously, Perelman (2002, 2003b, 2003a) employed it to prove the Poincaré conjecture and Thurston’s geometrization conjecture. By carefully handling singularities, Perelman’s work revealed topological insights through the progressive smoothing of the manifold’s geometry. This mathematical framework bears a compelling analogy to deep neural networks, which progressively simplify and smooth the geometry of data manifolds, thereby uncovering richer information about the underlying classes in classification tasks.

Building on this intuition, we propose a novel framework for locally evaluating geometric transformations through comparison with discrete Ricci flow dynamics. We conduct experiments on more than 20,000 feedforward neural networks trained on binary classification tasks across both synthetic and real-world datasets. We find that across datasets and architectures, neural networks consistently impose curvature-driven transformations closely aligned with the Ricci flow dynamics. Moreover, the emergence of class separability is reflected in the development of community structure in the associated graph representations, an evolution known to be closely tied to discrete Ricci flow dynamics (Tian et al., 2025; Ni et al., 2019; Lai et al., 2022).

Leveraging our geometric framework, we introduce a new early-stopping heuristic based on the emergence of geometrically informed behavior during training. Additionally, by analyzing curvature-driven transformations layer-wise, we propose a geometric criterion for depth selection, identifying a critical point beyond which additional layers cease to yield meaningful curvature-driven changes. This framework opens new avenues for understanding the geometric principles underlying deep learning and offers practical tools that can improve training efficiency and parameter selection across diverse applications.

##### Summary of contributions

The main contributions of this work are as follows:

- 1.
We prove that, in the wide regime, deep linear networks preserve feature geometry, whereas non-linear activations such as ReLU enable meaningful geometric transformations (Sec. [3.1](https://arxiv.org/html/2509.22362v1#S3.SS1)).
- 2.
Our experiments show that the progressive emergence of class separability is reflected in the emergence of community structure within the corresponding graph representations (Sec. [4.2](https://arxiv.org/html/2509.22362v1#S4.SS2)).
- 3.
We propose a novel early-stopping heuristic that leverages the emergence of curvature-driven geometric behavior during training (Sec. [4.3](https://arxiv.org/html/2509.22362v1#S4.SS3)).
- 4.
By analyzing layer-wise curvature-driven transformations, we introduce a geometric criterion for network depth selection (Sec. [4.4](https://arxiv.org/html/2509.22362v1#S4.SS4)).

##### Related work

A variety of approaches have been proposed to better understand the feature transformations of deep neural networks. The connection between deep learning and Ricci flow was first explored by Baptista et al. (2024), who analyzed geometric transformations via Ricci flow at a global scale. Our approach differs by capturing the inherently local behavior of Hamilton’s Ricci flow and by leveraging more refined discretizations of Ricci curvature. Other efforts include topology-based analyses (Naitzat et al., 2020), and geometric measures of simplification (Brahma et al., 2015; Ansuini et al., 2019; Cohen et al., 2020). We defer a more detailed discussion of related literature to Appendix [A.1](https://arxiv.org/html/2509.22362v1#A1.SS1).

## 2 Background and Notation

Following standard notation, we use $a,{\bm{a}},$ and ${\bm{A}}$ to denote scalars, vectors, and matrices. For $\mathbf{x}\in\mathbb{R}^{n}$, $\lVert\mathbf{x}\rVert$ denotes the $L^{2}$ norm. $\mathcal{N}(\mu,\sigma^{2})$ represents a normal distribution with mean $\mu$ and variance $\sigma^{2}$.
We denote a graph as ${\mathcal{G}}=(V,E)$, where $V$ is the vertex set and $E\subseteq V\times V$ the edge set. We write $u\sim v$ if $(u,v)\in E$ and $d(u,v)$ denotes the shortest path distance between $u$ and $v$. The 1-hop neighborhood of $v$ is denoted by $N(v)=\{u\in V:u\sim v\}$ and the degree by $\deg(v)=|N(v)|$. The maximum degree is given by $\deg_{\max}=\max_{v\in V}\deg(v)$.

### 2.1 Setting

Figure: Figure 1: Schematic illustration of evolving feature manifolds (top row) along with the corresponding geometric graphs (bottom row) approximating their evolving geometry.
Refer to caption: Figures/schematic_fig_1_cropped.png

To study the feature geometry of deep neural networks, we focus on binary classification, a fundamental task in supervised learning. Following the notation of Naitzat et al. (2020), we consider a compact manifold $M=M_{a}\cup M_{b}\subseteq\mathbb{R}^{n}$, given by the disjoint union of two submanifolds. The task is to determine, given a sample ${\bm{x}}\in M$, whether it belongs to $M_{a}$ or $M_{b}$.

To this end, we train a feed-forward neural network $\Phi:\mathbb{R}^{n}\to[0,1]$ with $L$ hidden layers, given by

$$ $\Phi=\phi_{L+1}\circ\phi_{L}\circ\ldots\circ\phi_{1}.$ $$

Each layer of the network is defined as the composition of an affine transformation and a non-linear activation function $\sigma$, i.e., $\phi_{\ell}:\mathbb{R}^{n_{\ell-1}}\to\mathbb{R}^{n_{\ell}}$ is given by

$$ $\phi_{\ell}({\bm{x}})=\sigma({\bm{W}}_{\ell}{\bm{x}}+{\bm{b}}_{\ell}),$ $$

where ${\bm{W}}_{\ell}\in\mathbb{R}^{n_{\ell}\times n_{\ell-1}}$ is the weight matrix and ${\bm{b}}_{\ell}\in\mathbb{R}^{n_{\ell}}$ is the bias vector. Here, $n_{\ell}$ denotes the width of layer $\ell$, with $n_{0}=n$ corresponding to the input dimension. In this work, we use the ReLU activation function, defined as $\sigma(z)=\max(0,z)$, applied elementwise in all hidden layers. To produce probabilistic outputs, we apply a sigmoid activation in the final layer, i.e.,
$\phi_{L+1}({\bm{x}})=\rho({\bm{W}}_{L+1}{\bm{x}}+{\bm{b}}_{L+1})$,
where ${\bm{W}}_{L+1}\in\mathbb{R}^{1\times n_{\ell}}$, ${\bm{b}}_{L+1}\in\mathbb{R}$ and $\rho(z)=\frac{1}{1+e^{-z}}$.

We study how the geometry of data evolves as it propagates through neural networks. Given an input manifold $M$, we denote by $\Phi_{\ell}=\phi_{\ell}\circ\ldots\circ\phi_{1}$ the composition of the first $\ell$ layers, and refer to $\Phi_{\ell}(M)$ as the feature manifold at layer $\ell$. In practice, $M$ is unobserved, and we only have access to a finite set of samples $X=\{{\bm{x}}^{(i)}\}_{i=1}^{N}\subset M$. To approximate the geometry of the feature manifolds, we construct geometric graphs on the transformed samples $\Phi_{\ell}(X)=\{\Phi_{\ell}({\bm{x}}^{(i)})\}_{i=1}^{N}$, as schematically illustrated in Figure [1](https://arxiv.org/html/2509.22362v1#S2.F1). Graphs based on local connectivity patterns, such as $k$-nearest neighbor graphs or $r$-neighborhood graphs, are known to preserve geometric and topological properties of the manifold when samples are sufficiently dense, including Ricci curvature (Van Der Hoorn et al., 2021; Trillos and Weber, 2023). This approach is well-established in manifold learning and geometric data analysis, where such graph-based representations are commonly used to study the geometry of data.

Specifically, we consider the $k$-nearest neighbor graph, denoted by ${\mathcal{G}}_{k}(X)$, where the vertices of ${\mathcal{G}}_{k}(X)$ correspond exactly to the samples in $X$, and two vertices are connected if either is among the $k$-nearest neighbors of the other. Additionally, we construct $r$-neighborhood graphs $G_{r}(X)$, where an edge is drawn between two vertices if their distance is less than a fixed radius $r>0$. These graphs provide discrete approximations of the evolving feature manifolds.

### 2.2 Ricci Curvature of Graphs

Ricci curvature plays a fundamental role in Riemannian geometry and provides the foundation for our analysis of feature geometry. To extend curvature concepts to graphs, we adopt two of the most widely used discretizations, proposed by Ollivier (2009) and Forman (2003). We briefly introduce them below.

Intuitively, Ricci curvature measures how the local geometry of a manifold deviates from being flat. This can be captured by comparing the distance between two nearby points with the distance between small geodesic balls centered at them: in regions of positive (negative) curvature, the geodesic balls are closer together (farther apart) than the points themselves.

Building on this intuition, Ollivier (2009) extends the classical notion of Ricci curvature to graphs by replacing geodesic balls with the transition probability of a random walk. For a vertex $u$, let $\mu_{u}$ denote the uniform distribution over its neighbors, i.e., $\mu_{u}(v)=\frac{1}{\deg(u)}$ if $u\sim v$ and $\mu_{u}(v)=0$ otherwise. Ollivier-Ricci curvature then compares the distance between these distributions to the distance between their centers, mirroring the comparison between geodesic balls and their centers in the Riemannian case:

$$ $\mathcal{O}(u,v)=1-\frac{W_{1}(\mu_{u},\mu_{v})}{d(u,v)},$ $$

where $W_{1}(\mu_{u},\mu_{v})$ is the 1-Wasserstein distance, defined by

$$ $W_{1}(\mu_{u},\mu_{v})=\inf_{\pi\in\Pi(\mu_{u},\mu_{v})}\sum_{a\in V}\sum_{b\in V}d(a,b)\pi(a,b),$ $$

and $\Pi(\mu_{u},\mu_{v})$ denotes the set of all couplings of $\mu_{u}$ and $\mu_{v}$, i.e., joint probability distributions on $V\times V$ with marginals $\mu_{u}$ and $\mu_{v}$.

Computing Ollivier-Ricci curvature is computationally demanding, as it requires solving an optimal transport problem for each edge with complexity $O(\deg_{\max}^{3})$ via the Hungarian algorithm.
This can be mitigated by approximating the Wasserstein distance using Sinkhorn distances (Cuturi, 2013) or through direct combinatorial approximations of the Ollivier-Ricci curvature (Tian et al., 2025). We adopt the latter, detailed in Appendix [A.2.1](https://arxiv.org/html/2509.22362v1#A1.SS2.SSS1), in our experiments.

On the other hand, Forman (2003) introduced a discretization of Ricci curvature on CW complexes via a discrete analogue of the Bochner–Weitzenböck formula. For a simple, unweighted graph, the Forman-Ricci curvature of an edge $u\sim v$ is defined as

$$ $\mathcal{F}(u,v)=4-\deg(u)-\deg(v).$ $$

While this definition is well-founded in Forman’s framework and computationally efficient, it is often too simplistic to capture the geometric complexity required in many applications. To address this limitation, augmented versions of Forman’s curvature have been considered (Bloch, 2014; Samal et al., 2018; Weber et al., 2018). A widely used refinement incorporates contributions from three-cycles, yielding the following combinatorial expression:

$$ $\mathcal{AF}(u,v)=4-\deg(u)-\deg(v)+3|N(u)\cap N(v)|.$ $$

This augmentation can be computed in $O(E\deg_{\max})$ time, providing a scalable alternative to the computationally demanding Ollivier–Ricci curvature. A more detailed introduction to the Forman-Ricci curvature is provided in Appendix [A.2.2](https://arxiv.org/html/2509.22362v1#A1.SS2.SSS2).

#### 2.2.1 Curvature Gap

When two adjacent vertices belong to the same community, their neighborhoods tend to be more tightly connected. This lowers the transport cost between neighborhood distributions, yielding higher Ollivier-Ricci curvature, and likewise increases augmented Forman-Ricci curvature due to a higher incidence of triangles. Both measures are therefore effective for community detection (Sia et al., 2019; Gosztolai and Arnaudon, 2021; Fesser et al., 2024). By contrast, the original Forman–Ricci curvature depends only on endpoint degrees and cannot reliably distinguish intra- from inter-community edges. As a result, Ollivier- and augmented Forman–Ricci curvature show a bimodal distribution in graphs with strong community structure. To quantify this bimodality, we use the curvature gap (Gosztolai and Arnaudon, 2021):

$$ $\Delta\mathcal{O}=\frac{1}{\sigma}\left(\mathcal{O}_{\operatorname{intra}}-\mathcal{O}_{\operatorname{inter}}\right)$ $$

where $\mathcal{O}_{\operatorname{intra}}$ and $\mathcal{O}_{\operatorname{inter}}$ denote the mean Ollivier-Ricci curvature of intra- and inter-community edges, and $\sigma$ is the pooled standard deviation. This measure captures how strongly the local graph geometry, as encoded by Ricci curvature, reflects community structure. The curvature gap can be analogously defined for augmented Forman–Ricci curvature. Visualizations and further community structure metrics (modularity, normalized cut, spectral gap) are presented in Appendix [A.2.3](https://arxiv.org/html/2509.22362v1#A1.SS2.SSS3).

### 2.3 Ricci Flow

To analyze the evolving geometry of the feature manifolds, it is natural to draw inspiration from the Ricci flow, a central concept in Riemannian geometry introduced by Hamilton (1982). The Ricci flow evolves a Riemannian metric $g$ according to $\tfrac{\partial}{\partial t}g(t)=-2\mathrm{Ric}(g(t))$ with initial condition $g(0)=g$, where $\mathrm{Ric}(g(t))$ denotes the Ricci curvature tensor; further details are provided in Appendix [A.2.4](https://arxiv.org/html/2509.22362v1#A1.SS2.SSS4). This evolution is often compared to heat diffusion, as the underlying equation shares a similar averaging effect, smoothing out curvature irregularities by shrinking positively curved regions and expanding negatively curved ones. While there is no unique notion of discrete Ricci flow on graphs, this fundamental geometric evolution characterizes the current versions, first proposed by Ollivier (2010), and we show below that well-trained networks follow the same mechanism.

## 3 Approximating Feature Geometry

This section establishes theoretical results on feature manifold evolution in wide neural networks, emphasizing the key role of non-linear activations in geometric transformations. We then introduce a novel measure that compares local network-induced geometric changes with those predicted by discrete Ricci flow.

### 3.1 Theoretical Results

As a first result, we show that for randomly initialized, sufficiently wide neural networks without nonlinearity, the graph structures encoding the feature geometry are preserved with high probability. Two graphs are said to be isomorphic if there exists a bijection between their vertex sets that preserves adjacency relations, i.e., the graphs are identical up to vertex relabeling. The following theorem establishes explicit lower bounds on the network width that guarantee the existence of an isomorphism between the $k$-nearest neighbor graphs before and after the network transformation.

###### Theorem 3.1 .

Let $X\subset\mathbb{R}^{n}$ be a finite set, and assume there exists $0<\epsilon<1$ such that

$$ $\min_{\begin{subarray}{c}Y\subset X\\ |Y|=k\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\frac{1-\epsilon}{1+\epsilon}\min_{\begin{subarray}{c}Y\subset X\\ |Y|=k+1\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\quad\forall{\bm{x}}\in X.$ $$

Furthermore, let ${\bm{A}}\in\mathbb{R}^{m\times n}$ be a random matrix with i.i.d. entries ${A}_{ij}\sim\mathcal{N}(0,1/m)$. Then, the map $\psi:X\mapsto{\bm{A}}X:=\{{\bm{A}}{\bm{x}}:{\bm{x}}\in X\}$, defined by $\psi({\bm{x}})={\bm{A}}{\bm{x}}$, is a graph isomorphism between ${\mathcal{G}}_{k}(X)$ and ${\mathcal{G}}_{k}({\bm{A}}X)$ with probability bounded from below

$$ $\mathbb{P}\left({\mathcal{G}}_{k}(X)\cong{\mathcal{G}}_{k}({\bm{A}}X)\;\text{under}\;\psi\right)\geq 1-|X|(|X|-1)e^{\frac{m}{4}(\epsilon^{3}-\epsilon^{2})}.$ $$

###### Remark .

Since the addition of a bias term does not affect pairwise distances, the same result holds for one-layer linear networks with bias.

The proof builds on the Johnson–Lindenstrauss Lemma, which implies that randomly initialized weight matrices act as approximate isometries with high probability. The complete proof of Theorem [3.1](https://arxiv.org/html/2509.22362v1#S3.Thmtheorem1) is deferred to Appendix [A.3.1](https://arxiv.org/html/2509.22362v1#A1.SS3.SSS1).
Analogous results for $r$-neighborhood graphs (Theorem [A.6](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem6)), generalizations to deep networks (Theorem [A.7](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem7)), and empirical validation (Appendix [A.4.1](https://arxiv.org/html/2509.22362v1#A1.SS4.SSS1)) are also provided.

Random initialization combined with over-parameterization keeps network weights near their initial values during gradient descent. We show that, without nonlinearities, network dynamics cannot alter the feature geometry encoded by graph structures, regardless of the number of gradient descent steps. Consider a two-layer network $\Phi=\phi_{2}\circ\phi_{1}$ with $\phi_{1}({\bm{x}})=\sigma\left(\frac{1}{\sqrt{m}}{\bm{W}}{\bm{x}}\right)$, where $\sigma$ denotes the ReLU activation and $m$ the width of the hidden layer. We minimize the empirical loss by keeping the second-layer weights fixed, while gradient descent updates the first-layer weight matrix ${\bm{W}}$, denoted by ${\bm{W}}(l)$ after $l$ gradient descent steps. Then, the $k$-nearest neighbor graphs remain invariant prior to the nonlinearity, as stated in the following theorem.

###### Theorem 3.2 (Informal) .

Let $X\subset\mathbb{R}^{n}$ be a finite set. Under suitable technical assumptions, for networks of sufficient width $m$ and any number of gradient descent steps $l\geq 0$, the map

$$ $\psi:X\to X(l):=\left\{\frac{1}{\sqrt{m}}{\bm{W}}(l){\bm{x}}:{\bm{x}}\in X\right\};\quad\psi({\bm{x}})=\frac{1}{\sqrt{m}}{\bm{W}}(l){\bm{x}}$ $$

is a graph isomorphism between ${\mathcal{G}}_{k}(X)$ and ${\mathcal{G}}_{k}(X(l))$ with high probability.

A formal version of this result, including exact lower bounds on the required network width and the full proof, is provided in Appendix [A.3.2](https://arxiv.org/html/2509.22362v1#A1.SS3.SSS2). There, we also present an analogous theorem for $r$-neighborhood graphs.

The results above establish that wide linear neural networks cannot alter the underlying feature geometry, as their weight matrices act as approximate isometries. In contrast, once a nonlinearity is introduced, our experiments show clear changes in the geometry, as captured by the graph structures (see Section [4](https://arxiv.org/html/2509.22362v1#S4)). This highlights the essential role of the ReLU activation in enabling such transformations. Building on this observation, we further demonstrate that even when the weight matrices are exact isometries, adding the ReLU nonlinearity is sufficient to change the geometry of the feature manifolds.

###### Theorem 3.3 (Informal) .

For any three vertices, there exists a linear isometry such that composing it with a ReLU activation changes the ordering of their pairwise distances. In particular, this operation can rewire the $k$-nearest neighbor graph.

This provides not only empirical but also theoretical evidence for the fundamental role of the activation function in changing the feature geometry. A formal treatment of this result is provided in Appendix [A.3.3](https://arxiv.org/html/2509.22362v1#A1.SS3.SSS3).

###### Theorem 3.1 .

###### Remark .

###### Theorem 3.2 (Informal) .

###### Theorem 3.3 (Informal) .

### 3.2 Local Ricci Evolution Coefficients

In this section, we introduce a novel framework to evaluate the geometric changes induced by deep neural networks by drawing an analogy with the Ricci flow. Recall that the Ricci flow regularizes the geometry of a manifold by shrinking regions of positive curvature and expanding regions of negative curvature. We aim to assess whether neural networks induce feature transformations that exhibit a similar curvature-driven regularization. Since the feature manifolds cannot be directly observed, we instead approximate their geometry using the $k$-nearest neighbor graph ${\mathcal{G}}_{k}(\Phi_{\ell}(X))$, constructed from the transformed samples $\Phi_{\ell}(X)=\{\Phi_{\ell}({\bm{x}}^{(i)})\}_{i=1}^{N}$ after layer $\ell$. A discussion on the choice of the parameter $k$ is provided in Appendix [A.5.1](https://arxiv.org/html/2509.22362v1#A1.SS5.SSS1).

To reflect the local nature of the Ricci flow in our graph-based framework, we focus on the smallest neighborhoods, i.e., the one-hop neighborhoods. The curvature of a one-hop neighborhood centered at a vertex ${\bm{x}}$ at layer $\ell$ is approximated by the discrete scalar curvature of Ollivier (2010),

$$ $\mathcal{O}_{\ell}({\bm{x}})=\frac{1}{\deg_{\ell}({\bm{x}})}\sum_{{\bm{y}}\in N_{\ell}({\bm{x}})}\mathcal{O}({\bm{x}},{\bm{y}}),$ $$

where $\deg_{\ell}({\bm{x}})$ and $N_{\ell}({\bm{x}})$ denote the degree and one-hop neighborhood of ${\bm{x}}$ in ${\mathcal{G}}_{k}(\Phi_{\ell}(X))$. To capture how a local region evolves across layers, we define the average change in distances

$$ $\eta_{\ell}({\bm{x}})=\frac{1}{\deg_{\ell}({\bm{x}})}\sum_{{\bm{y}}\in N_{\ell}({\bm{x}})}\left(d_{\ell+1}({\bm{x}},{\bm{y}})-d_{\ell}({\bm{x}},{\bm{y}})\right),$ $$

where $d_{\ell}({\bm{x}},{\bm{y}})$ is the distance between ${\bm{x}}$ and ${\bm{y}}$ at layer $\ell$. Intuitively, $\eta_{\ell}({\bm{x}})$ measures whether the neighborhood of ${\bm{x}}$ expands during the transition from layer $\ell$ to $\ell+1$. Under the Ricci flow, positively curved regions contract while negatively curved regions expand, implying a negative correlation between $\mathcal{O}_{\ell}({\bm{x}})$ and $\eta_{\ell}({\bm{x}})$. To quantify this, we compute the Pearson correlation coefficient across layers,

$$ $\rho({\bm{x}})=\frac{\sum_{\ell=1}^{L-1}(\eta_{\ell}({\bm{x}})-\bar{\eta}({\bm{x}}))(\mathcal{O}_{\ell}({\bm{x}})-\bar{\mathcal{O}}({\bm{x}}))}{\sqrt{\sum_{\ell=1}^{L-1}(\eta_{\ell}({\bm{x}})-\bar{\eta}({\bm{x}}))^{2}}\sqrt{\sum_{\ell=1}^{L-1}(\mathcal{O}_{\ell}({\bm{x}})-\bar{\mathcal{O}}({\bm{x}}))^{2}}},$ $$

where $\bar{\eta}({\bm{x}})=\tfrac{1}{L-1}\sum_{\ell=1}^{L-1}\eta_{\ell}({\bm{x}})$ and $\bar{\mathcal{O}}({\bm{x}})=\tfrac{1}{L-1}\sum_{\ell=1}^{L-1}\mathcal{O}_{\ell}({\bm{x}})$ denote the averages across layers.
We refer to $\rho({\bm{x}})$ as the local Ricci evolution coefficient of the network at point ${\bm{x}}$. Although introduced here in the context of Ollivier curvature, the framework is general and can likewise be instantiated with alternative notions of discrete curvature, such as the augmented Forman curvature or efficient approximations of Ollivier curvature. In all cases, the local Ricci evolution coefficient evaluates whether the evolution of neighborhoods under the network aligns with the curvature-driven dynamics of Hamilton’s Ricci flow.

###### Remark .

Appendix [A.1.1](https://arxiv.org/html/2509.22362v1#A1.SS1.SSS1) provides a detailed comparison between our local framework and the global approach of Baptista et al. (2024).

In addition to evaluating Ricci flow–like behavior at the level of individual neighborhoods, we can also assess it layer by layer. Specifically, we ask whether the geometric transformations induced by a given layer $\ell$ align with those expected under the Ricci flow. To this end, we define the layer Ricci coefficient

$$ $\rho(\ell)=\frac{\sum_{{\bm{x}}\in\Phi_{\ell}(X)}(\eta_{\ell}({\bm{x}})-\bar{\eta}_{\ell})(\mathcal{O}_{\ell}({\bm{x}})-\bar{\mathcal{O}}_{\ell})}{\sqrt{\sum_{{\bm{x}}\in\Phi_{\ell}(X)}(\eta_{\ell}({\bm{x}})-\bar{\eta}_{\ell})^{2}}\sqrt{\sum_{{\bm{x}}\in\Phi_{\ell}(X)}(\mathcal{O}_{\ell}({\bm{x}})-\bar{\mathcal{O}}_{\ell})^{2}}},$ $$

where $\bar{\eta}_{\ell}=\frac{1}{|X|}\sum_{{\bm{x}}\in\Phi_{\ell}(X)}\eta_{l}({\bm{x}})$ and $\quad\bar{\mathcal{O}}_{\ell}=\frac{1}{|X|}\sum_{{\bm{x}}\in\Phi_{\ell}(X)}\mathcal{O}_{\ell}({\bm{x}})$.
This coefficient provides a global summary of whether the geometric transformation induced by layer $\ell$ follows the curvature-driven dynamics of the Ricci flow.

###### Remark .

## 4 Experimental Analysis

### 4.1 Local Ricci Evolution Coefficients

Using our framework of local Ricci evolution coefficients, we empirically examine whether deep neural networks exhibit curvature-driven dynamics in the evolution of their feature geometry. To this end, we study both synthetic and real-world datasets. The synthetic datasets are constructed to span varying degrees of geometric and topological entanglement. For real-world benchmarks, we consider visually similar digit pairs from MNIST (1 vs. 7, 6 vs. 9), fine-grained visual distinctions from Fashion-MNIST—sneakers vs. sandals (FMNIST-SvS) and shirts vs. dresses (FMNIST-SvD)—and from CIFAR-10 (cars vs. planes). Further details on datasets and task setup are provided in Appendix [A.5](https://arxiv.org/html/2509.22362v1#A1.SS5). We train feed-forward networks with varying widths and depths, all of which achieve over 99% training accuracy, ensuring that our analysis reflects meaningful learned feature representations. To account for randomness in training, results are averaged over 50 independently initialized and trained networks per dataset–architecture pair. In total, we analyze the feature geometry of more than 20,000 networks.

Table [1](https://arxiv.org/html/2509.22362v1#S4.T1) reports results on real-world datasets, consistently showing negative local Ricci evolution coefficients, providing strong evidence of Ricci flow–like dynamics in feature geometry. The large majority of vertices exhibit negative coefficients, indicating that curvature-driven dynamics are a global phenomenon on the data manifold. To reduce computational overhead, we further compute local Ricci evolution coefficients using augmented Forman curvature and the approximate Ollivier curvature of Tian et al. (2025). Both yield results consistent with the exact Ollivier curvature while being substantially more efficient (see Tables [4](https://arxiv.org/html/2509.22362v1#A1.T4) and [5](https://arxiv.org/html/2509.22362v1#A1.T5)). For completeness, we present the entire distribution of local Ricci evolution coefficients in Appendix [A.4.2](https://arxiv.org/html/2509.22362v1#A1.SS4.SSS2), along with results on synthetic datasets. Strikingly, we observe qualitatively identical behavior across all architectures and datasets, both synthetic and real, underscoring the robustness and universality of this phenomenon. Together, these findings provide compelling evidence that the evolution of feature geometry in deep neural networks is fundamentally curvature-driven, closely aligned with Ricci flow.

**Table 1: Average local Ricci evolution coefficients on real-world data. Values are means $\pm$ standard deviations over 50 independently trained networks per architecture; proportion of vertices with negative coefficients is reported in parentheses. Networks were randomly initialized.**
| (Width,Depth) | MNIST-1v7 | MNIST-6v9 | FMNIST-SvS | FMNIST-SvD | CIFAR |
| --- | --- | --- | --- | --- | --- |
| $(15,7)$ | $-0.58\pm 0.08\,(88.7\%)$ | $-0.51\pm 0.09\,(85.3\%)$ | $-0.43\pm 0.05\,(84.0\%)$ | $-0.27\pm 0.08\,(73.4\%)$ | $-0.44\pm 0.12\,(87.8\%)$ |
| $(15,10)$ | $-0.60\pm 0.06\,(91.8\%)$ | $-0.59\pm 0.06\,(92.6\%)$ | $-0.40\pm 0.05\,(84.4\%)$ | $-0.29\pm 0.12\,(77.6\%)$ | $-0.43\pm 0.15\,(87.8\%)$ |
| $(15,15)$ | $-0.61\pm 0.07\,(93.3\%)$ | $-0.58\pm 0.11\,(92.9\%)$ | $-0.52\pm 0.11\,(93.8\%)$ | $-0.40\pm 0.12\,(88.2\%)$ | $-0.55\pm 0.18\,(93.3\%)$ |
| $(25,7)$ | $-0.58\pm 0.05\,(89.3\%)$ | $-0.48\pm 0.10\,(83.3\%)$ | $-0.41\pm 0.03\,(81.9\%)$ | $-0.28\pm 0.08\,(74.3\%)$ | $-0.48\pm 0.13\,(89.9\%)$ |
| $(25,10)$ | $-0.62\pm 0.05\,(92.8\%)$ | $-0.59\pm 0.05\,(92.8\%)$ | $-0.40\pm 0.05\,(84.8\%)$ | $-0.32\pm 0.09\,(80.4\%)$ | $-0.54\pm 0.13\,(94.8\%)$ |
| $(25,15)$ | $-0.60\pm 0.06\,(94.2\%)$ | $-0.61\pm 0.07\,(94.9\%)$ | $-0.47\pm 0.08\,(93.5\%)$ | $-0.46\pm 0.08\,(92.2\%)$ | $-0.71\pm 0.06\,(98.1\%)$ |
| $(50,7)$ | $-0.59\pm 0.05\,(90.6\%)$ | $-0.46\pm 0.14\,(82.0\%)$ | $-0.42\pm 0.03\,(83.0\%)$ | $-0.35\pm 0.09\,(80.8\%)$ | $-0.57\pm 0.12\,(95.4\%)$ |
| $(50,10)$ | $-0.65\pm 0.04\,(94.6\%)$ | $-0.61\pm 0.07\,(93.3\%)$ | $-0.43\pm 0.07\,(86.5\%)$ | $-0.44\pm 0.10\,(88.8\%)$ | $-0.70\pm 0.05\,(98.5\%)$ |
| $(50,15)$ | $-0.63\pm 0.06\,(95.2\%)$ | $-0.61\pm 0.08\,(95.0\%)$ | $-0.54\pm 0.05(96.0\%)$ | $-0.53\pm 0.07\,(95.0\%)$ | $-0.76\pm 0.04\,(98.3\%)$ |

### 4.2 Community Structure

Figure: Figure 2: Modularity and normalized cut across network layers on synthetic datasets. Reported values are averaged over 50 independently trained networks with random initialization.
Refer to caption: Figures/community_structure_synthetic_data.png

We study graphs whose nodes can be naturally partitioned into two communities according to the true labels of the underlying binary classification task. This setup is well suited for a community-detection perspective. In this section, we examine whether the class separability learned by deep neural networks induces a rewiring that strengthens the community structure of the $k$-nearest neighbor graphs.

To this end, we evaluate how well the geometry of the graphs aligns with the prescribed community structure by measuring the curvature gap, modularity, and normalized cut. Our experiments on both synthetic and real-world datasets show that the community structure becomes increasingly pronounced as the networks evolve the feature geometry. Figure [2](https://arxiv.org/html/2509.22362v1#S4.F2) reports the evolution of modularity and normalized cut across network layers, averaged over 50 independently trained models to mitigate stochastic variability. In all datasets, we observe a consistent increase in modularity and a corresponding decrease in normalized cut, indicating that the learned feature geometry progressively aligns with the prescribed community structure. For real-world datasets, this effect is still present but less pronounced, as the $k$-nearest neighbor graphs constructed from raw inputs already exhibit relatively high modularity, particularly in the case of MNIST (see Figure [9](https://arxiv.org/html/2509.22362v1#A1.F9)).

Figure: Figure 3: Curvature gaps before and after removing misclassified samples.
Refer to caption: Figures/curvature_gap.png

In our setting, the curvature gap does not reliably capture how well the graph geometry aligns with the prescribed community structure. Most inter-community edges arise from misclassified nodes connected to correctly classified ones with the same label, which the network effectively treats as intra-community edges, making them indistinguishable through the curvature lens. To clarify this effect, Figure [3](https://arxiv.org/html/2509.22362v1#S4.F3) compares the curvature gaps on the MNIST 1-vs-7 dataset computed on the full test set with those computed after removing the five misclassified points (out of 1000). While removing such a small fraction of samples should not noticeably alter the graph geometry, it leads to a qualitatively different behavior: the curvature gap increases consistently across layers instead of collapsing. This is expected, as inter-community edges now differ structurally from intra-community ones.
We discuss this phenomenon in more detail in Appendix [A.4.3](https://arxiv.org/html/2509.22362v1#A1.SS4.SSS3).

Overall, these results demonstrate that deep neural networks progressively evolve the geometry of feature manifolds in a manner that amplifies the underlying community structure.

Figure: Figure 4: Average local Ricci evolution coefficients, computed from the approximated Ollivier–Ricci curvature, shown with the corresponding accuracies throughout training on the Fashion-MNIST dataset. Reported values are averaged over 50 independently trained networks with random initialization.
Refer to caption: Figures/training_dynamics_fMNIST_apperal_avg.png

### 4.3 Overfitting and Local Ricci Evolution Coefficients

To better understand how neural networks learn the geometry of the data manifold, we track the local Ricci evolution coefficients during training. Across all datasets, we observe a strikingly consistent pattern: at the beginning of training, the mean coefficients exhibit a sharp decline, suggesting that the network is effectively learning the underlying geometric structure. Once test accuracy stabilizes, however, this trend reverses: the mean coefficients plateau or rise again. We hypothesize that this marks a shift in training dynamics, where the network ceases to capture new geometric structure and instead begins to overfit individual samples. This pattern suggests that monitoring local Ricci evolution coefficients during training could serve as a principled stopping heuristic. In practice, this can be made more efficient by approximating Ollivier–Ricci curvature or by using augmented Forman curvature, both of which lower computational cost while retaining the essential geometric signal. Figure [4](https://arxiv.org/html/2509.22362v1#S4.F4) illustrates this phenomenon on the Fashion-MNIST dataset, showing the local Ricci evolution coefficients alongside train and test accuracy throughout training.

### 4.4 Analysis Across Layers

We now turn to the evaluation of the layer Ricci coefficients, introduced in Section [3.2](https://arxiv.org/html/2509.22362v1#S3.SS2). We compute these coefficients across both synthetic and real-world datasets, considering networks of varying depth, while keeping the width fixed. As before, all models are trained to exceed $99\%$ training accuracy to ensure that we analyze meaningful learned representations. For each dataset-architecture pair, results are averaged over 50 independently trained networks to account for stochasticity in initialization and optimization.

Across all experiments, we observe a strikingly consistent behavior: the curves of the layer-Ricci coefficients follow the same trend across network depths. Specifically, there appears to be a critical depth up to which the coefficients decrease, and after which they begin to increase again. This turning point suggests a balance between the network’s ability to capture geometric structure and its tendency to overfit. Up to the critical depth, additional layers appear to enrich the evolution of the feature geometry, as reflected by decreasing layer Ricci coefficients. Beyond this point, however, further depth no longer contributes meaningful geometric transformations, which manifests as increasing Ricci coefficients. This phenomenon highlights the critical depth as a potential heuristic for selecting network architectures: it indicates the point at which adding more layers ceases to provide geometric benefits. An example of this behavior on the MNIST dataset is shown in Figure [5](https://arxiv.org/html/2509.22362v1#S4.F5). Notably, the depth identified by this procedure coincides with the depth that maximizes test accuracy when averaged over 50 independently trained networks.

Figure: Figure 5: Layer-Ricci coefficients, computed from the augmented Forman-Ricci curvature, on the MNIST 1-vs-7 dataset for networks of varying depth (width fixed to 25). Reported values are averaged over 50 independently trained networks with random initialization.
Refer to caption: Figures/Layer_Ricci_Coefficients_1.png

## 5 Discussion

##### Summary

In this paper we have introduced the local Ricci evolution coefficients, a tool to evaluate locally the geometric transformations of feature manifolds by comparing them to Ricci flow dynamics. We theoretically show that nonlinear activations are essential for reshaping feature geometry. Empirically, we demonstrate that the progressive emergence of class separability is mirrored in the development of community structure within the corresponding graph representations. Moreover, our experiments indicate that well-trained networks exhibit curvature-driven transformations closely aligned with Ricci flow, and that this behavior emerges during training. Building on these insights, we propose an early-stopping criterion and a heuristic for selecting network depth, based on detecting when additional layers no longer induce curvature-driven changes.

##### Limitations and future work

While we have established the importance of non-linear activations in reshaping feature geometry, deriving exact evolution equations for graphs constructed from local connectivity patterns in non-linear networks remains an open problem. Moreover, our study was conducted on relatively small datasets and focused exclusively on feed-forward architectures; extending the analysis to larger-scale datasets and more diverse architectures (e.g., convolutional neural networks) represents a valuable direction for future work.

Another interesting avenue for future study is to analyze the double descent phenomenon (Belkin et al., 2019) through the framework of local Ricci evolution coefficients. In the overparameterized regime, our results show that increasing network size—either by expanding depth at fixed width or width at fixed depth—systematically raises the proportion of vertices with negative Ricci coefficients. This suggests that larger networks operate in a more geometry-aware manner, providing a novel geometric perspective on the mechanisms underlying double descent. Further discussion and initial experimental results can be found in Appendix [A.4.4](https://arxiv.org/html/2509.22362v1#A1.SS4.SSS4). Furthermore, local Ricci evolution coefficients could serve as a novel tool to detect geometric anomalies and support uncertainty quantification in deep neural networks, since regions of the data manifold with non-negative coefficients may signal unexpected geometric behavior by the network.

#### Acknowledgments

MR thanks Karl Schlagenhauf for a very inspiring breakfast conversation triggering his interest in the question. MH wants to thank Willem Diepeveen for fruitful discussions and Guido Montúfar for his support. MH was partly supported by BMFTR in DAAD project 57616814 ([SECAI](https://secai.org/)). MW was partially supported by NSF award CBET-2112085 and DMS-2406905, and an Alfred P. Sloan Research Fellowship in Mathematics.

## References

- Ansuini et al. (2019)
Alessio Ansuini, Alessandro Laio, Jakob H Macke, and Davide Zoccolan.
Intrinsic dimension of data representations in deep neural networks.
*Advances in Neural Information Processing Systems*, 32, 2019.
- Ba et al. (2020)
Jimmy Ba, Murat Erdogdu, Taiji Suzuki, Denny Wu, and Tianzong Zhang.
Generalization of two-layer neural networks: An asymptotic viewpoint.
In *International Conference on Learning Representations*, 2020.
- Bai et al. (2020)
Shuliang Bai, Yong Lin, Linyuan Lu, Zhiyu Wang, and Shing-Tung Yau.
Ollivier ricci-flow on weighted graphs.
*arXiv preprint arXiv:2010.01802*, 2020.
- Baptista et al. (2024)
Anthony Baptista, Alessandro Barp, Tapabrata Chakraborti, Chris Harbron, Ben D
MacArthur, and Christopher RS Banerji.
Deep learning as ricci flow.
*Scientific Reports*, 14(1):23383, 2024.
- Belkin et al. (2019)
Mikhail Belkin, Daniel Hsu, Siyuan Ma, and Soumik Mandal.
Reconciling modern machine-learning practice and the classical
bias–variance trade-off.
*Proceedings of the National Academy of Sciences*, 116(32):15849–15854, 2019.
- Bloch (2014)
Ethan Bloch.
Combinatorial ricci curvature for polyhedral surfaces and posets.
*arXiv preprint arXiv:1406.4598*, 2014.
- Brahma et al. (2015)
Pratik Prabhanjan Brahma, Dapeng Wu, and Yiyuan She.
Why deep learning works: A manifold disentanglement perspective.
*IEEE transactions on neural networks and learning systems*,
27(10):1997–2008, 2015.
- Chung (1997)
Fan RK Chung.
*Spectral graph theory*, volume 92.
American Mathematical Soc., 1997.
- Cohen et al. (2020)
Uri Cohen, SueYeon Chung, Daniel D Lee, and Haim Sompolinsky.
Separability and geometry of object manifolds in deep neural
networks.
*Nature communications*, 11(1):746, 2020.
- Cushing et al. (2025)
David Cushing, Supanat Kamtue, Shiping Liu, Florentin Münch, Norbert
Peyerimhoff, and Ben Snodgrass.
Bakry-émery curvature sharpness and curvature flow in finite
weighted graphs: theory.
*manuscripta mathematica*, 176(1):11, 2025.
- Cuturi (2013)
Marco Cuturi.
Sinkhorn distances: Lightspeed computation of optimal transport.
*Advances in neural information processing systems*, 26, 2013.
- Deng et al. (2022)
Zeyu Deng, Abla Kammoun, and Christos Thrampoulidis.
A model of double descent for high-dimensional binary linear
classification.
*Information and Inference: A Journal of the IMA*, 11(2):435–495, 2022.
- Du et al. (2018)
Simon S Du, Xiyu Zhai, Barnabas Poczos, and Aarti Singh.
Gradient descent provably optimizes over-parameterized neural
networks.
*arXiv preprint arXiv:1810.02054*, 2018.
- Erbar and Kopfer (2020)
Matthias Erbar and Eva Kopfer.
Super ricci flows for weighted graphs.
*Journal of Functional Analysis*, 279(6):108607, 2020.
- Fesser et al. (2024)
Lukas Fesser, Sergio Serrano de Haro Ivánez, Karel Devriendt, Melanie
Weber, and Renaud Lambiotte.
Augmentations of forman’s ricci curvature and their applications in
community detection.
*Journal of Physics: Complexity*, 5(3):035010, 2024.
- Flamary et al. (2021)
Rémi Flamary, Nicolas Courty, Alexandre Gramfort, Mokhtar Z. Alaya,
Aurélie Boisbunon, Stanislas Chambon, Laetitia Chapel, Adrien Corenflos,
Kilian Fatras, Nemo Fournier, Léo Gautheron, Nathalie T.H. Gayraud,
Hicham Janati, Alain Rakotomamonjy, Ievgen Redko, Antoine Rolet, Antony
Schutz, Vivien Seguy, Danica J. Sutherland, Romain Tavenard, Alexander Tong,
and Titouan Vayer.
Pot: Python optimal transport.
*Journal of Machine Learning Research*, 22(78):1–8, 2021.
URL [http://jmlr.org/papers/v22/20-451.html](http://jmlr.org/papers/v22/20-451.html).
- Forman (2003)
Robin Forman.
Bochner’s method for cell complexes and combinatorial ricci
curvature.
*Discrete & Computational Geometry*, 29:323–374,
2003.
- Gosztolai and Arnaudon (2021)
Adam Gosztolai and Alexis Arnaudon.
Unfolding the multiscale structure of networks with dynamical
ollivier-ricci curvature.
*Nature Communications*, 12(1):4561, 2021.
- Haber and Ruthotto (2017)
Eldad Haber and Lars Ruthotto.
Stable architectures for deep neural networks.
*Inverse problems*, 34(1):014004, 2017.
- Hagberg et al. (2008)
Aric Hagberg, Pieter J Swart, and Daniel A Schult.
Exploring network structure, dynamics, and function using networkx.
Technical report, Los Alamos National Laboratory (LANL), Los Alamos,
NM (United States), 2008.
- Hamilton (1982)
Richard S Hamilton.
Three-manifolds with positive ricci curvature.
*Journal of Differential geometry*, 17(2):255–306, 1982.
- Hauser and Ray (2017)
Michael Hauser and Asok Ray.
Principles of riemannian geometry in neural networks.
*Advances in neural information processing systems*, 30, 2017.
- Jacot et al. (2018)
Arthur Jacot, Franck Gabriel, and Clément Hongler.
Neural tangent kernel: Convergence and generalization in neural
networks.
*Advances in neural information processing systems*, 31, 2018.
- Johnson et al. (1984)
William B Johnson, Joram Lindenstrauss, et al.
Extensions of lipschitz mappings into a hilbert space.
*Contemporary mathematics*, 26(189-206):1,
1984.
- Jost and Liu (2014)
Jürgen Jost and Shiping Liu.
Ollivier’s ricci curvature, local clustering and
curvature-dimension inequalities on graphs.
*Discrete & Computational Geometry*, 51(2):300–322, 2014.
- Jost and Münch (2021)
Jürgen Jost and Florentin Münch.
Characterizations of forman curvature.
*arXiv preprint arXiv:2110.04554*, 2021.
- Kinga et al. (2015)
Diederik Kinga, Jimmy Ba Adam, et al.
A method for stochastic optimization.
In *International conference on learning representations
(ICLR)*, volume 5. California;, 2015.
- Krizhevsky (2009)
Alex Krizhevsky.
Learning multiple layers of features from tiny images.
Technical report, University of Toronto, 2009.
- Lai et al. (2022)
Xin Lai, Shuliang Bai, and Yong Lin.
Normalized discrete ricci flow used in community detection.
*Physica A: Statistical Mechanics and its Applications*,
597:127251, 2022.
- LeCun (1998)
Yann LeCun.
The mnist database of handwritten digits.
*http://yann. lecun. com/exdb/mnist/*, 1998.
- Li and Münch (2024)
Ruowei Li and Florentin Münch.
The convergence and uniqueness of a discrete-time nonlinear markov
chain.
*arXiv preprint arXiv:2407.00314*, 2024.
- Magai and Ayzenberg (2022)
German Magai and Anton Ayzenberg.
Topology and geometry of data manifold in deep learning.
*arXiv preprint arXiv:2204.08624*, 2022.
- Montufar et al. (2014)
Guido F Montufar, Razvan Pascanu, Kyunghyun Cho, and Yoshua Bengio.
On the number of linear regions of deep neural networks.
*Advances in neural information processing systems*, 27, 2014.
- Naitzat et al. (2020)
Gregory Naitzat, Andrey Zhitnikov, and Lek-Heng Lim.
Topology of deep neural networks.
*Journal of Machine Learning Research*, 21(184):1–40, 2020.
- Newman (2004)
Mark EJ Newman.
Analysis of weighted networks.
*Physical Review E—Statistical, Nonlinear, and Soft Matter
Physics*, 70(5):056131, 2004.
- Ni et al. (2019)
Chien-Chun Ni, Yu-Yao Lin, Feng Luo, and Jie Gao.
Community detection on networks with ricci flow.
*Scientific reports*, 9(1):9984, 2019.
- Ollivier (2009)
Yann Ollivier.
Ricci curvature of markov chains on metric spaces.
*Journal of Functional Analysis*, 256(3):810–864, 2009.
- Ollivier (2010)
Yann Ollivier.
A survey of ricci curvature for metric spaces and markov chains.
In *Probabilistic approach to geometry*, volume 57, pages
343–382. Mathematical Society of Japan, 2010.
- Pascanu et al. (2013)
Razvan Pascanu, Guido Montufar, and Yoshua Bengio.
On the number of response regions of deep feed forward networks with
piece-wise linear activations.
*arXiv preprint arXiv:1312.6098*, 2013.
- Paszke et al. (2019)
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory
Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al.
Pytorch: An imperative style, high-performance deep learning library.
*Advances in neural information processing systems*, 32, 2019.
- Pedregosa et al. (2011)
Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel,
Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron
Weiss, Vincent Dubourg, Jake Vanderplas, Alexandre Passos, David Cournapeau,
Matthieu Brucher, Matthieu Perrot, and Édouard Duchesnay.
Scikit-learn: Machine learning in python.
*Journal of Machine Learning Research*, 12(85):2825–2830, 2011.
URL [http://jmlr.org/papers/v12/pedregosa11a.html](http://jmlr.org/papers/v12/pedregosa11a.html).
- Perelman (2002)
Grisha Perelman.
The entropy formula for the ricci flow and its geometric
applications.
*arXiv preprint math/0211159*, 2002.
- Perelman (2003a)
Grisha Perelman.
Finite extinction time for the solutions to the ricci flow on certain
three-manifolds.
*arXiv preprint math/0307245*, 2003a.
- Perelman (2003b)
Grisha Perelman.
Ricci flow with surgery on three-manifolds.
*arXiv preprint math/0303109*, 2003b.
- Samal et al. (2018)
Areejit Samal, RP Sreejith, Jiao Gu, Shiping Liu, Emil Saucan, and Jürgen
Jost.
Comparative analysis of two discretizations of ricci curvature for
complex networks.
*Scientific reports*, 8(1):8650, 2018.
- Shi and Malik (2000)
Jianbo Shi and Jitendra Malik.
Normalized cuts and image segmentation.
*IEEE Transactions on pattern analysis and machine
intelligence*, 22(8):888–905, 2000.
- Sia et al. (2019)
Jayson Sia, Edmond Jonckheere, and Paul Bogdan.
Ollivier-ricci curvature-based method to community detection in
complex networks.
*Scientific reports*, 9(1):9800, 2019.
- Tian et al. (2025)
Yu Tian, Zachary Lubberts, and Melanie Weber.
Curvature-based clustering on graphs.
*Journal of Machine Learning Research*, 26(52):1–67, 2025.
- Trillos and Weber (2023)
Nicolas Garcia Trillos and Melanie Weber.
Continuum limits of ollivier’s ricci curvature on data clouds:
pointwise consistency and global lower bounds.
*arXiv preprint arXiv:2307.02378*, 2023.
- Van Der Hoorn et al. (2021)
Pim Van Der Hoorn, William J Cunningham, Gabor Lippner, Carlo Trugenberger, and
Dmitri Krioukov.
Ollivier-ricci curvature convergence in random geometric graphs.
*Physical Review Research*, 3(1):013211,
2021.
- Virtanen et al. (2020)
Pauli Virtanen, Ralf Gommers, Travis E. Oliphant, Matt Haberland, Tyler Reddy,
David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan
Bright, Stéfan J. van der Walt, Matthew Brett, Joshua Wilson, K. Jarrod
Millman, Nikolay Mayorov, Andrew R. J. Nelson, Eric Jones, Robert Kern, Eric
Larson, C J Carey, İlhan Polat, Yu Feng, Eric W. Moore, Jake
VanderPlas, Denis Laxalde, Josef Perktold, Robert Cimrman, Ian Henriksen,
E. A. Quintero, Charles R. Harris, Anne M. Archibald, Antônio H. Ribeiro,
Fabian Pedregosa, Paul van Mulbregt, and SciPy 1.0 Contributors.
SciPy 1.0: Fundamental Algorithms for Scientific Computing in
Python.
*Nature Methods*, 17:261–272, 2020.
doi: 10.1038/s41592-019-0686-2.
- Weber et al. (2017)
Melanie Weber, Emil Saucan, and Jürgen Jost.
Characterizing complex networks with forman-ricci curvature and
associated geometric flows.
*Journal of Complex Networks*, 5(4):527–550, 2017.
- Weber et al. (2018)
Melanie Weber, Emil Saucan, and Jürgen Jost.
Coarse geometry of evolving networks.
*Journal of complex networks*, 6(5):706–732, 2018.
- Xiao et al. (2017)
Han Xiao, Kashif Rasul, and Roland Vollgraf.
Fashion-mnist: a novel image dataset for benchmarking machine
learning algorithms.
*arXiv preprint arXiv:1708.07747*, 2017.

## Appendix A Appendix

### A.1 Extended related work

Numerous works have addressed the challenge of explaining the remarkable success of deep neural networks from diverse theoretical perspectives. One line of research characterizes network expressivity in terms of the complexity of decision boundaries. Pascanu et al. [2013] and Montufar et al. [2014] established bounds on the number of linear regions generated by deep ReLU networks, showing that depth increases representational power. Furthermore, the Neural Tangent Kernel framework by Jacot et al. [2018] offers an analytical tool to understand the training dynamics of wide networks by relating them to kernel methods.

Other lines of research explore how the geometry and topology of neural feature representations evolve as data propagate through network layers. Using tools from topological data analysis, such as persistent homology, Naitzat et al. [2020] experimentally showed that neural networks progressively simplify the topology of feature representations. Geometric approaches have uncovered similar phenomena of simplification and regularization. Brahma et al. [2015] observed flattening and disentanglement in manifold-shaped data, Ansuini et al. [2019] reported decreasing intrinsic dimension in deeper layers, and Cohen et al. [2020] demonstrated improved classification capacity via geometric simplification.

Beyond empirical observations, several works propose theoretical frameworks building on classical mathematical tools. Hauser and Ray [2017] argued that deep networks can be naturally interpreted using the language of Riemannian geometry, with network layers acting on the coordinate representation of the underlying data manifold. Meanwhile, Haber and Ruthotto [2017] propose to interpret deep learning as a parameter estimation problem for nonlinear dynamical systems, a framework well-suited for analyzing stability and well-posedness of deep learning.

Closest to our work is the framework introduced by Baptista et al. [2024], which evaluates geometric transformations via Ricci flow at a global scale. A comparison between their global analysis and our local analysis is provided in the following section.

#### A.1.1 Comparison of local and global Ricci coefficients

Baptista et al. [2024] introduced a metric that quantifies the geometric transformations induced by deep neural networks relative to those predicted by the Ricci flow at a global scale. In this section, we compare their global metric to our local Ricci evolution coefficients.

Their framework is based on comparing the Forman-Ricci curvature at a global scale to a global approximation of the expansion or contraction of the manifold. Specifically, they define

$$ $\mathcal{F}_{\ell}=\sum_{e\in E_{\ell}}\mathcal{F}(e),$ $$

where $E_{\ell}$ denotes the edge set of the $k$-nearest-neighbor graph constructed from the set $\Phi_{\ell}(X)=\{\Phi_{\ell}({\bm{x}}^{(i)}):i=1,\ldots,N\}$. To quantify the global expansion or contraction of the manifold across layers, they consider all pairwise distances:

$$ $\eta_{\ell}=\sum_{{\bm{x}},{\bm{y}}\in\Phi_{\ell+1}(X)}d_{\ell+1}({\bm{x}},{\bm{y}})-\sum_{{\bm{x}},{\bm{y}}\in\Phi_{\ell}(X)}d_{\ell}({\bm{x}},{\bm{y}}).$ $$

The relation between these two quantities is then summarized via the Pearson correlation coefficient

$$ $\rho=\frac{\sum_{\ell=1}^{L-1}(\eta_{\ell}-\bar{\eta})(\mathcal{F}_{\ell}-\bar{\mathcal{F}})}{\sqrt{\sum_{\ell=1}^{L-1}(\eta_{\ell}-\bar{\eta})^{2}}\sqrt{\sum_{\ell=1}^{L-1}(\mathcal{F}_{\ell}-\bar{\mathcal{F}})^{2}}},$ $$

where $\bar{\eta}$ and $\bar{\mathcal{F}}$ denote the respective layer-wise averages. We will refer to the quantity $\rho$ as the global Ricci coefficient. A negative global Ricci coefficient indicates that the geometric changes induced by the network follow the dynamics predicted by Ricci flow at global scale—large ”global curvature” corresponds to contraction, while small ”global curvature” corresponds to expansion.

Our approach differs in two key aspects. First, it explicitly leverages the inherently local nature of the Ricci flow, which evolves the Riemannian metric tensor at each point of the manifold according to the local curvature, rather than relying on global approximations. Second, we adopt the more refined notion of Ollivier-Ricci curvature, which comes with consistency guarantees relative to the curvature of the underlying manifold given sufficiently dense samples [Van Der Hoorn et al., 2021, Trillos and Weber, 2023]. In contrast, Baptista et al. [2024] employ the Forman-Ricci curvature, which cannot capture higher-order structures and is therefore too simplistic to provide a rich geometric characterization.

To propose an early-stopping heuristic, we evaluate the local Ricci evolution coefficients throughout training. The global Ricci coefficient turns out to be too coarse to provide meaningful insights into the learning dynamics. Indeed, even for randomly initialized, untrained networks, the global Ricci coefficient typically takes negative values, suggesting Ricci flow-like behavior. Table [2](https://arxiv.org/html/2509.22362v1#A1.T2) reports the global Ricci coefficients of randomly initialized, untrained networks with $10$ layers across different datasets, averaged over $100$ runs per dataset. For completeness, we also provide the percentage of networks with negative global Ricci coefficient and the minimum observed value.

**Table 2: Global Ricci coefficients of untrained neural networks, averaged over 100 independently and randomly initialized models.**
|  | Syn-I | Syn-II | Syn-III | Syn-IV |
| --- | --- | --- | --- | --- |
| Mean $\pm$ std. | $-0.389\pm 0.258$ | $-0.349\pm 0.151$ | $-0.231\pm 0.193$ | $-0.204\pm 0.186$ |
| Minimum | $-0.772$ | $-0.644$ | $-0.744$ | $-0.577$ |
| Negative share | $91\%$ | $99\%$ | $89\%$ | $89\%$ |

**Table 3: Mean local Ricci evolution coefficients of untrained neural networks, averaged over 100 independently and randomly initialized models.**
|  | Syn-I | Syn-II | Syn-III | Syn-IV |
| --- | --- | --- | --- | --- |
| Mean $\pm$ std. | $-0.037\pm 0.077$ | $0.039\pm 0.052$ | $-0.019\pm 0.081$ | $-0.035\pm 0.054$ |
| Minimum | $-0.234$ | $-0.117$ | $-0.173$ | $-0.133$ |
| Negative share | $66\%$ | $21\%$ | $63\%$ | $76\%$ |

This phenomenon is consistent with a simple heuristic indicating an inherent negative correlation between $\eta_{\ell}$ and $\mathcal{F}_{\ell}$. Specifically, the estimate of the global curvature of the underlying manifold at layer $\ell$ is given by

$$ $\mathcal{F}_{\ell}=\sum_{e\in E_{\ell}}\mathcal{F}(e)=4|E_{\ell}|-\sum_{{\bm{x}}\in\Phi_{\ell}(X)}\deg({\bm{x}})^{2}.$ $$

From this expression, $\mathcal{F}_{\ell}$ takes large negative values in densely connected graphs with many high-degree vertices. Such graphs, however, tend to exhibit smaller pairwise distances, thereby yielding larger values of $\eta_{\ell}$. As a result, a negative correlation between $\eta_{\ell}$ and $\mathcal{F}_{\ell}$ is expected regardless of the specific neural network under consideration.

In contrast, when examined using the framework of local Ricci evolution coefficients, no systematic correlation is observed. For randomly initialized networks, the local Ricci evolution coefficients remain close to zero (Table [3](https://arxiv.org/html/2509.22362v1#A1.T3)), reflecting the lack of correlation between the expansion of local neighborhoods and the Ollivier-Ricci curvature within those neighborhoods. This underscores the value of local Ricci evolution coefficients for studying learning dynamics: since no Ricci flow-like behavior is present at random initialization, they allow us to track the genuine emergence of curvature-driven dynamics during training.

Finally, note that computing the global Ricci coefficient requires the $k$-nearest-neighbor graphs of each layer to be connected. In practice, however, this condition may not be met, especially for smaller values of $k$. In contrast, an advantage of the local Ricci evolution coefficients is that they can still be computed even when the $k$-nearest-neighbor graphs are disconnected. The only requirement is that each point ${\bm{x}}$ is connected to its neighbors in the subsequent layer — a significantly weaker condition.

### A.2 Extended background

#### A.2.1 Approximation of Ollivier-Ricci curvature

Computing the Ollivier-Ricci curvature is computationally demanding, since it involves solving an optimal transport problem for every edge in the graph. Using the Hungarian algorithm, each such computation has complexity $O(\deg_{\max}^{3})$. However, the computational burden can be alleviated by approximating the Ollivier-Ricci curvature. Tian et al. [2025] proposed an approximation by taking the arithmetic mean of an upper and a lower bound, each of which can be efficiently computed in linear time. These bounds were first established by Jost and Liu [2014].

###### Theorem A.1 ( Jost and Liu [ 2014 ] ) .

Let ${\mathcal{G}}=(V,E)$ be a locally finite graph and let $u,v\in V$ with $u\sim v$. Then, the Ollivier-Ricci curvature is bounded from below by

$$ $\displaystyle\mathcal{O}(u,v)\geq$ $\displaystyle-\left(1-\frac{1}{\deg(u)}-\frac{1}{\deg(v)}-\frac{|N(u)\cap N(v)|}{\deg(u)\wedge\deg(v)}\right)_{+}$ $\displaystyle-\left(1-\frac{1}{\deg(u)}-\frac{1}{\deg(v)}-\frac{|N(u)\cap N(v)|}{\deg(u)\vee\deg(v)}\right)_{+}+\frac{|N(u)\cap N(v)|}{\deg(u)\vee\deg(v)}.$ $$

Furthermore, the Ollivier-Ricci curvature is bounded from above by

$$ $\mathcal{O}(u,v)\leq\frac{|N(u)\cap N(v)|}{\deg(u)\vee\deg(v)}.$ $$

Using these bounds, Tian et al. [2025] propose to approximate the Ollivier-Ricci curvature by taking the arithmetic mean, i.e.,

$$ $\widetilde{\mathcal{O}}(u,v)=\frac{1}{2}\left(\mathcal{O}^{up}(u,v)+\mathcal{O}^{low}(u,v)\right),$ $$

where $\mathcal{O}^{up}(u,v)$ and $\mathcal{O}^{low}(u,v)$ denote the upper and lower bound established in Theorem [A.1](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem1). Note that this approximation can be computed with complexity $O(\deg_{\max})$, which strongly reduces the cost compared to computing the exact Ollivier-Ricci curvature.

###### Theorem A.1 ( Jost and Liu [ 2014 ] ) .

#### A.2.2 Forman-Ricci curvature and its augmentations

Forman [2003] introduced a discretization of the classical Ricci curvature on CW complexes, derived from a discrete analogue of the Bochner-Weitzenböck formula. Viewing a simple graph as a one-dimensional CW complex, with edges corresponding to one-cells, allows this notion to be applied naturally to graphs. In particular, for a simple, unweighted graph, the Forman-Ricci curvature of an edge $u\sim v$ is defined as

$$ $\mathcal{F}(u,v)=4-\deg(u)-\deg(v).$ $$

Although this definition is well-founded in Forman’s framework and computationally efficient, it is often too simplistic to provide the rich geometric characterization required in many practical and theoretical applications. For example, a key limitation of the Forman-Ricci curvature is that it disregards the number of triangles adjacent to an edge, one of the most elementary and important geometric properties of a graph Jost and Liu [2014].

To address this limitation, augmentations of the Forman-Ricci curvature have been considered [Bloch, 2014, Samal et al., 2018, Weber et al., 2018]. The core idea is to incorporate additional information about the local geometry by constructing a two-dimensional CW-complex from the graph, inserting two-cells into cycles up to a given length. This approach provides a natural way to capture higher-order correlations among vertices in the network. We augment the Forman-Ricci curvature with all cycles of length three, balancing improved empirical performance in community detection [Fesser et al., 2024] with computational tractability. The resulting augmented Forman-Ricci curvature for an edge $u\sim v$ is given by the following combinatorial formula:

$$ $\mathcal{AF}(u,v)=4-\deg(u)-\deg(v)+3|N(u)\cap N(v)|=\mathcal{F}(u,v)+3|N(u)\cap N(v)|.$ $$

This approximation can be computed in $O(E\deg_{\max})$ time on the whole graph, significantly reducing the cost relative to the computation of Ollivier–Ricci curvature.

#### A.2.3 Measures of community strength

Beyond curvature-based measures, the strength of community structure is often assessed using a set of well-established classical metrics. For completeness, we summarize the most widely used ones below. We consider a graph ${\mathcal{G}}=(V,E)$, where the vertex set is partitioned into disjoint communities $C_{1},\ldots.C_{n}$, i.e.,

$$ $V=\bigsqcup_{i=1}^{n}C_{i}.$ $$

Modularity. One of the most prevalent measures for assessing community strength is modularity, first introduced by Newman [2004]. It quantifies the density of edges within communities relative to the expected density in a random graph with the same degree distribution. Formally, it is defined by

$$ $Q=\frac{1}{2|E|}\sum_{u,v\in V}\left(A_{uv}-\frac{\deg(u)\deg(v)}{2|E|}\right)\delta(C_{u},C_{y}),$ $$

where $\delta(C_{u},C_{v})$ denotes the Kronecker delta, which equals 1 if $u$ and $v$ belong to the same community and 0 otherwise. Modularity equal to zero indicates that the density of intra-community edges is no greater than what would be expected in a random graph with the same degree distribution. Positive modularity, on the other hand, indicates a higher density of intra-community edges, with values above 0.3 typically reflecting strong community structure.

Normalized Cut. Another classical approach for assessing the strength of community structure is based on the cut size, i.e., the number of edges crossing between different communities. Since raw cut size tends to favor unbalanced partitions, Shi and Malik [2000] introduced a normalized variant, defined as

$$ $\operatorname{Ncut}(C_{1},\ldots,C_{n})=\frac{1}{2}\sum_{i=1}^{n}\frac{\operatorname{cut}(C_{i})}{\operatorname{vol}(C_{i})},$ $$

where $\operatorname{cut}(C_{i})=|\{u\sim v:u\in C_{i},v\notin C_{i}\}|$, and $\operatorname{vol}(C_{i})=\sum_{v\in C_{i}}\deg(v)$.

Figure: Figure 6: Distribution of Ollivier–Ricci curvature for two stochastic block models. The first row shows weak community structure with two communities of 40 nodes each, intra-community edge probability 0.5, and inter-community edge probability 0.2. The second row shows strong community structure with intra-community edge probability 0.7, and inter-community edge probability 0.1.
Refer to caption: Figures/curvature_gap_visualization.png

Algebraic connectivity. There exists a whole field dedicated to the study of graph Laplacians and their spectra, known as spectral graph theory. The eigenvalues and eigenvectors of the graph Laplacian are closely related to community structure, forming the basis of spectral clustering methods. In particular, the second-smallest eigenvalue of the Laplacian, called the algebraic connectivity, reflects how well connected the graph is: it is greater than zero if and only if the graph is connected, and larger values indicate stronger connectivity. For more details, we refer the reader to the comprehensive book by Chung [1997].

Curvature Gap. The neighborhoods of two adjacent vertices tend to be more tightly connected when they belong to the same community. This results in a lower transport cost between their neighborhood distributions and thus higher Ollivier-Ricci curvature. Building on this observation, graphs with community structure exhibit a bimodal distribution of curvature values, reflecting the systematic difference between intra-community and inter-community edges. To quantify this separation, Gosztolai and Arnaudon [2021] introduced the curvature gap:

$$ $\Delta\mathcal{O}=\frac{1}{\sigma}\left(\mathcal{O}_{\operatorname{intra}}-\mathcal{O}_{\operatorname{inter}}\right),$ $$

where $\mathcal{O}_{\operatorname{intra}}$ denotes the average Ollivier-Ricci curvature of intra-community edges, $\mathcal{O}_{\operatorname{inter}}$ denotes the average Ollivier-Ricci curvature of inter-community edges, and $\sigma=\sqrt{\frac{1}{2}\left(\sigma^{2}_{\operatorname{intra}}+\sigma^{2}_{\operatorname{inter}}\right)}$ is the pooled standard deviation. A large curvature gap indicates a significant distinction in local geometry between edges within communities and those connecting different communities. Figure [6](https://arxiv.org/html/2509.22362v1#A1.F6) illustrates this effect for two graphs with different degrees of community strength.

#### A.2.4 Ricci flow

The Ricci flow, introduced by Hamilton [1982], is a second-order nonlinear partial differential equation for the Riemannian metric. Given a smooth Riemannian manifold $M$ with metric $g$, the Ricci flow evolves the metric according to

$$ $\left\{\begin{aligned} \frac{\partial}{\partial t}g(t)&=-2\,\mathrm{Ric}(g(t)),\\ g(0)&=g,\end{aligned}\right.$ (1) $$

where $\mathrm{Ric}(g(t))$ denotes the Ricci curvature associated with the time-dependent metric $g(t)$. The constant factor $-2$ is conventional; any negative scalar would yield a qualitatively equivalent evolution under an appropriate time reparametrization.

Hamilton proved the short-time existence of solutions to the Ricci flow for arbitrary smooth initial metrics on compact manifolds.

###### Theorem A.2 ( [Hamilton, 1982 ] , Theorem 4.2) .

The Ricci flow introduced in ([1](https://arxiv.org/html/2509.22362v1#A1.E1)) has a solution for a short time on any compact Riemannian manifold with any initial metric at $t=0$.

The prove is based on the Nash-Moser implicit function theorem and also ensures the uniqueness of a short-time solution. Furthermore, Hamilton established the long-time existence theorem, which guarantees the existence and uniqueness of a solution as long as the curvature remains bounded.

###### Theorem A.3 ( [Hamilton, 1982 ] , Theorem 14.1) .

The Ricci flow introduced in ([1](https://arxiv.org/html/2509.22362v1#A1.E1)) has a unique solution on a maximal time interval $[0,T)$ with $T\leq\infty$ for any compact Riemannian manifold $M$ with any initial metric at $t=0$. If $T<\infty$, then

$$ $\sup_{x\in M}|\mathrm{Rm}(g(t))|(x)\to\infty$ $$

as $t\to T$, where $|\mathrm{Rm}(g(t))|$ denotes the norm of the Riemannian curvature tensor associated with the metric $g(t)$.

A variety of discrete Ricci flow formulations on graphs have been developed, based on the idea that negatively curved regions expand while positively curved ones contract. Although no canonical version exists, many build on this intuition. Ollivier [2010] introduced discrete Ricci flow using Ollivier-Ricci curvature. Later work established convergence and uniqueness results, such as Li and Münch [2024] for discrete-time flows, and Bai et al. [2020] for continuous-time flows on weighted graphs. Other flows based on different curvature notions include the Bakry-Émery flow [Cushing et al., 2025] and Forman-Ricci flow [Weber et al., 2017]. Additionally, Erbar and Kopfer [2020] introduce a concept of super Ricci flow for weighted graphs.

###### Theorem A.2 ( [Hamilton, 1982 ] , Theorem 4.2) .

###### Theorem A.3 ( [Hamilton, 1982 ] , Theorem 14.1) .

### A.3 Deferred proof details

In this section, we provide the deferred proofs for the theoretical results stated in Section [3.1](https://arxiv.org/html/2509.22362v1#S3.SS1).

#### A.3.1 Random initialization

To derive lower bounds on the network width that ensure the preservation of graph structures under random initialization, we build upon the Johnson–Lindenstrauss Lemma.

###### Theorem A.4 (Johnson-Lindenstrauss Lemma, [Johnson et al., 1984 ] ) .

Let ${\bm{x}}\in\mathbb{R}^{n}$ and let ${\bm{A}}\in\mathbb{R}^{m\times n}$ be a random matrix with i.i.d. entries ${A}_{ij}\sim\mathcal{N}(0,1)$. Then, for $0<\epsilon<1$, we have

$$ $\mathbb{P}\left((1-\epsilon)\lVert{\bm{x}}\rVert^{2}\leq\left\lVert\frac{1}{\sqrt{m}}{\bm{A}}{\bm{x}}\right\rVert^{2}\leq(1+\epsilon)\lVert{\bm{x}}\rVert^{2}\right)\geq 1-2\exp\left(\frac{m}{4}(\epsilon^{3}-\epsilon^{2})\right).$ $$

###### Proof.

Let ${\bm{x}}\in\mathbb{R}^{n}$ be arbitrary. First, observe that the entries of ${\bm{A}}{\bm{x}}$ are normally distributed, as the sum of independent, normally distributed random variables. Furthermore, we have

$$ $\mathbb{E}\left[({\bm{A}}{\bm{x}})_{i}\right]=\mathbb{E}\left[\sum_{j=1}^{n}{A}_{ij}{x}_{j}\right]=\sum_{j=1}^{n}\mathbb{E}\left[{A}_{ij}\right]{x}_{j}=0,$ $$

and

$$ $\displaystyle\mathbb{V}[({\bm{A}}{\bm{x}})_{i}]$ $\displaystyle=\mathbb{E}\left[(({\bm{A}}{\bm{x}})_{i})^{2}\right]-\mathbb{E}\left[(({\bm{A}}{\bm{x}})_{i})\right]^{2}=\mathbb{E}\left[\left(\sum_{j=1}^{n}{A}_{ij}{x}_{j}\right)^{2}\right]$ $\displaystyle=\mathbb{E}\left[\sum_{k,j=1}^{n}{A}_{ij}{A}_{ik}{x}_{j}{x}_{k}\right]=\sum_{k,j=1}^{n}\mathbb{E}\left[{A}_{ij}{A}_{ik}\right]{x}_{j}{x}_{k}=\sum_{j=1}^{n}{x}_{j}^{2}=\lVert{\bm{x}}\rVert^{2}.$ $$

Hence, the random variables

$$ $X_{i}=\frac{({\bm{A}}{\bm{x}})_{i}}{\lVert{\bm{x}}\rVert}$ $$

are i.i.d. with $X_{i}\sim\mathcal{N}(0,1)$. Therefore, we obtain

$$ $\mathbb{P}\left(\left\lVert\frac{1}{\sqrt{m}}{\bm{A}}{\bm{x}}\right\rVert^{2}>(1+\epsilon)\lVert{\bm{x}}\rVert^{2}\right)=\mathbb{P}\left(\left\lVert\frac{{\bm{A}}{\bm{x}}}{\|{\bm{x}}\rVert}\right\rVert^{2}>(1+\epsilon)m\right)=\mathbb{P}\left(\sum_{i=1}^{m}X_{i}^{2}>(1+\epsilon)m\right),$ $$

where $\sum_{i=1}^{m}X_{m}^{2}$ is distributed according to the chi-squared distribution with $m$ degrees of freedom. Using standard concentration inequalities for the chi-squared distribution, we obtain

$$ $\mathbb{P}\left(\left\lVert\frac{1}{\sqrt{m}}{\bm{A}}{\bm{x}}\right\rVert^{2}>(1+\epsilon)\lVert{\bm{x}}\rVert^{2}\right)\leq e^{\frac{m}{4}(\epsilon^{3}-\epsilon^{2})}.$ $$

Analogously, one can prove that

$$ $\mathbb{P}\left(\left\lVert\frac{1}{\sqrt{m}}{\bm{A}}{\bm{x}}\right\rVert^{2}<(1-\epsilon)\lVert{\bm{x}}\rVert^{2}\right)\leq e^{\frac{m}{4}(\epsilon^{3}-\epsilon^{2})}.$ $$

This concludes the proof.
∎

Using Boole’s inequality, we immediately obtain the following corollary.

###### Corollary A.5 .

Let $X\subset\mathbb{R}^{n}$ be a finite set, and let ${\bm{A}}\in\mathbb{R}^{m\times n}$ be a random matrix with i.i.d. entries ${A}_{ij}\sim\mathcal{N}(0,1/m)$. Then, for $0<\epsilon<1$, we have

$$ $\mathbb{P}\left((1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert^{2}\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}:\forall{\bm{x}},{\bm{y}}\in X\right)\geq 1-\delta,$ $$

where

$$ $\delta=|X|(|X|-1)\exp\left(\frac{m}{4}(\epsilon^{3}-\epsilon^{2})\right).$ $$

We are now prepared to prove Theorem [3.1](https://arxiv.org/html/2509.22362v1#S3.Thmtheorem1).

###### Theorem 3.1 .

Let $X\subset\mathbb{R}^{n}$ be a finite set, and assume there exists $0<\epsilon<1$ such that

$$ $\min_{\begin{subarray}{c}Y\subset X\setminus\{x\}\\ |Y|=k\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\frac{1-\epsilon}{1+\epsilon}\min_{\begin{subarray}{c}Y\subset X\setminus\{x\}\\ |Y|=k+1\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\quad\forall{\bm{x}}\in X.$ $$

Furthermore, let ${\bm{A}}\in\mathbb{R}^{m\times n}$ be a random matrix with i.i.d. entries ${A}_{ij}\sim\mathcal{N}(0,1/m)$. Then, the map

$$ $\psi:X\to{\bm{A}}X:=\{{\bm{A}}{\bm{x}}:{\bm{x}}\in X\};\quad\psi({\bm{x}})={\bm{A}}{\bm{x}}$ $$

is a graph isomorphism between ${\mathcal{G}}_{k}(X)$ and ${\mathcal{G}}_{k}({\bm{A}}X)$ with probability bounded from below

$$ $\mathbb{P}\left({\mathcal{G}}_{k}(X)\cong{\mathcal{G}}_{k}({\bm{A}}X)\;\text{under}\;\psi\right)\geq 1-|X|(|X|-1)e^{\frac{m}{4}(\epsilon^{3}-\epsilon^{2})}.$ $$

###### Remark .

To bound the probability of error by $\delta$, i.e.,

$$ $\mathbb{P}\left({\mathcal{G}}_{k}(X)\not\cong{\mathcal{G}}_{k}(AX)\;\text{under}\;\psi\right)\leq\delta,$ $$

we have to choose the width of the network

$$ $m\geq\frac{4(\log(|X|(|X|-1))-\log(\delta))}{\epsilon^{2}-\epsilon^{3}}.$ $$

###### Proof.

We first prove that $\psi$ is a graph isomorphism, if

$$ $(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert^{2}\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\quad\forall{\bm{x}},{\bm{y}}\in X.$ (2) $$

Let ${\bm{x}},{\bm{y}}\in X$ such that ${\bm{x}}\sim{\bm{y}}$ in ${\mathcal{G}}_{k}(X)$. Without loss of generality, we may assume that ${\bm{y}}$ is among the $k$-nearest neighbors of ${\bm{x}}$. We claim that ${\bm{A}}{\bm{y}}$ is among the $k$-nearest neighbors of ${\bm{A}}{\bm{x}}$. Assume for contradiction that this is not the case. Hence, there exists a ${\bm{z}}\in X$, which is not among the $k$-nearest neighbors of ${\bm{x}}$, such that

$$ $\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{z}}\rVert<\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert.$ $$

This contradicts our assumption, since

$$ $\|{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert^{2}\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq(1-\epsilon)\lVert{\bm{x}}-{\bm{z}}\rVert^{2}\leq\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{z}}\rVert^{2},$ $$

where we applied our assumption on $\epsilon$ to obtain the second inequality.
Therefore, our assumption is false, implying that ${\bm{A}}{\bm{y}}$ belongs to the $k$-nearest neighbors of ${\bm{A}}{\bm{x}}$ and therefore ${\bm{A}}{\bm{x}}\sim{\bm{A}}{\bm{y}}$ in ${\mathcal{G}}_{k}({\bm{A}}X)$.

Conversely, let ${\bm{A}}{\bm{x}}\sim{\bm{A}}{\bm{y}}$ be an arbitrary edge in ${\mathcal{G}}_{k}({\bm{A}}X)$, and assume without loss of generality that ${\bm{A}}{\bm{y}}$ is among the $k$-nearest neighbors of ${\bm{A}}{\bm{x}}$. It remains to show that ${\bm{x}}\sim{\bm{y}}$ in ${\mathcal{G}}_{k}(X)$. Assume for contradiction that this is not the case. Hence, there exists ${\bm{z}}\in X$ among the $k$-nearest neighbors of ${\bm{x}}$ such that

$$ $\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{z}}\rVert>\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert.$ $$

This contradicts our assumption, since

$$ $\|{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{z}}\rVert^{2}\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{z}}\rVert^{2}\leq(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert^{2},$ $$

where we again applied our assumption on $\epsilon$ to obtain the second inequality. Thus, the assumption is contradicted, and ${\bm{x}}\sim{\bm{y}}$ in ${\mathcal{G}}_{k}(X)$ must hold.

This concludes the proof that the map $\psi$ is a graph isomorphism, assuming that condition ([2](https://arxiv.org/html/2509.22362v1#A1.E2)) holds. By Corollary [A.5](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem5), the probability for this is bounded from below by

$$ $1-|X|(|X|-1)\exp\left(\frac{m}{4}(\epsilon^{3}-\epsilon^{2})\right).$ $$

This concludes the proof.
∎

We can prove a similar result for $r$-neighborhood graphs.

###### Theorem A.6 .

Let $X\subset\mathbb{R}^{n}$ be a finite set, and denote by $N({\bm{x}})$ the one-hop neighborhood of ${\bm{x}}$ in $G_{r}(X)$. Choose $0<\epsilon<1$ such that

$$ $\epsilon<\min\left\{\frac{r^{2}-\max_{{\bm{y}}\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}}{\max_{{\bm{y}}\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}},\frac{\min_{{\bm{y}}\not\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}-r^{2}}{\min_{{\bm{y}}\not\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}}\right\}\quad\forall{\bm{x}}\in X.$ $$

Furthermore, let ${\bm{A}}\in\mathbb{R}^{m\times n}$ be a random matrix with i.i.d. entries ${A}_{ij}\sim\mathcal{N}(0,1/m)$. Then, the map

$$ $\psi:X\to{\bm{A}}X:=\{{\bm{A}}{\bm{x}}:{\bm{x}}\in X\};\quad\psi({\bm{x}})={\bm{A}}{\bm{x}}$ $$

is a graph isomorphism between $G_{r}(X)$ and $G_{r}(AX)$ with probability bounded from below by

$$ $\mathbb{P}\left(G_{r}(X)\cong G_{r}({\bm{A}}X)\;\text{under}\;\psi\right)\geq 1-|X|(|X|-1)e^{\frac{m}{4}(\epsilon^{3}-\epsilon^{2})}.$ $$

###### Proof.

We first prove that $\psi$ is a graph isomorphism, if

$$ $(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert^{2}\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\quad\forall{\bm{x}},{\bm{y}}\in X.$ (3) $$

Let ${\bm{x}}\sim{\bm{y}}$ be an arbitrary edge in $G_{r}(X)$. Using our assumption and the upper bound on $\epsilon$, we obtain

$$ $\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert^{2}\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}<r^{2}.$ $$

Therefore, we obtain ${\bm{A}}{\bm{x}}\sim{\bm{A}}{\bm{y}}$ in $G_{r}({\bm{A}}X)$. Analogously, consider an arbitrary edge ${\bm{A}}{\bm{x}}\sim{\bm{A}}{\bm{y}}$ in $G_{r}({\bm{A}}X)$. It remains to show that ${\bm{x}}\sim{\bm{y}}$ in $G_{r}(X)$. Assume this is not the case. Hence, $\lVert{\bm{x}}-{\bm{y}}\rVert>r$ and therefore

$$ $\lVert{\bm{A}}{\bm{x}}-{\bm{A}}{\bm{y}}\rVert^{2}\geq(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert^{2}>r^{2},$ $$

contradicting ${\bm{A}}{\bm{x}}\sim{\bm{A}}{\bm{y}}$. Hence, the assumption leads to a contradiction, and we conclude that $\psi$ is a graph isomorphism, provided that ([3](https://arxiv.org/html/2509.22362v1#A1.E3)) holds. By Corollary [A.5](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem5), the probability for this is bounded from below by

$$ $1-|X|(|X|-1)\exp\left(\frac{m}{4}(\epsilon^{3}-\epsilon^{2})\right).$ $$

This concludes the proof.
∎

Thus, for sufficiently wide, randomly initialized one-layer networks without non-linear activation functions, the graph structures are preserved. This result can be naturally extended to multi-layer networks in the following way.

###### Theorem A.7 .

Let $X\subset\mathbb{R}^{n}$ be a finite set, and assume there exists $0<\epsilon<1$ such that

$$ $\min_{\begin{subarray}{c}Y\subset X\setminus\{x\}\\ |Y|=k\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\left(\frac{1-\epsilon}{1+\epsilon}\right)^{L}\min_{\begin{subarray}{c}Y\subset X\setminus\{x\}\\ |Y|=k+1\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\quad\forall{\bm{x}}\in X.$ $$

Furthermore, let ${\bm{A}}_{1}\in\mathbb{R}^{m\times n}$ and ${\bm{A}}_{2},\ldots,{\bm{A}}_{L}\in\mathbb{R}^{m\times m}$ be random matrices with i.i.d. entries $({A}_{\ell})_{ij}\sim\mathcal{N}(0,1/m)$ for $\ell=1,\ldots,L$. Then, the map

$$ $\psi_{L}:X\to X_{L}:=\{{\bm{A}}_{L}{\bm{A}}_{L-1}\ldots{\bm{A}}_{1}{\bm{x}}:{\bm{x}}\in X\};\quad\psi_{L}({\bm{x}})={\bm{A}}_{L}{\bm{A}}_{L-1}\ldots{\bm{A}}_{1}{\bm{x}}$ $$

is a graph isomorphism between ${\mathcal{G}}_{k}(X)$ and ${\mathcal{G}}_{k}(X_{L})$ with probability bounded from below

$$ $\mathbb{P}\left({\mathcal{G}}_{k}(X)\cong{\mathcal{G}}_{k}(X_{L})\;\text{under}\;\psi_{L}\right)\geq\left(1-|X|(|X|-1)e^{\frac{m}{4}(\epsilon^{3}-\epsilon^{2})}\right)^{L}.$ $$

###### Proof.

We first prove that $\psi_{L}$ is an isomorphism, if the following inequality holds for all $x,y\in X$ and $\ell=1,\ldots,L$:

$$ $(1-\epsilon)\lVert\psi_{\ell-1}({\bm{x}})-\psi_{\ell-1}({\bm{y}})\rVert^{2}\leq\lVert\psi_{\ell}({\bm{x}})-\psi_{\ell}({\bm{y}})\rVert^{2}\leq(1+\epsilon)\lVert\psi_{\ell-1}({\bm{x}})-\psi_{\ell-1}({\bm{y}})\rVert^{2},$ (4) $$

where we use the convention $\psi_{0}({\bm{x}})={\bm{x}}$.

To this end, consider an arbitrary edge ${\bm{x}}\sim{\bm{y}}$ in ${\mathcal{G}}_{k}(X)$, and assume without loss of generality that ${\bm{y}}$ is among the $k$-nearest neighbors of ${\bm{x}}$. We aim to show that $\psi_{L}({\bm{x}})\sim\psi_{L}({\bm{y}})$ in ${\mathcal{G}}_{k}(X_{L})$. Assume this is not the case. Hence, there exists a vertex ${\bm{z}}\in X$, which is not among the $k$-nearest neighbors of ${\bm{x}}$, such that

$$ $\lVert\psi_{L}({\bm{x}})-\psi_{L}({\bm{z}})\rVert<\lVert\psi_{L}({\bm{x}})-\psi_{L}({\bm{y}})\rVert.$ $$

This contradicts our assumption, since

$$ $\lVert\psi_{L}({\bm{x}})-\psi_{L}({\bm{y}})\rVert^{2}\leq(1+\epsilon)^{L}\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq(1-\epsilon)^{L}\lVert{\bm{x}}-{\bm{z}}\rVert^{2}\lVert\leq\lVert\psi_{L}({\bm{x}})-\psi_{L}({\bm{z}})\rVert^{2},$ $$

where we applied our assumption on $\epsilon$ to obtain the second inequality. Therefore, our assumption is false, implying that $\psi_{L}({\bm{x}})\sim\psi_{L}({\bm{y}})$ in ${\mathcal{G}}_{k}(X_{L})$ must hold. Using a similar argument, one can show that $\psi_{L}({\bm{x}})\sim\psi_{L}({\bm{y}})$ in ${\mathcal{G}}_{k}(X_{L})$ implies ${\bm{x}}\sim{\bm{y}}$ in ${\mathcal{G}}_{k}(X)$.

Thus, $\psi_{L}$ is a graph isomorphism, provided that condition ([4](https://arxiv.org/html/2509.22362v1#A1.E4)) holds. For fixed $\ell$, the probability that this condition is satisfied can be bounded from below by Corollary [A.5](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem5). Since all entries of all weight matrices are independent, the corresponding events are independent across the different layers $\ell=1,\ldots,L$. Consequently, we obtain a lower bound by taking the product of the individual probabilities:

$$ $\mathbb{P}\left({\mathcal{G}}_{k}(X)\cong{\mathcal{G}}_{k}(X_{L})\;\text{under}\;\phi_{L}\right)\geq\left(1-|X|(|X|-1)e^{\frac{m}{4}(\epsilon^{3}-\epsilon^{2})}\right)^{L}.$ $$

∎

###### Theorem A.4 (Johnson-Lindenstrauss Lemma, [Johnson et al., 1984 ] ) .

###### Proof.

###### Corollary A.5 .

###### Theorem 3.1 .

###### Remark .

###### Proof.

###### Theorem A.6 .

###### Proof.

###### Theorem A.7 .

###### Proof.

#### A.3.2 Trained networks

Random initialization together with over-parameterization ensures that the network’s weights remain close to their initial values throughout gradient descent. To illustrate, consider a two-layer neural network $\Phi=\phi_{2}\circ\phi_{1}$, where the first layer is

$$ $\phi_{1}({\bm{x}})=\sigma\left(\frac{1}{\sqrt{m}}{\bm{W}}{\bm{x}}\right)$ $$

with $\sigma$ denoting the ReLU activation and ${\bm{W}}\in\mathbb{R}^{m\times n}$ the weight matrix. The second layer computes a weighted linear combination, $\phi_{2}({\bm{x}})=\langle{\bm{a}},{\bm{x}}\rangle$ with ${\bm{a}}\in\mathbb{R}^{m}$.

Given a training data set $\{({\bm{x}}_{i},y_{i})\}_{i=1}^{N}$, we aim to minimize the empirical loss

$$ $L({\bm{W}},{\bm{a}})=\frac{1}{2}\sum_{i=1}^{N}(\Phi({\bm{x}}_{i})-y_{i})^{2}.$ $$

To this end, we fix the second-layer weights ${\bm{a}}\in\mathbb{R}^{m}$ and apply gradient descent to optimize the first-layer weight matrix ${\bm{W}}\in\mathbb{R}^{m\times n}$ via the update rule

$$ ${\bm{W}}(k+1)={\bm{W}}(k)-\eta\frac{\partial L({\bm{W}}(k),{\bm{a}})}{\partial{\bm{W}}(k)},$ $$

where $\eta>0$ denotes the learning rate. We denote by

$$ ${\bm{u}}(k)=(\Phi({\bm{x}}_{1}),\ldots,\Phi({\bm{x}}_{N}))\in\mathbb{R}^{N}$ $$

the prediction vector after $k$ steps of gradient descent. Our main result in this section relies on an assumption regarding the smallest eigenvalue of the Gram matrix, so we briefly recall this concept here.

###### Definition 1 (Gram matrix) .

The Gram matrix ${\bm{H}}^{\infty}\in\mathbb{R}^{N\times N}$ is defined by

$$ ${H}^{\infty}_{ij}=\mathbb{E}_{{\bm{w}}\sim\mathcal{N}(0,1)^{n}}\left[{\bm{x}}_{i}^{\top}{\bm{x}}_{j}1_{\{{\bm{w}}^{\top}{\bm{x}}_{i}\geq 0,{\bm{w}}^{\top}{\bm{x}}_{j}\geq 0\}}\right].$ $$

We denote by $\lambda_{0}=\lambda_{min}({\bm{H}}^{\infty})$ the smallest eigenvalue of the Gram matrix.

###### Remark .

If ${\bm{x}}_{i}\not\parallel{\bm{x}}_{j}$ for all $i\neq j$, then $\lambda_{0}>0$. Since this condition is typically satisfied in real-world datasets, the assumption $\lambda_{0}>0$ is not restrictive in practice.

Assuming that the smallest eigenvalue of the Gram matrix is strictly positive, Du et al. [2018] proved that gradient descent converges to a global minimum at a linear rate.

###### Theorem A.8 ( [Du et al., 2018 ] ) .

Suppose that $\lambda_{0}>0$ and $\|{\bm{x}}_{i}\rVert=1$ and $|y_{i}|\leq C$ for all $i=1,\ldots,N$. Assume that the width $m=\Omega\left(\frac{N^{6}}{\lambda_{0}^{4}\delta^{3}}\right)$, and ${W}_{ij}\sim\mathcal{N}(0,1)$, ${a}_{i}\sim Unif(\{-1,1\})$, and set the step size $\eta=\mathcal{O}\left(\frac{\lambda_{0}}{N^{2}}\right)$. Then, with probability at least $1-\delta$ we obtain

$$ $\lVert{\bm{u}}(k)-{\bm{y}}\rVert^{2}\leq\left(1-\frac{\eta\lambda_{0}}{2}\right)^{k}\lVert{\bm{u}}(0)-{\bm{y}}\rVert^{2}.$ $$

###### Remark .

The assumption $\lVert{\bm{x}}_{i}\rVert=1$ can be easily relaxed. If the inputs satisfy $0<c\leq\lVert{\bm{x}}_{i}\rVert\leq C$ for all $i=1,\ldots,N$, then the result still holds, but the required network width will now also depend on the ratio $\frac{C}{c}$.

Using this, Du et al. [2018] prove that the weight matrix remains close to its initialization throughout training.

###### Corollary A.9 .

Assume that the assumptions of Theorem [A.8](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem8) are satisfied. Then, with probability at least $1-\delta$, we have for all $k\geq 0$ and every row index $r\in\{1,\ldots,m\}$ that

$$ $\lVert{\bm{W}}_{r,:}(k)-{\bm{W}}_{r,:}(0)\rVert\leq\frac{4\sqrt{N}}{\sqrt{m}\lambda_{0}}\lVert{\bm{u}}(0)-{\bm{y}}\rVert,$ $$

where ${\bm{W}}_{r,:}(k)$ denotes the $r$-th row of the weight matrix ${\bm{W}}(k)$.

We are now almost ready to prove that, even after an arbitrary number of gradient descent steps, the network remains unable to alter the feature geometry encoded in the graph structures before the application of the nonlinearity. To this end, we introduce one final technical lemma.

###### Lemma A.10 .

Let ${\bm{A}}\in\mathbb{R}^{m\times n}$ satisfying $\lVert{\bm{A}}_{r,:}\rVert\leq\epsilon$ for every $r\in\{1,\ldots,m\}$. For ${\bm{x}}\in\mathbb{R}^{n}$, we obtain the following upper bound

$$ $\lVert{\bm{A}}{\bm{x}}\rVert\leq\sqrt{m}\epsilon\lVert{\bm{x}}\rVert.$ $$

###### Proof.

This follows immediately from the Cauchy-Schwarz inequality:

$$ $\lVert{\bm{A}}{\bm{x}}\rVert^{2}=\sum_{r=1}^{m}\langle{\bm{A}}_{r,:},{\bm{x}}\rangle^{2}\leq\sum_{r=1}^{m}\lVert{\bm{A}}_{r,:}\rVert^{2}\lVert{\bm{x}}\rVert^{2}\leq m\epsilon^{2}\lVert{\bm{x}}\rVert^{2}.$ $$

Taking the square root on both sides completes the proof.
∎

We now show that with large probability, sufficiently wide networks cannot alter the geometry of the k-nearest neighbor graph before the activation function is applied, regardless of the number of gradient descent steps performed. This highlights the crucial role of the non-linearity.

###### Theorem 3.2 .

Let $X\subset\mathbb{R}^{n}$ be a finite set, and assume there exists $0<\epsilon<1$ such that

$$ $\min_{\begin{subarray}{c}Y\subset X\setminus\{x\}\\ |Y|=k\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert\leq\frac{1-\epsilon}{1+\epsilon}\min_{\begin{subarray}{c}Y\subset X\setminus\{x\}\\ |Y|=k+1\end{subarray}}\max_{y\in Y}\lVert{\bm{x}}-{\bm{y}}\rVert\quad\forall{\bm{x}}\in X.$ $$

Assume that the assumptions of Theorem [A.8](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem8) are satisfied. Furthermore, assume that

$$ $m\geq\frac{64N\lVert{\bm{u}}(0)-{\bm{y}}\rVert^{2}}{\epsilon^{2}\lambda_{0}^{2}}.$ $$

Then, for any number of gradient descent steps $l\geq 0$, the map

$$ $\psi:X\to X(l):=\left\{\frac{1}{\sqrt{m}}{\bm{W}}(l){\bm{x}}:{\bm{x}}\in X\right\};\quad\psi({\bm{x}})=\frac{1}{\sqrt{m}}{\bm{W}}(l){\bm{x}}$ $$

is a graph isomorphism between ${\mathcal{G}}_{k}(X)$ and ${\mathcal{G}}_{k}(X(l))$ with probability bounded from below by

$$ $\mathbb{P}({\mathcal{G}}_{k}(X)\cong{\mathcal{G}}_{k}(X(l))\;\text{under}\;\psi)\geq 1-\delta-|X|(|X|-1)e^{\frac{m}{4}\left(\frac{\epsilon^{3}}{8}-\frac{\epsilon^{2}}{4}\right)}.$ $$

###### Proof.

For ease of notation, we define ${\bm{A}}(l)=\frac{1}{\sqrt{m}}{\bm{W}}(l)$. Note that the matrix ${A}(0)$ has i.i.d. entries with $A(0)_{ij}\sim\mathcal{N}(0,1/m)$.
We first show that $\psi$ is a graph isomorphism, if

$$ $(1-\frac{\epsilon}{2})\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\lVert{\bm{A}}(0)({\bm{x}}-{\bm{y}})\rVert^{2}\leq(1+\frac{\epsilon}{2})\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\quad\forall{\bm{x}},{\bm{y}}\in X,$ (5) $$

and for every $l\geq 0$ and every row index $r\in\{1,\ldots,m\}$

$$ $\lVert{\bm{W}}_{r,:}(l)-{\bm{W}}_{r,:}(0)\rVert\leq\frac{4\sqrt{N}}{\sqrt{m}\lambda_{0}}\lVert{\bm{u}}(0)-{\bm{y}}\rVert.$ (6) $$

To this end, observe that, for any ${\bm{x}}\in\mathbb{R}^{n}$, we have

$$ $\lVert({\bm{A}}(l)-{\bm{A}}(0)){\bm{x}}\rVert=\frac{1}{\sqrt{m}}\lVert({\bm{W}}(l)-{\bm{W}}(0))x\rVert\leq\frac{4\sqrt{N}}{\sqrt{m}\lambda_{0}}\lVert{\bm{u}}(0)-{\bm{y}}\rVert\lVert{\bm{x}}\rVert\leq\frac{\epsilon}{2}\lVert{\bm{x}}\rVert,$ $$

where the first inequality is a consequence of Lemma [A.10](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem10), and the second follows from our assumption on $m$. Using these inequalities, we obtain

$$ $\displaystyle\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert$ $\displaystyle\leq\lVert({\bm{A}}(l)-{\bm{A}}(0))({\bm{x}}-{\bm{y}})\rVert+\lVert{\bm{A}}(0)({\bm{x}}-{\bm{y}})\rVert$ $\displaystyle\leq\frac{\epsilon}{2}\lVert{\bm{x}}-{\bm{y}}\rVert+\sqrt{1+\frac{\epsilon}{2}}\lVert{\bm{x}}-{\bm{y}}\rVert$ $\displaystyle\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert$ $$

for all ${\bm{x}},{\bm{y}}\in X$. On the other hand, using the reverse triangle inequality, we obtain

$$ $\displaystyle\lVert({\bm{A}}(l){\bm{x}}-{\bm{A}}(l)){\bm{y}}\rVert$ $\displaystyle\geq\Big|\lVert{\bm{A}}(0)({\bm{x}}-{\bm{y}})\rVert-\lVert({\bm{A}}(l)-{\bm{A}}(0))({\bm{x}}-{\bm{y}})\rVert\Big|$ $\displaystyle\geq\sqrt{1-\frac{\epsilon}{2}}\lVert{\bm{x}}-{\bm{y}}\rVert-\frac{\epsilon}{2}\|{\bm{x}}-{\bm{y}}\rVert$ $\displaystyle\geq(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert.$ $$

for all ${\bm{x}},{\bm{y}}\in X$.

We are now prepared to prove that $\psi$ is a graph isomorphism. To this end, let ${\bm{x}}\sim{\bm{y}}$ be an arbitrary edge in $\mathcal{G}_{k}(X)$. Without loss of generality, we may assume that ${\bm{y}}$ is among the $k$-nearest neighbors of ${\bm{x}}$. We claim that $\psi({\bm{y}})$ is among the $k$-nearest neighbors of $\psi({\bm{x}})$. Assume this is not the case. Hence, there exists a ${\bm{z}}\in X$, which is not among the $k$-nearest neighbors of ${\bm{x}}$, such that

$$ $\lVert\psi({\bm{x}})-\psi({\bm{z}})\rVert=\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{z}}\rVert<\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert=\lVert\psi({\bm{x}})-\psi({\bm{y}})\rVert.$ $$

This contradicts

$$ $\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert\leq(1-\epsilon)\lVert{\bm{x}}-{\bm{z}}\rVert\leq\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{z}}\rVert,$ $$

where we applied our assumption on $\epsilon$ to obtain the second inequality. Therefore, our assumption is false, implying that $\psi({\bm{y}})$ belongs to the $k$-nearest neighbors of $\psi({\bm{x}})$ and therefore $\psi({\bm{x}})\sim\psi({\bm{y}})$ in ${\mathcal{G}}_{k}(X(l))$.

Conversely, let $\psi({\bm{x}})\sim\psi({\bm{y}})$ be an arbitrary edge in ${\mathcal{G}}_{k}(X(l))$, and assume without loss of generality that $\psi({\bm{y}})$ is among the $k$-nearest neighbors of $\psi({\bm{x}})$. It remains to show that ${\bm{x}}\sim{\bm{y}}$ in ${\mathcal{G}}_{k}(X)$. Assume for contradiction that this is not the case. Hence, there exists ${\bm{z}}\in X$ among the $k$-nearest neighbors of ${\bm{x}}$ such that

$$ $\lVert\psi({\bm{x}})-\psi({\bm{z}})\rVert=\|{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{z}}\rVert>\lVert\psi({\bm{x}})-\psi({\bm{y}})\rVert=\|{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert.$ $$

This contradicts our assumption, since

$$ $\|{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{z}}\rVert\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{z}}\rVert\leq(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert\leq\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert,$ $$

where we again applied our assumption on $\epsilon$ to obtain the second inequality. Thus, the assumption is contradicted, and ${\bm{x}}\sim{\bm{y}}$ in ${\mathcal{G}}_{k}(X)$ must hold.

Hence, $\psi$ is a graph isomorphism between $\mathcal{G}_{k}(X)$ and $\mathcal{G}_{k}(X(l))$, provided that ([5](https://arxiv.org/html/2509.22362v1#A1.E5)) and ([6](https://arxiv.org/html/2509.22362v1#A1.E6)) hold. According to Corollary [A.5](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem5), the probability that ([5](https://arxiv.org/html/2509.22362v1#A1.E5)) holds is bounded from below by

$$ $1-|X|(|X|-1)\exp\left(\frac{m}{4}\left(\frac{\epsilon^{3}}{8}-\frac{\epsilon^{2}}{4}\right)\right).$ $$

On the other hand, by Corollary [A.9](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem9), we know that the probability that ([6](https://arxiv.org/html/2509.22362v1#A1.E6)) holds is bounded from below by $1-\delta$. The claim now follows from the Bonferroni inequality.
∎

An analogous result can also be established for $r$-neighborhood graphs.

###### Theorem A.11 .

Let $X\subset\mathbb{R}^{n}$ be a finite set, and denote by $N({\bm{x}})$ the one-hop neighborhood of ${\bm{x}}$ in $G_{r}(X)$. Choose $0<\epsilon<1$ such that

$$ $\epsilon<\min\left\{\frac{r-\max_{{\bm{y}}\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert}{\max_{{\bm{y}}\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert},\frac{\min_{{\bm{y}}\not\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert-r}{\min_{{\bm{y}}\not\in N({\bm{x}})}\lVert{\bm{x}}-{\bm{y}}\rVert}\right\}\quad\forall{\bm{x}}\in X.$ $$

Assume that the assumptions of Theorem [A.8](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem8) are satisfied. Furthermore, assume that

$$ $m\geq\frac{64N\lVert{\bm{u}}(0)-{\bm{y}}\rVert^{2}}{\epsilon^{2}\lambda_{0}^{2}}.$ $$

Then, for any number of gradient descent steps $l\geq 0$, the map

$$ $\psi:X\to X(l):=\left\{\frac{1}{\sqrt{m}}{\bm{W}}(l){\bm{x}}:{\bm{x}}\in X\right\};\quad\psi({\bm{x}})=\frac{1}{\sqrt{m}}{\bm{W}}(l){\bm{x}}$ $$

is a graph isomorphism between $G_{r}(X)$ and $G_{r}(X(l))$ with probability bounded from below by

$$ $\mathbb{P}(G_{r}(X)\cong G_{r}(X(l))\;\text{under}\;\psi)\geq 1-\delta-|X|(|X|-1)e^{\frac{m}{4}\left(\frac{\epsilon^{3}}{8}-\frac{\epsilon^{2}}{4}\right)}.$ $$

###### Proof.

For ease of notation, we define ${\bm{A}}(l)=\frac{1}{\sqrt{m}}{\bm{W}}(l)$. Note that the matrix ${\bm{A}}(0)$ has i.i.d. entries with ${\bm{A}}(0)_{ij}\sim\mathcal{N}(0,1/m)$.
We first show that $\psi$ is a graph isomorphism, if

$$ $(1-\frac{\epsilon}{2})\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\leq\lVert{\bm{A}}(0)({\bm{x}}-{\bm{y}})\rVert^{2}\leq(1+\frac{\epsilon}{2})\lVert{\bm{x}}-{\bm{y}}\rVert^{2}\quad\forall{\bm{x}},{\bm{y}}\in X,$ (7) $$

and for every $l\geq 0$ and every row index $r\in\{1,\ldots,m\}$

$$ $\lVert{\bm{W}}_{r,:}(l)-{\bm{W}}_{r,:}(0)\rVert\leq\frac{4\sqrt{N}}{\sqrt{m}\lambda_{0}}\lVert{\bm{u}}(0)-{\bm{y}}\rVert.$ (8) $$

By employing the same reasoning as in Theorem [3.2](https://arxiv.org/html/2509.22362v1#S3.Thmtheorem2), it follows that

$$ $(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert\leq\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert$ $$

holds for every ${\bm{x}},{\bm{y}}\in X$ and $l\geq 0$.

We now proceed to show that $\psi$ is a graph isomorphism. To this end, let ${\bm{x}}\sim{\bm{y}}$ be an arbitrary edge in $G_{r}(X)$. Using our upper bound, we obtain

$$ $\lVert\psi({\bm{x}})-\psi({\bm{y}})\rVert=\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert\leq(1+\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert<r,$ $$

by our assumption on $\epsilon$. Therefore, we conclude $\psi({\bm{x}})\sim\psi({\bm{y}})$ in $G_{r}(X(l))$. Conversely, consider an arbitrary edge $\psi({\bm{x}})\sim\psi({\bm{y}})$ in $G_{r}(X(l))$. It remains to show that ${\bm{x}}\sim{\bm{y}}$ in $G_{r}(X)$. Assume this is not the case. Hence, $\lVert{\bm{x}}-{\bm{y}}\rVert>r$ and therefore

$$ $\lVert\psi({\bm{x}})-\psi({\bm{y}})\rVert=\lVert{\bm{A}}(l){\bm{x}}-{\bm{A}}(l){\bm{y}}\rVert\geq(1-\epsilon)\lVert{\bm{x}}-{\bm{y}}\rVert>r,$ $$

contradicting $\psi({\bm{x}})\sim\psi({\bm{y}})$.

Hence, $\psi$ is a graph isomorphism between $G_{r}(X)$ and $G_{r}(X(l))$, provided that ([7](https://arxiv.org/html/2509.22362v1#A1.E7)) and ([8](https://arxiv.org/html/2509.22362v1#A1.E8)) hold. Again, according to Corollary [A.5](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem5), the probability that ([7](https://arxiv.org/html/2509.22362v1#A1.E7)) holds is bounded from below by

$$ $1-|X|(|X|-1)\exp\left(\frac{m}{4}\left(\frac{\epsilon^{3}}{8}-\frac{\epsilon^{2}}{4}\right)\right).$ $$

On the other hand, by Corollary [A.9](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem9), we know that the probability that ([8](https://arxiv.org/html/2509.22362v1#A1.E8)) holds is bounded from below by $1-\delta$. The claim now follows from the Bonferroni inequality.
∎

###### Definition 1 (Gram matrix) .

###### Remark .

###### Theorem A.8 ( [Du et al., 2018 ] ) .

###### Remark .

###### Corollary A.9 .

###### Lemma A.10 .

###### Proof.

###### Theorem 3.2 .

###### Proof.

###### Theorem A.11 .

###### Proof.

#### A.3.3 Impact of nonlinearity on feature geometry

We have seen that, in wide linear networks, the feature geometry captured by the graph structures remains unchanged, as the learned weight matrices act approximately as isometries. In this section, we show that this behavior changes once a ReLU activation is introduced. Specifically, we prove that, even when the weight
matrices are exact isometries, adding the ReLU nonlinearity is sufficient to change the geometry of the feature manifolds.

It is a standard result from linear algebra that the linear isometries of $\mathbb{R}^{n}$ correspond precisely to the set of orthogonal matrices, denoted by $\mathrm{O}(n)$, defined as

$$ $\mathrm{O}(n)=\{{\bm{A}}\in\mathbb{R}^{n\times n}:{\bm{A}}^{\top}{\bm{A}}={\bm{I}}_{n}\}.$ $$

The proof of the main theorem of this section relies on the following lemma.

###### Lemma A.12 .

Let ${\bm{x}}\in\mathbb{R}^{n}$ be arbitrary. Then, there exists a linear isometry ${\bm{A}}\in\mathrm{O}(n)$ such that

$$ ${\bm{A}}{\bm{x}}=(\lVert{\bm{x}}\rVert,0,\ldots,0)^{\top}.$ $$

###### Proof.

If $\lVert{\bm{x}}\rVert=0$, the claim holds for every linear isometry ${\bm{A}}\in\mathrm{O}(n)$. Hence, assume $\lVert{\bm{x}}\rVert>0$, and define the normalized vector

$$ ${\bm{u}}_{1}=\frac{{\bm{x}}}{\lVert{\bm{x}}\rVert}.$ $$

Using the Basis Extension Theorem and the Gram-Schmidt Process, we can extend the set $\{{\bm{u}}_{1}\}$ to an orthogonal basis $\{{\bm{u}}_{1},\ldots,{\bm{u}}_{n}\}$ of $\mathbb{R}^{n}$. Then, the matrix

$$ ${\bm{A}}=\begin{pmatrix}{\bm{u}}_{1}^{\top}\\ \vdots\\ {\bm{u}}_{n}^{\top}\end{pmatrix}\in\mathrm{O}(n)$ $$

satisfies ${\bm{A}}{\bm{x}}=(\lVert{\bm{x}}\rVert,0,\ldots,0)^{\top}$ by construction.
∎

We are now prepared to prove the main theorem of this section.

###### Theorem 3.3 .

Let ${\bm{x}},{\bm{y}},{\bm{z}}\in\mathbb{R}^{n}$, such that ${\bm{z}}\not\in\operatorname{span}\{{\bm{x}},{\bm{y}}\}$ and

$$ $\lVert{\bm{x}}-{\bm{y}}\rVert\geq\lVert{\bm{x}}-{\bm{z}}\rVert.$ $$

Then, for $m\geq n$, there exists a linear isometry ${\bm{A}}\in\mathbb{R}^{m\times n}$ and a bias vector ${\bm{b}}\in\mathbb{R}^{m}$, such that

$$ $\lVert\sigma({\bm{A}}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}{\bm{y}}+{\bm{b}})<\lVert\sigma({\bm{A}}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}{\bm{z}}+{\bm{b}})\rVert.$ $$

###### Remark .

As shown above, a wide linear neural network cannot change the geometry of the features, since its weight matrices are almost isometries. However, as Theorem [3.3](https://arxiv.org/html/2509.22362v1#S3.Thmtheorem3) demonstrates, this is no longer the case once the ReLU activation function is introduced: for any three vertices, the ordering of their pairwise distances can be altered by applying an orthogonal matrix followed by the ReLU activation, thereby rewiring the $k$-nearest neighbor graph.

###### Proof.

Without loss of generality, we may assume $m=n$. In the case $m>n$, any $n$-dimensional vector can be embedded into $\mathbb{R}^{m}$ by appending $m-n$ zero coordinates. If $\lVert{\bm{x}}\rVert=0$, then by assumption $\lVert{\bm{y}}\rVert>0$ must hold. According to Lemma [A.12](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem12), there exists ${\bm{A}}_{1}\in\mathrm{O}(n)$, such that

$$ ${\bm{A}}_{1}{\bm{y}}=(-\lVert{\bm{y}}\rVert,0,\ldots,0)^{\top}.$ $$

By assumption, we have ${\bm{z}}\not\in\operatorname{span}\{{\bm{x}},{\bm{y}}\}=\operatorname{span}\{{\bm{y}}\}$. Therefore, there exists $i\in\{2,\ldots,n\}$ such that $({\bm{A}}_{1}{\bm{z}})_{i}\neq 0$. Without loss of generality, we may assume that $({\bm{A}}_{1}{\bm{z}})_{i}>0$. Choose ${\bm{b}}$ to be the zero vector in $\mathbb{R}^{n}$. Then,

$$ $\lVert\sigma({\bm{A}}_{1}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}_{1}{\bm{y}}+{\bm{b}})\rVert=0<(({\bm{A}}_{1}{\bm{z}})_{i})^{2}\leq\|\sigma({\bm{A}}_{1}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}_{1}{\bm{z}}+{\bm{b}})\rVert.$ $$

Thus, we may assume $\lVert x\rVert>0$.

According to Lemma [A.12](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem12), there exists ${\bm{A}}_{1}\in\mathrm{O}(n)$, such that

$$ ${\bm{A}}_{1}{\bm{x}}=(-\lVert{\bm{x}}\rVert,0,\ldots,0)^{\top}.$ $$

The proof proceeds by cases.

Case 1: ${\bm{y}}\in\operatorname{span}\{{\bm{x}}\}$. Hence, there exists $\alpha\in\mathbb{R}$ such that ${\bm{y}}=\alpha{\bm{x}}$. Thus, we obtain

$$ ${\bm{A}}_{1}{\bm{y}}=(-\alpha\lVert{\bm{x}}\rVert,0,\ldots,0).$ $$

By assumption, we have ${\bm{z}}\not\in\operatorname{span}\{{\bm{x}}\}$. Therefore, there exists $i\in\{2,\ldots,n\}$ such that $({\bm{A}}_{1}{\bm{z}})_{i}\neq 0$. Without loss of generality, we may assume that $({\bm{A}}_{1}{\bm{z}})_{i}>0$. Define the bias vector

$$ ${\bm{b}}=\begin{cases}(\alpha\lVert{\bm{x}}\rVert,0,\ldots,0),&\text{if }\alpha<0,\[4.30554pt] \mathbf{0},&\text{otherwise,}\end{cases}$ $$

where $\mathbf{0}\in\mathbb{R}^{n}$ denotes the zero vector. Thus, by construction, we obtain

$$ $\lVert\sigma({\bm{A}}_{1}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}_{1}{\bm{y}}+{\bm{b}})\rVert=0<(({\bm{A}}_{1}{\bm{z}})_{i})^{2}\leq\|\sigma({\bm{A}}_{1}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}_{1}{\bm{z}}+{\bm{b}})\rVert.$ $$

Case 2: ${\bm{y}}\not\in\operatorname{span}\{{\bm{x}}\}$.
Denote by

$$ $({\bm{A}}_{1}{\bm{y}})_{-1}=(({\bm{A}}_{1}{\bm{y}})_{2},\ldots,({\bm{A}}_{1}{\bm{y}})_{n})\in\mathbb{R}^{n-1}$ $$

the vector obtained from ${\bm{A}}_{1}{\bm{y}}$ by removing its first coordinate. Note that $\lVert({\bm{A}}_{1}{\bm{y}})_{-1}\rVert>0$, since ${\bm{y}}\not\in\operatorname{span}\{{\bm{x}}\}$. Define

$$ $\tilde{{\bm{u}}}_{1}=\frac{({\bm{A}}_{1}{\bm{y}})_{-1}}{\lVert({\bm{A}}_{1}{\bm{y}})_{-1}\rVert}.$ $$

and ${\bm{u}}_{1}=(0,-\tilde{{\bm{u}}}_{1})\in\mathbb{R}^{n}$, so that the first coordinate of ${\bm{u}}_{1}$ is zero and the remaining coordinates are given by $\tilde{{\bm{u}}}_{1}$.

Denote by ${\bm{e}}^{(i)}$ the $i$-th standard basis vector. The set $\{{\bm{e}}^{(1)},{\bm{u}}_{1}\}$ forms an orthonormal system and can therefore be extended to an orthonormal basis $\{{\bm{e}}^{(1)},{\bm{u}}_{1},\ldots,{\bm{u}}_{n-1}\}$ of $\mathbb{R}^{n}$ using the Basis Extension Theorem together with the Gram–Schmidt Process. Note that for every $i\in\{1,\ldots,n-1\}$, we have $\langle{\bm{u}}_{i},{\bm{e}}^{(1)}\rangle=0$, and therefore $\langle{\bm{u}}_{i},{\bm{A}}_{1}{\bm{x}}\rangle=0$. Define the matrix

$$ ${\bm{A}}_{2}=\begin{pmatrix}{\bm{e}}^{(1)\top}\\ {\bm{u}}_{1}^{\top}\\ \vdots\\ {\bm{u}}_{n-1}^{\top}\end{pmatrix}\in O(n)\quad\text{and}\quad{\bm{A}}={\bm{A}}_{2}{\bm{A}}_{1}\in\mathrm{O}(n).$ $$

By construction, we obtain

$$ ${\bm{A}}{\bm{x}}=(-\lVert{\bm{x}}\rVert,0,\ldots,0)^{\top}\quad\text{and}\quad{\bm{A}}{\bm{y}}=(({\bm{A}}_{1}{\bm{y}})_{1},-\lVert({\bm{A}}_{1}{\bm{y}})_{-1}\rVert,0,\ldots,0).$ $$

By assumption, we have ${\bm{z}}\not\in\operatorname{span}\{{\bm{x}},{\bm{y}}\}$. Hence, there exists $i\in\{3,\ldots,n\}$ such that $({\bm{A}}{\bm{z}})_{i}\neq 0$. Without loss of generality, we may assume that $({\bm{A}}{\bm{z}})_{i}>0$.

Finally, define the bias vector

$$ ${\bm{b}}=\begin{cases}(-({\bm{A}}_{1}{\bm{y}})_{1},0,\ldots,0),&\text{if }({\bm{A}}_{1}{\bm{y}})_{1}>0,\[4.30554pt] \mathbf{0},&\text{otherwise.}\end{cases}$ $$

Therefore, by construction, we obtain

$$ $\lVert\sigma({\bm{A}}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}{\bm{y}}+{\bm{b}})\rVert=0<(({\bm{A}}{\bm{z}})_{i})^{2}\leq\|\sigma({\bm{A}}{\bm{x}}+{\bm{b}})-\sigma({\bm{A}}{\bm{z}}+{\bm{b}})\rVert.$ $$

∎

###### Lemma A.12 .

###### Proof.

###### Theorem 3.3 .

###### Remark .

###### Proof.

### A.4 Additional experimental results

#### A.4.1 Experimental confirmation of theoretical insights

We supplement the theoretical results of Section [3.1](https://arxiv.org/html/2509.22362v1#S3.SS1) with experimental validation. Specifically, we sample points uniformly from the $d$-dimensional unit ball and construct $k$-nearest neighbor graphs on these point clouds. Note that any point cloud can be rescaled to the unit ball without altering its $k$-nearest neighbor graph, ensuring generality of this setup. For varying network widths, we apply randomly initialized linear neural networks and test whether the induced graphs remain isomorphic to the original ones. Figure [7](https://arxiv.org/html/2509.22362v1#A1.F7) reports the proportion of linear neural networks that preserve the $k$-nearest neighbor and $r$-neighborhood graphs across different widths. For each width, 1,000 linear neural networks were independently initialized. Consistent with our theoretical predictions, the preservation probability converges to one as the width increases. The faster convergence observed for $r$-neighborhood graphs is explained by the fact that the maximal $\epsilon$ satisfying the condition of Theorem [A.6](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem6) was larger than the corresponding bound from Theorem [3.1](https://arxiv.org/html/2509.22362v1#S3.Thmtheorem1).

Across all experiments, we find that the network widths required for the estimated probabilities to exceed a given threshold $1-\delta$ are in practice smaller than the widths for which Theorems [3.1](https://arxiv.org/html/2509.22362v1#S3.Thmtheorem1) and [A.6](https://arxiv.org/html/2509.22362v1#A1.Thmtheorem6) guarantee this.
This is expected, since the proofs rely on Boole’s inequality, which generally does not provide a tight bound for the probability of a union.

Figure: Figure 7: Proportion of linear neural networks that preserve the $k$-nearest neighbor and $r$-neighborhood graphs, constructed from the feature manifolds, across different network widths. The graphs are built from a point cloud of 50 samples in the 3-dimensional unit ball. We consider the 5-nearest neighbor graph, and for the $r$-neighborhood graph we set the radius equal to 0.3.
Refer to caption: Figures/feature_geometry_experiments.png

#### A.4.2 Local Ricci evolution coefficients

In this subsection, we present additional experimental results for the computation of local Ricci evolution coefficients. In addition to the Ollivier-Ricci curvature, we also compute the coefficients using the augmented Forman curvature and the approximation of Ollivier-Ricci curvature proposed by Tian et al. [2025]. For all curvature notions, we evaluate both our synthetic and real-world datasets by training deep neural networks of varying width and depth and subsequently computing the local Ricci evolution coefficients. We average our results over 50 independently trained networks for each dataset-architecture pair, to account for the inherent randomness in neural network training, making sure our observed patterns are robust rather than accidental.

Figure: Figure 8: Distribution of local Ricci evolution coefficients for networks of depth 15 and width 50 on real-world datasets, shown for augmented Forman–Ricci curvature (top row) and Ollivier–Ricci curvature (bottom row).
Refer to caption: Figures/ricci_coefficients_distribution.png

Results on real-world datasets using augmented Forman curvature and approximated Ollivier curvature are reported in Table [4](https://arxiv.org/html/2509.22362v1#A1.T4) and Table [5](https://arxiv.org/html/2509.22362v1#A1.T5), respectively. In all cases, we observe strongly negative local Ricci evolution coefficients, highlighting pronounced curvature-driven dynamics in the evolution of feature geometry. To further support this finding, we evaluate the proportion of vertices with negative local coefficients, consistently showing that the vast majority of vertices exhibit such behavior. Hence, curvature-driven dynamics appear almost universally across the data manifold. Figure [8](https://arxiv.org/html/2509.22362v1#A1.F8) shows the entire distribution of local Ricci evolution coefficients on the real-world datasets for both Ollivier–Ricci curvature and augmented Forman-Ricci curvature. Complementary results on synthetic datasets are provided in Table [6](https://arxiv.org/html/2509.22362v1#A1.T6) for Ollivier-Ricci curvature, in Table [7](https://arxiv.org/html/2509.22362v1#A1.T7) for augmented Forman-Ricci curvature, and in Table [8](https://arxiv.org/html/2509.22362v1#A1.T8) for approximated Ollivier-Ricci curvature. The results are consistent with those observed on the real-world datasets.

Furthermore, we observe consistent results for all three discretizations of Ricci curvature. The numerical values obtained using the augmented Forman-Ricci curvature and the approximation of the Ollivier-Ricci curvature are nearly identical, which is expected since both curvature notions are primarily influenced by three-cycles. Moreover, Jost and Münch [2021] show that Ollivier–Ricci curvature coincides with the maximal Forman curvature over cell complexes having the given graph as their 1-skeleton, providing a theoretical explanation for the close agreement observed across the different notions.

**Table 4: Average local Ricci evolution coefficients, computed using augmented Forman curvature, on real-world data. Values are means $\pm$ standard deviations over 50 independently trained networks per architecture; proportion of vertices with negative coefficients is reported in parentheses. Networks were randomly initialized.**
| (Width,Depth) | MNIST-1v7 | MNIST-6v9 | FMNIST-SvS | FMNIST-SvD | CIFAR |
| --- | --- | --- | --- | --- | --- |
| $(15,7)$ | $-0.82\pm 0.06\,(98.5\%)$ | $-0.79\pm 0.09\,(97.5\%)$ | $-0.81\pm 0.08\,(98.7\%)$ | $-0.53\pm 0.13\,(91.2\%)$ | $-0.73\pm 0.11\,(98.2\%)$ |
| $(15,10)$ | $-0.83\pm 0.05\,(99.3\%)$ | $-0.83\pm 0.06\,(99.5\%)$ | $-0.82\pm 0.06\,(99.8\%)$ | $-0.58\pm 0.16\,(94.0\%)$ | $-0.76\pm 0.15\,(97.5\%)$ |
| $(15,15)$ | $-0.84\pm 0.05\,(99.8\%)$ | $-0.88\pm 0.03\,(99.9\%)$ | $-0.86\pm 0.05\,(99.9\%)$ | $-0.66\pm 0.13\,(97.5\%)$ | $-0.79\pm 0.21\,(97.4\%)$ |
| $(25,7)$ | $-0.80\pm 0.05\,(97.8\%)$ | $-0.69\pm 0.18\,(94.0\%)$ | $-0.80\pm 0.04\,(99.5\%)$ | $-0.54\pm 0.11\,(91.9\%)$ | $-0.69\pm 0.13\,(96.7\%)$ |
| $(25,10)$ | $-0.83\pm 0.07\,(99.0\%)$ | $-0.83\pm 0.06\,(99.4\%)$ | $-0.83\pm 0.05\,(99.8\%)$ | $-0.62\pm 0.12\,(96.2\%)$ | $-0.80\pm 0.09\,(99.3\%)$ |
| $(25,15)$ | $-0.83\pm 0.05\,(99.8\%)$ | $-0.85\pm 0.04\,(99.9\%)$ | $-0.85\pm 0.04\,(100\%)$ | $-0.74\pm 0.07\,(99.4\%)$ | $-0.90\pm 0.03\,(99.9\%)$ |
| $(50,7)$ | $-0.81\pm 0.04\,(98.3\%)$ | $-0.61\pm 0.16\,(91.1\%)$ | $-0.79\pm 0.04\,(99.3\%)$ | $-0.58\pm 0.10\,(92.9\%)$ | $-0.76\pm 0.08\,(98.8\%)$ |
| $(50,10)$ | $-0.84\pm 0.03\,(99.7\%)$ | $-0.79\pm 0.09\,(98.5\%)$ | $-0.84\pm 0.05\,(99.8\%)$ | $-0.70\pm 0.12\,(97.2\%)$ | $-0.87\pm 0.03\,(100\%)$ |
| $(50,15)$ | $-0.83\pm 0.04\,(99.9\%)$ | $-0.86\pm 0.05\,(99.9\%)$ | $-0.88\pm 0.02\,(100\%)$ | $-0.80\pm 0.06\,(100\%)$ | $-0.91\pm 0.02\,(100\%)$ |

**Table 5: Average local Ricci evolution coefficients, computed using approximated Ollivier curvature, on real-world data. Values are means $\pm$ standard deviations over 50 independently trained networks per architecture; proportion of vertices with negative coefficients is reported in parentheses. Networks were randomly initialized.**
| (Width,Depth) | MNIST-1v7 | MNIST-6v9 | FMNIST-SvS | FMNIST-SvD | CIFAR |
| --- | --- | --- | --- | --- | --- |
| $(15,7)$ | $-0.75\pm 0.21\,(94.6\%)$ | $-0.76\pm 0.12\,(96.4\%)$ | $-0.77\pm 0.07\,(98.8\%)$ | $-0.50\pm 0.13\,(89.5\%)$ | $-0.66\pm 0.13\,(96.5\%)$ |
| $(15,10)$ | $-0.82\pm 0.05\,(99.5\%)$ | $-0.84\pm 0.04\,(99.7\%)$ | $-0.77\pm 0.06\,(99.7\%)$ | $-0.54\pm 0.16\,(92.7\%)$ | $-0.69\pm 0.16\,(96.4\%)$ |
| $(15,15)$ | $-0.83\pm 0.04\,(99.8\%)$ | $-0.83\pm 0.07\,(99.1\%)$ | $-0.81\pm 0.06\,(99.9\%)$ | $-0.64\pm 0.14\,(97.0\%)$ | $-0.75\pm 0.18\,(97.2\%)$ |
| $(25,7)$ | $-0.79\pm 0.05\,(98.1\%)$ | $-0.66\pm 0.20\,(92.3\%)$ | $-0.76\pm 0.04\,(99.2\%)$ | $-0.50\pm 0.12\,(90.0\%)$ | $-0.62\pm 0.15\,(94.6\%)$ |
| $(25,10)$ | $-0.81\pm 0.04\,(99.4\%)$ | $-0.82\pm 0.05\,(99.6\%)$ | $-0.78\pm 0.04\,(99.6\%)$ | $-0.59\pm 0.12\,(95.3\%)$ | $-0.74\pm 0.10\,(98.9\%)$ |
| $(25,15)$ | $-0.81\pm 0.06\,(99.8\%)$ | $-0.84\pm 0.03\,(100\%)$ | $-0.79\pm 0.04\,(100\%)$ | $-0.72\pm 0.08\,(99.2\%)$ | $-0.86\pm 0.04\,(99.9\%)$ |
| $(50,7)$ | $-0.79\pm 0.04\,(98.5\%)$ | $-0.57\pm 0.21\,(87.9\%)$ | $-0.75\pm 0.04\,(98.9\%)$ | $-0.56\pm 0.11\,(91.4\%)$ | $-0.69\pm 0.10\,(98.1)\%$ |
| $(50,10)$ | $-0.82\pm 0.03\,(99.8\%)$ | $-0.82\pm 0.04\,(99.7\%)$ | $-0.80\pm 0.05\,(99.7\%)$ | $-0.68\pm 0.12\,(96.6\%)$ | $-0.83\pm 0.03\,(100\%)$ |
| $(50,15)$ | $-0.83\pm 0.04\,(99.9\%)$ | $-0.84\pm 0.04\,(100\%)$ | $-0.83\pm 0.03\,(100\%)$ | $-0.78\pm 0.07\,(100\%)$ | $-0.89\pm 0.03\,(100\%)$ |

**Table 6: Average local Ricci evolution coefficients, computed using Ollivier curvature, on synthetic data. Values are means $\pm$ standard deviations over 50 independently trained networks per architecture; proportion of vertices with negative coefficients is reported in parentheses. Networks were randomly initialized.**
| (Width,Depth) | Syn-I | Syn-II | Syn-III | Syn-IV |
| --- | --- | --- | --- | --- |
| (15,7) | $-0.38\pm 0.07\,(80.9\%)$ | $-0.31\pm 0.11\,(78.2\%)$ | $-0.53\pm 0.09\,(92.1\%)$ | $-0.39\pm 0.09\,(82.9\%)$ |
| (15,10) | $-0.43\pm 0.07\,(83.9\%)$ | $-0.29\pm 0.14\,(81.2\%)$ | $-0.59\pm 0.09\,(92.7\%)$ | $-0.45\pm 0.10\,(87.1\%)$ |
| (15,15) | $-0.43\pm 0.12\,(81.0\%)$ | $-0.36\pm 0.09\,(84.9\%)$ | $-0.64\pm 0.07\,(93.9\%)$ | $-0.49\pm 0.13\,(86.2\%)$ |
| (25,7) | $-0.37\pm 0.06\,(81.9\%)$ | $-0.34\pm 0.10\,(79.7\%)$ | $-0.56\pm 0.07\,(93.8\%)$ | $-0.32\pm 0.09\,(77.4\%)$ |
| (25,10) | $-0.43\pm 0.07\,(83.8\%)$ | $-0.37\pm 0.08\,(86.9\%)$ | $-0.63\pm 0.05\,(96.2\%)$ | $-0.40\pm 0.09\,(85.4\%)$ |
| (25,15) | $-0.49\pm 0.04\,(86.5\%)$ | $-0.40\pm 0.05\,(87.6\%)$ | $-0.69\pm 0.04\,(95.5\%)$ | $-0.51\pm 0.05\,(90.3\%)$ |
| (50,7) | $-0.38\pm 0.06\,(83.2\%)$ | $-0.38\pm 0.07\,(81.6\%)$ | $-0.59\pm 0.05\,(96.3\%)$ | $-0.29\pm 0.05\,(74.9\%)$ |
| (50,10) | $-0.47\pm 0.05\,(88.0\%)$ | $-0.41\pm 0.05\,(86.9\%)$ | $-0.66\pm 0.05\,(97.3\%)$ | $-0.34\pm 0.07\,(81.8\%)$ |
| (50,15) | $-0.53\pm 0.04\,(89.1\%)$ | $-0.42\pm 0.04\,(88.2\%)$ | $-0.72\pm 0.03\,(97.0\%)$ | $-0.53\pm 0.06\,(91.7\%)$ |

**Table 7: Average local Ricci evolution coefficients, computed using augmented Forman curvature, on synthetic data. Values are means $\pm$ standard deviations over 50 independently trained networks per architecture; proportion of vertices with negative coefficients is reported in parentheses. Networks were randomly initialized.**
| (Width,Depth) | Syn-I | Syn-II | Syn-III | Syn-IV |
| --- | --- | --- | --- | --- |
| (15,7) | $-0.43\pm 0.10\,(87.2\%)$ | $-0.32\pm 0.16\,(78.4\%)$ | $-0.64\pm 0.08\,(97.6\%)$ | $-0.37\pm 0.12\,(81.7\%)$ |
| (15,10) | $-0.51\pm 0.16\,(90.4\%)$ | $-0.34\pm 0.12\,(87.4\%)$ | $-0.72\pm 0.10\,(98.5\%)$ | $-0.48\pm 0.13\,(90.0\%)$ |
| (15,15) | $-0.63\pm 0.10\,(95.3\%)$ | $-0.45\pm 0.09\,(91.6\%)$ | $-0.70\pm 0.15\,(96.0\%)$ | $-0.63\pm 0.20\,(94.3\%)$ |
| (25,7) | $-0.43\pm 0.09\,(88.4\%)$ | $-0.36\pm 0.14\,(81.6\%)$ | $-0.63\pm 0.08\,(97.6\%)$ | $-0.27\pm 0.09\,(73.7\%)$ |
| (25,10) | $-0.57\pm 0.07\,(95.5\%)$ | $-0.40\pm 0.10\,(91.5\%)$ | $-0.74\pm 0.06\,(99.3\%)$ | $-0.44\pm 0.11\,(88.1\%)$ |
| (25,15) | $-0.65\pm 0.09\,(97.0\%)$ | $-0.50\pm 0.07\,(95.9\%)$ | $-0.75\pm 0.12\,(98.2\%)$ | $-0.67\pm 0.07\,(97.4\%)$ |
| (50,7) | $-0.39\pm 0.09\,(86.0\%)$ | $-0.45\pm 0.08\,(89.0\%)$ | $-0.62\pm 0.07\,(97.4\%)$ | $-0.22\pm 0.08\,(68.7\%)$ |
| (50,10) | $-0.58\pm 0.07\,(96.7\%)$ | $-0.50\pm 0.08\,(95.5\%)$ | $-0.76\pm 0.05\,(99.8\%)$ | $-0.33\pm 0.10\,(79.8\%)$ |
| (50,15) | $-0.69\pm 0.06\,(98.4\%)$ | $-0.55\pm 0.05\,(97.1\%)$ | $-0.81\pm 0.03\,(99.8\%)$ | $-0.63\pm 0.10\,(96.5\%)$ |

**Table 8: Average local Ricci evolution coefficients, computed using approximated Ollivier curvature, on synthetic data. Values are means $\pm$ standard deviations over 50 independently trained networks per architecture; proportion of vertices with negative coefficients is reported in parentheses. Networks were randomly initialized.**
| (Width,Depth) | Syn-I | Syn-II | Syn-III | Syn-IV |
| --- | --- | --- | --- | --- |
| (15,7) | $-0.44\pm 0.10\,(89.6\%)$ | $-0.37\pm 0.16\,(82.9\%)$ | $-0.64\pm 0.11\,(96.6\%)$ | $-0.36\pm 0.11\,(81.0\%)$ |
| (15,10) | $-0.52\pm 0.11\,(92.6\%)$ | $-0.39\pm 0.08\,(91.5\%)$ | $-0.72\pm 0.12\,(98.1\%)$ | $-0.51\pm 0.16\,(90.6\%)$ |
| (15,15) | $-0.60\pm 0.15\,(94.7\%)$ | $-0.44\pm 0.11\,(91.6\%)$ | $-0.73\pm 0.19\,(96.2\%)$ | $-0.65\pm 0.13\,(95.9\%)$ |
| (25,7) | $-0.43\pm 0.08\,(89.5\%)$ | $-0.34\pm 0.13\,(83.0\%)$ | $-0.64\pm 0.08\,(97.8\%)$ | $-0.26\pm 0.11\,(72.6\%)$ |
| (25,10) | $-0.56\pm 0.07\,(95.8\%)$ | $-0.44\pm 0.09\,(94.2\%)$ | $-0.75\pm 0.05\,(99.7\%)$ | $-0.44\pm 0.13\,(87.5\%)$ |
| (25,15) | $-0.66\pm 0.04\,(98.3\%)$ | $-0.49\pm 0.08\,(94.9\%)$ | $-0.79\pm 0.05\,(99.6\%)$ | $-0.64\pm 0.13\,(96.1\%)$ |
| (50,7) | $-0.38\pm 0.07\,(87.5\%)$ | $-0.46\pm 0.07\,(91.2\%)$ | $-0.66\pm 0.06\,(98.7\%)$ | $-0.22\pm 0.08\,(68.4\%)$ |
| (50,10) | $-0.60\pm 0.06\,(97.4\%)$ | $-0.53\pm 0.04\,(97.3\%)$ | $-0.77\pm 0.04\,(100\%)$ | $-0.35\pm 0.09\,(81.2\%)$ |
| (50,15) | $-0.69\pm 0.04\,(99.1\%)$ | $-0.55\pm 0.05\,(97.5\%)$ | $-0.83\pm 0.03\,(100\%)$ | $-0.64\pm 0.08\,(97.9\%)$ |

#### A.4.3 Community structure

Figure: Figure 9: Modularity and normalized cut across network layers on real-world datasets. Reported values are averaged over 50 independently trained networks with random initialization.
Refer to caption: Figures/community_structure_real_data.png

In this section, we examine how the curvature gap evolves as the data manifold propagates through the layers of the deep neural network. Whereas both modularity and the normalized cut provide clear evidence that the network rewires the $k$-nearest neighbor graph derived from the point clouds such that its geometry aligns more closely with the community structure induced by the true labels (see Figure [2](https://arxiv.org/html/2509.22362v1#S4.F2) and Figure [9](https://arxiv.org/html/2509.22362v1#A1.F9)), the behavior of the curvature gap is less straightforward.

The explanation for this is that most inter-community edges connect misclassified nodes to correctly classified nodes with the same label, making them indistinguishable from intra-community edges. This effect is clearly illustrated in Figure [10](https://arxiv.org/html/2509.22362v1#A1.F10), where we show the full curvature distribution on the MNIST 1-vs-7 dataset, comparing inter-community edges (orange) and intra-community edges (blue). As expected, intra-community edges systematically shift toward more positive curvature values as the $k$-nearest neighbor graphs are transformed through the layers of the deep neural network. In contrast, the behavior of inter-community edges is more intricate.
The left column displays the distributions computed on the entire test set. In the final layer, two structurally distinct types of inter-community edges emerge. The majority exhibit positive curvature and vanish once the five misclassified points are removed. These are precisely the edges described above, connecting a misclassified point with a correctly classified one. In contrast, a small subset of inter-community edges remains, characterized by highly negative curvature values. These correspond to the true inter-community edges. This distinction explains the vanishing of the curvature gaps before removing the misclassified samples, and we find the same qualitative pattern consistently across all synthetic and real-world datasets considered.

Figure: Figure 10: Curvature distributions for inter-community edges (orange) and intra-community edges (blue) on MNIST 1-vs-7 before (left column) and after (right column) removing misclassified samples.
Refer to caption: Figures/curvature_distribution.png

#### A.4.4 Double descent phenomenon

In modern machine learning, it is common to train extremely large and heavily overparameterized models that achieve zero training error while still exhibiting strong generalization performance. This surprising behavior is captured by the *double descent* phenomenon, introduced by Belkin et al. [2019], which refines the classical view of the bias–variance trade-off. Whereas the traditional theory predicts a U-shaped generalization curve as model capacity increases, double descent reveals an additional regime: once the interpolation threshold is crossed, generalization error can decrease again with increasing capacity.
Recent work has shown that this phenomenon is a fundamental property of overparameterized models, appearing across a wide range of settings including neural networks, ensemble methods, decision trees, and classical linear regression [Belkin et al., 2019, Ba et al., 2020, Deng et al., 2022].

Figure: Figure 11: Proportion of vertices with negative local Ricci evolution coefficient for networks of varying depth.
Refer to caption: Figures/double_descent.png

Several explanations have been proposed for this behavior. One line of reasoning suggests that enlarging the function class increases the number of interpolating solutions, thereby making it more likely to find functions that not only fit the data but also exhibit higher smoothness and regularity. Such simpler solutions are favored by an implicit form of Occam’s razor, indicating that overparameterization can promote generalization by biasing learning toward these low-complexity explanations [Belkin et al., 2019].

A promising direction for future work is to investigate the double descent phenomenon through the lens of local Ricci evolution coefficients. In the overparameterized regime, double descent suggests that further enlarging the network should lead to improved generalization. Our experiments show that increasing network size—either by adding depth at fixed width or by expanding width at fixed depth—systematically increases the proportion of vertices with negative Ricci coefficients. Figure [11](https://arxiv.org/html/2509.22362v1#A1.F11) illustrates these findings on real-world datasets using neural networks with a fixed width of 50 neurons per layer while varying the depth. This observation indicates that larger models exhibit curvature-driven dynamics on a more global scale, potentially enabling them to capture the underlying geometry of the problem more effectively. Since models that better align with data geometry are expected to generalize better, this perspective highlights a potential interplay between capacity growth and geometric representation, offering a novel geometric perspective on the double descent phenomenon.

### A.5 Details on experimental setup

All experiments were implemented in Python. Neural networks were built using PyTorch (v2.7.1). Default initialization schemes were used for the initial network weights. Networks were trained with binary cross-entropy loss and optimized using the standard Adam optimizer [Kinga et al., 2015] with a learning rate of $0.001$. To solve the optimal transport problems required for computing Ollivier–Ricci curvature, we relied on the POT Python Optimal Transport library (v0.9.5). For constructing $k$-nearest neighbor graphs we used scikit-learn (v1.7.1), and for computing classical community strength measures such as modularity we employed NetworkX (v3.5). All figures in the main text were generated using Matplotlib (v3.10.5).

Our experiments were conducted on a local server with the specifications presented in the following table.

**Table 9: Hardware specifications.**
| Components | Specifications |
| --- | --- |
| ARCHITECTURE | X86_64 |
| OS | Rocky Linux 8.10 (Green Obsidian) |
| CPU | Intel Xeon Platinum 8480CL 56-Core (×2) |
| GPU | NVIDIA H200 Tensor Core |
| RAM | 40GB |

We evaluate our approach on both synthetic and real-world datasets.
The synthetic datasets, presented in Figure [12](https://arxiv.org/html/2509.22362v1#A1.F12), are designed to exhibit different degrees of geometric and topological complexity, providing controlled settings to study curvature dynamics. For real-world data, we consider three benchmarks. MNIST [LeCun, 1998] consists of $28\times 28$ grayscale images of handwritten digits (0–9). We focus on visually similar digit pairs, i.e., 1 vs. 7 (MNIST-1v7) and 6 vs. 9 (MNIST-6v9), to test the sensitivity of our approach to subtle shape differences. On Fashion-MNIST [Xiao et al., 2017], which contains grayscale images of clothing items, we consider sneakers vs. sandals (FMNIST-SvS) and shirts vs. dresses (FMNIST-SvD) as representative examples of fine-grained visual distinctions. Finally, on CIFAR-10 [Krizhevsky, 2009], a dataset of color natural images across ten object categories, we study cars vs. planes (CIFAR) as an example of two closely related classes. Figure [13](https://arxiv.org/html/2509.22362v1#A1.F13) illustrates representative samples from the real-world datasets.

Across all our experiments, we train the networks to achieve training accuracy above 99%, ensuring that our experiments evaluate meaningful learned feature representations.

Figure: Figure 12: The synthetic datasets.
Refer to caption: Figures/synthetic_datasets.png

Figure: Figure 13: The real-world datasets.
Refer to caption: Figures/real_world_datasets.png

#### A.5.1 Hyperparameters

The computation of local Ricci evolution coefficients requires constructing $k$-nearest neighbor graphs to approximate the geometry of the underlying manifold. The parameter $k$, which determines the number of neighbors each point connects to and thus controls the local scale of connectivity, plays a central role. Small values of $k$ capture fine-grained geometric structure but increase sensitivity to noise and may disconnect the graph. Larger values emphasize more global structure, at the cost of oversmoothing important local variations and raising the computational cost of Ollivier–Ricci curvature, which scales cubically with the vertex degree. It is therefore not a priori clear how to choose $k$, as it mediates a fundamental trade-off between locality, robustness, and efficiency.

To investigate this trade-off, we conduct experiments across a range of neighborhood sizes. Specifically, we vary $k$ from 1% to 15% of the total size of the point cloud $X$, and present the results in Figure [14](https://arxiv.org/html/2509.22362v1#A1.F14). We find that for small neighborhood sizes ($k$ between 1% and 5%), the local Ricci evolution coefficients remain relatively stable or even decrease. As $k$ increases further, the coefficients tend to rise, reflecting a weaker correlation between local Ricci curvature and the expansion or contraction of this region.

Figure: Figure 14: Mean local Ricci evolution coefficients for different neighborhood sizes $k$ on real datasets. Reported values are averaged over 50 independently trained networks.
Refer to caption: Figures/role_of_k.png

This behavior is expected, since we are approximating local geometric properties of the manifold using $k$-nearest neighbor graphs. When the neighborhood scale becomes too large, the one-hop neighborhoods of these graphs no longer correspond to genuinely local regions of the manifold. Consequently, we expect a weaker correlation between the two quantities, as they cease to reflect the local nature of the Ricci flow.

To balance these effects, we fix $k=5\%$ of the total size of the point cloud in the experiments reported in the main text. We additionally repeated the same experiments with $k=3\%$ and $k=7\%$, and observed quantitatively similar outcomes, showing that our findings are robust with respect to the precise choice of neighborhood size.

#### A.5.2 Licenses

We summarize the licenses of all code and datasets used in our experiments in Table [10](https://arxiv.org/html/2509.22362v1#A1.T10).

**Table 10: Licenses of code and datasets.**
| Model/Dataset | License |
| --- | --- |
| MNIST [LeCun, 1998] | CC BY-SA 3.0 |
| Fashion-MNIST [Xiao et al., 2017] | MIT |
| CIFAR-10 [Krizhevsky, 2009] | MIT |
| PyTorch [Paszke et al., 2019] | 3-clause BSD |
| Scikit-learn [Pedregosa et al., 2011] | 3-clause BSD |
| POT (Python Optimal Transport) [Flamary et al., 2021] | 3-clause BSD |
| NetworkX [Hagberg et al., 2008] | 3-clause BSD |
| SciPy [Virtanen et al., 2020] | 3-clause BSD |

### A.6 LLM usage disclosure

We used an LLM during paper writing to improve grammar and wording.

## Peer Reviews

confidence: 2
contribution: 2
initial_rating: 6
presentation: 2
questions: Overall, this is an interesting attempt to use Ricci flow to explain nerual network architectures and is somewhat convincing. The lack of comprehensive evaluation is a drawback. Taken together, I am inclined to weigh in borderline slightly positively.
soundness: 3
strengths: - Overall - I think this is an interesting observation and a refreshing approach to investigating neural network architectures 
- large empirical base: 20,000 networks tested across multiple datasets and consistent findings: clear negative curvature–distance correlation across layers.
summary: This paper studies how data representations change across layers of neural networks. It builds k-nearest-neighbor graphs on the samples at each layer and measures how their pairwise distances and discrete Ricci curvature evolve. Across many of trained feed-forward ReLU networks, the authors find that regions of positive curvature contract and negative curvature expand, mirroring the behavior of Ricci flow in geometry. Thus, network depth acts like a discrete time variable of a geometric flow on the data manifold. Experiments on synthetic, MNIST, Fashion-MNIST, and CIFAR-10 binary tasks confirm this trend. The study attempts to highlight that deep learning implicitly performs a curvature-driven transformation of the data manifold. It also suggests geometric heuristics for early stopping and optimal depth based on when curvature evolution saturates.
weaknesses: - The main weakness, perhaps is that it is quite unclear what the scope of the claimed observation is to a wide plethora of neural network architectures. The experiments are primarily made with only small binary tasks and MLPs. Residual networks, Neural ODEs, equivariant networks, and transformers seem like the most important avenues for investigation, and it is a bit disappointing to not find anything about that in this submission. Additionally, the heuristics have not yet been validated on real large-scale networks.
- too little conceptual exposition on Ricci flow itself. sec 2.3 and appendix A.2.4 seems inadequate. I also miss a larger discussion on the different physical and computational prior works on Ricci flow and how that connects to deep learning connection explored here.
- k-NN graphs may poorly capture manifold geometry in high dimensions.
- Just as a further proof of concept, it seems valuable to observe if the Ricci flow metrics for standard kernel-based methods for feature extraction. Is the observation exclusive only to neural-based feature representations?

---

confidence: 3
contribution: 3
initial_rating: 4
presentation: 4
questions: 1) What distance is the local change of distances based on? I'm assuming Euclidean? Can you also explain why it makes sense to compare layer to layer using a Euclidean distance? I would have thought that Euclidean distances would not be the best to compare from layer to layer. So agreed, the correlation takes care of scaling --- but what if you used a spearman instead? Would that be more robust?

2) I am not sure I understand the point of the community structure experiment: "While removing such a small fraction of samples should not noticeably alter the graph geometry, it leads to a qualitatively different behavior: the curvature gap increases consistently across layers instead of collapsing." Doesn't this mean that the metric that the authors are using is extremely sensitive to just a few outliers (5 misclassified points out of 1,000)? Wouldn't this be a red flag for using this method to diagnose problems/ early stopping, etc?
soundness: 3
strengths: 1) Exposition is clear.
2) Results are compelling. 
3) Theory looks correct.
summary: The paper studies how the geometry of data representations changes across layers of a feed‑forward neural network by constructing k‑nearest‑neighbor graphs on the features and measuring discrete Ricci curvature/ the local Ricci evolution coefficient on those graphs. The authors prove that nonlinearities (ReLU) are essential to alter geometry; They define local Ricci evolution coefficients that correlate curvature with local changes in distances in pairs of points (x,y) across layers; Finally, they deploy their framework on experiments, where these coefficients are largely negative, consistent with Ricci flow‑like dynamics;
weaknesses: Overall, I enjoyed reading this paper (although I am not an expert in Ricci curvature or neural network feature geometry).

I have two main reservations for this paper. The first is that the paper is overstating the significance of its results. The introduction states "We propose a novel early-stopping heuristic that leverages the emergence of curvature-driven geometric behavior during training (Sec. 4.3).4. By analyzing layer-wise curvature-driven transformations, we introduce a geometric criterion for network depth selection (Sec. 4.4)." In my opinion, this is overstated. The authors show some empirical evidence that the behavior of the Layer-Ricci coefficients might be correlated to the test accuracy. But this evidence is circumstantial at best here, and while the authors could hypothesize that this could be used for layer selection or early stopping heuristic, they haven't tried it out. What would this bring compared to regular stopping criteria? While I appreciate the paper and the work that the authors have put in, I do think that the significance of the findings is a little overstated.


The second pertains the specifics of the experiments and conclusions of the authors (see questions below). In particular, the authors don't spend too much time discussing the choice of the number of neighbors k. One could argue that Figure 14 shows some signs of sensitivity to $k$ (also, it might be worthwhile to add error bars on these plots). Did you use symmetric‑kNN (edge if either is in the other’s kNN) or mutual‑kNN? How sensitive are results to this choice and to feature normalization between layers?

---

confidence: 4
contribution: 2
initial_rating: 4
presentation: 2
questions: + Could you elaborate on the assumption used in Theorem 3.1 (line 229)? It seems to impose a kind of smoothness in the feature space. How do you justify that this assumption is appropriate?

+ Given the material presented, considering node-level curvature appears more natural than edge-level curvature (e.g., node resistance curvature, combinatorial curvature, or diffusion curvature). Could the authors discuss this further?

+ Based on the results in Figure 5, as the number of layers increases further, is it possible for the Layer-Ricci coefficient to become positive?
soundness: 2
strengths: The paper offers an interesting new perspective on understanding how features evolve in neural networks and provides some mathematical justification based on random matrix theory. The experimental results—especially Section 4.4—are interesting and reveal how features evolve as the number of layers increases.
summary: The paper analogizes the evolution of features in neural networks to a discrete Ricci flow and, on this basis, provides several interesting proofs and empirical findings.
weaknesses: * Although Section 3.1 offers interesting theoretical results, these results rely primarily on randomness and i.i.d. assumptions. It is currently unclear to what extent they can be generalized to real-world settings. In addition, I find that Section 3.1 is almost independent of the rest of the paper.

* Lines 353–354 state: “these findings provide compelling evidence that the evolution of feature geometry in deep neural networks is fundamentally curvature-driven, closely aligned with Ricci flow.” In my view, the authors appear to conflate correlation with causation. Table 1 only shows a negative correlation between $\mathcal O(x)$ and $\eta(x)$; it does not establish that the former causes the latter. The gradual shrinkage of distances among similar samples across layers is likely driven by their sharing the same labels, rather than by mean curvature.

* This paper is empirical. While it reports several interesting phenomena, it remains unclear how these findings could benefit the deep-learning community. Could the authors articulate potential application scenarios for these findings? Doing so would substantially strengthen the paper.

---

confidence: 4
contribution: 2
initial_rating: 4
presentation: 3
questions: I see the following minor issues:
1. Line 173:" While this definition is well-founded in Forman’s framework and computationally efficient, it is often too simplistic to capture the geometric complexity required in many applications": why is it too simplistic? 
2. Line 234: what is the meaning of $\overset{\sim}{=}$? Does it mean isomorphism? I would introduce the symbol in text before the theorem. If this was explained in the paper and I missed it please let me know.
3. Figure 1: What neural network architecture are you using here?
4. figure 5: width is fixed at 25: can you remark how this would change for larger widths? I would expect the the Layer-Ricci coeeficient to vary across widths or maybe stabilize at larger widths.
5. Question related to Ansuini et al. 2017: If the intrinsic dimensionality of feature representations is changing across layers (Figure 3 by Ansuini et al) then how do you relate it to your result on Layer-Ricci coefficients? I see that your measure is over discrete graphs but I assume the edge density of the graphs changes as intrinsic data dimensionality changes. 
6. Line 708: "depth increases representational power" In randomly initialized neural networks Hanin et al [1] found that depth doesn't necessarily increase representational power beyond the number of neurons. Moreover, Brahma et al show that depth helps disentangle the manifolds. I am not sure if this statement can be made with high accuracy as of now.

------------------------------

**References:**

[1] Complexity of Linear Regions in Deep Networks, Boris Hanin, David Rolnick
soundness: 2
strengths: The paper is well written with an argument that the authors build up intuitively. I particularly liked the idea of discretizing a continuous curved space to measure the curvature. Their use of the Ollivier-Ricci curvature is apt and clever. The authors build up to Section 3.2 where they present local Ricci coefficient in an intuitive manner. The various graphs and figures (including in the Appendix) help back their theoretical argument. Their measure correlates well with various phenomena such as over-fitting and data filtering.
summary: The paper studies how features of a neural network evolve as a function of the the depth over the training dynamics under the manifold hypothesis. They show that a linear neural network (NN) can only learn an isometric transformation with high probability. They then argue for the importance of non-linearity in learning meaningful feature representations. They then study the changes in feature geoemtry across layers using a *local Ricci evolution coefficient*. Their experiments show efficacy of this framework and also a new phenomena reflected in the curvature gap which relates to data filtering.
weaknesses: I see two main weaknesses and hope the authors can clarify these in the rebuttal.

1. **Theorem 3.1:** I am unsure how effective this bound is. I see that in Appendix A.4.1 you show the proportion of Linear NNs that preserve graphs (and give you isometry) but I am not sure if this is a result of your toy empirical setting i.e. sampling points on a unit ball or it is in fact indicative of the lower bound in Theorem 3.1. More specifically, if $m \times \epsilon^3$ is too small in magnitude and $|X|$ is too large wouldn't the lower bound be vacuous? I hope the authors can clarify this point. A few more questions: Is the lower bound independent for all $k$? That is a bit counter intuitive to me. Is $k$ (the size of the neighborhood) something you choose? Also, I realize that assuming data sampled from within a unit ball is common practice but your work hints at an underlying geometric structure of data and I wonder how that is captured in the toy setting in A.4.1.

2. The graphs in figures 2, 4, 3 are missing std error indicators. Is this because of the manner in which you measure the curvature gap, modularity etc or is this because these were omitted? What is the choice of $k$ in Section 4? How does your estimate of Ricci curvature vary with how you construct the discretized graph e.g. the parameters $k,r$? If these details are in the appendix or main body please feel free to point me to the same. Some of these details are missing (see questions below) which is keeping me from giving a higher score. 

I am willing to be convinced to increase my score to accept the paper if these issues are adequately addressed given how well the rest of the authors' arguments are made.


Decision: Reject