Towards General Geometries for Embedding Knowledge Graphs

Samuel G. Fadel, Tino Paulsen, Sebastian MairGRaM @ ICML 2024

TL;DR

This paper introduces Manifold Embeddings (ManE), a novel framework for knowledge graph embedding that allows learning on any Riemannian manifold, not just those with pre-defined closed-form equations for movement. By leveraging numerical approximation of the exponential map, ManE offers unprecedented flexibility in matching embedding geometries to graph structures, demonstrating competitive performance and opening doors to more expressive KG representations.

What Problem Does This Paper Address?

Knowledge graphs (KGs) represent information as entities and their relationships. Embedding KGs means learning low-dimensional vector representations for these entities and relations, enabling tasks like link prediction (e.g., predicting if "PersonA is a sibling of PersonB"). The effectiveness of these embeddings heavily depends on the geometric space they inhabit. While Euclidean space is simple, many real-world KGs exhibit hierarchical or cyclical structures that are better captured by non-Euclidean geometries like hyperbolic or spherical spaces.

Existing methods that use non-Euclidean geometries are often limited to specific manifolds (e.g., Poincaré disk, sphere) for which analytical equations for movement (like the exponential map) are known. This restricts the choice of geometry and can be cumbersome. Other approaches might abandon geometric interpretations altogether. This paper addresses the need for a more flexible framework that can leverage the benefits of diverse geometries without being constrained by the availability of analytical solutions for movement.

Methods

The core innovation of ManE lies in its ability to learn embeddings on any geodesically complete Riemannian manifold, provided its metric tensor is defined. Instead of relying on explicit closed-form equations for movement on the manifold, ManE uses numerical approximation of the exponential map. This is achieved by defining a velocity function for each relation type, which, when integrated, traces a geodesic path. The model learns these velocity functions such that the endpoint of the geodesic path is close to the target entity for a given relation.

Crucially, ManE allows for:

  • Arbitrary Manifolds: Any manifold with a defined metric tensor can be used.
  • Metric Tensor Flexibility: The metric tensor itself can be learned or defined.
  • Mixed Geometries: The paper demonstrates learning on a convex combination of metrics, effectively allowing the model to learn a mixed geometry.

The loss function is designed to minimize the distance between predicted and actual embeddings, incorporating a margin for negative sampling, similar to existing distance-based embedding methods.

Datasets

The paper evaluates ManE on two standard knowledge graph datasets:

  • FB15k-237: A subset of Freebase, known for its challenging link prediction task.
  • WN18RR: Derived from WordNet, also a common benchmark for KG embedding.

Key Insights and Ideas

  • Geometry Matters, Flexibility is Key: The paper strongly reinforces that the choice of geometry significantly impacts KG embedding performance. ManE's ability to explore a wider range of geometries, including learned mixed geometries, is a major step towards better matching embeddings to graph structures.
  • Numerical Approximation Unlocks Flexibility: By moving away from analytical solutions and embracing numerical integration of geodesics, ManE bypasses the limitations of pre-defined manifold movements, making it applicable to a much broader set of geometric spaces.
  • Learned Mixed Geometries: The ability to learn a convex combination of metrics (e.g., hyperbolic and spherical) is a powerful concept. It suggests that optimal representations might not reside in a single canonical geometry but rather in a hybrid space tailored to the specific data.

Key Results

  • Competitive Performance: ManE achieves performance comparable to existing state-of-the-art methods like FieldE on both Euclidean and Poincaré ball geometries.
  • Mixed Geometry Potential: While the mixed metric approach (ManE-MM) still requires further improvement, it shows promising results, indicating the potential of learning hybrid geometries.
  • Trade-offs in Flexibility: The increased flexibility comes at a computational cost. ManE can be slower to train than simpler models, especially when using more complex manifolds like the Poincaré ball, highlighting optimization challenges.

Limitations and Future Work

  • Computational Cost: The primary limitation acknowledged is the increased training time associated with numerical optimization on general manifolds. This is particularly pronounced for complex geometries.
  • Numerical Instability: Using a standard Euclidean distance in the loss function for non-Euclidean manifolds can introduce numerical instability, especially with the Poincaré ball metric.
  • Future Work: The authors suggest further research into optimizing the numerical approximation of the exponential map and exploring more sophisticated ways to define and learn metrics. Investigating the interpretability of learned mixed geometries and applying ManE to larger, more complex KGs are also promising directions.

Summary updated

BibTeX
@inproceedings{fadel2024towards,
  author = {Samuel G. Fadel and Tino Paulsen and Sebastian Mair},
  title = {{Towards General Geometries for Embedding Knowledge Graphs}},
  booktitle = {GRaM @ ICML},
  year = {2024},
  url = {https://openreview.net/forum?id=L7C0XG9eSM},
}
Figure