Comparison of 2D Regular Lattices for the CPWL Approximation of Functions

Mehrsa Pourya, Maïka Nogarotto, Michael Unser

TL;DR

This paper provides a rigorous mathematical analysis of how grid geometry affects the accuracy of continuous and piecewise-linear (CPWL) function approximations in 2D. By deriving an explicit formula for the asymptotic approximation error across general lattices, the authors prove that hexagonal grids are mathematically optimal, minimizing the error constant compared to standard Cartesian grids. Furthermore, they establish a direct bridge to deep learning by presenting the simplest known construction of these optimal 2D box splines using two-layer ReLU neural networks.

What Problem Does This Paper Address?

Continuous and piecewise-linear (CPWL) representations are foundational across signal processing, computer graphics, and finite element methods because they are simple, computationally efficient, and capable of approximating complex structures. Recently, they have gained immense interest in machine learning because neural networks with Rectified Linear Unit (ReLU) activations generate exactly this class of functions.

To construct CPWL functions, space is typically partitioned into a grid of triangles whose vertices sit on a regular lattice. While Cartesian (square) grids are the most common due to their simplicity, alternative geometries like hexagonal grids are known to have superior sampling properties.

Prior research into CPWL approximation errors has mostly focused on establishing loose upper bounds, or has been restricted to one-dimensional scenarios. This paper addresses a fundamental multi-dimensional gap: How exactly do the angles and step sizes of a 2D grid geometry impact the asymptotic approximation error?

Cartesian and hexagonal box splines used as basis functions for CPWL approximation.

Methods

The authors utilize box splines to construct CPWL search spaces over regular 2D lattices. To fairly evaluate different grid geometries, they introduce a flexible parameterization of the grid matrix $\Xi$ using a step size $T$ and two angles, $\theta_1$ and $\theta_2$:

$$\Xi = \frac{T}{\sqrt{\sin(\theta_2 - \theta_1)}} \begin{bmatrix} \cos \theta_1 & \cos \theta_2 \\ \sin \theta_1 & \sin \theta_2 \end{bmatrix}$$

This clever parameterization ensures that the number of grid points per unit area remains constant regardless of the angles, enabling a fair "apples-to-apples" comparison.

The underlying triangulations and grid lines for Cartesian (left) and hexagonal (right) lattices.

By moving into the Fourier domain and applying a Taylor series expansion to the error kernel, the authors isolate the dominant, asymptotic term of the $L_2$ approximation error as the step size $T \to 0$. Finally, they analyze how this error behaves as a function of the grid angles to find the optimal configuration.

Datasets

This is a purely theoretical and mathematical paper; therefore, no empirical datasets or training benchmarks were used. To validate their theoretical error formulas, the authors evaluate them analytically on a synthetic Fourier Disk function (a perfectly band-limited indicator function in the frequency domain).

Key Insights and Ideas

  • The Hexagonal Advantage: The asymptotic error constant $C(\theta_1, \theta_2)$ is minimized precisely when the angle difference $\delta = \theta_2 - \theta_1$ equals $\frac{2\pi}{3}$ ($120^\circ$) or $\frac{4\pi}{3}$ ($240^\circ$). This mathematically proves the optimality of the hexagonal lattice.
  • An Elegant Laplacian Connection: For a standard Cartesian grid, the approximation error formula depends on a complex combination of mixed partial derivatives. However, for the optimal hexagonal grid, the formula simplifies beautifully to depend solely on the $L_2$ norm of the Laplacian ($\|\Delta f\|_{L_2}$): $$\epsilon_{\Xi_{\text{Hex}}, \text{asym}}(f) = \frac{T^2}{8\sqrt{15}}\|\Delta f\|_{L_2}$$
  • The Simplest ReLU Box Spline: The paper reveals that a 2D Cartesian box spline can be perfectly represented as a two-layer ReLU network using only 4 neurons in total. This provides a direct, minimal bridge between classical spline interpolation and deep learning architectures.

Key Results

  • Quantified Error Constants: The minimal value of the asymptotic error constant achieved by the hexagonal grid is $\sqrt{1.5} \approx 1.22$. In comparison, the Cartesian grid yields an error constant of $\sqrt{3} \approx 1.73$.
  • Verification via Fourier Disk: When approximating a band-limited disk function, the hexagonal grid yields a strictly smaller asymptotic error than the Cartesian grid, confirming that hexagonal grids utilize the available sampling area more effectively.
The error constant plotted against grid angles, showing distinct minima at the hexagonal grid configurations.

Limitations and Future Work

The primary limitation of this work is its restriction to regular (uniform) lattices and two dimensions (2D). In many practical engineering applications, adaptive meshes (where triangles change size depending on the local curvature of the function) are preferred over uniform grids.

Additionally, extending this exact Fourier-domain asymptotic analysis to 3D and higher dimensions remains an open challenge. Higher dimensions feature a richer variety of optimal lattices (such as the BCC and FCC lattices in 3D) whose exact CPWL approximation behaviors have yet to be fully quantified in this manner.

Summary updated

BibTeX
@inproceedings{pourya2025comparison,
  author = {Mehrsa Pourya and Maïka Nogarotto and Michael Unser},
  title = {{Comparison of 2D Regular Lattices for the CPWL Approximation of Functions}},
  booktitle = {SampTA},
  year = {2025},
  url = {https://openreview.net/forum?id=6bdrNElqGS},
}
Figure