A Method for Auto-Differentiation of the Voronoi Tessellation
Sergei Shumilin, Alexander Ryabov, Serguei Barannikov, Evgeny Burnaev, Vladimir Vanovskii
TL;DR
This work delivers an end-to-end differentiable framework for the 2D Voronoi tessellation by exploiting the duality with Delaunay triangulation and introducing ghost points to manage infinite regions. The method computes $DT(S)$ for adjacency while constructing $V(S)$ through circumcenters, enabling backpropagation of gradients with respect to site positions. It supports bounded diagrams via differentiable clipping and controls retriangulation with a frequency parameter $r$, achieving a worst-case complexity of $O(m\,N\log N)$. The approach is demonstrated on tasks such as minimizing the variance of Voronoi region areas and optimizing hospital locations under a population density, illustrating practical impact for geometry-aware inverse problems.
Abstract
Voronoi tessellation, also known as Voronoi diagram, is an important computational geometry technique that has applications in various scientific disciplines. It involves dividing a given space into regions based on the proximity to a set of points. Autodifferentiation is a powerful tool for solving optimization tasks. Autodifferentiation assumes constructing a computational graph that allows to compute gradients using backpropagation algorithm. However, often the Voronoi tessellation remains the only non-differentiable part of a pipeline, prohibiting end-to-end differentiation. We present the method for autodifferentiation of the 2D Voronoi tessellation. The method allows one to construct the Voronoi tessellation and pass gradients, making the construction end-to-end differentiable. We provide the implementation details and present several important applications. To the best of our knowledge this is the first autodifferentiable realization of the Voronoi tessellation providing full set of Voronoi geometrical parameters in a differentiable way.
