Neural Latent Geometry Search: Product Manifold Inference via Gromov-Hausdorff-Informed Bayesian Optimization

Haitz Sáez de Ocáriz Borde, Alvaro Arroyo, Ismael Morales, Ingmar Posner, Xiaowen Dong

Abstract

Recent research indicates that the performance of machine learning models can be improved by aligning the geometry of the latent space with the underlying data structure. Rather than relying solely on Euclidean space, researchers have proposed using hyperbolic and spherical spaces with constant curvature, or combinations thereof, to better model the latent space and enhance model performance. However, little attention has been given to the problem of automatically identifying the optimal latent geometry for the downstream task. We mathematically define this novel formulation and coin it as neural latent geometry search (NLGS). More specifically, we introduce an initial attempt to search for a latent geometry composed of a product of constant curvature model spaces with a small number of query evaluations, under some simplifying assumptions. To accomplish this, we propose a novel notion of distance between candidate latent geometries based on the Gromov-Hausdorff distance from metric geometry. In order to compute the Gromov-Hausdorff distance, we introduce a mapping function that enables the comparison of different manifolds by embedding them in a common high-dimensional ambient space. We then design a graph search space based on the notion of smoothness between latent geometries and employ the calculated distances as an additional inductive bias. Finally, we use Bayesian optimization to search for the optimal latent geometry in a query-efficient manner. This is a general method which can be applied to search for the optimal latent geometry for a variety of models and downstream tasks. We perform experiments on synthetic and real-world datasets to identify the optimal latent geometry for multiple machine learning problems.

Introduction: The Challenge of Latent Geometry

In deep learning, data is typically projected into a "latent space"—a hidden representation where the model performs its primary computations. Traditionally, these spaces are assumed to be Euclidean (flat). However, recent research demonstrates that data with specific structures—such as hierarchical family trees or cyclical patterns—is better modeled in non-Euclidean spaces like hyperbolic or spherical manifolds, respectively.

The primary challenge lies in the fact that real-world data is often a complex mixture of these structures. While "product manifolds" (combinations of different geometries) offer a solution, selecting the correct "signature" (e.g., a combination of spheres and hyperboloids) currently relies on manual trial-and-error or computationally expensive random searches. There has been no mathematically grounded method to quantify the similarity between different latent geometries, hindering efficient navigation of the search space.

Methodology: Neural Latent Geometry Search (NLGS)

The authors introduce Neural Latent Geometry Search (NLGS), a framework to automate the identification of optimal non-Euclidean latent spaces. The methodology consists of three core components:

  1. Quantifying Manifold Similarity: To compare disparate geometries, the framework utilizes the Gromov-Hausdorff (GH) distance. To overcome the computational difficulty of GH distance, the authors develop a method to embed manifolds into a common high-dimensional Euclidean "ambient space," providing a reliable upper bound for similarity.
  2. Geometry-Informed Graph Search: All possible product manifold combinations are represented as nodes in a graph. Edges are weighted by the inverse of their GH distance, encoding a "smoothness" prior: mathematically similar geometries should yield similar model performance.
  3. Bayesian Optimization (BO): Using a diffusion kernel on this graph, the algorithm performs Bayesian Optimization to predict high-performing geometries based on previous evaluations, significantly reducing the required number of training cycles.
Visualization of the geometry-informed graph search space where nodes represent candidate product manifolds.

Experimental Setup

The researchers evaluated NLGS across three distinct settings:

  • Synthetic Datasets: Custom data with known "ground truth" latent manifolds to verify the search's accuracy.
  • Image Reconstruction: Standard benchmarks including MNIST, CIFAR-10, Fashion MNIST (fMNIST), and eMNIST using autoencoders.
  • Latent Graph Inference: Node classification tasks on the Cora and CiteSeer citation network datasets.

Key Results and Insights

The core "aha moment" of this research is the Smoothness Hypothesis: neural network performance is a relatively smooth function over the space of geometries. If a model performs well on one product manifold, it is likely to perform similarly on a geometrically related one.

Comparison of GH-informed Bayesian Optimization against Naive BO and Random search across various synthetic and real-world benchmarks.

Empirical results highlight the efficiency of the GH-informed approach:

  • Efficiency: In synthetic tests, GH-informed BO reached the global minimum significantly faster than "Naive BO" (which ignores geometry) or random search.
  • Image Tasks: On datasets like MNIST and CIFAR-10, the method consistently identified latent geometries with lower reconstruction errors within a limited budget of 50 iterations.
  • Graph Inference: On the Cora dataset, the method demonstrated a clear competitive advantage in finding optimal embedding spaces, though results on CiteSeer were more affected by dataset noise.

Limitations and Future Directions

While NLGS marks a significant step toward automated geometry selection, several areas for improvement remain:

  • Manifold Variety: Current experiments focus on 2D components with constant curvatures ($K \in \{-1, 0, 1\}$). Future work could extend this to higher dimensions or variable curvatures.
  • Computational Overhead: Calculating initial GH distances requires upfront mathematical effort, although these coefficients are constant once computed for a set of base manifolds.
  • Kernel Optimization: As Bayesian Optimization on graphs is a developing field, exploring more sophisticated kernels could further improve the capture of manifold-performance relationships.

By framing latent geometry selection as a specialized form of Neural Architecture Search (NAS), NLGS provides a practical tool for moving beyond the Euclidean default in machine learning.

Summary updated

BibTeX
@inproceedings{borde2023neural,
  author = {Haitz Sáez de Ocáriz Borde and Alvaro Arroyo and Ismael Morales and Ingmar Posner and Xiaowen Dong},
  title = {{Neural Latent Geometry Search: Product Manifold Inference via Gromov-Hausdorff-Informed Bayesian Optimization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=Gij638d76O},
}
Figure