Capacity and Bias of Learned Geometric Embeddings for Directed Graphs

Michael Boratko, Dongxu Zhang, Nicholas Monath, Luke Vilnis, Kenneth L. Clarkson, Andrew McCallumNeurIPS 2021

Representing complex relationships—like the hierarchy of a biological taxonomy or the flow of a citation network—is a fundamental challenge in machine learning. While we usually represent data as points (vectors) in space, recent research argues that "points" are often the wrong shape for the job.

This paper introduces T-Box, a novel box-based embedding model that uses learned "temperatures" to represent nodes as flexible geometric regions rather than fixed points. This approach allows the model to capture the hierarchical and transitive nature of directed graphs in low dimensions while avoiding the performance "saturation" that plagues other geometric models in high-dimensional spaces.

The Problem with Points

Most graph embedding techniques represent nodes as vectors in Euclidean space. To determine if an edge exists between node A and node B, models typically evaluate the distance or dot product between them. However, these operations are inherently symmetric: if A is close to B, B is close to A.

Directed graphs (e.g., representing "A is a type of B") are asymmetric. To address this, researchers have turned to geometric embeddings—representing nodes as cones, boxes, or hyperbolic shapes. In these models, an edge is represented by containment (e.g., Box A is inside Box B).

While these models have an excellent "inductive bias" (they naturally understand that if A $\subset$ B and B $\subset$ C, then A $\subset$ C), they historically suffer from two major issues:

  1. The Capacity Gap: They perform exceptionally well in low dimensions but often get outperformed by simple vector models as dimensionality increases.
  2. Theoretical Uncertainty: It has not been rigorously proven exactly which types of graphs box embeddings can actually represent.

Introducing T-Box Embeddings

To solve these issues, the authors propose T-Box (Learned Temperature Box Embeddings).

1. The "Soft" Box

Standard box embeddings use "hard" boundaries, which makes optimization via gradient descent difficult because gradients are often zero. T-Box uses a continuous relaxation—essentially "blurring" the edges of the boxes to allow for smooth gradient flow.

2. Learned Temperatures

The breakthrough of T-Box is making this "blurriness" (temperature) a learnable parameter for every node and every dimension. This allows the model to dynamically decide how "region-like" or "vector-like" a specific node needs to be. In high dimensions, the model can "sharpen" its boxes to increase representational capacity, effectively preventing the performance plateau seen in previous models.

3. Theoretical Proofs

The paper provides a formal proof that box embeddings are universal for Directed Acyclic Graphs (DAGs). Specifically, they prove that any DAG can be represented by probabilistic box embeddings in $O((\Delta + 2) \log |V|)$ dimensions, where $\Delta$ is the maximum node degree.

Key Insights and Results

The authors performed a massive evaluation using Bayesian hyperparameter optimization across synthetic graphs (Balanced Trees, nCRP, Price's model, Scale-Free) and real-world graphs (WordNet, ImageNet hierarchical clustering, and KNN graphs).

F1 scores across datasets and parameter sizes

The comprehensive evaluation highlights several critical performance trends across different parameter budgets (8, 32, and 128 parameters per node):

  • High-Dimension Dominance: As seen in the bottom row of the figure (128 parameters per node), T-Box (red bars) consistently outperforms all other geometric models (cones, hyperbolic, standard boxes) as dimensionality increases. It successfully bridges the capacity gap.
  • Inductive Bias vs. Capacity: Geometric models win in low dimensions (top row, 8 parameters) because their "shape" matches the data's logic. T-Box maintains this bias while scaling up to high-dimensional capacity.
  • Hyperbolic vs. Boxes: The results show a clear divide based on graph structure. Hyperbolic models (purple bars) excel on pure trees (hierarchies without cross-links), but they struggle with transitivity. Box models, conversely, are vastly superior for transitively-closed (TC) graphs where "A implies C" logic is prevalent.
  • The "Smoothing" Secret: By learning the temperature, T-Box effectively learns the "uncertainty" or "scale" of a node. This flexibility allows it to outperform state-of-the-art Gumbel-box models.

Limitations and Future Work

While highly effective, the T-Box model does have limitations:

  • Cycles: The paper focuses heavily on DAGs, but real-world graphs often contain cycles. Probabilistic box versions are naturally biased toward acyclicity.
  • Computational Cost: Box embeddings require more parameters per node (min/max coordinates plus temperatures) than simple vectors, which could impact scaling to extremely massive graphs.
  • Optimization Complexity: Geometric embeddings remain more sensitive to initialization and hyperparameter settings than standard Euclidean vectors.

The authors suggest that future work could explore "mixed-geometry" embeddings that combine the tree-modeling strengths of hyperbolic space with the transitive-modeling strengths of boxes, potentially offering the best of both worlds.

Summary updated

BibTeX
@inproceedings{boratko2021capacity,
  author = {Michael Boratko and Dongxu Zhang and Nicholas Monath and Luke Vilnis and Kenneth L. Clarkson and Andrew McCallum},
  title = {{Capacity and Bias of Learned Geometric Embeddings for Directed Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=0IqTX6FcZWv},
}
Figure