Abstract
Computing geodesic distances—the shortest path between two points along a curved surface—is a cornerstone of computer graphics, yet traditional methods struggle to balance computational efficiency with real-time query demands. We present GeGnn, a learning-based framework that leverages Graph Neural Networks (GNNs) to embed meshes into a high-dimensional latent space. By utilizing a novel GeoConv layer with max-aggregation and a topology-aware GeoPool mechanism, GeGnn enables constant-time $O(1)$ geodesic distance queries. Our approach achieves a $10^4\times$ speedup in query time and a $10^3\times$ speedup in precomputation over previous state-of-the-art methods, while maintaining high accuracy and robustness across diverse and even corrupted geometries.
Introduction
In computer graphics and geometric processing, calculating the geodesic distance is fundamental for tasks ranging from texture mapping and mesh deformation to shape analysis. Traditional algorithms generally fall into two categories: Dijkstra-based approaches and partial differential equation (PDE) solvers like the Heat Method. While these are effective for computing distances from a single source to all other vertices, they become computationally prohibitive for Geodesic Distance Queries (GDQ), where an application requires the distance between many arbitrary pairs of points in real-time.
Existing "embedding" methods attempt to map a mesh into a Euclidean space where the distance between points approximates their geodesic distance. However, these often require hours of non-linear optimization for a single mesh, rendering them impractical for large-scale datasets or interactive applications. GeGnn addresses these limitations by replacing slow optimization with a single forward pass of a specialized Graph Neural Network.
Methodology
The GeGnn pipeline consists of a two-stage architecture: a GNN-based encoder for precomputation and a lightweight MLP-based decoder for rapid querying.
1. Precomputation (The Encoder)
The encoder uses a U-Net-style GNN architecture to process the input mesh, producing a 256-dimensional feature vector (embedding) for every vertex. This stage is characterized by two novel components:
- GeoConv: Standard GNNs typically use
sumormeanaggregation to combine neighbor information. GeGnn introduces GeoConv, which explicitly incorporates local edge lengths and utilizes amaxaggregation function. This design is inspired by Dijkstra’s algorithm, which propagates the "extremal" distance along a wavefront; the authors found that this mimics the physical behavior of distance propagation far more effectively than traditional averaging. - GeoPool: Traditional grid-based pooling can lead to topological errors, such as merging the top and bottom of a thin table because they are physically close in 3D space. GeoPool operates in a 6D space (3D coordinates + 3D surface normals). By accounting for normals, the network ensures that points with opposing orientations are not collapsed together, preserving the mesh's intrinsic topology.
2. Query (The Decoder)
Once the embeddings are generated, the distance between any two points $i$ and $j$ is determined by passing their respective embedding vectors through a 3-layer Multi-Layer Perceptron (MLP). Rather than forcing a strict Euclidean mapping—which is mathematically impossible for many curved surfaces—the MLP learns a non-Euclidean distance function in the latent space, significantly reducing the Mean Relative Error (MRE).
Experimental Results
The model was trained primarily on the ShapeNet dataset (~24,800 meshes) and evaluated on unseen categories (ShapeNet-B) and classic benchmarks like the Stanford Bunny and Fandisk.
Speed and Efficiency
GeGnn demonstrates transformative performance gains. After a precomputation phase of only 0.09 seconds, the system can perform 1 million queries in just 0.04 seconds. This represents a 32,000× speedup over traditional methods like the Heat Method for the same query volume. Furthermore, the precomputation itself is roughly $10^3×$ faster than previous embedding-based optimization techniques.
Accuracy and Robustness
On the ShapeNet test set, GeGnn achieved a Mean Relative Error (MRE) of 1.33%. Its generalization capabilities are equally impressive, maintaining an error rate between 2.3% and 2.5% on completely unseen categories and complex topologies.
Crucially, the model exhibits high robustness to "corrupted" geometry. In cases where a mesh might be split into separate parts or contain topological noise—scenarios where traditional geometric algorithms often fail or produce undefined results—GeGnn continues to provide stable and accurate distance predictions.
Discussion and Limitations
While GeGnn represents a significant leap in GDQ performance, certain challenges remain. The model's accuracy can degrade on anisotropic meshes (those with extremely long, thin triangles) or highly unusual geometries that differ significantly from the training distribution, such as complex winding tubes. Additionally, because the distance is predicted by an MLP, it is not mathematically guaranteed to satisfy the triangle inequality ($d(a,c) \leq d(a,b) + d(b,c)$), though the authors note it holds approximately in practice.
Conclusion
GeGnn successfully frames geodesic distance computation as a learning problem, offering a high-speed, robust alternative to traditional geometric solvers. By incorporating topology-aware pooling and wavefront-inspired convolutions, the framework provides a practical solution for real-time applications in 3D vision and graphics. Future work may explore the integration of Transformers or apply this GNN approach to related problems like mesh parameterization and remeshing.
Summary updated