PepCompass: Navigating Peptide Embedding Spaces Using Riemannian Geometry

## Abstract

Abstract Antimicrobial peptide discovery is challenged by the astronomical size of peptide space and the relative scarcity of active peptides. Generative models provide continuous latent “maps” of peptide space, but conventionally ignore decoder-induced geometry and rely on flat Euclidean metrics, rendering exploration and optimization distorted and inefficient.
Prior manifold-based remedies assume fixed intrinsic dimensionality, which critically fails in practice for peptide data. Here, we introduce PepCompass , a geometry-aware framework for peptide exploration and optimization. At its core, we define a Union of κ \kappa -Stable Riemannian Manifolds 𝕄 κ \mathbb{M}^{\kappa} , a family of decoder-induced manifolds that captures local geometry while ensuring computational stability. We propose two local exploration methods: Second-Order Riemannian Brownian Efficient Sampling , which provides a convergent second-order approximation to Riemannian Brownian motion, and Mutation Enumeration in Tangent Space , which reinterprets tangent directions as discrete amino-acid substitutions. Combining these yields Local Enumeration Bayesian Optimization ( LE-BO ), an efficient algorithm for local activity optimization. Finally, we introduce Potential-minimizing Geodesic Search ( PoGS ), which interpolates between prototype embeddings along property-enriched geodesics, biasing discovery toward seeds, i.e. peptides with favorable activity. In-vitro validation confirms the effectiveness of PepCompass: PoGS yields four novel seeds, and subsequent optimization with LE-BO discovers 25 highly active peptides with broad-spectrum activity, including against resistant bacterial strains. These results demonstrate that geometry-informed exploration provides a powerful new paradigm for antimicrobial peptide design.

## 1 Introduction

Efficient exploration of peptide space is notoriously difficult. At the global level, there are more than $3.3\times 10^{32}$ combinatorially possible amino acid sequences of length at most 25. At the local level, each peptide of length 25 has nearly 1000 neighbors within an edit radius of one. Moreover, only a small fraction of amino acid sequences correspond to antimicrobial peptides (AMPs), which have high activity against bacteria [1, 2].
This extreme combinatorial complexity renders AMP discovery by brute-force exploration intractable. To address this challenge, we turn to one of the most prolific inventions of humankind: maps.

Since the dawn of civilization, maps have provided a structured way to support both local and global navigation, driving scientific discovery. In modern machine learning, latent-space generative models such as VAEs, GANs, WAEs, and normalizing flows [3] enable building continuous latent representations—maps—of peptides. Such maps have already facilitated the discovery of promising new AMPs [4, 5, 6, 7]. The standard workflow assumes that once the model is trained, its latent space together with the decoder properly models a set of valid, synthetizable peptides. The latent space is typically chosen to be $\mathbb{R}^{d}$ with a flat Euclidean metric, enabling direct application of existing exploration and optimization algorithms. However, such flat representations suffer from a significant flaw: they ignore the differential geometry induced by the decoder, leading to distortions in distances.

Typical approaches attempting to circumvent this problem assume the manifold hypothesis [8] and use the pullback metric [9]. However, recent work [10, 11, 12] has shown that the manifold hypothesis does not withstand empirical scrutiny for image data, where sets of images are better modeled as unions or CW-complexes of manifolds with varying low dimensionality (we refer to Appendix [A](https://arxiv.org/html/2510.01988v3#A1) for Related Work). We show that peptide spaces suffer from a similar issue and introduce decoder-derived Union of $\kappa$-Stable Riemannian Manifolds $\mathbb{M}^{\kappa}$, which captures both the complex structure of peptide space and its local geometry, with computational stability controlled by a parameter $\kappa$. Intuitively, we cut the globally distorted map into a set of charts that
enable efficient and distortion-free exploration and optimization.

Building upon the union-of-manifolds structure, we introduce PepCompass, a geometry-informed framework for peptide exploration and optimization at both global and local levels. At the *global level*, we propose Potential-minimizing Geodesic Search (PoGS), which models geodesic curves between known prototype peptides to identify promising seeds for further optimization (Figure [1](https://arxiv.org/html/2510.01988v3#S1.F1)A). We represent geodesics as energy-minimizing curves in peptide space and augment them with a potential function encoding antimicrobial activity. This biases exploration toward regions not only similar to the starting prototypes but also exhibiting higher activity.
In doing so, our method extends standard local analogue search around a single prototype into a bi-prototype, controllable regime.

For *local* search on a single manifold from the family $\mathbb{M}^{\kappa}$, we designed two geometry-informed approaches: Second-Order Riemannian Brownian Efficient Sampling (SORBES) and Mutation Enumeration in Tangent Space (MUTANG). SORBES is a provably convergent, second-order approximation of the Riemannian Brownian motion [13, 14], serving as a Riemannian analogue of local Gaussian search. MUTANG addresses the discrete nature of peptide space by reinterpreting the local tangent space not as continuous vectors but as discrete mutations, directly corresponding to amino-acid substitutions. This reinterpretation provides both interpretability and efficiency, enabling enumeration of a given peptide’s neighbours.
We further combine SORBES and MUTANG into an iterative Local Enumeration procedure that
densely populates the neighbourhood of a given peptide with valid, diverse neighbours. Finally, integrating this enumeration with a Bayesian optimization scheme yields an efficient Local Enumeration Bayesian Optimization procedure (LE-BO; see Figure [1](https://arxiv.org/html/2510.01988v3#S1.F1)B,C).

In vitro microbiological assays demonstrated unprecedented, 100% success rate of PepCompass in AMP optimization. Using PoGS we derived four peptide seeds, all of which showed significant antimicrobial activity. Further optimization of these seeds with LE-BO yielded 25/25 highly active peptides with broad-spectrum activity, including activity against multi-resistant bacterial strains.
Code is available at [https://anonymous.4open.science/r/pep-compass-2ABF](https://anonymous.4open.science/r/pep-compass-2ABF).

Figure: Figure 1: PepCompass overview.
Refer to caption: x1.png

## 2 Methods

### 2.1 Background

Let $\operatorname{Dec}_{\theta}\in C^{\infty}:\mathcal{Z}\to\mathcal{X}$ be the deterministic decoder mapping latent vectors $z\in\mathbb{R}^{d}$ to position-factorized peptide probabilities $\operatorname{Dec}_{\theta}(z)\in\mathbb{R}^{L\times A}$ (with $L$ the maximum peptide length and $A$ the size of the amino acid alphabet $\mathcal{A}$ extended with a padding token $pad$, and $\mathbb{R}^{L\times A}$ - set of matrices of shape $(L,A)$). Define

$$ $X=\operatorname{Dec}_{\theta}(\mathcal{Z})\subset\mathbb{R}^{L\times A},\qquad\mathtt{p}(z)=\operatorname{argmax}(\operatorname{Dec}_{\theta}(z),\operatorname{dim}=1)\in\mathcal{A}^{L},$ $$

where $\mathtt{p}(z)$ denotes the decoded peptide sequence. Intuitively, $X$ is a continuous probabilistic approximation of the peptide space (with $\mathcal{Z}$ as its map), from which the concrete peptides are decoded back using the $\mathtt{p}$ operator.
For clarity, we drop explicit parameter dependence and simply write $\operatorname{Dec}$ instead of $\operatorname{Dec}_{\theta}$. We additionally introduce $\hat{\operatorname{Dec}}:\mathcal{Z}\to\mathbb{R}^{LA}$ and $\hat{X}=\hat{\operatorname{Dec}}(\mathcal{Z})$, i.e. the flattened versions of $\operatorname{Dec}$ and $X$.

A common approach is to equip $\mathcal{Z}$ with the standard Euclidean inner product $\langle\cdot,\cdot\rangle_{\mathbb{R}^{d}}$, and use the associated Euclidean distance as a base for exploration. However, this ignores the geometry induced by the decoder, which, under the manifold hypothesis, can be accounted for using the *pullback metric* [8, 9].

##### Pullback metric

Under the manifold hypothesis, $\hat{\operatorname{Dec}}$ is full rank (i.e. $\operatorname{rank}J_{\hat{\operatorname{Dec}}}(z)=d$ for all $z\in\mathcal{Z}$, where $J_{\hat{\operatorname{Dec}}}(z)\in\mathbb{R}^{(LA)\times d}$ is the decoder Jacobian), and $(\mathcal{Z},G_{\hat{\operatorname{Dec}}})$ is a $d$-dimensional Riemannian manifold [15] where $G_{\hat{\operatorname{Dec}}}$ is a natural, decoder-induced pullback metric on $\mathcal{Z}$ given by:

$$ $G_{\hat{\operatorname{Dec}}}(z)=J_{\hat{\operatorname{Dec}}}(z)^{\top}J_{\hat{\operatorname{Dec}}}(z)\in\mathbb{R}^{d\times d},$ (1) $$

for $z\in\mathcal{Z}$. To simplify notation, let us set $G_{\operatorname{Dec}}=G_{\hat{\operatorname{Dec}}}$. Now, for a tangent space $T_{z}\mathcal{Z}$ at a point $z$ and tangent vectors $u,v\in T_{z}\mathcal{Z}$,

$$ $\langle u,v\rangle_{z}^{\operatorname{Dec}}=u^{\top}G_{\operatorname{Dec}}(z)\,v.$ (2) $$

Note that
$\hat{\operatorname{Dec}}:(\mathcal{Z},G_{\operatorname{Dec}})\to(\hat{X},\langle\cdot,\cdot\rangle_{\mathbb{R}^{LA}})$
is an isometric diffeomorphism.

##### When the manifold hypothesis fails: union of manifolds

Previous work demonstrates that the manifold hypothesis often fails for complex data such as images [10, 11, 12], and the data is better represented as unions of local manifolds of varying dimension, typically lower than that of the latent space. However, the previous methods defined the submanifolds based on pre-specified datasets and could not generalize to new data.

### 2.2 Union of κ \kappa -Stable Riemannian Manifolds

Assuming that the manifold hypothesis is indeed violated and that a given generative model has learned to faithfully capture the lower-dimensional structure in the data, it should be reflected in the decoder having rank strictly smaller than the latent dimensionality. We verified this phenomenon for antimicrobial peptides data in two state-of-the-art latent generative models [16, 4] (see Appendix [B](https://arxiv.org/html/2510.01988v3#A2)). This implies that the $G_{Dec}$ is not of full rank, and consequently the pair $(\mathcal{Z},G_{\operatorname{Dec}})$ does not constitute a Riemannian manifold.

To address this, we equip each point $z\in\mathcal{Z}$ with a local, potentially lower-dimensional manifold, which we further enrich with a Riemannian structure from the pullback metric. In contrast to previous methods, we adapt a decoder-dependent approach in the submanifold definition, enabling generalization to any point encoded in the latent space. Namely, we decompose $\mathcal{Z}$ as a union of locally $\kappa$-stable Riemannian submanifolds ($\kappa\geq 0)$

$$ $\mathbb{M}^{\kappa}=\{M_{z}^{\kappa}:z\in\mathcal{Z}\},\qquad M_{z}^{\kappa}=\big(W_{z}^{\kappa},G_{\operatorname{Dec}}\big),$ $$

where each $W_{z}^{\kappa}\ni z$ is an open affine submanifold of $\mathcal{Z}$ of *maximal dimension* (denoted as $k_{z}^{\kappa}$ and refered to as $\kappa-$stable dimension), such that the pullback metric $G_{\operatorname{Dec}}$ restricted to $W_{z}^{\kappa}$, denoted $G_{\operatorname{Dec}}|_{W_{z}^{\kappa}}$, has full rank and satisfies the $\kappa$-stability condition

$$ $\inf_{\begin{subarray}{c}v\in T_{z}W_{z}^{\kappa}\\ \langle v,v\rangle_{\mathbb{R}^{d}}=1\end{subarray}}\langle v,v\rangle_{z}^{\operatorname{Dec}}>\kappa^{2}.$ $$

Intuitively, $W_{z}^{\kappa}$ removes degenerated (non-active) directions of the decoder, ensuring that all eigenvalues of $G_{\operatorname{Dec}}|_{W_{z}^{\kappa}}$ are bounded below by $\kappa$. This guarantees numerical stability for geometric computations requiring inversion of $G_{\operatorname{Dec}}$. Note, that similarly to the full-rank case, $\hat{\operatorname{Dec}_{|W_{z}^{\kappa}}}:\left(W_{z}^{\kappa},G_{\operatorname{Dec}}\right)\to(\hat{\operatorname{Dec}}(W_{z}^{\kappa}),\langle\cdot,\cdot\rangle_{\mathbb{R}^{LA}})$ is an isometric diffeomorphism.

The explicit SVD-based construction of $W_{z}^{\kappa}$ is deferred to Appendix [C](https://arxiv.org/html/2510.01988v3#A3). For stability near boundaries, we also use contracted domains $W_{z}^{\kappa}(\alpha)=\left\{z+\alpha(v-z):v\in W_{z}^{\kappa}\right\}$ and $M_{z}^{\kappa}(\alpha)=\left(W_{z}^{\kappa}(\alpha),G_{\operatorname{Dec}}\right)$, with $\alpha\in(0,1)$.

### 2.3 SORBES - Second-Order Riemannian Brownian efficient Sampling

Having a stable Riemannian approximation $M_{z}^{\kappa}$ of $X$ in the vicinity of a point $z\in\mathcal{Z}$, we now describe how to explore it efficiently within the local neighbourhood of $z$. Our goal is to simulate a Riemannian Brownian motion for a time $T$ starting from $z$ that is a Riemannian equivalent of a local Gaussian perturbation $z+\epsilon$, $\epsilon\sim\mathcal{N}(0,T)$. To this end, we introduce the SORBES (Second-Order Riemannian Brownian efficient Sampling) procedure, described in Algorithm [1](https://arxiv.org/html/2510.01988v3#alg1). SORBES improves the flat Gaussian noise by exploring only active local subspace $W_{z}^{\kappa}$, it is isotropic w.r.t. to the decoder geometry, and respects the local curvature of $M^{\kappa}_{z}$.

Figure: Algorithm 1 SORBES

Before introducing the key theoretical property of this algorithm, let’s recall the crucial notation. For $A\subset M^{\kappa}_{z}$, $A^{c}$ is the complement of $A$ in $M^{\kappa}_{z}$. Let $d_{M_{\kappa}}$ be the geodesic distance on $M^{\kappa}_{z}$ w.r.t. to the pullback metric, and $d_{M_{z}^{\kappa}}(x,A)=\inf_{y\in A}d_{M_{z}^{\kappa}}(x,y)$ for $x\in M_{z}^{\kappa}$ and $A\subset M_{z}^{\kappa}$. Let $\operatorname{Ric}$ be the Ricci curvature. Then the key theoretical property of the Algorithm [1](https://arxiv.org/html/2510.01988v3#alg1) is summarized by:

###### Theorem 1 .

Let $(Z_{i}^{\epsilon})_{i\geq 0}$ be the sequence produced by Algorithm [1](https://arxiv.org/html/2510.01988v3#alg1), for $M_{z}^{\kappa}(\alpha)$ with $\alpha\in(0,1)$ and diffusion horizon $T>0$, and define its continuous-time interpolation

$$ $Z^{\epsilon}(t):=Z^{\epsilon}_{\lfloor\epsilon^{-2}t\rfloor},\qquad t\geq 0.$ $$

Let $R^{z}_{\kappa}=d_{M_{z}^{\kappa}}(z,(W_{z}^{\kappa})^{c})$, and suppose $L\geq 1$ satisfies

$$ $\sup_{x\in M^{\kappa}_{z}(\alpha)}\operatorname{Ric}_{M_{z}^{\kappa}}(x)\geq-L^{2}.$ $$

Then for $T<\tfrac{(R_{z}^{\kappa})^{2}}{4k_{z}^{\kappa}L}$, as $\epsilon\to 0$, the process $Z^{\epsilon}$ converges in distribution to Riemannian Brownian motion stopped at the boundary of $M_{z}^{\kappa}(\alpha)$, with respect to the Skorokhod topology, on a set $C^{T}_{\kappa,z}\subset\Omega$ such that

$$ $\mathbb{P}\!\left(C^{T}_{\kappa,z}\right)\;\geq\;1-\exp\!\left(-\tfrac{(R_{z}^{\kappa})^{2}}{32T}\right).$ $$

For the proof, see Appendix [D](https://arxiv.org/html/2510.01988v3#A4).
Intuitively, in the small–step limit, our algorithm converges to Riemannian Brownian motion on $M_{z}^{\kappa}(\alpha)$, stopped at the boundary, with the deviation probability decaying exponentially in the inverse time horizon.
Theorem [1](https://arxiv.org/html/2510.01988v3#S2.Ex7) extends the main convergence result of Schwarz et al. [13] to possibly non-compact manifolds.
Importantly, Schwarz et al. [13] showed that achieving this convergence requires a *second-order correction* term (capturing the effect of Christoffel symbols), rather than the commonly used naive first-order update.
This motivates our use of the second-order scheme in Algorithm [1](https://arxiv.org/html/2510.01988v3#alg1).
In Appendix [E](https://arxiv.org/html/2510.01988v3#A5) (Algorithm [4](https://arxiv.org/html/2510.01988v3#alg4)), we describe SORBES-SE (*Stable/Efficient*), an implementation of SORBES that approximates the second-order correction using finite differences.
It employs an adaptive step size $\epsilon$ that adjusts to the local curvature of the space, while still preserving the convergence guarantees.

###### Theorem 1 .

### 2.4 MUTANG - Mutation Enumeration in Tangent Space

To further exploit the manifold structure of $M^{\kappa}_{z}$, modelling the neighborhood of a point $z\in\mathcal{Z}$, let us observe that
the ambient tangent space $T_{\hat{\operatorname{Dec}}(z)}\hat{\operatorname{Dec}}(W_{z}^{\kappa})$ identifies directions in peptide space along which the decoder output is the most sensitive.
We interpret these directions as defining a *mutation space* for the decoded peptide $\mathtt{p}(z)$, providing candidate amino-acid substitutions.

Formally, let $U^{\kappa}(z)$ (see Equation [8](https://arxiv.org/html/2510.01988v3#A3.E8)) denote an orthonormal basis of $T_{\hat{\operatorname{Dec}}(z)}\hat{\operatorname{Dec}}(W_{z}^{\kappa})$ in the ambient space (Figure [2](https://arxiv.org/html/2510.01988v3#S2.F2)A–B),
and let $u_{j}\in\mathbb{R}^{LA}$ be the $j$-th basis vector.
We reshape $u_{j}$ into matrix form

$$ $\Delta\operatorname{Dec}^{(j)}(z)=\texttt{reshape}(u_{j},\,(L,A))\;\in\;\mathbb{R}^{L\times A}.$ (3) $$

Intuitively, each entry $\Delta\operatorname{Dec}^{(j)}(z)_{\ell,a}$ measures the first-order sensitivity of the probability assigned to amino acid $\mathcal{A}_{a}$ at position $\ell$, thereby suggesting a possible substitution.
To extract candidate mutations, we introduce a sensitivity threshold $\theta_{\text{mut}}>0$ and declare that

$$ $\big|\Delta\operatorname{Dec}^{(j)}(z)_{\ell,a}\big|\;\geq\;\theta_{\text{mut}}\quad\Rightarrow\quad\text{add mutation }\mathtt{p}(z)_{\ell}\to a,$ (4) $$

where $\mathtt{p}(z)_{\ell}$ is the current residue at position $\ell$.
Applying this rule across all $j=1,\ldots,k_{z}^{\kappa}$ yields a *mutation pool*

$$ $\mathcal{P}\;\subseteq\;\{1,\ldots,L\}\times\mathcal{A}.$ $$

To enumerate candidate peptides, for each sequence position $\ell$ we define the set of admissible residues (Figure [2](https://arxiv.org/html/2510.01988v3#S2.F2)C) as

$$ $S_{\ell}=\{\,\mathcal{A}_{a}\;|\;(\ell,a)\in\mathcal{P}\,\}\;\cup\;\{\mathtt{p}(z)_{\ell}\},$ $$

i.e., all suggested mutations together with the identity residue.
The complete candidate set is then obtained as the Cartesian product (Figure [2](https://arxiv.org/html/2510.01988v3#S2.F2)D):

$$ $\mathcal{C}(\mathtt{p}(z))\;=\;\prod_{\ell=1}^{L}S_{\ell}\;=\;\{\,y\in\Sigma^{L}\;:\;y_{\ell}\in S_{\ell}\;\;\forall\ell\,\}.$ (5) $$

The details of MUTANG are provided in Appendix [F](https://arxiv.org/html/2510.01988v3#A6) (Algorithm [5](https://arxiv.org/html/2510.01988v3#alg5)).

Figure: Figure 2: Tangent space as mutation space and local enumeration. A) Around an example peptide GTP we consider two orthogonal peptide-space tangent directions $\Delta\operatorname{Dec}^{(j)}$ obtained from the SVD of the decoder Jacobian at the peptide code. Each direction suggests a specific substitution: $\texttt{T}_{1}\!\to\!\texttt{K}$ and $\texttt{P}_{2}\!\to\!\texttt{C}$. B) Each $\Delta\operatorname{Dec}^{(j)}$ is reshaped into an $L\times A$ map (rows: amino acids; columns: positions). C) Thresholded entries define per-position sets of admissible residues (identity always included). D) The candidate set is the Cartesian product $\mathcal{C}(\texttt{GTP})=\prod_{\ell}S_{\ell}$.
Refer to caption: x2.png

### 2.5 Local enumeration

We aim to densely populate the neighbourhood of a single prototype peptide with valid, diverse candidates.
Starting from a seed peptide $\mathtt{p}$ with latent code $z_{0}$, we launch multiple Riemannian random walk trajectories using the SORBES algorithm (Sec. [2.3](https://arxiv.org/html/2510.01988v3#S2.SS3)).
At the start and after each step, the current latent state is decoded into a peptide and augmented with additional variants generated by MUTANG (Sec. [2.4](https://arxiv.org/html/2510.01988v3#S2.SS4)). Additionally, to account for local dimension variability, we re-estimate the $\kappa$-stable submanifold $M^{\kappa}_{z}$ at each step of the random walk. The union of all decoded walk steps and tangent-space mutations yields a compact, high-quality *local candidate set* around $\mathtt{p}$. LocalEnumeration is presented in Algorithm [2](https://arxiv.org/html/2510.01988v3#alg2).

Figure: Algorithm 2 LocalEnumeration

### 2.6 LE-BO - Local Enumeration Bayesian Optimization

Finally, we integrate our LocalEnumeration algorithm into a Bayesian optimization [17] framework for peptide design, which we term Local Enumeration Bayesian Optimization (LE-BO).
Instead of performing costly optimization of the acquisition function in the latent space, which typically relies on Euclidean-distance kernels and ignores both the latent geometry and the discrete nature of peptides, we use surrogate Gaussian process models [18], defined directly in the peptide space.
The acquisition function is optimized by locally enumerating peptides in the vicinity of the most promising candidates and then selecting the peptide that maximizes the acquisition value.
To further encourage exploration and increase the diversity of discovered candidates, we employ the ROBOT scheme [19], which promotes searching across a broader set of promising regions. Details of LE-BO are presented in Algorithm [3](https://arxiv.org/html/2510.01988v3#alg3).

Figure: Algorithm 3 LE-BO

### 2.7 PoGS - Potential-minimizing Geodesic Search

Given two prototype peptides with latent vectors $z_{a}$ and $z_{b}$, we aim to generate *seeds*, i.e., *analogues that are jointly similar to both vectors and have high predicted activity*.
To this end, we construct a discrete geodesic-like curve connecting $z_{a}$ and $z_{b}$, interpreted physically as a system with *kinetic energy* (geometric term) and an added *potential energy* (property term).
This provides a natural tradeoff between similarity to both seeds and the desired molecular property.

Because the decoder Jacobian may have varying rank, we avoid intrinsic pullback computations and work in the ambient peptide-probability space $\mathbb{R}^{LA}$.
For a sequence of latent waypoints $Z=\{z_{0}{=}z_{a},z_{1},\dots,z_{N}{=}z_{b}\}$, we define their decoded logits $X_{k}=\log(\hat{\operatorname{Dec}}(z_{k}))$, and approximate curve length using *chord distances* $\|X_{k+1}-X_{k}\|_{2}$.
This extrinsic metric serves as a first-order surrogate for geodesic energy, bypassing costly Christoffel evaluations and remaining stable under rank variability.

We define the total energy of a discrete path $Z$ as

$$ $\mathcal{E}_{\lambda,\mu}(Z)\;=\;\underbrace{\sum_{k=0}^{N-1}\|X_{k+1}-X_{k}\|_{2}^{2}}_{\text{kinetic term: geometric similarity}}\;+\;\lambda\,\underbrace{\sum_{k=0}^{N}\Phi(X_{k})}_{\text{potential term: property bias}}\;+\;\mu\,\underbrace{\sum_{k=0}^{N-1}\|z_{k+1}-z_{k}\|_{2}^{2}}_{\text{latent regularizer}},$ (6) $$

where $\Phi$ is the property prediction (e.g. negative log MIC), $\lambda\geq 0$ balances geometry vs. property, and $\mu\geq 0$ regularizes latent jumps to discourage large chords in $\mathcal{Z}$.
The first term corresponds to kinetic energy (favoring smooth, short ambient curves), the second to a potential energy that biases toward low $\Phi$, and the third acts as a stabilizer ensuring robustness of the chord points in the latent space.

To perform optimization and search, we initialize $Z$ by straight-line interpolation in latent space, and later optimize $\mathcal{E}_{\lambda,\mu}(Z)$ w.r.t. $Z$ using ADAM solver.
During optimization, only the interior points $z_{1},\dots,z_{N-1}$ are updated. Given an optimized path $Z$, we decode each $z_{i}$ to a peptide $\mathtt{p}_{i}$ and remove consecutive duplicates, obtaining a peptide path $\left(\mathtt{p}^{\prime}_{0},\dots,\mathtt{p}^{\prime}_{N^{\prime}}\right)$ of length $N^{\prime}$.
We call a peptide $\mathtt{p}^{\prime}_{k}$ a seed if its potential satisfies $\Phi(\mathtt{p}^{\prime}_{k})\leq\theta_{\text{pot}}$ for a threshold $\theta_{\text{pot}}$.
A peptide $\mathtt{p}^{\prime}_{k}$ is called a well if it is a seed and also a local minimum of the potential $\Phi$ along the peptide path. The detailed algorithm is presented in Appendix [G](https://arxiv.org/html/2510.01988v3#A7) (Algoritm [6](https://arxiv.org/html/2510.01988v3#alg6)).

## 3 Results

### 3.1 PoGS evaluation

To evaluate the PoGS procedure, we applied it for the HydrAMP model [4], using average standardized MIC predictions against 3 *Escherichia coli* strains (*E. coli* ATCC11775, AIG221 and AIG222) of a APEX-derived transformer prediction  [20] (Appendix [H](https://arxiv.org/html/2510.01988v3#A8)) as the potential function.
300 prototype pairs $(z_{a},z_{b})$ were drawn from the Veltri dataset [21], restricted to active peptides (average MIC $\leq 32\,\mu$g/ml against 3 E. coli strains) with edit distance between prototypes $\geq 10$.

For each pair $z_{a}$ and $z_{b}$, we compared three paths between $z_{a}$ and $z_{b}$: straight Euclidean interpolation, PoGS without potential, and full PoGS ; Sec. [2.7](https://arxiv.org/html/2510.01988v3#S2.SS7)), measuring chord latent and ambient lengths, decoded peptide path lengths, and property-based counts of seeds and wells. PoGS hyperparametrs and metrics are described in Appendix [G](https://arxiv.org/html/2510.01988v3#A7).
PoGS achieved shorter ambient paths, and substantially more seeds and wells (Table [1](https://arxiv.org/html/2510.01988v3#S3.T1)), showing that property-aware potentials enrich trajectories for active candidates.

**Table 1: PoGS results. Comparison of straight interpolation, geodesic (no potential), and property-extended geodesic. Reported are latent length, ambient length, peptide path per length, and counts of seeds and wells.**
| Method | Latent length | Ambient length | Peptide path length | Potential | Seeds | Wells |
| --- | --- | --- | --- | --- | --- | --- |
| Straight interpolation | 6.43 $\pm$ 0.13 | 1601.56 $\pm$ 57.04 | 71.25 $\pm$ 6.12 | -501.00 $\pm$ 23.92 | 11.70 $\pm$ 5.54 | 2.50 $\pm$ 1.90 |
| PoGS w.o. potential ($\lambda=0$) | 7.98 $\pm$ 0.18 | 1240.03 $\pm$ 40.72 | 66.68 $\pm$ 4.23 | -603.34 $\pm$ 15.12 | 18.90 $\pm$ 8.40 | 6.40 $\pm$ 3.20 |
| PoGS ($\lambda=0.01$) | 9.02 $\pm$ 0.09 | 1432.55 $\pm$ 19.98 | 77.12 $\pm$ 6.12 | -785.45 $\pm$ 34.12 | 22.70 $\pm$ 10.49 | 12.60 $\pm$ 4.45 |

### 3.2 LE-BO evaluation

We next evaluated our LE-BO algorithm on a black-box peptide optimization task with a budget of 1400 evaluations. Optimization was initialized from four seed peptides derived using PoGS for $\lambda~=0.01$ and $\mu=0.1$ (Sec. [2.7](https://arxiv.org/html/2510.01988v3#S2.SS7)): *KY14*, *KF16*, *KK16*, *FL14*, as well as two previously described AMPs (*mammuthusin-3*, *hydrodamin-2*) [20]. The optimization procedure was repeated 10 times, and for each run the best value achieved across all optimization steps was recorded and reported in Table [2](https://arxiv.org/html/2510.01988v3#S3.T2). LE-BO hyperparameters are described in Appendix [I](https://arxiv.org/html/2510.01988v3#A9).

We compared LE-BO against a diverse set of state-of-the-art methods, including generative models: HydrAMP [4] with different creativity hyperparameter $\tau$ and PepCVAE [16]; the diffusion-based model LaMBO-2 [22]; evolutionary strategies: Latent CMA-ES and Relaxed CMA-ES [23], where the former operates in the HydrAMP latent space and the latter optimizes directly on a continuous relaxation of one-hot sequence encodings, AdaLead [24], PEX [25]; GFlowNet-based approaches: GFN-AL [26] and GFN-AL-$\delta$CS [27]; the reinforcement learning method DyNA-PPO [28]; probabilistic methods: CbAS [29] and Evolutionary BO [24]; the insertion-based Joker method [30]; and greedy Random Mutation [31]. Comparison to competitor latent BO methods SAASBO [32], Hvarfner’s Vanilla BO [33], and LineBO [34] was not feasible due to their relative computational inefficiency: while LE-BO finalized within 2 hours, for all those methods, a single run of the same number of 1400 steps within HydrAMP latent space did not finish within a week.

Figure: Figure 3: Antimicrobial peptide success rates across MIC thresholds. Success rate is defined as the fraction of generated peptides with MIC below the specified threshold against at least one tested strain. Results are based on experimental validation against 19 bacterial strains, including 8 MDR isolates.
Refer to caption: figs/amp_success_rate.png

Additionally, we conducted an ablation study on LE-BO variants to isolate the effects of random walks and mutation enumeration.
These variants modify the EnumerateLocal sub-procedure in Algorithm [2](https://arxiv.org/html/2510.01988v3#alg2).
The *Euclidean walk* variant replaces SORBES with a naive Euclidean random walk in the latent space.
The *mutation-disabled* variant omits MUTANG.
Finally, the *walk-disabled* variant uses only a single MUTANG without random walks.

As the optimized black-box function, we used the APEX MIC regressor [20], with the objective of minimization.
We minimize the average $\log_{2}$ MIC across three *E. coli* strains, reporting the mean over the best results from 10 repeated optimization runs (Table [2](https://arxiv.org/html/2510.01988v3#S3.T2)).

LE-BO achieved the best performance on five out of six prototypes, outperforming all baselines except for *FL14*, where it ranked second.
The Ablated LE-BO variant with Euclidean walk and enabled mutations
achieved the second-best performance on four out of six prototypes, underscoring the importance of mutation enumeration in the optimization process.
These ablations further confirmed that both Riemannian random walks and mutations are essential for consistently achieving low MIC values.

### 3.3 Wet-lab validation

To validate the computational predictions from PoGS and LE-BO, we conducted comprehensive *in vitro* antimicrobial testing of the generated peptides. A total of 29 novel peptides were experimentally evaluated: 4 seed peptides discovered through PoGS bi-prototype geodesics with property-aware potentials, and 25 analogs derived from these 4 seeds through LE-BO optimization for E. coli activity. These peptides were tested against a panel of 19 bacterial strains, including 8 multidrug-resistant (MDR) isolates (Appendix [J](https://arxiv.org/html/2510.01988v3#A10)), to assess both broad-spectrum activity and efficacy against clinically relevant resistant pathogens. We compared the success rate of PepCompass to previous methods that were also validated experimentally (HydrAMP [4], AMP-Diffusion [35], CLaSS [7], Joker [30]). To this end, for each activity threshold, we computed the fraction of tested peptides that were active against at least one bacterial strain with this activity thershold.

As demonstrated in Figure [3](https://arxiv.org/html/2510.01988v3#S3.F3), with unprecedented $100$% success rate for the standard activity threshold of $32\mu$g/ml and $82$% rate at much more demanding threshold of $4\mu$g/ml, PepCompass achieved superior performance across various MIC thresholds compared to previous methods, maintaining high success rates even when evaluated specifically against MDR strains. The experimental results confirmed the expected activity increase from prototypes to seeds to analogs for Gram-negative bacteria, directly validating our optimization strategy that targeted E. coli activity. Indeed, while the generated peptides showed some activity against Gram-positive bacteria (Figure [8](https://arxiv.org/html/2510.01988v3#A10.F8)), the clear enhancement from optimization was primarily observed against Gram-negative pathogens (Figure [9](https://arxiv.org/html/2510.01988v3#A10.F9)).

**Table 2: Minimal $\log_{2}$ MIC values achieved by each optimization method. Reported values are the mean and standard deviation over 10 runs. The top row shows the predicted $\log_{2}$ MIC of seeds before optimization. The first block reports baseline results, the second block shows ablations, and the last row presents our method. Bold: best overall value for a prototype. Underline: second-best.**
| Method | KY14 | KF16 | KK16 | FL14 | mammuthusin-3 | hydrodamin-2 |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $\log_{2}$ MIC value (seed) | 2.88 | 3.39 | 2.71 | 4.00 | 4.30 | 6.96 |  |  |
| GFN-AL | 2.73 $\pm$ 0.27 | 3.20 $\pm$ 0.19 | 2.63 $\pm$ 0.17 | 3.73 $\pm$ 0.47 | 4.30 $\pm$ 0.00 | 3.85 $\pm$ 0.76 |  |  |
| GFN-AL-$\delta$CS | 1.91 $\pm$ 0.19 | 1.74 $\pm$ 0.20 | 1.79 $\pm$ 0.08 | 2.06 $\pm$ 0.42 | 3.02 $\pm$ 0.19 | 1.77 $\pm$ 0.41 |  |  |
| PEX | 1.39 $\pm$ 0.07 | 1.48 $\pm$ 0.09 | 1.54 $\pm$ 0.14 | 1.27 $\pm$ 0.27 | 2.65 $\pm$ 0.09 | 1.14 $\pm$ 0.11 |  |  |
| Joker | 4.66 $\pm$ 2.04 | 3.98 $\pm$ 1.52 | 3.79 $\pm$ 1.61 | 4.22 $\pm$ 1.08 | 6.49 $\pm$ 1.75 | 6.28 $\pm$ 0.33 |  |  |
| Random Mutation | 1.23 $\pm$ 0.26 | 1.17 $\pm$ 0.13 | 0.97 $\pm$ 0.40 | 1.02 $\pm$ 0.59 | 2.12 $\pm$ 0.80 | 0.69 $\pm$ 0.19 |  |  |
| LaMBO-2 | 1.88 $\pm$ 0.25 | 2.11 $\pm$ 0.20 | 1.72 $\pm$ 0.18 | 1.76 $\pm$ 0.32 | 2.75 $\pm$ 0.15 | 2.17 $\pm$ 0.35 |  |  |
| Relaxed CMA-ES | 1.92 $\pm$ 0.13 | 1.83 $\pm$ 0.28 | 1.87 $\pm$ 0.30 | 1.93 $\pm$ 0.40 | 2.86 $\pm$ 0.29 | 1.66 $\pm$ 0.34 |  |  |
| Latent CMA-ES | 1.81 $\pm$ 0.33 | 2.07 $\pm$ 0.56 | 1.72 $\pm$ 0.29 | 1.72 $\pm$ 0.20 | 2.17 $\pm$ 0.60 | 1.87 $\pm$ 0.44 |  |  |
| CbAS | 2.88 $\pm$ 0.00 | 3.39 $\pm$ 0.00 | 2.71 $\pm$ 0.00 | 4.00 $\pm$ 0.00 | 4.30 $\pm$ 0.00 | 5.50 $\pm$ 0.93 |  |  |
| DyNAPPO | 1.45 $\pm$ 0.36 | 1.31 $\pm$ 0.22 | 1.34 $\pm$ 0.20 | 0.73 $\pm$ 0.53 | 2.42 $\pm$ 0.54 | 0.82 $\pm$ 0.39 |  |  |
| Evolutionary BO | 1.65 $\pm$ 0.23 | 1.45 $\pm$ 0.42 | 1.50 $\pm$ 0.12 | 1.70 $\pm$ 0.19 | 2.68 $\pm$ 0.12 | 1.28 $\pm$ 0.33 |  |  |
| AdaLead | 0.87 $\pm$ 0.49 | 1.01 $\pm$ 0.28 | 0.93 $\pm$ 0.24 | 0.51 $\pm$ 0.38 | 2.30 $\pm$ 0.28 | \ul0.66 $\pm$ 0.21 |  |  |
| PepCVAE | 3.66 $\pm$ 0.00 | 2.87 $\pm$ 0.01 | 3.14 $\pm$ 0.11 | 2.12 $\pm$ 0.00 | 4.30 $\pm$ 0.00 | 6.74 $\pm$ 0.06 |  |  |
| HydrAMP $\tau=5.0$ | 2.35 $\pm$ 0.08 | 2.03 $\pm$ 0.12 | 1.88 $\pm$ 0.10 | 2.19 $\pm$ 0.12 | 3.19 $\pm$ 0.27 | 2.39 $\pm$ 0.38 |  |  |
| HydrAMP $\tau=2.0$ | 2.60 $\pm$ 0.03 | 2.27 $\pm$ 0.02 | 2.11 $\pm$ 0.11 | 2.81 $\pm$ 0.30 | 3.99 $\pm$ 0.01 | 5.02 $\pm$ 0.28 |  |  |
| HydrAMP $\tau=1.0$ | 2.86 $\pm$ 0.01 | 2.27 $\pm$ 0.00 | 2.35 $\pm$ 0.00 | 3.72 $\pm$ 0.35 | 4.27 $\pm$ 0.10 | 6.09 $\pm$ 0.01 |  |  |
|  | Walk | Mutation |  |  |  |  |  |  |
| Ablated LE-BO | Euclidean | – | 1.37 $\pm$ 0.27 | 1.33 $\pm$ 0.23 | 1.24 $\pm$ 0.18 | 1.29 $\pm$ 0.17 | 0.91 $\pm$ 0.37 | 1.16 $\pm$ 0.24 |
| SORBES-SE | – | 1.37 $\pm$ 0.22 | 1.42 $\pm$ 0.22 | 1.12 $\pm$ 0.35 | 1.18 $\pm$ 0.20 | 1.07 $\pm$ 0.50 | 1.12 $\pm$ 0.13 |  |
| – | ✓ | 1.71 $\pm$ 0.20 | 1.46 $\pm$ 0.40 | 1.82 $\pm$ 0.13 | 1.24 $\pm$ 0.13 | 1.90 $\pm$ 0.42 | 1.12 $\pm$ 0.20 |  |
| Euclidean | ✓ | \ul0.65 $\pm$ 0.18 | \ul0.71 $\pm$ 0.18 | \ul0.83 $\pm$ 0.32 | 0.87 $\pm$ 0.22 | \ul0.78 $\pm$ 0.45 | 0.80 $\pm$ 0.18 |  |
| LE-BO | SORBES-SE | ✓ | 0.50 $\pm$ 0.24 | 0.60 $\pm$ 0.29 | 0.50 $\pm$ 0.14 | \ul0.60 $\pm$ 0.22 | 0.50 $\pm$ 0.38 | 0.58 $\pm$ 0.34 |

## Conclusions

By leveraging Riemannian latent geometry, interpretable tangent-space mutations, and potential-augmented geodesics, PepCompass enables efficient navigation of and optimization within peptide space across global and local scales. One of possible limitation of our approach is the reliance on the Eucleadian-distance based metric on decoder outputs in the ambient space. However, any other metrics that would better capture the ambient manifold could easily be incorporated. Already now, our computational experiments demonstrate superior performance over state-of-the-art baselines, and wet-lab validation confirms unprecedented success rates, with all tested peptides showing activity in vitro, including activity against multidrug-resistant pathogens. These results establish geometry-aware exploration as a powerful new paradigm for controlled generative design in vast biological spaces.

#### Reproducibility Statement

All proofs, together with their explanations and underlying assumptions, are provided in Appendices [B](https://arxiv.org/html/2510.01988v3#A2), [C](https://arxiv.org/html/2510.01988v3#A3) and [D](https://arxiv.org/html/2510.01988v3#A4).
All implementation details and hyperparameters used in the experiments are listed in Appendices [E](https://arxiv.org/html/2510.01988v3#A5), [F](https://arxiv.org/html/2510.01988v3#A6), [G](https://arxiv.org/html/2510.01988v3#A7), [H](https://arxiv.org/html/2510.01988v3#A8) and [I](https://arxiv.org/html/2510.01988v3#A9). Additionally, we release the source code and experimental configurations necessary to reproduce the key results.
Full details of wet-lab validation procedure are described in Appendix [J](https://arxiv.org/html/2510.01988v3#A10).

#### Ethics statement

This work includes methods generally applicable to peptide design. An example of potential malicious use of PepCompass would include optimization of peptide toxicity. However, the intention of this paper is to instead provide tools facilitating the design of therapeutic peptides.

#### LLM usage

Large Language Models (LLMs) were used in this work to improve the clarity and structure of the text. Their use was limited to rephrasing and stylistic refinement. In addition, LLMs were employed to support the search of related work, helping to verify the accuracy of claims about prior research.

## References

- Szymczak and Szczurek [2023]
P. Szymczak and E. Szczurek.
Artificial intelligence-driven antimicrobial peptide discovery.
*Current Opinion in Structural Biology*, 83:102733, December 2023.
ISSN 0959-440X.
doi: 10.1016/j.sbi.2023.102733.
Epub 2023 Nov 21.
- Szymczak et al. [2025]
P. Szymczak, W. Zarzecki, J. Wang, Y. Duan, J. Wang, L. P. Coelho, C. de la Fuente-Nunez, and E. Szczurek.
Ai-driven antimicrobial peptide discovery: Mining and generation.
*Accounts of Chemical Research*, 58(12):1831–1846, June 2025.
ISSN 0001-4842.
doi: 10.1021/acs.accounts.0c00594.
Epub 2025 Jun 3.
- Bond‐Taylor et al. [2021]
Sam Bond‐Taylor, Adam Leach, Yang Long, and Chris G. Willcocks.
Deep generative modelling: A comparative review of vaes, gans, normalizing flows, energy‐based and autoregressive models.
*arXiv preprint arXiv:2103.04922*, 2021.
- Szymczak et al. [2023]
Paulina Szymczak, Marcin Możejko, Tomasz Grzegorzek, Radosław Jurczak, Marta Bauer, Damian Neubauer, Karol Sikora, Michał Michalski, Jacek Sroka, Piotr Setny, Wojciech Kamysz, and Ewa Szczurek.
Discovering highly potent antimicrobial peptides with deep generative model hydramp.
*Nature Communications*, 14(1):5129, 2023.
doi: 10.1038/s41467-023-36994-z.
URL [https://doi.org/10.1038/s41467-023-36994-z](https://doi.org/10.1038/s41467-023-36994-z).
- Oort et al. [2021]
Colin M. Van Oort, Jonathon B. Ferrell, Jacob M. Remington, Safwan Wshah, Jianing Li, et al.
Ampgan v2: Machine learning-guided design of antimicrobial peptides.
*Journal of Chemical Information and Modeling*, 61(5):2198–2207, May 2021.
doi: 10.1021/acs.jcim.0c01441.
- Wang et al. [2022]
Danqing Wang, Zeyu Wen, Fei Ye, Lei Li, and Hao Zhou.
Accelerating antimicrobial peptide discovery with latent structure model (lssamp).
*arXiv preprint arXiv:2212.09450*, 2022.
URL [https://arxiv.org/abs/2212.09450](https://arxiv.org/abs/2212.09450).
- Das et al. [2020]
Payel Das, Tom Sercu, Kahini Wadhawan, Inkit Padhi, Sebastian Gehrmann, Flaviu Cipcigan, Vijil Chenthamarakshan, Hendrik Strobelt, Cicero dos Santos, Pin-Yu Chen, Yi Yan Yang, Jeremy Tan, James Hedrick, Jason Crain, and Aleksandra Mojsilovic.
Accelerating antimicrobial discovery with controllable deep generative models and molecular dynamics.
*arXiv preprint arXiv:2005.11248*, 2020.
URL [https://arxiv.org/abs/2005.11248](https://arxiv.org/abs/2005.11248).
CLaSS (Controlled Latent Attribute Space Sampling).
- Bengio et al. [2012]
Yoshua Bengio, Aaron Courville, and Pascal Vincent.
Representation learning: A review and new perspectives.
*arXiv preprint arXiv:1206.5538*, 2012.
doi: 10.48550/arXiv.1206.5538.
URL [https://arxiv.org/abs/1206.5538](https://arxiv.org/abs/1206.5538).
- Arvanitidis et al. [2018]
Georgios Arvanitidis, Lars Kai Hansen, and Søren Hauberg.
Latent space oddity: On the curvature of deep generative models.
In *International Conference on Learning Representations (ICLR)*, 2018.
URL [https://arxiv.org/abs/1710.11379](https://arxiv.org/abs/1710.11379).
- Loaiza-Ganem et al. [2024]
Gabriel Loaiza-Ganem, Brendan Leigh Ross, Rasa Hosseinzadeh, Anthony L. Caterini, and Jesse C. Cresswell.
Deep generative models through the lens of the manifold hypothesis: A survey and new connections.
*arXiv preprint arXiv:2404.02954*, 2024.
doi: 10.48550/arXiv.2404.02954.
URL [https://arxiv.org/abs/2404.02954](https://arxiv.org/abs/2404.02954).
Also certified at TMLR (2024).
- Brown et al. [2022]
Bradley C. A. Brown, Anthony L. Caterini, Brendan L. Ross, Jesse C. Cresswell, and Gabriel Loaiza-Ganem.
Verifying the union of manifolds hypothesis for image data.
*arXiv preprint arXiv:2207.02862*, 2022.
- Wang and Wang [2024]
Yi Wang and Zhiren Wang.
Cw complex hypothesis for image data.
In Ruslan Salakhutdinov, Zico Kolter, Katherine Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, *Proceedings of the 41st International Conference on Machine Learning*, volume 235 of *Proceedings of Machine Learning Research*, pages 51596–51613. PMLR, Jul 2024.
URL [https://proceedings.mlr.press/v235/wang24bs.html](https://proceedings.mlr.press/v235/wang24bs.html).
- Schwarz et al. [2022]
Simon Schwarz, Michael Herrmann, Anja Sturm, and Max Wardetzky.
Efficient random walks on riemannian manifolds.
*arXiv preprint arXiv:2202.00959*, 2022.
URL [https://arxiv.org/abs/2202.00959](https://arxiv.org/abs/2202.00959).
- Herrmann et al. [2023]
Michael Herrmann, Pit Neumann, Simon Schwarz, Anja Sturm, and Max Wardetzky.
Sub-riemannian random walks: From connections to retractions.
*arXiv preprint arXiv:2311.17289*, 2023.
- do Carmo [1992]
Manfredo P. do Carmo.
*Riemannian Geometry*.
Birkhäuser, 1992.
Translated by Francis Flaherty, reprint edition.
- Das et al. [2018]
Payel Das, Kahini Wadhawan, Oscar Chang, Tom Sercu, Cicero dos Santos, Matthew Riemer, Vijil Chenthamarakshan, Inkit Padhi, and Aleksandra Mojsilovic.
Pepcvae: Semi-supervised targeted design of antimicrobial peptide sequences.
*arXiv preprint arXiv:1810.07743*, 2018.
URL [https://arxiv.org/abs/1810.07743](https://arxiv.org/abs/1810.07743).
Revised version v3, Nov. 2018.
- Garnett [2023]
Roman Garnett.
*Bayesian Optimization*.
Cambridge University Press, 2023.
ISBN 9781108348973.
- Seeger [2004]
Matthias Seeger.
Gaussian processes for machine learning.
*International journal of neural systems*, 14(02):69–106, 2004.
- Maus et al. [2023]
Natalie Maus, Kaiwen Wu, David Eriksson, and Jacob Gardner.
Discovering many diverse solutions with bayesian optimization.
In *Proceedings of the 26th International Conference on Artificial Intelligence and Statistics (AISTATS)*, volume 206 of *Proceedings of Machine Learning Research*, pages 1779–1798. PMLR, April 2023.
doi: 10.48550/arXiv.2210.10953.
URL [https://proceedings.mlr.press/v206/maus23a/maus23a.pdf](https://proceedings.mlr.press/v206/maus23a/maus23a.pdf).
- Wan et al. [2024]
Fangping Wan, Marcelo D. T. Torres, Jacqueline Peng, Cesar de la Fuente-Nunez, et al.
Deep-learning-enabled antibiotic discovery through molecular de-extinction.
*Nature Biomedical Engineering*, 8(7):854–871, 2024.
doi: 10.1038/s41551-024-01201-x.
URL [https://doi.org/10.1038/s41551-024-01201-x](https://doi.org/10.1038/s41551-024-01201-x).
- Veltri et al. [2018]
Daniel Veltri, Uday Kamath, and Amarda Shehu.
Deep learning improves antimicrobial peptide recognition.
*Bioinformatics*, 34(16):2740–2747, 2018.
doi: 10.1093/bioinformatics/bty179.
URL [https://academic.oup.com/bioinformatics/article/34/16/2740/4953367](https://academic.oup.com/bioinformatics/article/34/16/2740/4953367).
- Gruver et al. [2023]
Nate Gruver, Samuel Stanton, Nathan Frey, Tim G. J. Rudner, Julien Lafrance-Vanasse, Isidro Hotzel, Arvind Rajpal, Kyunghyun Cho, and Andrew Gordon Wilson.
Protein design with guided discrete diffusion.
In *Advances in Neural Information Processing Systems (NeurIPS)*, 2023.
URL [https://proceedings.neurips.cc/paper_files/paper/2023/file/29591f355702c3f4436991335784b503-Paper-Conference.pdf](https://proceedings.neurips.cc/paper_files/paper/2023/file/29591f355702c3f4436991335784b503-Paper-Conference.pdf).
- Hansen [2016]
Nikolaus Hansen.
The cma evolution strategy: A tutorial.
*arXiv*, 2016.
doi: 10.48550/arXiv.1604.00772.
URL [https://arxiv.org/abs/1604.00772](https://arxiv.org/abs/1604.00772).
- Sinai et al. [2020]
Sam Sinai, Richard Wang, Alexander Whatley, Stewart Slocum, Elina Locane, and Eric D. Kelsic.
Adalead: A simple and robust adaptive greedy search algorithm for sequence design.
*arXiv*, 2020.
doi: 10.48550/arXiv.2010.02141.
URL [https://arxiv.org/abs/2010.02141](https://arxiv.org/abs/2010.02141).
- Ren et al. [2022]
Zhizhou Ren, Jiahan Li, Fan Ding, Yuan Zhou, Jianzhu Ma, and Jian Peng.
Proximal exploration for model-guided protein sequence design.
In *Proceedings of the 39th International Conference on Machine Learning (ICML)*, volume 162 of *Proceedings of Machine Learning Research*, pages 18520–18536, 2022.
URL [https://proceedings.mlr.press/v162/ren22a.html](https://proceedings.mlr.press/v162/ren22a.html).
- Jain et al. [2022]
Moksh Jain, Emmanuel Bengio, Alex Hernandez-Garcia, Jarrid Rector-Brooks, Bonaventure F. P. Dossou, Chanakya Ekbote, Jie Fu, Tianyu Zhang, Michael Kilgour, Dinghuai Zhang, Lena Simine, Payel Das, and Yoshua Bengio.
Biological sequence design with gflownets.
In *Proceedings of the 39th International Conference on Machine Learning (ICML)*, volume 162 of *Proceedings of Machine Learning Research*, pages 9845–9895, 2022.
URL [https://proceedings.mlr.press/v162/jain22a.html](https://proceedings.mlr.press/v162/jain22a.html).
- Kim et al. [2025]
Hyeonah Kim, Minsu Kim, Taeyoung Yun, Sanghyeok Choi, Emmanuel Bengio, Alex Hernández-García, and Jinkyoo Park.
Improved off-policy reinforcement learning in biological sequence design.
In *Proceedings of the 42nd International Conference on Machine Learning (ICML) — Poster*, 2025.
URL [https://openreview.net/forum?id=0TY5lhhdZm](https://openreview.net/forum?id=0TY5lhhdZm).
- Angermueller et al. [2020]
Christof Angermueller, David Dohan, David Belanger, Ramya Deshpande, Kevin Murphy, and Lucy Colwell.
Model-based reinforcement learning for biological sequence design.
In *International Conference on Learning Representations (ICLR)*, 2020.
URL [https://openreview.net/pdf?id=HklxbgBKvr](https://openreview.net/pdf?id=HklxbgBKvr).
- Brookes et al. [2019]
David Brookes, Hahnbeom Park, and Jennifer Listgarten.
Conditioning by adaptive sampling for robust design.
In *Proceedings of the 36th International Conference on Machine Learning (ICML)*, volume 97 of *Proceedings of Machine Learning Research*, pages 773–782, 2019.
URL [https://proceedings.mlr.press/v97/brookes19a.html](https://proceedings.mlr.press/v97/brookes19a.html).
- Porto et al. [2018]
William F. Porto, Isabel C. M. Fensterseifer, Suzana M. Ribeiro, and Octavio L. Franco.
Joker: An algorithm to insert patterns into sequences for designing antimicrobial peptides.
*Biochimica et Biophysica Acta (BBA) - General Subjects*, 1862(9):2043–2052, 2018.
doi: 10.1016/j.bbagen.2018.06.011.
URL [https://pubmed.ncbi.nlm.nih.gov/29928920/](https://pubmed.ncbi.nlm.nih.gov/29928920/).
- González-Duque et al. [2024]
Miguel González-Duque, Richard Michael, Simon Bartels, Yevgen Zainchkovskyy, Søren Hauberg, and Wouter Boomsma.
A survey and benchmark of high-dimensional bayesian optimization of discrete sequences.
*NeurIPS 2024 (Datasets & Benchmarks Track)*, 2024.
doi: 10.48550/arXiv.2406.04739.
URL [https://arxiv.org/abs/2406.04739](https://arxiv.org/abs/2406.04739).
- Eriksson and Jankowiak [2021]
David Eriksson and Martin Jankowiak.
High-dimensional bayesian optimization with sparse axis-aligned subspaces.
In *Uncertainty in Artificial Intelligence*, pages 493–503. PMLR, 2021.
- Hvarfner et al. [2024]
Carl Hvarfner, Erik Orm Hellsten, and Luigi Nardi.
Vanilla bayesian optimization performs great in high dimensions.
*arXiv preprint arXiv:2402.02229*, 2024.
- Kirschner et al. [2019]
Johannes Kirschner, Mojmir Mutny, Nicole Hiller, Rasmus Ischebeck, and Andreas Krause.
Adaptive and safe bayesian optimization in high dimensions via one-dimensional subspaces.
In *International Conference on Machine Learning*, pages 3429–3438. PMLR, 2019.
- Torres et al. [2025]
Marcelo DT Torres, Leo Tianlai Chen, Fangping Wan, Pranam Chatterjee, and Cesar de la Fuente-Nunez.
Generative latent diffusion language modeling yields anti-infective synthetic peptides.
*Cell Biomaterials*, 2025.
- Arvanitidis et al. [2020]
Georgios Arvanitidis, Sŏren Hauberg, et al.
Geometrically enriched latent spaces.
*arXiv preprint arXiv:2008.00565*, 2020.
- Shao et al. [2018]
Hao Shao, Nicha C. Dvornek, et al.
The riemannian geometry of deep generative models.
In *CVPR Workshops*, 2018.
- Lou [2023]
Shuwen Lou.
Discrete approximation to brownian motion with varying dimension in bounded domains.
*Kyoto Journal of Mathematics*, 63(3):641–667, 2023.
doi: 10.1215/21562261-10607383.
- Detlefsen et al. [2022]
Nicki S. Detlefsen, Søren Hauberg, and Wouter Boomsma.
Learning meaningful representations of protein sequences.
*Nature Communications*, 13(1):1914, 2022.
doi: 10.1038/s41467-022-29443-w.
- Kalatzis et al. [2020]
Dimitris Kalatzis, David Eklund, Georgios Arvanitidis, and Søren Hauberg.
Variational autoencoders with riemannian brownian motion priors.
In *ICML*, 2020.
arXiv:2002.05227.
- De Bortoli et al. [2022]
Valentin De Bortoli, James Thornton, et al.
Riemannian score-based generative modeling.
In *NeurIPS*, 2022.
- Shen et al. [2020]
Yujun Shen et al.
Interpreting the latent space of gans for semantic face editing.
In *CVPR*, 2020.
- Park et al. [2021]
Seonghyeon Park et al.
Low-rank subspaces in gans.
In *NeurIPS*, 2021.
- Wang et al. [2024]
Yixin Wang et al.
Understanding the latent space of diffusion models through the lens of riemannian geometry.
*arXiv preprint*, 2024.
URL [https://arxiv.org/abs/2307.12868](https://arxiv.org/abs/2307.12868).
- Alemi et al. [2023]
Alexander Alemi et al.
Diffeomorphic explanations with normalizing flows.
*arXiv preprint*, 2023.
URL [https://arxiv.org/abs/2301.12844](https://arxiv.org/abs/2301.12844).
- Schneider et al. [2022]
Steffen Schneider et al.
Internal representations of vision models through the lens of frames on data manifolds.
*arXiv preprint*, 2022.
URL [https://arxiv.org/abs/2211.10558](https://arxiv.org/abs/2211.10558).
- Pegios et al. [2024]
Paraskevas Pegios, Aasa Feragen, Andreas A. Hansen, and Georgios Arvanitidis.
Counterfactual explanations via riemannian latent space traversal.
*arXiv preprint arXiv:2411.02259*, 2024.
- Blondel et al. [2024]
Mathieu Blondel, Kimon Fountoulakis, et al.
(deep) generative geodesics.
*arXiv preprint arXiv:2407.11244*, 2024.
- Gibbons [2015]
Gary W. Gibbons.
The jacobi metric for timelike geodesics in static spacetimes.
*Classical and Quantum Gravity*, 33, 2015.
URL [https://arxiv.org/abs/1508.06755](https://arxiv.org/abs/1508.06755).
- Zhong et al. [2022]
Siyu Zhong et al.
Chemspace: Interpretable and interactive chemical space exploration.
*ChemRxiv*, 2022.
URL [https://chemrxiv.org/engage/chemrxiv/article-details/633ba619ea6a22b0ba07e841](https://chemrxiv.org/engage/chemrxiv/article-details/633ba619ea6a22b0ba07e841).
- Winter et al. [2022]
Robin Winter et al.
Navigating chemical space with latent flows.
*arXiv preprint arXiv:2206.06072*, 2022.
- Feng et al. [2021]
Zhou Feng et al.
Mario plays on a manifold: Generating functional content in latent space.
In *ICML*, 2021.
URL [http://proceedings.mlr.press/v139/feng21g/feng21g.pdf](http://proceedings.mlr.press/v139/feng21g/feng21g.pdf).
- Cao et al. [2022]
T. Cao et al.
Ancestral protein sequence reconstruction with a tree-structured ornstein-uhlenbeck vae.
In *ICLR (OpenReview)*, 2022.
URL [https://openreview.net/forum?id=FZoZ7a31GCW](https://openreview.net/forum?id=FZoZ7a31GCW).
- Wang [2010]
Xiaodong Wang.
Compactifications of complete riemannian manifolds and their applications.
12 2010.
- Hsu [2002a]
Elton P Hsu.
*Stochastic analysis on manifolds*.
Number 38. American Mathematical Soc., 2002a.
- Du and Hsu [2021]
Weitao Du and Elton P. Hsu.
Reflecting brownian motion and the gauss-bonnet-chern theorem, 2021.
URL [https://arxiv.org/abs/2106.10825](https://arxiv.org/abs/2106.10825).
- Hsu [2002b]
Elton P. Hsu.
*Stochastic Analysis on Manifolds*, volume 38 of *Graduate Studies in Mathematics*.
American Mathematical Society, Providence, R.I.; Great Britain, 2002b.
ISBN 0821808028.
- Eberhardt et al. [2024]
Jerome Eberhardt, Aidan Lees, Markus Lill, and Torsten Schwede.
Combining bayesian optimization with sequence-or structure-based strategies for optimization of protein-peptide binding, 2024.
URL [https://doi.org/10.26434/chemrxiv-2023-b7l81-v2](https://doi.org/10.26434/chemrxiv-2023-b7l81-v2).
- Szedmak and Bach [2025]
Sándor Szedmak and Eric Bach.
On the generalization of tanimoto-type kernels to real valued functions.
*arXiv preprint arXiv:2007.05943*, 2025.
URL [https://arxiv.org/abs/2007.05943](https://arxiv.org/abs/2007.05943).
v3 (originally posted 2020).
- Capecchi et al. [2020]
Alice Capecchi, Daniel Probst, and Jean-Louis Reymond.
One molecular fingerprint to rule them all: drugs, biomolecules, and the metabolome.
*Journal of Cheminformatics*, 12(1):43, 2020.
doi: 10.1186/s13321-020-00445-4.

## Appendix

## Appendix A Related work

##### Riemannian latent geometry.

Deep generative models can be endowed with Riemannian structure [15] by pulling back the ambient metric through the decoder Jacobian [9, 36, 37].
This allows distances and geodesics to reflect data geometry rather than Euclidean latent coordinates.
However, most approaches assume a single smooth manifold of fixed dimension.
Evidence from both theory and experiments shows that data often lie on unions of manifolds with varying intrinsic dimension or CW-complex structures [38, 11, 12].
In practice, existing methods either restrict the latent to very low dimensions ($\leq 8$) or inflate the metric with variance terms to ensure full rank [36, 39], but these ignore extrinsic geometry.
Our model instead *decomposes the latent into Riemannian submanifolds of varying dimensions*, enabling principled geometry across heterogeneous regions.

##### Brownian motion and random walks.

Latent Brownian motion has been used as a prior for VAEs [40] and for Riemannian score-based modeling [41].
But these approaches rely on first-order updates.
Convergence results for geodesic random walks show that correct Riemannian and sub-Riemannian Brownian motion requires second-order approximations [13, 14].
Our method explicitly incorporates this requirement, yielding diffusion-consistent walks where previous methods diverge.

##### Tangent spaces and interpretability.

Tangent-space analysis has mostly been applied in vision, where interpretable latent directions are discovered in GANs or diffusion models via Jacobian or eigen decompositions [42, 43, 44, 45].
Frames induced by augmentations provide another lens on local tangent geometry [46].
We are the first to provide an *interpretable tangent space in peptide sequence models*, where tangent vectors correspond directly to biologically meaningful mutations.

##### Geodesics and potentials.

Geodesics are widely used for interpolation and counterfactual reasoning in latent space [47, 48].
Yet these are typically free geodesics.
We extend the concept with *potentials*, leveraging the Jacobi metric [49] so that peptide traversals account for both geometry and biochemical preferences.

##### Applications in molecules and proteins.

Geometry-aware latent models have been used for chemical-space exploration [50, 51], molecule optimization [52], and protein sequence modeling [53, 39].
Our approach complements these by combining: (i) varying-dimension latent decomposition, (ii) second-order consistent Brownian walks, (iii) interpretable tangent spaces via mutations, and (iv) potential-augmented geodesics tailored to peptide design.

## Appendix B κ \kappa -stable dimension of the PepCVAE [ 16 ] and HydrAMP [ 4 ] models

Figure: Figure 4: Stable rank and peptide statistics. A–B) Distributions of the $\kappa$-stable dimension ($\kappa=10^{-8}$) for HydrAMP (A) and PepCVAE (B) across sampled peptides. C–D) Scatter plots of peptide length versus $\kappa$-stable dimension for HydrAMP (C) and PepCVAE (D), revealing a clear positive correlation: longer peptides tend to yield higher stable dimensions.
Refer to caption: x3.png

To quantify how the $\kappa$-stable dimension varies across the latent space,
we sampled $1{,}000$ points from the HydrAMP [4] training set
and computed their $\kappa$-stable dimensions under both the PepCVAE [16]
and HydrAMP [4] models.
We set $\kappa=10^{-8}$, corresponding to the precision of the float32 format
commonly used in neural network computations.
This choice ensures that no eigenvalue of the inverse metric tensor exceeds $10^{8}$,
thereby avoiding numerical instabilities.

As shown in Figure [4](https://arxiv.org/html/2510.01988v3#A2.F4)A,
the $\kappa$-stable dimension was always strictly below the latent dimensionality ($64$)
of both models.
This indicates that the effective local dimensionalities of the peptide spaces
are substantially smaller than the nominal latent dimension.
Furthermore, when comparing peptide length (Figure [4](https://arxiv.org/html/2510.01988v3#A2.F4)B)
to $\kappa$-stable dimension (Figure [4](https://arxiv.org/html/2510.01988v3#A2.F4)C),
we observe a clear positive correlation: longer peptides systematically yield
higher $\kappa$-stable dimensions.
Intuitively, this suggests that longer sequences admit more locally meaningful perturbations,
which naturally translate into a richer set of candidate substitutions.
This observation further justifies our MUTANG
strategy (§[2.4](https://arxiv.org/html/2510.01988v3#S2.SS4)),
as it allocates a larger and more diverse mutation pool precisely where
biological sequence length provides greater combinatorial flexibility.

## Appendix C Construction of κ \kappa -Stable Manifolds

In this section we will introduce a construction of $\kappa$-stable Riemannian submanifolds, namely

$$ $\mathbb{M}^{\kappa}=\{M_{z}^{\kappa}:z\in\mathcal{Z}\},\qquad M_{z}^{\kappa}=\big(W_{z}^{\kappa},G_{\operatorname{Dec}}\big),$ $$

where each $W_{z}^{\kappa}\ni z$ is an open affine submanifold of *maximal dimension* (denoted $k_{z}^{\kappa}$) through $z$, such that the pullback metric $G_{\operatorname{Dec}}$ restricted to $W_{z}^{\kappa}$, denoted $G_{\operatorname{Dec}}|_{W_{z}^{\kappa}}$, has full rank and satisfies the $\kappa$-stability condition

$$ $\inf_{\begin{subarray}{c}v\in T_{z}W_{z}^{\kappa}\\ \langle v,v\rangle_{\mathbb{R}^{d}}=1\end{subarray}}\langle v,v\rangle_{z}^{\operatorname{Dec}}>\kappa^{2}.$ $$

For this, we will use the truncated-SVD of a flattened decoder Jacobian $J_{\hat{Dec}}$. Let

$$ $J_{\operatorname{\hat{Dec}}}(z)=U(z)\,\Sigma(z)\,V(z)^{\top}$ $$

be the thin SVD of the decoder Jacobian, with singular values $\sigma_{0}(z)\geq\sigma_{1}(z)\geq\cdots\geq 0$, and $\Sigma(z)=\operatorname{diag}\left((\sigma_{0},\sigma_{1},\dots,\sigma_{d-1})\right)$. Now let us note that:

$$ $G_{\operatorname{Dec}}(z)=J_{\operatorname{\hat{Dec}}}(z)^{\top}J_{\operatorname{\hat{Dec}}}(z)=V(z)\Sigma^{2}(z)V(z)^{\top},$ (7) $$

and define the $\kappa$-stable dimension:

$$ $k^{\kappa}_{z}=\#\{\,i:\sigma_{i}(z)^{2}>\kappa\,\}.$ $$

Truncating SVD-decomposition to first $k_{z}^{\kappa}$ singular values gives

$$ $U^{\kappa}(z)\in\mathbb{R}^{(LA)\times k^{\kappa}_{z}},\quad\Sigma^{\kappa}_{z}\in\mathbb{R}^{k^{\kappa}_{z}\times k^{\kappa}_{z}},\quad V^{\kappa}(z)\in\mathbb{R}^{d\times k^{\kappa}_{z}},$ (8) $$

with truncated Jacobian:

$$ $J_{\hat{\operatorname{Dec}}}^{\kappa}=U(z)^{\kappa}\Sigma(z)^{\kappa}V(z)^{\kappa}\in\mathbb{R}^{LA\times d}.$ $$

We then define the affine subspace (together with its parametrization)

$$ $\mathcal{V}_{z}^{\kappa}=\{\phi^{\kappa}_{z}(x):x\in\mathbb{R}^{k^{\kappa}_{z}}\},\qquad\phi^{\kappa}_{z}(x)=z+V^{\kappa}(z)x.$ $$

Restricting the decoder to $\mathcal{V}_{z}^{\kappa}$ gives $\operatorname{Dec}^{\kappa}_{z}=\operatorname{\hat{Dec}}\circ\phi^{\kappa}_{z}$, with Jacobian

$$ $J_{\operatorname{Dec}^{\kappa}_{z}}(0)=U^{\kappa}(z)\Sigma^{\kappa}(z),$ (9) $$

which has full column rank $k^{\kappa}_{z}$. By the inverse function theorem, there exists a neighborhood $\hat{W}^{\kappa}_{z}=B(0,r^{\kappa}_{z})$ such that $\operatorname{Dec}^{\kappa}_{z}(\hat{W}^{\kappa}_{z})$ is a smooth $k^{\kappa}_{z}$-dimensional manifold. Its pullback metric is

$$ $G_{\operatorname{Dec}^{\kappa}_{z}}(0)=\big(\Sigma^{\kappa}(z)\big)^{2},$ (10) $$

with eigenvalues $\{\sigma_{i}(z)^{2}:\sigma_{i}(z)^{2}>\kappa\}$, all $\geq\kappa$.

Finally, set $W_{z}^{\kappa}=\phi^{\kappa}_{z}(\hat{W}^{\kappa}_{z})$. Then

$$ $M_{z}^{\kappa}=(W_{z}^{\kappa},G_{\operatorname{Dec}}),$ $$

and $(\phi^{\kappa}_{z})^{-1}$ is a diffeomorphic isometry between $(W_{z}^{\kappa},G_{\operatorname{Dec}})$ and $(\hat{W}_{z}^{\kappa},G_{\operatorname{Dec}^{\kappa}_{z}})$. From this and Eq. [10](https://arxiv.org/html/2510.01988v3#A3.E10) it follows that $M_{\kappa}^{z}$ satisfies the $\kappa$-stability condition.

The maximality of $k_{z}^{\kappa}$ follows from the fact that if there existed
an affine subspace $\bar{W}_{\kappa}^{z}$ with
$\dim(\bar{W}_{\kappa}^{z})>k_{z}^{\kappa}$ such that
$G_{\operatorname{Dec}}|_{\bar{W}_{z}^{\kappa}}$ has full rank and satisfies the
$\kappa$-stability condition, then we could define

$$ $\bar{W}^{\kappa}_{z}\cap(W_{z}^{\kappa})^{\perp}=\left\{w\in\bar{W}_{\kappa}^{z}:\forall v\in W_{z}^{\kappa},\ \langle v,w\rangle^{\text{Euc}}=0\right\}\subset\bar{W}^{\kappa}_{z},$ $$

as the subspace of $\bar{W}^{\kappa}_{z}$ orthogonal to $W^{\kappa}_{z}$.
Since $\dim(\bar{W}_{\kappa}^{z})>\dim(W_{\kappa}^{z})$, it follows that
$\dim\!\left(\bar{W}^{\kappa}_{z}\cap(W_{z}^{\kappa})^{\perp}\right)>0$.
By construction

$$ $\bar{W}^{\kappa}_{z}\cap(W_{z}^{\kappa})^{\perp}\subset\operatorname{span}\{V(z)_{:,k_{z}^{\kappa}},\dots,V(z)_{:,d-1}\}.$ $$

what implies that for all $v\in\bar{W}^{\kappa}_{z}\cap(W_{z}^{\kappa})^{\perp}$ it holds that

$$ $v=a_{k_{z}^{\kappa}}V(z)_{:,k_{z}^{\kappa}}+\dots+a_{d-1}V(z)_{:,d-1},$ $$

for some $a_{k_{z}^{\kappa}},\dots,a_{d-1}\in\mathbb{R}$. Now take $v\in\bar{W}^{\kappa}_{z}\cap(W_{z}^{\kappa})^{\perp}$ such that
$\langle v,v\rangle^{\text{Euc}}=1$.
Equation [7](https://arxiv.org/html/2510.01988v3#A3.E7) then implies

$$ $\displaystyle\langle v,v\rangle^{\text{Dec}}_{z}$ $\displaystyle=a_{k_{z}^{\kappa}}^{2}\sigma_{k_{z}^{\kappa}}^{2}\|V(z)_{:,k_{z}^{\kappa}}\|^{2}+\dots+a_{d-1}^{2}\sigma_{d-1}^{2}\|V(z)_{:,d-1}\|^{2}$ (11) $\displaystyle\leq\kappa\Big(a_{k_{z}^{\kappa}}^{2}\|V(z)_{:,k_{z}^{\kappa}}\|^{2}+\dots+a_{d-1}^{2}\|V(z)_{:,d-1}\|^{2}\Big)$ (12) $\displaystyle=\kappa,$ (13) $$

which contradicts the assumption that $\bar{V}_{z}^{\kappa}$ satisfies the
$\kappa$-stability condition.

Note. This construction cannot be replaced by a direct Frobenius theorem argument, since $k^{\kappa}_{z}=\ell$ at a point does not imply that $k^{\kappa}$ is constant in a neighborhood (see Appendix [C.1](https://arxiv.org/html/2510.01988v3#A3.SS1)).

### C.1 On the local instability of κ \kappa -stable dimension

Recall that $k^{\kappa}_{z}=\#\{\,i:\sigma_{i}(z)>\sqrt{\kappa}\,\}$ counts the number of singular values of $J_{\operatorname{Dec}}(z)$ exceeding the threshold $\sqrt{\kappa}$. While $k^{\kappa}_{z}$ is well defined at every point $z$, it need not be locally constant. In particular, singular values of $J_{\operatorname{Dec}}(z)$ depend continuously on $z$, but they can cross the threshold $\sqrt{\kappa}$ arbitrarily close to a given point. Hence, even if $k^{\kappa}_{z}=\ell$ at some $z$, there may exist nearby points $z^{\prime}$ with $k^{\kappa}_{z^{\prime}}>\ell$ (see Figure [5](https://arxiv.org/html/2510.01988v3#A3.F5)).

Figure: Figure 5: Example of a local non-stability of a $\kappa$-stable dimension. A function $f(x)=x^{3}+\kappa x$ has a stable rank $k^{\kappa}$ equal to 1 everywhere except of 0. So in every neighbourhood of 0, a stable rank is different than 0, thus preventing the application of a Frobenious theorem.
Refer to caption: figs/Non-stable-rank.png

This observation prevents a direct application of the Frobenius or constant rank theorem, which require a rank function that is constant in a neighborhood. Our construction in Sec. [2.1](https://arxiv.org/html/2510.01988v3#S2.SS1) circumvents this issue by working with an open set $W^{\kappa}_{z}$ around $z$ on which the rank remains constant, thereby ensuring that both $M^{\kappa}_{z}$ and $\operatorname{Dec}(W^{\kappa}_{z})$ are smooth $k^{\kappa}_{z}$-dimensional submanifolds.

## Appendix D Proof of Theorem 1

In this section we prove the main theorem of the paper. As preparation, we first recall the definition of Riemannian Brownian motion, starting with the compact case.

##### Riemannian Brownian Motion (compact case).

Let $(M,g)$ be a smooth, compact, connected, $d$-dimensional Riemannian manifold with Riemannian metric $g$. A *Riemannian Brownian motion* on $M$ is a continuous stochastic process

$$ $B=\{B_{t}\}_{t\geq 0}$ $$

defined on a filtered probability space $(\Omega,\mathcal{F},\{\mathcal{F}_{t}\}_{t\geq 0},\mathbb{P})$, satisfying:

- 1.
$B_{0}=x\in M^{\prime}$ almost surely, for some fixed starting point $x\in M$.
- 2.
The sample paths $t\mapsto B_{t}$ are almost surely continuous and adapted to the filtration $\{\mathcal{F}_{t}\}$.
- 3.
For every smooth function $f\in C^{\infty}(M)$, the process
$f(B_{t})-f(B_{0})-\tfrac{1}{2}\int_{0}^{t}(\Delta_{g}f)(B_{s})\,ds$
is a real-valued local martingale, where $\Delta_{g}$ denotes the Laplace–Beltrami operator associated with $g$.
- 4.
The generator of $B_{t}$ is $\tfrac{1}{2}\Delta_{g}$, i.e.
$\lim_{t\rightarrow 0}\frac{\mathbb{E}[f(B_{t})]-f(x)}{t}=\tfrac{1}{2}(\Delta_{g}f)(x),\quad\forall f\in C^{\infty}(M).$

##### Extension to the non-compact case: smooth spherical-cap compactification.

Our manifolds of interest, $M_{z}^{\kappa}(\alpha),\ \alpha\in(0,1),\ z\in\mathcal{Z}$, are open subsets of $M^{\kappa}_{z}$ and therefore non-compact. To define Brownian motion in this setting, one needs to control the behaviour of paths near the boundary. Classical approaches include: (i) compactification [54], (ii) stopping the process at the boundary [55], or (iii) reflecting it [56]. In our work we adopt a compactification strategy via a smooth spherical cap (see Figure [6](https://arxiv.org/html/2510.01988v3#A4.F6)), followed by stopping on the boundary of a natural embedding of $M^{\kappa}_{z}(\alpha)$.

Concretely, let $k^{\kappa}_{z}$ be the $\kappa$-stable dimension and consider the unit sphere

$$ $S^{k^{\kappa}_{z}}_{1}\subset\mathbb{R}^{k^{\kappa}_{z}+1}.$ $$

Take an atlas of this sphere consisting of two charts $(U_{1},\psi_{1})$, $(U_{2},\psi_{2})$ such that $U_{1},U_{2}\subset\mathbb{R}^{k_{z}^{\kappa}}$ $\psi_{1}(U_{1})\cup\psi_{2}(U_{2})=S^{k^{\kappa}_{z}}_{1}$, with $\alpha\bar{W}_{z}^{\kappa}\subset U_{1}$ $(\alpha\bar{W}_{z}^{\kappa}=\{\alpha v:v\in\bar{W}_{z}^{\kappa}\}$) and

$$ $\psi_{1}\circ\psi_{2}^{-1}(U_{2})\cap\bar{W}_{z}^{\kappa}=\emptyset.$ $$

Let $G_{\psi_{i}}$ be the pullback metric on $U_{i}$ induced by $\psi_{i}$.

Choose a smooth bump function $b\in C^{\infty}$ such that

$$ $b\equiv 1\quad\text{on }(\tfrac{2}{3}\alpha+\tfrac{1}{3})\bar{W_{z}^{\kappa}},\qquad b\equiv 0\quad\text{on }(\tfrac{1}{3}\alpha+\tfrac{2}{3})\bar{W_{z}^{\kappa}}.$ $$

We then define the compactified manifold $\overline{M^{\kappa}_{z}}(\alpha)$ with charts $\{(U_{1},\psi_{1}),(U_{2},\psi_{2})\}$ and Riemannian metric on $U_{1}$ given by

$$ $G=b\,G_{\operatorname{Dec}^{\kappa}_{z}}\;+\;(1-b)\,G_{\psi_{1}},$ $$

where

$$ $\overline{\operatorname{Dec}^{\kappa}_{z}}(x)=\begin{cases}\operatorname{Dec}^{\kappa}_{z}(x),&x\in\alpha\bar{W}_{z}^{\kappa},\[6.0pt] 0,&\text{otherwise}.\end{cases}$ $$

By construction, there is a natural isometric embedding

$$ $M^{\kappa}_{z}(\alpha)\hookrightarrow\overline{M^{\kappa}_{z}}(\alpha).$ $$

This compactification allows us to invoke convergence results for Brownian motion on compact manifolds, while ensuring that in the region of interest the geometry coincides with that of the original $\kappa$-stable manifold.

Figure: Figure 6: Sphere-cap manifold compactification $\overline{M^{\kappa}_{z}}$. The figure illustrates how the $M_{z}^{\kappa}$ manifold is compactified by capping off the spherical domain with the appropriate boundary conditions.
Refer to caption: figs/sphere_cap.png

###### Theorem (Main Theorem) .

Let $(Z_{i}^{\epsilon})_{i\geq 0}$ be the sequence produced by Algorithm [1](https://arxiv.org/html/2510.01988v3#alg1), for $M_{z}^{\kappa}(\alpha)$ with $\alpha\in(0,1)$ and diffusion horizon $T>0$, and define its continuous-time interpolation

$$ $Z^{\epsilon}(t):=Z^{\epsilon}_{\lfloor\epsilon^{-2}t\rfloor},\qquad t\geq 0.$ $$

Let $R^{z}_{\kappa}=d_{M_{z}^{\kappa}}(z,\alpha W_{z}^{\kappa})^{c})$, and suppose $L\geq 1$ satisfies

$$ $\sup_{x\in M^{\kappa}_{z}(\alpha)}\operatorname{Ric}_{M_{z}^{\kappa}}(x)\geq-L^{2}.$ $$

Then for $T<\tfrac{(R_{z}^{\kappa})^{2}}{4k_{z}^{\kappa}L}$, as $\epsilon\to 0$, the process $X^{\epsilon}$ converges in distribution to Riemannian Brownian motion stopped at the boundary of $M_{z}^{\kappa}(\alpha)$, with respect to the Skorokhod topology, on a set $C^{T}_{\kappa,z}\subset\Omega$ such that

$$ $\mathbb{P}\!\left(C^{T}_{\kappa,z}\right)\;\geq\;1-\exp\!\left(-\tfrac{(R_{z}^{\kappa})^{2}}{32T}\right).$ $$

###### Proof.

Let $\overline{M^{\kappa}_{z}(\alpha)}$ be the spherical-cap compactification of $M^{\kappa}_{z}(\alpha)$. Schwarz et al. [13] showed that the non-stopped version of Algorithm [1](https://arxiv.org/html/2510.01988v3#alg1), extended to $\overline{M^{\kappa}_{z}(\alpha)}$, produces a process $\overline{Z^{\epsilon}}$ that converges to $B$ in the Skorokhod topology on $\overline{M^{\kappa}_{z}(\alpha)}$.

For a closed set $A$ define the exit time

$$ $T^{X}_{A}=\inf\{t\in[0,T]:X(t)\notin A\}\land T$ $$

Both $T_{\alpha W_{z}^{\kappa}}^{\overline{X^{\epsilon}}}$ and $T_{\alpha W_{z}^{\kappa}}^{B}$ are valid stopping times (by right-continuity and because $(W_{z}^{\kappa})^{c}$ is closed), and (from the construction of the Algorithm [1](https://arxiv.org/html/2510.01988v3#alg1):

$$ $Z^{\epsilon}=\overline{Z^{\epsilon}}_{\cdot\wedge\alpha W_{z}^{\kappa}}^{\overline{X^{\epsilon}}}$ $$

Convergence in Skorokhod topology does not automatically imply convergence of stopping times (see Appendix [D.1](https://arxiv.org/html/2510.01988v3#A4.SS1) for a counterexample). However, for the high-probability event

$$ $C^{T}_{\kappa,z}=\left\{\omega\in\Omega:\forall\,t\in[0,T],\ B_{t}(\omega)\in\alpha W_{z}^{\kappa}\right\},$ $$

we have that $\exists\epsilon_{0}$ such that $\forall\epsilon>\epsilon_{0}$,

$$ $T_{\alpha W_{z}^{\kappa}}^{\overline{X^{\epsilon}}}\equiv T,\quad T_{\alpha W_{z}^{\kappa}}^{B}\equiv T,$ $$

and thus convergence holds on $C^{T}_{\kappa,z}$.

It remains to lower-bound $\mathbb{P}(C^{T}_{\kappa,z})$. Observe that

$$ $\Omega\setminus C^{T}_{\kappa,z}\subset D^{T}_{\kappa,z}=\Bigl\{\omega\in\Omega:\exists t\in[0,T],\ d_{M_{z}^{\kappa}}(B_{t}(\omega),z)\geq R_{z}^{\kappa}\Bigr\}.$ $$

Hence

$$ $\mathbb{P}(C^{T}_{\kappa,z})\;\geq\;1-\mathbb{P}(D^{T}_{\kappa,z}).$ $$

###### Lemma 1 (Exit-time bound) .

Suppose $L\geq 1$ satisfies

$$ $\sup_{x\in M^{\kappa}_{z}(\alpha)}\operatorname{Ric}_{M_{z}^{\kappa}}(x)\geq-L^{2}.$ $$

Let $T_{R^{\kappa}_{z}}$ be the first exit time of Riemannian Brownian motion from

$$ $B_{M^{\kappa}_{z}}(B_{0},R_{z}^{\kappa})=\{x\in M^{\kappa}_{z}(\alpha):d_{M_{z}^{\kappa}}(B_{0},x)<R_{z}^{\kappa}\}.$ $$

Then

$$ $\mathbb{P}(T_{R^{\kappa}_{z}}\leq T)\;\leq\;\exp\!\left(-\tfrac{(R_{z}^{\kappa})^{2}}{8T}\Bigl(1-\tfrac{2Tk_{z}^{\kappa}L}{(R_{z}^{\kappa})^{2}}\Bigr)^{2}\right).$ $$

###### Proof.

Let $r(x)=d_{M_{z}^{\kappa}}(B_{0},x)$ and write $r_{t}:=r(B_{t})$. On $M_{z}^{\kappa}$ the function $r$ is smooth. The semimartingale decomposition of $r_{t}$ (see, e.g., [57, Eq. (3.6.1)]) gives

$$ $r_{t}^{2}\;\leq\;2\int_{0}^{t}r_{s}\,d\beta_{s}\;+\;\int_{0}^{t}r_{s}\,\Delta r(B_{s})\,ds\;+\;t,$ $$

where $\beta$ is a real Brownian motion adapted to $B$, and we have used that the local time term is nonnegative and can be dropped to obtain an inequality.

By the Laplacian comparison theorem (Ricci$(\cdot)\geq-(k_{z}^{\kappa}-1)L^{2}$), for $r>0$,

$$ $\Delta r\;\leq\;(k_{z}^{\kappa}-1)\,L\,\coth(Lr)\;\leq\;(k_{z}^{\kappa}-1)\Bigl(L+\tfrac{1}{r}\Bigr),$ $$

hence

$$ $r\,\Delta r\;\leq\;(k_{z}^{\kappa}-1)\bigl(Lr+1\bigr).$ $$

Up to the first exit time $T_{R_{z}^{\kappa}}:=\inf\{t\geq 0:\,r_{t}\geq R_{z}^{\kappa}\}$ we have $r_{s}\leq R_{z}^{\kappa}$, so

$$ $r_{s}\,\Delta r(B_{s})\;\leq\;(k_{z}^{\kappa}-1)\bigl(LR_{z}^{\kappa}+1\bigr)\;\leq\;k_{z}^{\kappa}L\,+\,k_{z}^{\kappa}\;\leq\;2\,k_{z}^{\kappa}L,$ $$

using $L\geq 1$. Therefore, for $t=T_{R_{z}^{\kappa}}\wedge T$,

$$ $r_{t}^{2}\;\leq\;2\!\int_{0}^{t}r_{s}\,d\beta_{s}\;+\;2\,k_{z}^{\kappa}L\,t\;+\;t\;\leq\;2\!\int_{0}^{t}r_{s}\,d\beta_{s}\;+\;2\,k_{z}^{\kappa}L\,t\;+\;t.$ (14) $$

On the event $\{T_{R_{z}^{\kappa}}\leq T\}$ we have $t=T_{R_{z}^{\kappa}}$ and $r_{t}\geq R_{z}^{\kappa}$, hence from equation [14](https://arxiv.org/html/2510.01988v3#A4.E14)

$$ $(R_{z}^{\kappa})^{2}\;\leq\;2\!\int_{0}^{T_{R_{z}^{\kappa}}}r_{s}\,d\beta_{s}\;+\;2\,k_{z}^{\kappa}L\,T.$ $$

Rearranging,

$$ $\int_{0}^{T_{R_{z}^{\kappa}}}r_{s}\,d\beta_{s}\;\geq\;\frac{(R_{z}^{\kappa})^{2}-2\,k_{z}^{\kappa}L\,T}{2}.$ $$

Set $M_{t}:=\int_{0}^{t}r_{s}\,d\beta_{s}$, a continuous martingale with quadratic variation
$\langle M\rangle_{t}=\int_{0}^{t}r_{s}^{2}\,ds\leq(R_{z}^{\kappa})^{2}t$ up to time $T_{R_{z}^{\kappa}}$. By the Dambis–Dubins–Schwarz theorem there exists a standard Brownian motion $W$ such that
$M_{T_{R_{z}^{\kappa}}}=W_{\eta}$ with $\eta=\langle M\rangle_{T_{R_{z}^{\kappa}}}\leq(R_{z}^{\kappa})^{2}T_{R_{z}^{\kappa}}\leq(R_{z}^{\kappa})^{2}T$ on $\{T_{R_{z}^{\kappa}}\leq T\}$. Thus,

$$ $\{T_{R_{z}^{\kappa}}\leq T\}\;\subset\;\Bigl\{W_{\eta}\;\geq\;\frac{(R_{z}^{\kappa})^{2}-2\,k{\kappa}(z)L\,T}{2}\Bigr\}.$ $$

Using the Gaussian tail bound together with $\eta\leq(R_{z}^{\kappa})^{2}T$ (and the reflection principle),

$$ $\mathbb{P}\bigl(T_{R_{z}^{\kappa}}\leq T\bigr)\;\leq\;\exp\!\left(-\frac{\bigl((R_{z}^{\kappa})^{2}-2\,k_{z}^{\kappa}L\,T\bigr)^{2}}{8\,(R_{z}^{\kappa})^{2}\,T}\right)\;=\;\exp\!\left(-\frac{(R_{z}^{\kappa})^{2}}{8T}\Bigl(1-\frac{2\,k_{z}^{\kappa}L\,T}{(R_{z}^{\kappa})^{2}}\Bigr)^{\!2}\right),$ $$

which is the claimed bound.
∎

Applying the lemma, if $T<\tfrac{(R_{z}^{\kappa})^{2}}{4k_{z}^{\kappa}L}$, then

$$ $\mathbb{P}(D^{T}_{\kappa,z})=\mathbb{P}(T_{R_{z}^{\kappa}}\leq T)\;\leq\;\exp\!\left(-\tfrac{(R_{z}^{\kappa})^{2}}{32T}\right),$ $$

which yields

$$ $\mathbb{P}(C^{T}_{\kappa,z})\;\geq\;1-\exp\!\left(-\tfrac{(R_{z}^{\kappa})^{2}}{32T}\right).$ $$

∎

###### Theorem (Main Theorem) .

###### Proof.

###### Lemma 1 (Exit-time bound) .

###### Proof.

##### Remark.

The lemma shows that the probability of exiting the ball of radius $R^{\kappa}_{z}$ before time $T$ decays exponentially in $\tfrac{(R^{\kappa}_{z})^{2}}{T}$, up to curvature- and rank-dependent constants.
Intuitively, this means that with overwhelming probability the Riemannian Brownian motion (and hence our random walk in the $\epsilon\to 0$ limit) remains confined inside $B_{{M^{\kappa}_{z}}(}(z,R^{\kappa}_{z})$ for all $t\leq T$.
This high-probability control is what allows us to restrict attention to the event $C^{T}_{\kappa,z}$ in the proof of Theorem [1](https://arxiv.org/html/2510.01988v3#S2.Ex7).

### D.1 On stopping times and Skorohod convergence

An important subtlety in the proof of Theorem [1](https://arxiv.org/html/2510.01988v3#S2.Ex7) is that convergence of processes in the Skorohod topology does not, in general, imply convergence of associated stopping times. Figure [7](https://arxiv.org/html/2510.01988v3#A4.F7) illustrates this phenomenon with a simple deterministic example.

Let $X_{t}=\sin(t)$, and consider the approximating sequence of processes

$$ $X^{n}_{t}=\Bigl(1-\tfrac{1}{n}\Bigr)\sin(t).$ $$

Clearly $X^{n}\to X$ uniformly on compact time intervals, hence also in the Skorohod topology. However, the stopping time defined as

$$ $T=\inf\{t\geq 0:X_{t}=1\}$ $$

does not converge along this sequence. Indeed, $T=\pi/2$ for $X$, but for every finite $n$, the process $X^{n}$ never reaches $1$ and therefore $T^{n}=\infty$. Thus, despite $X^{n}\to X$ in Skorohod topology, we have $T^{n}\not\to T$.

Figure: Figure 7: Skorohod convergence does not imply convergence of stopping times. The black dashed curve shows $X_{t}=\sin(t)$, which reaches $1$ at $t=\pi/2$ (red dot). The colored curves show approximations $X^{n}_{t}=(1-\tfrac{1}{n})\sin(t)$, converging uniformly to $X_{t}$. However, none of the $X^{n}_{t}$ ever reach $1$, so their stopping times for hitting level $1$ are infinite. This illustrates that Skorohod convergence of processes does not guarantee convergence of stopping times defined by hitting closed sets.
Refer to caption: figs/skorohod-stopping.png

In the proof of Theorem [1](https://arxiv.org/html/2510.01988v3#S2.Ex7) we avoid this issue by restricting to the high-probability set $C^{T}_{\kappa,z}$ where the Brownian path remains in the interior of the ball. On this event the stopping times agree with $T$, ensuring consistency with the limiting process.

## Appendix E SORBES implementation details

We now provide practical details for the implementation of the SORBES algorithm.

##### Approximating Jacobian.

The decoder Jacobian $J_{\hat{\operatorname{Dec}}}$ can be obtained exactly using one decoder forward pass and $LA$ backward passes, where $LA$ is a dimensionality of ambient space. To reduce computational cost, we approximate it via finite differences. Specifically, the $i$-th column of the Jacobian is approximated as

$$ $\frac{\partial\hat{\operatorname{Dec}}}{\partial z_{i}}(z)\;\approx\;\frac{\hat{\operatorname{Dec}}(z+\varepsilon e_{i})-\hat{\operatorname{Dec}}(z)}{\varepsilon},$ (15) $$

where $e_{i}$ denotes the $i$-th standard basis vector in the latent space $\mathcal{Z}$ and $\varepsilon>0$ is a small perturbation parameter. This approximation requires only $d+1$ decoder forward passes, where $d$ is a dimensionality of latent space, providing a substantial reduction in computational overhead.

##### Sampling a unit tangent direction.

We adopt the efficient implementation of Schwarz et al. [13], which exploits a thin SVD of the decoder Jacobian to orthogonalize tangent directions.

##### Approximating Γ ​ ( z ) ​ [ v , v ] \Gamma(z)[v,v] .

Computing Christoffel symbols directly requires evaluating first derivatives of the metric, which is computationally expensive and numerically unstable. Instead, we use an extrinsic approach: the covariant derivative of a curve can be obtained from its Euclidean acceleration in the ambient space, projected back onto the tangent space [15]. Concretely, for a point $z\in\mathcal{Z}$, $z^{\prime}\in W^{\kappa}_{z}$ and a probe radius $\rho>0$, we approximate the extrinsic acceleration of a decoded curve along $v\in T_{z^{\prime}}M_{z}^{\kappa}$ by a second-order central difference:

$$ $a^{z,\kappa}_{\mathrm{ex}}(v;z^{\prime},\rho)\;\approx\;\frac{\hat{\operatorname{Dec}}(z^{\prime}+\rho v)-2\,\hat{\operatorname{Dec}}(z^{\prime})+\hat{\operatorname{Dec}}(z^{\prime}-\rho v)}{\rho^{2}}.$ (16) $$

Projecting back to the latent tangent space using the Moore–Penrose pseudoinverse of the truncated Jacobian yields an efficient approximation of the Christoffel correction:

$$ $\Gamma(z^{\prime})[v,v]\;\approx\;c(v;z^{\prime},\rho)\;=\;J_{\hat{\operatorname{Dec}}}^{\kappa}(z^{\prime})^{+}\,a_{\mathrm{ex}}(v;z^{\prime},\rho),\qquad c(v;z^{\prime},\rho)\in\mathbb{R}^{k^{\kappa}_{z}}.$ (17) $$

##### Adaptive step size ϵ \epsilon .

Since the computation of Christoffel symbols involves the (pseudo)inverse of the Jacobian, small values of $\kappa$ may amplify numerical noise. In this case, the update

$$ $z^{\epsilon}_{i}\;=\;z^{\epsilon}_{i-1}+\epsilon v-\epsilon^{2}\Gamma[v,v]\;=\;z^{\epsilon}_{i-1}+\Delta(\epsilon),$ $$

may become unreasonably large in the ambient Euclidean metric on $U_{z}^{\kappa}$, making the algorithm unstable.

To control this, we adapt the step size $\epsilon$ so that the update norm never exceeds a predefined threshold $\Delta_{\max}$:

$$ $\epsilon_{\Delta_{\max}}\;=\;\min\Bigl\{\,\epsilon^{\prime}>0\,:\,\|\Delta(\epsilon^{\prime})\|\geq\Delta_{\max}\,\Bigr\}\,\vee\,\epsilon,$ $$

where $a\vee b=\max\{a,b\}$.
This guarantees that the step size is never smaller than the nominal $\epsilon$, but shrinks adaptively whenever the second-order correction is large.

##### SORBES (Stable/Efficient).

We refer to the resulting algorithm with adaptive step size control and extrinsic approximation of Christoffel symbols (Sec. [2.3](https://arxiv.org/html/2510.01988v3#S2.SS3)) as SORBES-SE. This variant is numerically stable in ill-conditioned regions of the decoder geometry while preserving the efficiency of the original scheme.

Figure: Algorithm 4 SORBES-SE

## Appendix F MUTANG - Mutation Enumeration in Tangent Space

The detailed description of MUTANG algorithm is presented in Algorithm [5](https://arxiv.org/html/2510.01988v3#alg5).

Figure: Algorithm 5 MUTANG

## Appendix G PoGS

Below we present the details of PoGS training and evaluation metrics:

PoGS hyperparameters:

- •
PoGS without potential: $\lambda=0$ and $\mu=0.1$,
- •
Full PoGS: $\lambda=0.01$ and $\mu=0.1$.
- •
All: $\theta_{\text{pot}}=5$.

PoGS metrics:

- •
chord ambient length:
$\sum_{k=0}^{N-1}\|X_{k+1}-X_{k}\|_{2}$
- •
chord latent length:
$\sum_{k=0}^{N-1}\|z_{k+1}-z_{k}\|_{2}$

For computation of seeds and wells, we excluded first and last 20% of a peptide path were excluded to avoid trivial rediscovery.

For each pair, the chord length $N$ was determined dynamically as

$$ $N=\left\lfloor\rho\cdot\|z_{a}-z_{b}\|_{2}\right\rfloor,$ $$

where $\rho$ is the point density hyperparameter (set to $\rho=90$ in our experiments).
This construction guarantees that longer trajectories in the latent space are sampled more densely than shorter ones, preserving a uniform resolution across geodesics of varying length.
The geodesic points $\{z_{i}\}_{i=1}^{n}$ were optimized using the Adam optimizer with learning rate $\eta=10^{-3}$ and weight decay $10^{-5}$. We applied a ReduceLROnPlateau scheduler, which decreased the learning rate by a factor of $0.8$ whenever no improvement in the loss was observed for a number of iterations equal to the patience hyperparameter.
The endpoints $z_{a}$ and $z_{b}$ were kept fixed throughout the optimization by zeroing their gradients at every step.

Figure: Algorithm 6 PoGS

## Appendix H APEX-potential for PoGS

The APEX predictor [20] estimates minimum inhibitory concentration (MIC) values against $11$ bacterial strains, but it operates on concrete peptide *sequences*. In Potential-Minimizing Geodesic Search (PoGS), optimization proceeds over *latent-space chords*, i.e., intermediate points $z$ that decode to *position-factorized distributions* over peptides rather than single sequences:

$$ $\operatorname{Dec}(z)\in\mathbb{R}^{L\times A},$ $$

where $L$ is the maximum peptide length and $A=21$ is the amino-acid alphabet augmented with padding. To enable PoGS, we first *distill* the sequence-level APEX potential into a surrogate that accepts peptide *distributions*.

##### Dataset construction.

Peptides from the HydrAMP training set  [4] were encoded into latent codes $z$. In order to obtain multiple distributions from a single peptide, we then created four clones $z^{\prime}$ of latent codes $z$. We applied a 2×2 perturbation scheme: two clones were injected with Gaussian noise $N(0,0.05)$, and two were left unchanged. Finally, these four latent codes were decoded to $\operatorname{Dec}(z^{\prime})$, using a softmax scaling with temperature of 1.0 for one pair (noisy and non-noisy) and a temperature of 1.5 to the other pair, resulting in four distributions per peptide. This yielded 1,060,000 peptide distributions in total. For each $\operatorname{Dec}(z^{\prime})$, we enumerated the $N=20$ most-probable sequences

$$ $\big(P_{0}(z^{\prime}),\dots,P_{N-1}(z^{\prime})\big)\quad\text{with probabilities}\quad\big(p_{0}(z^{\prime}),\dots,p_{N-1}(z^{\prime})\big),$ $$

applied APEX to each $P_{i}(z^{\prime})$ to obtain MIC *vectors* $\mathrm{MIC}_{P_{i}(z^{\prime})}\in\mathbb{R}^{11}$, and defined the distribution’s *expected* MIC vector via the probability-weighted average

$$ $\Phi_{\mathrm{MIC}}^{\mathrm{true}}\big(\operatorname{Dec}(z^{\prime})\big)=\sum_{i=0}^{N-1}\mathrm{MIC}_{P_{i}(z^{\prime})}\cdot\frac{p_{i}(z^{\prime})}{\sum_{j=0}^{N-1}p_{j}(z^{\prime})}\ \in\ \mathbb{R}^{11}.$ $$

##### Training protocol and standardization.

We split the dataset into $80\%$ train, $10\%$ validation, and $10\%$ test in such a way that no two sets contain distributions originating from the same peptide. Let $\mu,\sigma\in\mathbb{R}^{11}$ be the per-strain mean and standard deviation computed *on the training set*. Targets were z-scored componentwise:

$$ $y^{\mathrm{z}}=\frac{y-\mu}{\sigma}\,.$ $$

We trained an encoder-only transformer that *operates on distributions* $\operatorname{Dec}(z)\in\mathbb{R}^{L\times A}$ and predicts z-scored MIC vectors in $\mathbb{R}^{11}$:

$$ $\Phi_{\mathrm{MIC}}^{\mathrm{model}}:\ \operatorname{Dec}(z)\ \mapsto\ \mathbb{R}^{11}.$ $$

Architecture: three transformer encoder layers (four heads), embedding dimension $128$, feed-forward dimension $256$, dropout $0.05$. Optimization used Adam (learning rate $10^{-4}$) for $15$ epochs with mean-squared error (MSE) loss on z-scored targets:

$$ $\mathcal{L}_{\mathrm{MSE}}=\frac{1}{11}\,\big\|\Phi_{\mathrm{MIC}}^{\mathrm{model}}(\operatorname{Dec}(z))-y^{\mathrm{z}}\big\|_{2}^{2}.$ $$

##### Final potential used by PoGS.

PoGS operates on flattened *log-probabilities*. Let $X\in\mathbb{R}^{L\cdot A}$ be the flattened log-probability vector. We reconstruct a valid distribution using PyTorch-style operations:

$$ $P(X)=\operatorname{softmax}\!\big(\operatorname{X.reshape}(L,A),\ \texttt{dim}=1\big)\ \in\ [0,1]^{L\times A},$ $$

where dim=1 is the amino-acid dimension. The surrogate outputs a z-scored MIC vector

$$ $\widehat{m}^{\mathrm{z}}(X)=\Phi_{\mathrm{MIC}}^{\mathrm{model}}\!\big(P(X)\big)\in\mathbb{R}^{11}.$ $$

Restricting to the three target E. coli strains (index set $\mathcal{I}_{\textit{E.~coli}}$), the scalar property potential used by PoGS is

$$ $\Phi(X)=\mathbf{1}^{\top}\big[\widehat{m}^{\mathrm{z}}(X)\big]_{\mathcal{I}_{\textit{E.~coli}}}\,.$ $$

## Appendix I LE-BO Hyperparameters

We enumerate all hyperparameter values of our optimization algorithm LE-BO and all its sub-algorithms.

- •
Algorithm [3](https://arxiv.org/html/2510.01988v3#alg3) LE-BO - Local Enumeration Bayesian Optimization
–
Trust region distance $d_{\text{trust}}=2$.
–
Number of ROBOT evaluations per iteration $k_{\text{ROBOT}}=3$.
–
Diversity threshold $d_{\text{ROBOT}}=2$.
–
Following the approach of [58], as a surrogate model, we use a Gaussian Process $\operatorname{GP}$ with the Tanimoto similarity kernel [59], applied to the MAP4 fingerprints of peptides [60].
–
Aquisition function $\operatorname{GP.acquistion}$ was chosen to be Log Expected Improvement.
- •
Algorithm [2](https://arxiv.org/html/2510.01988v3#alg2) LocalEnumeration
–
$\kappa_{SORBES}=0.01$.
–
$\kappa_{\textsc{MUTANG}}=10^{-6}$.
–
Number of trajectories $M=10$.
–
Walk time budget $T_{\text{walk}}=0.1$.
–
Nominal step size $\epsilon=0.1$.
–
Mutation threshold $\theta_{\text{mut}}$
- •
A probe radius $\rho>0$ in the second-order central difference approximation of the extrinsic acceleration (Equation [16](https://arxiv.org/html/2510.01988v3#A5.E16)) $\rho=0.05$.
- •
Step of the finite-difference approximation of the decoder Jacobian (Equation [15](https://arxiv.org/html/2510.01988v3#A5.E15)) $\varepsilon=0.05$.

## Appendix J Wet-lab validation

### J.1 Peptide synthesis and characterization

Peptides were synthesized on an automated peptide synthesizer (Symphony X, Gyros Protein Technologies) by standard Fmoc-based solid-phase peptide synthesis (SPPS) on Fmoc-protected amino acid–Wang resins (100–200 mesh). The following preloaded resins were employed with their respective loading capacities (100 $\mu$mol scale): Fmoc-Asn(Trt)-Wang Resin (0.510 mmol g^-1), Fmoc-His(Trt)-Wang Resin (0.480 mmol g^-1), Fmoc-Leu-Wang Resin (0.538 mmol g^-1), Fmoc-Lys(Boc)-Wang Resin (0.564 mmol g^-1), Fmoc-Phe-Wang Resin (0.643 mmol g^-1), Fmoc-Thr(tBu)-Wang Resin (0.697 mmol g^-1), Fmoc-Trp(Boc)-Wang Resin (0.460 mmol g^-1), Fmoc-Tyr(tBu)-Wang Resin (0.520 mmol g^-1). In addition to preloaded resins, standard Fmoc-protected amino acids were employed for chain elongation, including: Fmoc-Ala-OH, Fmoc-Cys(Trt)-OH, Fmoc-Glu(OtBu)-OH, Fmoc-Phe-OH, Fmoc-Gly-OH, Fmoc-His(Trt)-OH, Fmoc-Ile-OH, Fmoc-Lys(Boc)-OH, Fmoc-Leu-OH, Fmoc-Met-OH, Fmoc-Asn(Trt)-OH, Fmoc-Arg(Pbf)-OH, Fmoc-Ser(tBu)-OH, Fmoc-Thr(tBu)-OH, Fmoc-Val-OH, Fmoc-Trp(Boc)-OH, and Fmoc-Tyr(tBu)-OH. N,N-Dimethylformamide (DMF) was used as the primary solvent throughout synthesis. Stock solutions included: 500 mmol L^-1 Fmoc-protected amino acids in DMF, a coupling mixture of HBTU (450 mmol L^-1) and N-methylmorpholine (NMM, 900 mmol L^-1) in DMF, and 20% (v/v) piperidine in DMF for Fmoc deprotection. After synthesis, peptides were deprotected and cleaved from the resin using a cleavage cocktail of trifluoroacetic acid (TFA)/triisopropylsilane (TIS)/dithiothreitol (DTT)/water (92.8% v/v, 1.1% v/v, 0.9% w/v, 4.8% w/w) for 2.5 hours with stirring at room temperature. The resin was removed by vacuum filtration, and the peptide-containing solution was collected. Crude peptides were precipitated with cold diethyl ether and incubated for 20 min at $-20$ °C, pelleted by centrifugation, and washed once more with cold diethyl ether. The resulting pellets were dissolved in 0.1% (v/v) aqueous formic acid and incubated overnight at $-20$ °C, followed by lyophilization to obtain dried peptides. For characterization, peptides were dried, reconstituted in 0.1% formic acid, and quantified spectrophotometrically. Peptide separations were performed on a Waters XBridge C18 column (4.6 $\times$ 50 mm, 3.5 $\mu$m, 120 Å) at room temperature using a conventional high-performance liquid chromatography (HPLC) system. Mobile phases were water with 0.1% formic acid (solvent A) and acetonitrile with 0.1% formic acid (solvent B). A linear gradient of 1–95% B over 7 min was applied at 1.5 mL min^-1. UV detection was monitored at 220 nm. Eluates were analyzed on Waters SQ Detector 2 with electrospray ionization in positive mode. Full scan spectra were collected over m/z 100–2,000. Selected Ion Recording (SIR) was used for targeted peptides. Source conditions were capillary voltage 3.0 kV, cone voltage 25–40 V, source temperature 120 °C, and desolvation temperature 350 °C. Mass spectra were processed with MassLynx software. Observed peptide masses were compared with theoretical values, and quantitative analysis was based on integrated SIR peak areas.

### J.2 Bacterial Strains and Growth Conditions

The bacterial panel utilized in this study consisted of the following pathogenic strains: Acinetobacter baumannii ATCC 19606; A. baumannii ATCC BAA-1605 (resistant to ceftazidime, gentamicin, ticarcillin, piperacillin, aztreonam, cefepime, ciprofloxacin, imipenem, and meropenem); Escherichia coli ATCC 11775; E. coli AIC221 [MG1655 phnE_2::FRT, polymyxin-sensitive control]; E. coli AIC222 [MG1655 pmrA53 phnE_2::FRT, polymyxin-resistant]; E. coli ATCC BAA-3170 (resistant to colistin and polymyxin B); Enterobacter cloacae ATCC 13047; Klebsiella pneumoniae ATCC 13883; K. pneumoniae ATCC BAA-2342 (resistant to ertapenem and imipenem); Pseudomonas aeruginosa PAO1; P. aeruginosa PA14; P. aeruginosa ATCC BAA-3197 (resistant to fluoroquinolones, $\beta$-lactams, and carbapenems); Salmonella enterica ATCC 9150; S. enterica subsp. enterica Typhimurium ATCC 700720; Bacillus subtilis ATCC 23857; Staphylococcus aureus ATCC 12600; S. aureus ATCC BAA-1556 (methicillin-resistant); Enterococcus faecalis ATCC 700802 (vancomycin-resistant); and Enterococcus faecium ATCC 700221 (vancomycin-resistant). P. aeruginosa strains were propagated on Pseudomonas Isolation Agar, whereas all other species were maintained on Luria-Bertani (LB) agar and broth. For each assay, cultures were initiated from single colonies, incubated overnight at 37 °C, and subsequently diluted 1:100 into fresh medium to obtain cells in mid-logarithmic phase.

### J.3 Minimal Inhibitory Concentration (MIC) determination

MIC values were established using the standard broth microdilution method in untreated 96-well plates. Test peptides were dissolved in sterile water and prepared as twofold serial dilutions ranging from 1 to 64 $\mu$mol L^-1. Each dilution was combined at a 1:1 ratio with LB broth containing $4\times 10^{6}$ CFU mL^-1 of the target bacterial strain. Plates were incubated at 37 °C for 24 h, and the MIC was defined as the lowest peptide concentration that completely inhibited visible bacterial growth. All experiments were conducted independently in triplicate.

### J.4 Detailed wet-lab validation results

Figure: Figure 8: Antimicrobial activity against Gram-positive bacterial strains by seed family. Bar chart shows the number of Gram-positive strains (out of 5 total) against which each peptide achieved MIC $\leq$ 32 $\mu$g/ml, organized by seed family (Seed-1 through Seed-4). Within each family, results are shown for prototypes (P1, P2; orange), seeds (S; blue), and analogs (A1-A7; green). Numbers above bars indicate the count of active strains for each peptide.
Refer to caption: figs/active_gramplus.png

Figure: Figure 9: Antimicrobial activity against Gram-negative bacterial strains by seed family. Bar chart shows the number of Gram-negative strains (out of 14 total) against which each peptide achieved MIC $\leq$ 32 $\mu$g/ml, organized by seed family (Seed-1 through Seed-4). Within each family, results are shown for prototypes (P1, P2; orange), seeds (S; blue), and analogs (A1-A7; green). Numbers above bars indicate the count of active strains for each peptide.
Refer to caption: figs/active_gramminus.png

## Peer Reviews

confidence: 5
contribution: 3
initial_rating: 4
presentation: 2
questions: 1. You motivate unions of manifolds by decoder rank deficiency. Could you quantify how often and how severely the rank drops across the latent space of your trained peptide models, and how this correlates with optimization failure modes under Euclidean search? 
2. Beyond antimicrobial activity, what other peptide properties (e.g., hemolysis, proteolytic stability, solubility) most benefit from geometry-aware exploration, and why would Euclidean search be particularly misleading for them?
3. In Table 2, LE-BO dominates most baselines. Which single design decision (SORBES vs. MUTANG vs. ROBOT diversity) contributed most to the gains, according to your ablations, and is that consistent across different seeds?
soundness: 3
strengths: The paper motivates why decoder-induced geometry matters and why a single manifold is insufficient, introducing a principled union of κ-stable manifolds with an SVD-based construction to ensure full-rank pullback metrics locally. This directly addresses rank-deficiency in realistic peptide decoders. SORBES includes a second-order correction (Christoffel term) and a convergence guarantee to stopped Riemannian Brownian motion on the κ-stable chart (Theorem 1). A practical finite-difference variant (SORBES-SE) with adaptive steps is also provided. MUTANG turns tangent directions into concrete amino-acid substitutions and enumerates local neighborhoods in sequence space—bridging continuous geometry and discrete edits. LE-BO leverages local enumeration rather than latent Euclidean kernels, with ROBOT-style diversity for exploration. PoGS adds a property-aware geodesic objective that yields more seeds/wells than straight interpolation.
summary: The authors proposed PepCompass, a geometry-aware framework for exploring and optimizing antimicrobial peptide (AMP) space. The authors argue that flat Euclidean latent spaces distort distances because they ignore decoder-induced geometry. They formalize a Union of κ-Stable Riemannian Manifolds to capture locally valid geometry and numerical stability, then design two local exploration tools and integrate them into LE-BO, a local-enumeration Bayesian optimization loop. For global search, they introduce PoGS, a potential-minimizing geodesic interpolation biased by predicted antimicrobial activity. The approach reports strong in silico results against diverse baselines and in vitro validation: four PoGS seeds showed activity and LE-BO produced 25/25 highly active peptides across multiple strains, including MDR isolates.
weaknesses: The paper itself notes a limitation—using Euclidean distance on decoder logits as the ambient metric for PoGS; while the authors argue it’s a stable first-order surrogate, alternative metrics might better match biochemical structure or synthesis constraints. A sensitivity analysis to this metric would strengthen claims.  While SORBES-SE mitigates cost, repeatedly estimating κ-stable charts, Christoffel terms (even indirectly), and re-encoding during LOCALENUMERATION could be heavy for large-scale campaigns; clearer runtime/memory profiling beyond the remark that other BO baselines were too slow would help assess deployment trade-offs.Many gains depend on the chosen property predictor (e.g., APEX MIC regressor) and seed selection from PoGS. More detail on robustness to different oracles, calibration under domain shift, and ablations on κ/α thresholds would help generalize the conclusions.

---

confidence: 3
contribution: 2
initial_rating: 6
presentation: 3
questions: 1. How does the proposed Riemannian structure correlate with biologically meaningful properties—e.g., do high-curvature regions correspond to specific physicochemical or functional transitions in peptides?

2. What is the computational scalability of SORBES and LE-BO when applied to longer peptide sequences or larger embedding dimensions?

3. How sensitive is PoGS to the choice of property potential (Φ)? Could it incorporate multiple objectives, such as stability or toxicity, simultaneously?

4. Has PepCompass been tested beyond antimicrobial peptide design (e.g., anticancer or cell-penetrating peptides) to assess its generalizability?

5. How does the Bayesian component in LE-BO handle uncertainty from noisy or biased property predictors, and does it improve robustness in real-world peptide screening?
soundness: 2
strengths: The paper presents a novel and well-structured framework that integrates Riemannian geometry with peptide generative modeling. Its algorithms—SORBES, MUTANG, and LE-BO/PoGS—enable interpretable and geometry-consistent peptide optimization, validated both computationally and experimentally with exceptional success rates. The combination of solid mathematical formulation and real-world biological validation makes the contribution both original and impactful.
summary: This paper introduces PepCompass, a geometry-aware framework for peptide design that leverages Riemannian manifold learning to navigate and optimize peptide embedding spaces. By modeling latent peptide representations as a Union of κ-Stable Riemannian Manifolds, the authors develop three key components: SORBES (a second-order Riemannian Brownian sampler), MUTANG (mutation enumeration in tangent space), and LE-BO/PoGS (local–global Bayesian optimization via potential-minimizing geodesics). The approach enables interpretable and geometry-consistent exploration of peptide space, achieving superior computational and 100% experimental success in antimicrobial peptide discovery. Overall, the work bridges geometric machine learning and biological sequence optimization, offering a mathematically grounded and experimentally validated paradigm for controllable peptide generation.
weaknesses: While mathematically elegant, the work’s biological justification for adopting Riemannian geometry remains limited, and some algorithmic components (e.g., κ-stability, second-order correction) lack clear ablation evidence. The framework’s complexity and computational overhead may hinder broader applicability, and its generalization beyond antimicrobial peptides is not yet demonstrated.

---

confidence: 2
contribution: 2
initial_rating: 6
presentation: 3
questions: 1. Where are the sequences for all wet-lab validated peptides? Please provide them in a table, along with their full MIC profiles against all tested strains.

2. Please clarify the discrepancy between the 25 generated analogs and the subset shown in Figures 8 and 9. Are the shown analogs the best-performing ones? If so, state this clearly. Presenting only a curated subset can be misleading.

3. The optimization targeted E. coli, yet validation included Gram-positive strains. Could you please discuss the rationale for this choice and explicitly address the observation that Gram-positive activity did not improve (and often degraded) during optimization? Does this indicate a potential trade-off or specialization effect?

4. The PoGS potential function is a distilled model from APEX. How sensitive are the discovered seeds to the accuracy of this surrogate model? A brief analysis of the correlation between the predicted potential and the final wet-lab MIC would strengthen this section.
soundness: 3
strengths: Novelty and Technical Depth: The paper makes significant contributions at the intersection of geometric deep learning and biological sequence design. The formulation of the κ-stable manifold union is a principled and elegant solution to the problem of varying intrinsic dimensionality in latent spaces. The SORBES algorithm, with its second-order correction and associated convergence theorem, represents a substantial advance over naive first-order random walks.

Comprehensive Methodology: The framework is well-rounded, offering tools for both global exploration (PoGS) and local optimization (LE-BO). The MUTANG method is particularly clever, bridging the gap between continuous latent geometry and discrete sequence space in an interpretable way.

Compelling Empirical Validation: The most striking strength is the successful in vitro validation. Achieving a 100% success rate (29/29 peptides active) and discovering 25 highly active, broad-spectrum AMPs against multidrug-resistant strains is a powerful demonstration of the method's real-world utility. This goes far beyond the typical computational benchmarks in the field.

Rigorous Ablations: The paper includes thorough ablation studies for LE-BO, clearly demonstrating the individual contributions of the Riemannian walk (SORBES) and the tangent-space mutations (MUTANG).
summary: This paper introduces "PepCompass", a novel framework for navigating the latent spaces of generative models for peptide design. The core contribution is a geometry-aware approach that addresses the limitations of standard Euclidean exploration. The authors first define a "Union of κ-Stable Riemannian Manifolds" to model the latent space more faithfully, accounting for varying local dimensionality. They then propose two key methods for exploration: SORBES, a second-order approximation of Riemannian Brownian motion for local sampling, and MUTANG, which interprets tangent directions as discrete amino-acid mutations. These are combined into a Local Enumeration Bayesian Optimization (LE-BO) algorithm. For global exploration, they introduce Potential-minimizing Geodesic Search (PoGS), which finds promising "seed" peptides by interpolating between prototypes along property-enriched geodesics. The method is validated with impressive wet-lab results, reporting a 100% success rate in generating active antimicrobial peptides (AMPs).
weaknesses: 1. Reproducibility and Presentation of Wet-Lab Experiments: The presentation of the experimental results is confusing and lacks critical details, which undermines an otherwise stellar validation.

1.1 Missing Sequences: All peptide sequences are not listed in the main text or the appendices. This is a major omission for a paper centered on peptide design, as it prevents replication, analysis, and a proper understanding of the generated molecules.

1.2 Incomplete Results: Figure 9 shows only 6-7 analogs per seed family, but the text states 25 analogs were generated for each seed. It is unclear how these 25 are distributed across the seeds and why only a subset is visualized. A complete table of all analog peptides and their MIC values against all 19 strains is essential.

1.3 Justification for Bacterial Panel: The optimization objective targeted E. coli activity (a Gram-negative bacterium). However, the validation panel includes 14 Gram-negative and 5 Gram-positive strains. The rationale for this broader panel is not well-explained. The results in Figure 8 show that performance on Gram-positive bacteria is poor and, in many cases, worse than the prototypes. This suggests that the optimization successfully specialized for Gram-negative activity, but the authors should explicitly discuss this point and the implications of this specificity.

2. Computational Complexity: While the paper mentions the computational efficiency of LE-BO compared to other Bayesian optimization methods, the cost of computing the κ-stable manifolds, SVDs, and second-order corrections for SORBES is non-trivial. A more detailed discussion of the computational budget and scaling would be helpful for practitioners.