Fully Dynamic Embedding into $\ell_p$ Spaces

Kiarash Banihashem, Xiang Chen, MohammadTaghi Hajiaghayi, Sungchul Kim, Kanak Mahadik, Ryan A. Rossi, Tong YuICML 2025

Introduction

Metric embeddings are a cornerstone of modern machine learning. By mapping complex, discrete data structures—such as graphs—into continuous vector spaces like $\ell_p$ spaces, they preserve pairwise distances between points. This mathematical translation enables efficient similarity search, dimensionality reduction, clustering, and representation learning, underpinning modern architectures like transformers and large language models.

While static embeddings (where the graph is fixed) and decremental embeddings (where edges are only deleted or weights only increase) are well understood, the fully dynamic setting has remained an open problem. Real-world graphs are constantly changing, with edges being both added and removed. Updating an entire embedding from scratch after every single structural change is computationally infeasible. This paper presents the first fully dynamic algorithm for embedding graph metrics into $\ell_p$ spaces, achieving low expected distortion and fast update times.

The "Bridge Graph" Bottleneck

To understand why fully dynamic embeddings are challenging, the authors identify a critical theoretical hurdle: the "Bridge Graph" bottleneck.

Imagine a graph consisting of two massive clusters connected by a single "bridge" edge. If that edge is deleted, the shortest-path distance between the two clusters skyrockets. If it is added back, the distance plummets. Any algorithm that explicitly updates the embedding vectors in memory would have to rewrite $\Omega(n)$ vectors every time that single edge toggles.

The authors formally prove that any fully dynamic algorithm explicitly outputting changes to a non-contractive embedding must have an amortized update time of at least $\Omega(n)$. This proves that explicitly maintaining the embedding is a computational dead end.

Methodology: Implicit Maintenance and Noise Injection

To bypass the $\Omega(n)$ bottleneck, the authors shift to an implicit model. Instead of updating vector coordinates for every node upon every graph change, the algorithm maintains a queryable function. When a node's embedding is needed, it is queried on the fly.

The algorithm relies on several novel theoretical mechanisms to maintain accuracy:

  1. Dynamic Tree Embeddings: The standard static approach (like Bourgain's embedding) uses distances to sampled sets of vertices as vector coordinates. Doing this dynamically requires dynamic distance oracles, which only provide approximate distances. Because approximations break the triangle inequality, they ruin the mathematical guarantees of the embedding. To solve this, the authors dynamically embed the graph into a forest of trees. Because trees have exact, unique paths, the triangle inequality is restored, fixing the upper bound of the distortion.
  2. Edge-Dominant Trees: The authors prove that existing dynamic tree algorithms naturally produce "edge-dominant" trees. In these structures, every path between two nodes contains a "heavy" edge whose weight makes up a significant fraction of the total path length.
  3. Random Noise Injection: Counter-intuitively, injecting random noise is exactly what makes the embedding work. To prevent embedded distances from artificially collapsing, the algorithm multiplies the weight of each edge in the tree by a random noise factor of either 1 or 2. Because paths between distant nodes diverge, they accumulate different random noise, breaking unwanted concentration of measure and ensuring their embedded distance remains large.

Key Results

By combining implicit maintenance with noisy, edge-dominant tree embeddings, the algorithm achieves breakthrough theoretical performance:

  • Distortion: The algorithm achieves an expected distortion of $O(\log(n))^{2q} O(\log(nW))^{q-1}$, where $n$ is the number of vertices, $W$ is the maximum edge weight, and $q \ge 2$ is an integer parameter.
  • Update Time: The amortized update time (the time required to process an edge insertion or deletion) is highly efficient at $O(m^{1/q + o(1)})$.
  • Query Time: Retrieving the embedding vector for any specific vertex takes only $O(q \log(n) \log(nW))$ time.
  • Non-contractivity: The algorithm guarantees with high probability that the embedding is non-contractive, meaning the embedded distance between two nodes is never smaller than their actual distance in the underlying graph.

Limitations and Future Work

While this paper establishes a foundational theoretical result, it comes with certain limitations inherent to its design:

  • Oblivious Adversary Model: The algorithm assumes an oblivious adversary. This means the sequence of graph updates must be chosen without knowledge of the algorithm's internal random coin flips. If updates were adaptive (based on the algorithm's outputs), the mathematical guarantees might fail.
  • Expected Bounds: The distortion bounds hold in expectation. While non-contractivity holds with high probability, the upper bound on how much distances are stretched is an expected value, not a strict worst-case guarantee.
  • Query Overhead: Because the embedding is implicit, downstream machine learning tasks that require immediate, continuous access to the entire embedding matrix will incur overhead from repeatedly querying the structure.

Future work will likely focus on tightening these distortion bounds, exploring algorithms robust against adaptive adversaries, and translating these theoretical data structures into optimized, practical libraries for real-world dynamic graph machine learning.

Summary updated

BibTeX
@inproceedings{banihashem2025fully,
  author = {Kiarash Banihashem and Xiang Chen and MohammadTaghi Hajiaghayi and Sungchul Kim and Kanak Mahadik and Ryan A. Rossi and Tong Yu},
  title = {{Fully Dynamic Embedding into $\textbackslash\{\}ell\_p$ Spaces}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=hPn8eX3LVv},
}
Figure