NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

A Method for Auto-Differentiation of the Voronoi Tessellation

Sergei Shumilin, Alexander Ryabov, Evgeny Burnaev, Vladimir VanovskiýarXiv 2023 · DOI

TL;DR

This paper introduces a novel method to make Voronoi tessellations "auto-differentiable." This means that the process of generating a Voronoi diagram can now be seamlessly integrated into optimization pipelines, allowing gradients to flow through it. This breakthrough enables end-to-end differentiable optimization for problems that rely on Voronoi structures, a significant advancement for fields like computational geometry, physics, and engineering.

What Problem Does This Paper Address?

Voronoi tessellations are incredibly useful for partitioning space based on proximity, finding applications in everything from urban planning to biological modeling. However, a major hurdle in using them for optimization tasks, especially those involving machine learning or gradient-based methods, is that the standard algorithms for constructing Voronoi diagrams are non-differentiable. This means you can't easily calculate how small changes in the input points (the "sites") affect the resulting Voronoi regions (like their areas or edge lengths). This "non-differentiable bottleneck" prevents end-to-end optimization, forcing researchers to use workarounds or approximations. This paper tackles this by developing a method to make the Voronoi tessellation process itself differentiable.

Methods

The core of the method leverages the duality between Voronoi diagrams and Delaunay triangulations. While Delaunay triangulation itself is non-differentiable, the paper uses it to obtain adjacency information. This information is then used to construct a computational graph for the Voronoi tessellation.

Key techniques include:

  • Auto-differentiation (AD): The paper uses AD frameworks (like PyTorch) to automatically compute gradients. This means they don't need to manually derive complex gradient formulas for every Voronoi parameter.
  • Delaunay Triangulation for Adjacency: The Delaunay triangulation (DT(S)) of the site points (S) is computed first. This provides crucial information about which triangles share edges, which in turn defines the Voronoi edges.
  • Circumcenters for Voronoi Points: Voronoi points are the circumcenters of the Delaunay triangles. The paper provides analytical expressions for calculating these circumcenters and makes them part of the computational graph.
  • Handling Infinite Voronoi Regions: For unbounded Voronoi tessellations, infinite Voronoi regions are made finite by introducing "ghost points." These ghost points are strategically placed on rays extending from the midpoints of border edges of the convex hull of the site points, ensuring that the areas and edges associated with these regions can be computed differentiably.
  • Retriangulation Strategy: To manage computational cost during optimization, the Delaunay triangulation is not recomputed at every step. Instead, a frequency parameter r is introduced, meaning retriangulation occurs every r optimization steps.

Datasets

Not discussed in the paper. The paper focuses on a general method and demonstrates its application on synthetic data and simulated problems (optimal hospital placement, minimizing Voronoi area variance).

Key Insights and Ideas

  • Bridging the Gap: The most significant insight is successfully bridging the gap between non-differentiable geometric constructions (Voronoi tessellations) and the powerful tools of auto-differentiation. This opens up a vast array of optimization problems that were previously intractable.
  • Duality is Key: The paper elegantly exploits the Voronoi-Delaunay duality. By using the DT as a "scaffold" for the Voronoi construction, they can leverage the differentiable properties of circumcenter calculations and geometric formulas.
  • Ghost Points for Infinity: The method for handling infinite Voronoi regions with "ghost points" is a clever way to make these unbounded structures computationally tractable and differentiable, which is crucial for many real-world scenarios.
  • Flexibility of Loss Functions: The auto-differentiable nature means that any differentiable loss function can be applied to the Voronoi geometry (e.g., areas, edge lengths), allowing for diverse optimization objectives.

Key Results

The paper demonstrates the method's effectiveness through several applications:

  • Minimizing Variance of Voronoi Region Areas: They show that by optimizing site point positions, they can achieve a highly uniform distribution of Voronoi region areas, converging towards a theoretical ideal (e.g., 0.001 area per region for 1000 points in a unit square). The loss curve shows stable convergence.
  • Optimizing Hospital Locations: They frame the problem of optimally placing hospitals to match population density with hospital capacity. The method allows for optimizing hospital locations based on a differentiable efficiency metric, showing promising results in aligning Voronoi cell populations with hospital capacities.
  • Bounded Voronoi Tessellation: The method is extended to handle bounded domains, which is essential for many practical simulations and applications.

The paper also provides an algorithmic complexity analysis, showing the dominant factor is the Delaunay triangulation, leading to an overall complexity of O(m N log N) for m optimization steps with N points.

Limitations and Future Work

  • Computational Cost: While the method is differentiable, the underlying Delaunay triangulation can still be computationally intensive, especially for a large number of points. The retriangulation strategy helps mitigate this, but it's still a consideration.
  • Approximation for Infinite Regions: The "ghost points" introduce an approximation for infinite Voronoi regions. The accuracy of this approximation depends on the hyperparameter w.
  • Future Work: The authors suggest that this method is particularly useful for solving inverse problems across various scientific and engineering disciplines where gradients with respect to Voronoi construction are needed. They highlight its potential in fluid dynamics, physics simulations, and other areas where precise spatial configurations are critical. The extension to 3D Voronoi tessellations would be a natural next step.

Summary updated

BibTeX
@misc{shumilin2023method,
  author = {Sergei Shumilin and Alexander Ryabov and Evgeny Burnaev and Vladimir Vanovskiý},
  title = {{A Method for Auto-Differentiation of the Voronoi Tessellation}},
  year = {2023},
  eprint = {2312.16192},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.16192},
}
Figure