A Faster Closest-Point Algorithm for the $A_n^*$ Lattices

2026-07-11Information Theory

Information Theory
AI summary

The authors study a mathematical problem where you want to find the closest point in a special grid called the dual root lattice A_n^* to a given point. This lattice is useful for working with data like probability distributions. They developed a new, faster method that improves on a previous approach by avoiding unnecessary sorting and complex data structures. Their method also works exactly with rational inputs and runs significantly quicker, especially in higher dimensions. They tested their method on a modern processor and shared the code publicly.

dual root latticeA_n^*closest-point problemquantizationbucket sortinteger latticeprefix aggregatescounting sortrational coordinatesroot lattices
Authors
Yuriy A. Reznik
Abstract
The dual root lattice $A_n^*$ is an important lattice in quantization, coding, and estimation. It can be represented as the projection of the integer lattice $\mathbb{Z}^{n+1}$ onto the $n$-dimensional hyperplane whose coordinates sum to zero. This representation makes $A_n^*$ particularly natural for quantizing simplex-constrained data, such as histograms and probability distributions. This paper studies the closest-point problem for $A_n^*$: given a query vector $y$, find the lattice point $x\in A_n^*$ minimizing $\|y-x\|^2$. The fastest previously known method is the linear-time algorithm of McKilliam, Clarkson, Smith, and Quinn (MCSQ), which employs bucket sort as a core operation. We present a faster linear-time algorithm. The key observation is that the closest-point objective depends on the rounding residuals only through two prefix aggregates: a count and a residual sum. Hence the elements inside each bucket never need to be sorted, stored, or traversed. This replaces the linked-list traversal and pointer chasing of MCSQ with a single bucketing pass over two flat arrays with counting-sort-style accumulates. A scaled objective further makes most of the computation exact integer arithmetic, and when the input coordinates are rationals with a common denominator, for example, histograms or empirical distibutions, the entire algorithm becomes exact and integer-only. Experiments on an Intel Core i9-13900H show speedups of about $1.8\times$ to $3.0\times$ over MCSQ for $n=2,\dots,100$, with larger gains at higher dimensions. The proposed algorithm is also noticeably faster than Conway and Sloan methods for other root lattices, including $A_n$, $D_n^*$, and $E_8$. An open-source implementation is available in the "fanstar" project.