PepCompass: Navigating Peptide Embedding Spaces Using Riemannian Geometry

Marcin Możejko, Adam Bielecki, Jurand Prądzyński, Hyun-Su Lee, Antoni Janowski, Michal Kmicikiewicz, Paulina Szymczak, Karol Jurasz, Marcin Traskowski, Michał Kucharczyk, Marcelo Der Torossian Torres, Cesar de la Fuente-Nunez, Ewa Szczurek

The "Flat Earth" Problem in Peptide Discovery

The search for novel antimicrobial peptides (AMPs) is a staggering challenge. With over $10^{32}$ possible amino acid sequences for a standard 25-residue peptide, finding active molecules is akin to searching for a needle in a cosmic haystack. Deep learning models, such as Variational Autoencoders (VAEs), attempt to solve this by compressing this vast sequence space into continuous "latent maps."

However, a critical flaw persists in how we navigate these maps: they are typically treated as flat, Euclidean planes. Because the "decoder"—the neural network component that translates a latent point back into a peptide—is highly non-linear, a straight line in latent space does not correspond to a smooth or natural transition in actual peptide space. Distances become distorted, and standard search algorithms frequently wander into "dead zones" where the model outputs inactive sequences or biological gibberish. Furthermore, existing geometric methods often assume the data lies on a single smooth surface of fixed dimensionality, an assumption that fails against the complex, patchy nature of biological sequences.

Introducing PepCompass

To address these geometric distortions, researchers have introduced PepCompass, a novel framework that treats the latent spaces of peptide generative models as curved Riemannian manifolds. By accounting for the geometric warping created by decoders, PepCompass acts as a highly accurate GPS for peptide discovery. The framework relies on three core innovations:

1. Union of $\kappa$-Stable Riemannian Manifolds

Instead of assuming the latent space is one uniform manifold, PepCompass models it as a collection of local "charts" with varying dimensions. A stability parameter, $\kappa$, filters out "noisy" directions where the decoder is poorly defined. Interestingly, the researchers discovered that longer peptides possess "higher-dimensional" local neighborhoods, offering more degrees of freedom for meaningful mutations—a nuance entirely missed by Euclidean methods.

2. Potential-Minimizing Geodesic Search (PoGS)

For global navigation between two known peptides, PoGS calculates a "curved" path (a geodesic) that minimizes a specific potential, such as predicted antibiotic resistance. By following the "pullback metric" of the decoder, the search naturally biases toward sequences the model understands well, steering the path through the most active and viable regions of the latent space.

3. Local Enumeration Bayesian Optimization (LE-BO)

For local fine-tuning of candidate peptides, PepCompass employs LE-BO, which combines two novel tools:

  • SORBES: A second-order random walk that respects the local curvature of the manifold.
  • MUTANG: An elegant algorithm that translates abstract geometric "tangent vectors" into discrete, biologically meaningful amino acid mutations.

Experimental Validation and Results

The researchers applied PepCompass to two state-of-the-art generative models (HydrAMP and PepCVAE) and utilized an APEX-derived transformer to predict the Minimum Inhibitory Concentration (MIC) of candidates. The results were rigorously validated in-vitro against a panel of 19 bacterial strains, including 8 multi-drug resistant (MDR) clinical isolates like MRSA and VRE.

The outcomes demonstrate a massive leap in generative peptide design:

  • 100% Validation Rate: All 29 peptides generated by PepCompass were active against at least one bacterial strain at the standard threshold ($\le 32 \mu g/ml$).
  • Exceptional Potency: 82% of the generated peptides remained active even at a highly stringent threshold of $4 \mu g/ml$.
  • State-of-the-Art Performance: In head-to-head comparisons, LE-BO outperformed a dozen leading optimization methods—including GFlowNets and standard Bayesian Optimization—in 5 out of 6 test cases.
  • Enhanced Diversity: The Riemannian approach produced significantly more diverse and novel candidates compared to Euclidean searches, which frequently collapsed around the same few sequences.

Limitations and Future Directions

While PepCompass represents a paradigm shift in navigating latent spaces, the authors note a few areas for future refinement. Currently, the framework uses a simple Euclidean "ambient" metric for the decoder's output probability matrix; integrating biologically informed substitution matrices could further enhance performance. Additionally, the MUTANG algorithm assumes positional independence, ignoring "epistatic" interactions where a mutation at one end of a protein depends on a specific residue at the other. Finally, the second-order geometric calculations are computationally intensive, though the unprecedented 100% in-vitro hit rate strongly justifies the computational cost.

Ultimately, PepCompass proves that treating generative latent spaces with the geometric respect they deserve is a powerful, highly effective paradigm for discovering the next generation of life-saving therapeutics.

Summary updated

BibTeX
@inproceedings{mozejko2026pepcompass,
  author = {Marcin Możejko and Adam Bielecki and Jurand Prądzyński and Hyun-Su Lee and Antoni Janowski and Michal Kmicikiewicz and Paulina Szymczak and Karol Jurasz and Marcin Traskowski and Michał Kucharczyk and Marcelo Der Torossian Torres and Cesar de la Fuente-Nunez and Ewa Szczurek},
  title = {{PepCompass: Navigating Peptide Embedding Spaces Using Riemannian Geometry}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=HENUU9VR8F},
}
Figure