Closest point search in lattices
Paper · 2002 · Erik Agrell, Thomas Eriksson, Alexander Vardy et al.
Summary
A lattice is a grid whose directions can be tilted and whose spacings can differ. Given a point somewhere in space, how do you find the lattice point nearest to it? For a grid with perpendicular axes, rounding along each axis works. In a general lattice, a choice that looks best along one direction can leave a poor set of choices along the others. This matters in communications because decoding a signal or quantizing a vector can require the same lattice to be searched for many different inputs. The authors examine how to make those searches faster while still finding an exact nearest point.
The paper brings several earlier methods into a common framework. Each method sees the lattice as parallel layers, and each layer can be divided into smaller layers until the choices are individual points. The authors implement a search based on Schnorr and Euchner’s ordering. It tries the closest layer first at every level, so it quickly finds the point produced by Babai’s nearest-plane method. The distance to that first point gives the search a finite radius. Whenever the search finds a better point, it shrinks the radius. As soon as a layer is too far away, the ordering lets the search skip that layer and every farther sibling. A change of basis can make this pruning more effective while preserving the lattice and the answer.
On random lattices, the authors’ implementation was faster than their implementation of the Viterbo–Boutros decoder at every tested dimension, by a factor of 2.5–3 with Korkine–Zolotareff basis reduction applied to both. For dimensions described as 30+, average searches with bases reduced by either the Korkine–Zolotareff method or its dual took almost 100 times less time than searches with unreduced bases. Those timings exclude the cost of reduction. A separate theoretical comparison gives the ordered search an advantage over the paper’s chosen version of Kannan’s method in the volume of the region searched. The paper also shows what happens when the search is stopped early. In a 45-dimensional example, accepting a 10% increase in mean squared distance made the search approximately 40 times faster.
The same search machinery can answer several questions about the lattice itself. Searching from the origin and excluding the origin gives a shortest non-zero vector. Collecting ties makes it possible to count shortest vectors or identify which neighboring points determine the faces of a Voronoi region. Repeating the shortest-vector search in successively projected lattices provides a way to compute a Korkine–Zolotareff reduced basis.
Deep dive: Closest point search in lattices
How closest-point search in lattices uses an early candidate and ordered enumeration to find the exact nearest point with less search. · about 39 minutes to read
The problem and its context
The point set and the query
A generator matrix describes a lattice by giving a basis as its rows. Every lattice point is an integer combination of those rows. The coefficients may be negative, positive, or zero, and the rows themselves may have real coordinates. Linear independence makes the coefficients of each lattice point unique for a given basis. It also allows the lattice to occupy a subspace of the space where the input is measured. The paper distinguishes the dimension of the lattice, which is the number of basis rows, from the dimension of that surrounding space, which is the number of coordinates in each row.
The query is a point with real coordinates. The task is to return a lattice point that minimizes ordinary Euclidean distance to the query. If there is a tie, any point at the minimum distance satisfies the original task. Finding all the tied points is a separate problem that the authors also address. An important distinction is between rounding the coefficients of a point and minimizing geometric distance. With an oblique basis, changing a coefficient moves the candidate in a direction that can affect several coordinates. The coefficient choices interact through the geometry of the basis.
The Voronoi region of a lattice point consists of all queries for which that point is among the nearest lattice points. Thus a query on a boundary can belong to several regions. The regions are translates of the one around the origin, and each is symmetric under reflection through its lattice point. In the lattice’s own span, the regions are convex polytopes. If the input space has additional perpendicular directions, the distance to every candidate includes the same perpendicular contribution. The nearest-point decision still takes place in the lattice’s span. This is why the algorithm can work in fewer coordinates when the generator matrix has more columns than rows.
Why the same search appears in different applications
In the paper’s channel-coding example, the receiver has an observed signal and needs to decide which lattice point was sent. For a lattice code on a Gaussian channel, maximum-likelihood decoding leads to a closest-point search. The authors mention space-time code decoding as an example. In vector quantization, an encoder replaces the input vector with a codebook vector. When the codebook is a lattice and the distortion criterion is mean squared error, the closest vector is again the relevant choice. The same computation therefore goes by different names depending on where it occurs in a communication system.
The authors also discuss a finite code formed by restricting a lattice to a bounded region. Such a restriction introduces another question. A candidate can minimize distance over the infinite lattice and fall outside the permitted region. The paper focuses on the infinite-lattice problem and separately considers adjustments for a finite code. In both settings, a practical feature of communications is that the lattice often stays fixed while the query changes. A change of basis can then be calculated once and reused, even though the closest-point decision must be made afresh for every input.
Closest-point search also arises while designing lattices and estimating their second moments. The paper describes using the search to generate points distributed uniformly within a Voronoi region. In numerical lattice design, the generator can change as part of the design procedure. That makes a general search method valuable, because a matrix under adjustment may offer no recognizable structure to exploit. The paper also points to frequency estimation and phase unwrapping as applications. These examples motivate a method whose input is a generator matrix and whose operation depends on the geometry that can be extracted from it.
What earlier search methods offered
The authors distinguish general search from decoding procedures tailored to particular lattices. Classical lattices can have symmetries or constructions that permit specialized algorithms. A trellis gives another way to organize the choices, allowing a decoder such as the Viterbi algorithm to find the best path. The paper notes that a finite-state lattice trellis exists precisely when the lattice contains a full set of mutually orthogonal vectors. Even where such a representation exists, its decoding cost can grow enough to make the approach impractical. A general generator matrix therefore calls for a method that can work without a useful trellis or a specialized decoder.
The earlier general methods share a geometric idea. If a finite region is known to contain an optimum, the search can focus on the lattice points inside that region. The paper traces early versions of this idea to shortest-vector calculations used in assessing random number generators. Those methods examined a parallelepiped whose axes followed the basis. The authors then describe two lines of work. Pohst’s strategy searches within a sphere, whereas Kannan’s uses a rectangular parallelepiped. The literature on Pohst’s approach emphasized practical implementation, in the authors’ account, while work on Kannan’s approach concentrated more on asymptotic complexity.
Babai’s nearest-plane algorithm gives a nearby lattice point through a sequence of local decisions. It can do so in polynomial time in the dimensions of the generator matrix. Its choice can depend on the basis, and the returned point can be farther away than the optimum. Schnorr and Euchner had already proposed a way to order the branches of Pohst’s search so that the nearest-plane point comes first. Their procedure appeared within a basis-reduction algorithm. Agrell and colleagues make that search a stand-alone decoder, explain its relation to the other strategies, and compare the resulting procedures under a common description.
The paper places this practical problem alongside the known hardness of closest-point search. It reports that the general problem is NP-hard and that hardness also holds for some versions that allow approximation. The authors’ aim is to reduce the work done by an exact search on a given instance. Search order determines how soon a useful candidate appears, and the lattice basis determines how much of the enumeration that candidate can rule out. Both can matter even when the underlying problem remains computationally hard.
The method, step by step
From a generator matrix to layers
The algorithm begins with the same objects that define the problem. A generator matrix gives the possible answers, and an input vector gives the location from which all distances are measured. The lattice can be written as follows.
Λ(G) = {uG : u ∈ ℤⁿ}
Here Λ(G) denotes the lattice generated by G. The matrix G has n independent rows, each with m real coordinates. The row vector u contains the integer coefficients, ℤ is the set of integers, and ℤⁿ is the set of integer vectors of length n. The product uG forms a point in the surrounding m-dimensional space. The colon in the set expression means that the set includes the product for every u satisfying the stated condition.
‖x − ĉ‖ ≤ ‖x − c‖ for every c ∈ Λ(G)
Here x is the input vector, ĉ is the chosen lattice point, and c ranges through the entire lattice Λ(G). The double bars denote Euclidean length. The relation allows equality, so a search that returns any one of several equally close points fulfills the objective.
The authors’ geometric decomposition begins by fixing the coefficient of the last basis vector. As the other coefficients vary, the resulting points form a translated copy of a lattice of lower dimension. Changing the fixed coefficient shifts the copy sideways and moves it in a direction perpendicular to its span. The perpendicular movement separates the copies into distinct parallel layers. Because the rows are independent, the last row has a non-zero component perpendicular to the span of the earlier rows. Each integer choice for its coefficient therefore specifies a different layer.
Λ(G) = ⋃ᵤₙ∈ℤ {c + uₙv∥ + uₙv⊥ : c ∈ Λ(G*)}
Here G* contains the first n − 1 rows of G, and c varies over their lattice Λ(G*). The coefficient uₙ is the last entry of u. The vectors v∥ and v⊥ are the components of the last basis row parallel and perpendicular to the span of G*, respectively. The union collects the points from all choices of uₙ. The term involving v∥ accounts for the shift within a layer, and the term involving v⊥ accounts for the shift between layers.
Once the last coefficient is fixed, the same construction applies to the lattice inside its layer. Fix the next coefficient and there is a smaller collection of points to examine. Continue until all coefficients have been assigned and there is just a single candidate. The resulting search has a tree structure. A partial assignment identifies a layer, its children specify finer layers, and a complete assignment identifies a point. The method can bound the distance to every point under a partial assignment by calculating the distance to the layer containing them.
Consider the point in the procedure where the search has yet to choose the last coefficient. Within the lattice’s span, the perpendicular coordinate of the query, expressed in units of layer spacing, locates it relative to the layers. For an input originally given in a larger space, the following calculation describes the separation in the direction v⊥. The preprocessing below removes any additional perpendicular component common to all lattice-point distances.
ûₙ = xv⊥ᵀ / ‖v⊥‖²
Here ûₙ is the real-valued location of x along the layer index, and the superscript ᵀ transposes v⊥ so that the product xv⊥ᵀ is a dot product. The denominator is the squared length of v⊥. It converts the projection into units where changing the integer coefficient uₙ by one moves to the adjacent layer. In this formula the hat denotes a real-valued center for enumeration, distinct from the integer output of the complete decoder.
yₙ = |uₙ − ûₙ| ‖v⊥‖
Here yₙ is the perpendicular separation associated with layer uₙ, the single bars give the absolute difference between that index and the query’s real-valued location, and ‖v⊥‖ is the spacing of the layers. A point inside the layer has at least this much distance from the query. Its actual distance can be larger because the projection of the query into the layer may fall between lattice points.
How a radius turns the layers into a finite search
Suppose the search has an upper bound on the distance to an optimum. It can ignore layers whose perpendicular separation already exceeds that bound. The remaining integer choices form an interval around the real-valued center.
⌈ûₙ − ρₙ/‖v⊥‖⌉ ≤ uₙ ≤ ⌊ûₙ + ρₙ/‖v⊥‖⌋
Here ρₙ is the distance bound for the current n-dimensional search. The symbols ⌈ ⌉ round the lower endpoint up to an integer, and ⌊ ⌋ round the upper endpoint down. All other symbols are as in the layer-distance formula. The interval identifies layers that can intersect the search sphere. Intersecting the sphere is a necessary condition for a layer to contain a candidate within the bound, and checking the sublayers determines whether it actually contains one.
The four search strategies in the paper use these layers in different ways. Babai’s method follows just the nearest integer index at every stage. After taking that step, it finds the query’s position relative to the sublayers within the chosen layer and rounds again. The process reaches a point without requiring a search radius. Its efficiency comes from committing to each layer as it goes. A layer at a greater perpendicular distance can still contain a better point, since its points can be closer to the query along the directions inside the layer.
Kannan’s strategy makes a different choice about the subproblem. The variants discussed in the paper scan eligible layers and use the same bound on the lower-dimensional search across those layers. They differ in how they select bounds, but the common feature is that the subproblem bound at a given level does not change with the perpendicular distance of the particular layer selected there. In geometric terms the search region is a rectangular parallelepiped. Traversing its layers allows an exact search, and a uniform bound can retain candidates that a distance-sensitive bound would discard earlier.
Pohst’s strategy accounts for how much of the allowed squared distance was spent getting to the selected layer. A layer near the query can still have a wide cross-section of the original sphere. A layer near the edge can have only a narrow one. The orthogonal components of Euclidean distance give the radius available inside each of them.
ρₙ₋₁ = √(ρₙ² − yₙ²)
Here ρₙ₋₁ is the remaining radius inside the chosen layer, ρₙ is the current radius before choosing it, and yₙ is the perpendicular separation. The square root converts the remaining squared distance into a length. The formula applies to an eligible layer, for which the expression under the root is non-negative. Whenever a point improves the best distance, that distance can serve as a tighter bound, including for subproblems the search has yet to visit.
Schnorr–Euchner enumeration retains this spherical rule and makes the ordering of the layer choices depend on their distances. It starts at the nearest integer to the center and takes each successive integer in nondecreasing distance from the center. The side that goes next depends on where the center falls relative to the rounded value. A representative sequence is the one in which the center is on or below the rounded integer.
uₙ = r, r − 1, r + 1, r − 2, …
Here r is the nearest integer to ûₙ, and the sequence applies when ûₙ ≤ r. The ellipsis continues the alternating steps with increasing magnitudes. When the center is above r, the direction of the first step is reversed. The arithmetic gives the search the next layer as needed, without first constructing a list of all layers allowed by the bound.
The first complete descent follows exactly the choices made by the nearest-plane algorithm. The first finite radius is therefore the distance to the Babai point. Once this radius is available, subsequent branches can be discarded as soon as their partial distance reaches the best known distance. Within a parent layer, all later siblings have at least the distance of the sibling just checked. A failed check rules out the rest of that ordered sequence. The same property makes the initially unbounded search practical. It reaches a complete candidate before it needs to enumerate any set of siblings.
Exact closest-point search with ordered layers
The steps in order.
Preparing a basis the decoder can use
The implementation works with a square lower-triangular generator matrix whose diagonal is positive. This form exposes the layer structure in the coordinates of the matrix. For example, the last coordinate of a point depends only on the last integer coefficient, because the earlier rows have zeros there. After that coefficient is chosen, the search can account for its contribution to the earlier coordinates and continue in the leading part of the matrix. A positive diagonal lets the enumeration use the sign of a residual to select the direction of its next step.
The paper’s full procedure separates a change of basis from a change of coordinates. The first changes the rows used to describe the lattice while keeping every lattice point in place. The second chooses orthonormal coordinates in the lattice’s span. Confusing the transformations would change the problem. In particular, if the search is performed in a new coordinate system, the query must also be represented in those coordinates.
G₂ = WG
Here G is the given generator matrix, G₂ is a new generator for the identical lattice, and W is a square n-dimensional integer matrix with determinant ±1. Such a W has an integer inverse, so every integer combination of either basis is an integer combination of the other. Taking W to be the identity leaves the basis as given. Taking W from a reduction procedure changes how the lattice breaks into layers.
G₂ = G₃Q
Here G₃ is square and lower triangular with positive diagonal entries. The matrix Q has n rows and m columns, and its rows are orthonormal vectors in the span of G₂. The product maps coordinates in that span back to the original space. In these coordinates the first basis row lies along the first axis. Each subsequent row lies in the span of the axes introduced up through that row. Those properties give G₃ its triangular form.
The paper describes obtaining this factorization by applying QR decomposition to the transpose of G₂. The transposed triangular factor gives G₃, and the transposed factor with orthonormal columns gives Q. If the factorization yields a negative diagonal entry, a sign change in the corresponding column of G₃ and row of Q preserves the product and makes the diagonal positive. The paper also describes a Cholesky route. The row inner products form a positive definite matrix, and the lower-triangular factor reproduces those inner products.
G₂G₂ᵀ = G₃G₃ᵀ
Here the left-hand product records the pairwise inner products of the rows of G₂, and the right-hand product does the same for the rows of G₃. The equality follows from the orthonormal rows of Q. In the Cholesky approach, one obtains G₃ from this matrix of row inner products and recovers Q by multiplying G₂ on the left by the inverse of G₃.
H₃ = G₃⁻¹
Here H₃ is the inverse triangular matrix expected by the inner decoder. The superscript ⁻¹ denotes the inverse of G₃. Since G₃ is lower triangular and has positive diagonal entries, H₃ has those properties as well. It can be calculated once for a fixed lattice. Passing the inverse into the decoder makes the computation inside the query loop primarily a matter of updating vectors and distances.
x₃ = xQᵀ
Here x₃ is the query in the orthonormal coordinates of the lattice’s span, x is the original query, and Qᵀ is the transpose of Q. If the span is smaller than the surrounding space, the omitted component of x is perpendicular to every difference measured within the span. Its squared length contributes the same amount to the squared distance to each lattice point. Thus the candidate that minimizes distance in the inner search also minimizes the original distance.
x̂ = û₃G₂
Here û₃ is the integer coefficient vector returned by the inner decoder and x̂ is the nearest lattice point in the original coordinates. The coefficients refer to the transformed triangular basis. The same coefficients applied to the rows of G₂ yield the corresponding point in the original space. The query transformation and output reconstruction run for each input. Basis reduction, triangular factorization, and inversion depend only on the generator matrix and can be shared across inputs. There is no training stage.
What the inner loop remembers
The implementation replaces recursive calls with a loop that moves down and up the levels of the search. At a level indexed by k, the coefficients at higher indices have already been chosen. The decoder stores the squared distance from those choices, the state needed to examine the sublayers, the current integer choice, and a step used to generate its next sibling. Keeping this information lets the search resume a parent’s enumeration after returning from a child. A better candidate changes the bound used in future checks, with no need to discard the saved state and restart.
The triangular inverse maps the transformed query into coefficient coordinates. At the top level, the initial vector of real coefficients is the query multiplied by that inverse. Inside a layer, the first k entries of the corresponding vector are stored as eₖ. Its final entry is the real center for the next integer choice. Dividing the difference between that center and the integer by the appropriate diagonal of the inverse converts a coefficient difference into a signed perpendicular displacement.
y = (eₖₖ − uₖ)/hₖₖ
Here eₖₖ is entry k of the stored vector eₖ, uₖ is the integer currently being examined, and hₖₖ is the diagonal entry of the triangular inverse at position k. The quotient y has a sign that records which side of the chosen sublayer the query lies on. Squaring it gives the contribution to squared distance. The reciprocal of hₖₖ is the diagonal spacing in the generator matrix at this level.
newdist = distₖ + y²
Here distₖ is the squared distance already incurred by the higher-index choices, and newdist is the squared distance after adding the current choice. The decoder compares newdist with bestdist, the smallest squared distance among the complete points it has seen. Initially bestdist is infinite and the accumulated distance at the top level is zero. A complete point with a smaller squared distance can replace the stored answer. A partial assignment with a smaller squared distance can still lead to such a point.
When the partial assignment passes the check, the loop descends. It uses the current signed displacement to update the coordinates for the child’s enumeration. That update accounts for the way a sublayer’s shift along the current axis changes the residual coefficient coordinates on the axes still to be searched.
eₖ₋₁,ᵢ = eₖᵢ − yhₖᵢ for i = 1, …, k − 1
Here i indexes the coordinates retained at the next level. The entry eₖᵢ belongs to the current level, eₖ₋₁,ᵢ belongs to the child, and hₖᵢ is the entry in row k and column i of the inverse. The product yhₖᵢ subtracts the effect of the signed displacement in the current coordinate. The new partial distance becomes the starting distance at the child, and the next coefficient is initialized by rounding the child’s final entry.
For subsequent siblings, the loop keeps an integer step for each level. It starts with a step towards the center from the rounded integer, taking the negative direction when the signed residual is zero. After applying a step, it changes the sign and increases the magnitude for the next move.
stepₖ ← −stepₖ − sgn*(stepₖ)
Here stepₖ is the saved increment for coefficient uₖ, and the arrow assigns its new value after the previous increment has been applied. The function sgn* returns −1 for a nonpositive argument and 1 for a positive argument. The same sign rule is applied to y to choose the first increment at a newly entered level. A rounding tie can be broken either way for the task of returning a single optimum.
The loop has three outcomes for a distance check. A promising partial assignment leads to a child. A promising complete assignment updates the record and returns control upward. A failed check discards the current assignment and the remaining siblings at that level, and either moves upward or ends the search if it was already at the top. The strict comparison is appropriate for the single-answer problem. Once a complete point is stored, another point at the same distance cannot improve the record, so branches that can only tie it need no further examination. Every excluded branch has a lower bound at least as large as the recorded distance. This is what makes the returned point exact when the distance comparisons are exact.
Why basis reduction changes the amount of search
Different bases of the same lattice can produce different families of layers. The lattice points stay fixed, but the search partitions them differently and the spacing at each level changes. The authors identify two useful goals. One is to space the higher-dimensional layers widely, so relatively few of them intersect a given search sphere. The other is to make the lattice points along each lowest-level line close together, so the nearest line is more likely to furnish a good complete point. Applying these ideas at intermediate levels gives a preference for wider spacing near the top of the search and tighter spacing near the bottom.
∏ₖ₌₁ⁿ vₖₖ = vol(Ω(Λ, 0))
Here vₖₖ denotes the positive diagonal entry of the triangular generator at level k, which gives the spacing between adjacent layers at that level. The product runs over all n diagonal entries. The symbol Ω(Λ, 0) denotes the Voronoi region of the origin for lattice Λ, and vol is its volume within the lattice’s span. The product is invariant under the choice of basis. Changing the spacing at one part of the hierarchy therefore constrains what can happen at the others.
The paper describes several meanings of a reduced basis. Hermite’s criterion considers the sequence of basis lengths in order, comparing possible continuations when the previous lengths agree. Minkowski’s criterion fixes the earlier vectors themselves, so once a valid prefix has been chosen, the next vector can be selected among bases that contain that prefix. For the search in this paper, the authors focus on reductions that let the lower-dimensional problem be treated recursively. These are Korkine–Zolotareff reduction, abbreviated KZ, and Lenstra–Lenstra–Lovász reduction, abbreviated LLL.
In a KZ-reduced triangular basis, the first row is a shortest non-zero lattice vector. The other rows have limited components along it. After removing the first row and coordinate, the remaining triangular basis satisfies the same criterion for the projected lattice. A lattice of dimension 1 already meets the recursive criterion. The condition on the first coordinate is written as follows.
|vₖ₁| ≤ |v₁₁|/2 for k = 2, …, n
Here vₖ₁ is the first coordinate of row k and v₁₁ is the first diagonal entry. The absolute bars measure the magnitudes of those coordinates. The bound controls how much the later rows extend along the first basis direction. The same condition recurs in successive projected bases with their own first row and first coordinate.
KZ reduction of the original lattice minimizes the low-dimensional spacings in their order, beginning with the shortest possible first row. To pursue wide spacings from the top of the search, the authors apply KZ reduction to the dual lattice. In square coordinates, the transpose of the inverse generator is a generator for the dual. The largest attainable spacing at the top level is the reciprocal of the shortest non-zero dual-vector length. The paper extends that observation recursively and describes recovering a basis of the original lattice by reversing the rows of the reduced dual basis and taking its inverse transpose.
LLL also uses the coordinate bound and a recursive condition on the smaller block. Its first-row length is controlled by a comparison with the next row, which is cheaper to enforce than requiring a globally shortest vector in every projected lattice.
‖v₁‖ ≤ (2/√3) ‖v₂‖
Here v₁ and v₂ are the first and second rows of the triangular basis in the current recursive problem. The norms are their Euclidean lengths. The factor multiplying the second length is the constant in the paper’s LLL criterion. A KZ-reduced basis satisfies the LLL conditions, and the paper describes LLL as an approximate way to pursue the spacing goals at both ends of the hierarchy. The authors favor LLL when the cost of preprocessing weighs heavily and KZ when a substantial number of searches can share the reduced basis.
How the paper bounds the size of the search
The theoretical comparison uses the volume of the searched region as a measure proportional to average search complexity for a fixed lattice under uniformly distributed inputs. The paper takes uniformity over a region large enough for boundary effects to be negligible, equivalently over a Voronoi region. The volume calculation reflects which offsets the algorithm may have to consider under those assumptions. Execution also involves arithmetic and control flow, which the experiments assess separately with measured search times.
The argument begins with a one-dimensional interval and builds upward using the cross-sections of the search sphere.
V₁(ρ₁) = 2ρ₁
Here V₁ is the length searched along a line, and ρ₁ is its distance bound. The allowed interval extends from −ρ₁ to +ρ₁ about the projected query. In higher dimensions the sphere restricts which layers can contribute and how large the search inside each layer can be.
Vₖ(ρₖ) ≤ ∫₋ρₖ^ρₖ Vₖ₋₁(ρₖ₋₁) dy
Here Vₖ is the volume searched in a k-dimensional layer, ρₖ is the radius in that layer, and y is the signed perpendicular offset to a sublayer. The integral ranges from −ρₖ to +ρₖ. The child radius ρₖ₋₁ is at most the square root of the remaining squared radius after subtracting y². The integrand expresses the bound on what can be searched in that cross-section. The inequality allows for the search to tighten its bound when it finds a better point.
Vₖ(ρ) ≤ π^(k/2) ρᵏ / Γ(k/2 + 1)
Here ρ is a radius bound in k dimensions, π is the circle constant, and Γ denotes the gamma function. The right-hand side is the volume of the k-dimensional sphere of radius ρ. This bound follows by integrating the spherical cross-sections. By itself, it presupposes a finite radius. The Babai point supplies one for the ordered search.
βₖ = √(v₁₁² + ⋯ + vₖₖ²)
Here βₖ combines the first k diagonal spacings of the triangular generator. Each vᵢᵢ is the layer spacing at index i, and the ellipsis includes all the squared spacings between the displayed terms. The Babai distance in the corresponding k-dimensional problem is bounded by βₖ/2. Each nearest-layer decision has a perpendicular residual of at most half its spacing, and those residuals are measured along orthogonal directions. Their squared contributions account for the form of the bound.
The search can initially be specified with an infinite bound because it reaches the Babai point on the first descent. The proof uses that point to place a finite limit on search volume and applies the same nearest-plane bound in the lower-dimensional analysis. A product bound follows from limiting the extent at each level.
Vₙ(∞) ≤ ∏ₖ₌₁ⁿ βₖ
Here Vₙ(∞) is the volume measure for the full search when no starting radius is supplied. The product over the bounds βₖ is the volume of a rectangular parallelepiped with those side lengths. The paper also gives a bound by enclosing the search in the sphere permitted by the full-dimensional Babai distance.
Vₙ(∞) ≤ π^(n/2) βₙⁿ / (2ⁿ Γ(n/2 + 1))
Here βₙ is the bound parameter formed from all n spacings, and 2ⁿ in the denominator comes from using radius βₙ/2 in n dimensions. The paper uses a Stirling inequality for the gamma function to obtain a simpler expression useful in discussing large dimensions.
Vₙ(∞) ≤ (2n/(πe))^(−n/2) βₙⁿ
Here e is the base of the natural logarithm. The other symbols retain their previous meanings. The authors note that the bound with the gamma function is tighter at low and moderate dimensions. They also give an intermediate family of bounds, using a spherical calculation through one dimension of the recursion and the product of spacing bounds for the remaining levels.
Vₙ(∞) ≤ [π^(k/2) βₖᵏ / (2ᵏ Γ(k/2 + 1))] ∏ⱼ₌ₖ₊₁ⁿ βⱼ
Here k selects the dimension for the spherical part and j indexes the remaining factors through n. The square brackets group the spherical volume bound. At the endpoint where there is no spherical calculation, the spherical factor is taken as 1, and at the other endpoint the empty product is 1. This expresses how the two full bounds arise from different uses of the same recursion.
For the version of Kannan’s algorithm adopted in the comparison, the volume lies between two expressions involving the same spacings.
∏ₖ₌₁ⁿ βₖ ≤ Kₙ ≤ βₙⁿ
Here Kₙ is the search volume of that version of Kannan’s algorithm in dimension n. The lower endpoint is attained when the diagonal spacings increase and the upper endpoint when they decrease. The paper also describes a recursive cube variant that attains the lower endpoint. The upper product bound for the ordered search coincides with the lower bound for Kannan’s volume, giving an ordering in the paper’s average-complexity measure. The spherical bound shows how the gap can grow when the Kannan volume is near its upper endpoint. These equations compare the enumeration regions for the specified algorithms, while the timing experiments compare concrete implementations.
How the search is adapted to other lattice problems
For a shortest-vector search, the query becomes the origin and the origin itself is excluded from the answers. The loop still accumulates distances to layers and shrinks the bound when a complete candidate improves it. The initial descent reaches the zero vector, which the modified search must pass over before recording an admissible candidate. A further saving follows from symmetry. If a vector is shortest, its negative has the same length and belongs to the same lattice. To find one of them, the search can restrict coefficient vectors to a single representative of each opposite pair, for example the one whose first non-zero coefficient is positive.
The kissing number asks how many shortest non-zero vectors there are. This changes what a branch can contribute, because a point that ties the best length may increase the count. The paper emphasizes that small errors in a generator can break exact ties. The proposed implementation uses finite precision during enumeration and includes a margin in the distance tests, keeping a set of potential answers. It then uses exact distances between the original vectors in a final pass. A related procedure for an arbitrary query keeps the candidates near the smallest distance and returns every point with the exact minimum.
newdist < (1 + ε) bestdist
Here newdist and bestdist are squared distances in the inner loop, and ε is a small positive margin. It widens the distance test during candidate collection so that numerical noise is less likely to exclude a genuine tie. The final comparisons use the distances computed exactly from the retained vectors and the original problem. In the kissing-number problem the origin is excluded, as in a shortest-vector search. In the all-closest-points problem the input is arbitrary and any lattice point at the minimum distance belongs in the answer.
The all-closest-points procedure also gives a way to identify the facets of the Voronoi region, the faces of codimension one in the span of the lattice. The region around the origin can be described by constraints comparing the distance to the origin with the distance to other lattice points. The Voronoi-relevant vectors are the points needed to define that region through a minimal collection of such constraints. The paper’s test for relevance uses the midpoint between two prospective neighbors.
s = (c₁ + c₂)/2
Here c₁ and c₂ are distinct lattice points and s is their midpoint. Reflection about s interchanges c₁ and c₂ and maps the lattice to itself. The authors show that the regions of c₁ and c₂ share a facet precisely when these two points are the only nearest lattice points to s.
‖s − c₁‖ = ‖s − c₂‖ < ‖s − c′‖ for every c′ ∈ Λ \ {c₁, c₂}
Here Λ is the lattice, c′ ranges over its points other than c₁ and c₂, and the norms give distances to s. Strict inequality matters. Extra points at the same distance make this midpoint unsuitable as a witness that the proposed pair shares a facet. If the pair are the only closest points, the midpoint belongs to their common boundary and to no third region. Conversely, the authors start with a point inside a shared facet, where distances to the two neighbors are tied and smaller than to any other lattice point. Reflection about the midpoint supplies a distance comparison for every competitor and its reflected partner. Averaging those comparisons establishes the same strict condition at the midpoint itself.
The infinite collection of possible midpoints reduces to a finite one when midpoints that differ by a lattice translation are grouped together. Their coefficients are half-integers. After subtracting an integer coefficient vector, each coordinate can be represented by zero or one half. The all-zero choice is already a lattice point, which has itself as its unique nearest point.
M(G) = {zG : z ∈ {0, 1/2}ⁿ \ {0}}
Here M(G) is the set of representative midpoints for generator G. The coefficient vector z has n entries, each chosen from the displayed set, and the final exclusion removes the all-zero vector. For each midpoint, the method determines all its nearest lattice points. If there are exactly two, their difference and its negative are relevant vectors. Translating either member of the pair to the origin shows why those are precisely the contributions from that midpoint class. A midpoint with more tied points contributes no pair under the strict test. Because each non-zero class contributes at most one opposite pair, the paper obtains the facet bound below.
2|M(G)| = 2^(n+1) − 2
Here |M(G)| is the number of representative midpoints and n is the lattice dimension. This is the maximum number of facets of the Voronoi region in the paper’s discussion. The authors also review bounds on the numbers of lower-dimensional faces to explain why constructing the whole region can be expensive. In particular, they give the following upper and lower bounds on faces of dimension n − k.
(k + 1) ∑ᵢ₌₀ᵏ (−1)ⁱ binom(k, i) (k − i + 1)ⁿ
Here n is the lattice dimension, k is the codimension of the faces being counted, and i is the summation index. The notation binom(k, i) is the binomial coefficient. The paper gives the dual of the root lattice Aₙ as an example attaining the upper bound at every k.
binom(n, k) 2ᵏ
Here binom(n, k) is the number of ways to choose k indices out of n, and 2ᵏ is the factor in the lower bound. The cubic lattice attains this lower bound. The bounds explain the distinction between retaining the vectors that determine the facets and explicitly storing the geometry of every face. The authors suggest using the relevant vectors to simplify a full geometric construction when that more detailed output is required.
KZ reduction itself is another application of the shortest-vector procedure. It begins by finding a shortest non-zero vector and making that vector the first basis direction. The lattice is then projected onto the perpendicular hyperplane and the procedure is applied recursively to the projected lattice. The associated coordinates along each selected direction must satisfy the size condition in the definition of the reduced basis. The authors use LLL for the preliminary reduction inside these shortest-vector searches. This gives each search a useful basis without requiring the KZ basis it is helping to compute.
Experiments and results
Random generators and repeated queries
The main timing experiments use random generator matrices with independent Gaussian entries of zero mean and unit variance. The authors chose these matrices to study general lattices with no apparent structure for a decoder to exploit. At each point in the main timing comparisons, they generate 50 matrices. For each matrix they run the search on a collection of uniformly distributed input vectors and compute a mean search time. At large dimensions, where each search takes longer, they use 200 queries per matrix. They use many more queries at small dimensions.
The reported statistic is the median of those per-matrix means. The distinction matters because a random draw can produce a matrix for which searches take unusually long. The median keeps such matrices from dominating the displayed timing. For a comparison between algorithms, the same generators and the same query vectors are used for each. Thus differences in the sampled matrices and inputs do not explain the differences between their reported times. The paper measures seconds on a DELL computer with a 733 MHz Pentium III processor, using Visual C++ under Windows XP.
The input distribution in this experiment is separate from the distribution used to generate the lattice. Gaussian sampling supplies the entries of the matrices. Uniform sampling supplies the queries. The authors consider uniform queries reasonable for settings such as source coding and describe how uniform sampling in a Voronoi region corresponds to the uniform-input assumption used in their analysis. A query concentrated around a transmitted lattice point poses a different timing question. The experiments reported here use the uniform protocol.
Timing across search strategies and bases
The main decoder baseline is the authors’ implementation of Viterbo–Boutros, which uses the Pohst strategy. It needs an initial radius. One initialization starts with the length of the shortest basis row and expands the radius if the sphere contains no lattice point. The authors experiment with expansion factors between 1.1 and 1.6. They also try using the distance to the Babai point as the initial radius. Under that setting, the starting sphere already contains a lattice point, so an empty initial sphere cannot force another pass.
Both implementations use KZ reduction for this comparison. The paper reports the time for a single search as a function of dimension and gives the ordered ClosestPoint implementation a speed advantage of 2.5–3 across the tested dimensions. The comparison includes Viterbo–Boutros settings with different ways to choose the initial bound. The headline factor is a measured result for the authors’ implementations and their shared random-lattice workload. The comparison with Kannan is separate and uses the theoretical volume bounds.
Another experiment holds the search procedure fixed and varies the basis supplied to it. The configurations include an unreduced basis, LLL reduction, KZ reduction of the lattice, and KZ reduction of its dual. The two KZ procedures give the fastest searches in this study and are close to one another. At dimensions the authors describe as 30+, KZ reduces average search time by nearly two orders of magnitude compared with an unreduced basis and by about one order of magnitude compared with LLL. Up to about 10–15 dimensions, the authors report good results with LLL. These are times for searching after the basis has been prepared. They leave the reduction time outside the comparison.
Classical lattices and early stopping
The paper also runs the general decoder on several structured lattices. These include the cubic lattice, the Leech lattice in 24 dimensions, and Barnes–Wall lattices in dimensions 8, 16, and 32. The experiments apply KZ preprocessing because it helps the general search on those lattices as well. The reported times for the classical lattices are slightly higher than for the random generators, with a broadly similar pattern across dimensions. The experiment concerns how these lattices behave as inputs to the same general decoder. A timing comparison against algorithms specialized for their particular structure would address a different question.
In the early-stopping experiment, the metric is the mean squared distance from the query to the point returned when the allowed time runs out. The paper normalizes that quantity by the mean squared distance achieved by the completed, exact search. On this scale, the exact search is the reference level of 1. The Babai point, which is available at the first complete descent, has a normalized mean squared distance of 1.49 in the reported 45-dimensional example.
Babai and exact search in the 45-dimensional example, normalized mean squared distance
The first point found has a higher mean squared distance than the completed search.
The numbers
| System or setting | normalized mean squared distance |
|---|---|
| Babai nearest-plane point | 1.49 |
| Completed ClosestPoint search (this paper) | 1 |
The time curve shows how the gap closes as the decoder gets more time to replace its first answer. In the same 45-dimensional example, the authors report that tolerating a 10% increase over the optimal mean squared distance allows the search to finish approximately 40 times faster than when exact completion is required. This is a tradeoff between time and mean squared distance across the queries in that example. The authors say the qualitative result held across the dimensions and lattices they tested, while giving the numerical time–distortion curve for just that example.
What the ablations show
Starting radius and search order
The paper studies mechanisms through controlled comparisons of complete search procedures and preprocessing choices. One such comparison varies the initial radius of Viterbo–Boutros. A radius based on the shortest basis row can lead to an empty search, in which case the implementation expands the radius and tries again. The expansion factor governs the size of that next attempt. A larger starting sphere can give the search more candidates to examine, while a sphere containing no points requires additional work before the first candidate is available. This sensitivity follows from having to choose a starting size before enumeration has supplied a point.
The run initialized with the Babai distance is particularly informative. It gives Viterbo–Boutros a feasible starting sphere, bringing the two algorithms closer on the question of where the initial bound comes from. The ordered procedure still visits layers differently and reaches useful bounds through its own traversal. Its reported timing advantage is therefore observed in a comparison that includes a baseline with a guaranteed nonempty initial sphere. The experiment compares the implemented search strategies as a whole. The paper gives no separate timing breakdown for the cost of finding the Babai point, advancing to the next sibling, and abandoning a sequence of siblings.
The layer analysis explains why ordering can matter even once a finite bound is available. An early complete candidate sets a distance restriction for all unexplored branches. Where a better point appears in the order determines how long the search continues using the looser bound. The ordered traversal also gives a direct stopping test within each layer sequence. Once the next sibling has exhausted the available squared distance, every subsequent sibling has done so too. These are distinct effects of the same ordering. One can bring good points forward. The other can let the algorithm finish scanning a parent’s children with a single failed test.
Which benefits come from reduction
The preprocessing comparison changes the basis while keeping the lattice and the search objective fixed. An integer change of basis represents the same set of points, so the differences in time arise with the same exact nearest-point problem. The unreduced configuration shows what happens when the decoder uses the layer hierarchy already present in the drawn matrix. LLL provides a less costly reduction that changes that hierarchy. The KZ configurations go further by optimizing spacing recursively from opposite ends of the hierarchy.
The near agreement between the KZ reductions is consistent with the authors’ explanation of the spacing product. Reducing the original basis can make the lower-dimensional spacings small, while reducing the dual can make the upper-dimensional spacings large. The fixed product connects these tendencies. The experiment shows that both approaches produce similar search times on the tested random generators. It does not measure how much of each speedup is attributable to any particular diagonal entry, nor establish a universal ranking between the two ways of reducing the basis.
The experiment also distinguishes the search savings at large dimensions from the practical role of a cheaper reduction at small dimensions. The gap between LLL and KZ is more consequential where the searches themselves are expensive. The curves isolate that per-query effect because they exclude the preprocessing time. A total workload comparison would also have to account for how often the generator changes and how many queries each reduced basis serves. This is why the authors’ discussion of reduction depends on the reuse of a lattice as well as its dimension.
Early answers and the cost of certifying them
The early-stopping result measures what the decoder has found by a deadline. It draws on a feature of the exact algorithm that also matters for practical use. A candidate is available almost immediately from the first descent, and each later improvement replaces it with a closer point. The work still pending at the deadline can include finding a better point, ruling out the remaining possibilities, or both. The curve in the paper shows that a substantial part of the allotted search time can be saved while keeping the mean squared distance close to the completed result in the example reported.
The final discussion also reports that traversal order affects the convergence of the early-stopped search. There is an ambiguity in the paper’s equation references for this comparison. The passage contrasts the references numbered (13) and (15) as ways of ordering the layers, although the first equation specifies the eligible interval of indices and the second gives an explicit order. The measured time–distortion result and the point that traversal affects early answers can be reported directly. The references in that passage leave the exact identification of the alternative traversals ambiguous.
Limitations
Limits the authors identify
The closest-point problem remains hard in general. The paper describes an exact enumeration that often avoids a large portion of the work suggested by its initial search region. Its pruning rule provides no general polynomial-time guarantee. The authors also distinguish these procedures from algorithms specialized for a particular lattice. A specialized method can use structural information that the general algorithm will encounter only through the supplied basis and the layer distances it computes. The experiment with classical lattices illustrates the general method’s behavior on those inputs.
The authors identify the query distribution as a limit on the experiments. Uniform queries suit the analysis and several of the applications discussed. For channel coding, they consider a Gaussian distribution around a lattice point more appropriate and say they did not run those experiments. A distribution centered on lattice points may change how often the first candidate is optimal, how far the initial search extends, and when a smaller radius becomes available. The reported speed factors apply to the measured workload.
The covering radius is another practical constraint. It is a distance bound that would be valid for every query to the lattice, so knowing it could help initialize a bounded search. The authors explain that computing it for a general lattice is difficult. The geometric algorithm they discuss for recovering it constructs the Voronoi region in detail and has memory demands that limit its use to low dimensions. Their relevant-vector procedure needs much less memory and supplies the facet-defining vectors. A complete description containing the vertices and edges still requires further work.
Finite lattice codes need a separate stopping argument. The infinite-lattice decoder can take a first descent, accept the Babai point, and proceed with a finite radius. A finite code may exclude that first point and even exclude all candidates in the line where the decoder first reaches the lowest level. The authors point out that rejecting such points while retaining an infinite initial bound can prevent the unmodified search from terminating. Their discussion considers a finite radius with enlargement when needed, as well as projecting a distant query toward the code’s support. Projection can help locate an admissible candidate, but the nearest point to the projected query can differ from the desired answer for the original query.
Exact ties also place a limit on ordinary finite-precision distance tests. This is particularly important for the kissing number, which can change under even a small perturbation if several shortest-vector lengths were exactly equal. The authors propose using a margin to assemble candidates, followed by exact postprocessing. The accuracy of that result depends on preserving the true candidates through the first stage. The margin has to account for the numerical errors in the enumeration, since evaluating retained candidates exactly cannot recover a point dropped earlier.
What the setup leaves open
The timing statistic describes typical performance among the sampled matrices. Since it is a median of per-matrix means, a few difficult generators can have little effect on the displayed result. An application that is sensitive to rare delays would need information about those matrices and about the distribution of search times within each matrix’s queries. Similarly, the reduction comparison isolates time spent searching after preparation. It leaves open the total cost for a workload that often replaces its basis or searches each lattice only briefly.
The volume analysis has a specific comparison target. The authors select one interpretation of Kannan’s algorithm because Kannan’s work focused on the existence of an algorithm within a complexity bound. The inequalities apply under the assumed input distribution and compare a geometric measure. They leave room for differences in arithmetic cost per visited layer and in the implementation of preprocessing. The empirical result against Viterbo–Boutros concerns the implementations and machine in the experiment. Together these are evidence at different levels, with the volume theorem answering a question about the regions searched and the timing study answering a question about particular programs.
The early-stopping curve reports an average distortion tradeoff for a single 45-dimensional example. A mean squared distance close to the optimum on that workload leaves open how large an error an individual stopped search can have. The decoder’s monotonic improvement of its stored point ensures that more search time cannot worsen that point for a fixed query. The numerical tradeoff in the example gives neither a per-query approximation guarantee nor a deadline that can be transferred directly to a different lattice or implementation.
What came after
The paper documents the existing work on which the decoder builds and the extensions the authors develop alongside it. There are no documented later works to discuss here.
Cite
Cite as Erik Agrell, Thomas Eriksson, Alexander Vardy and K. Zeger. 2002. Closest point search in lattices. IEEE Transactions on Information Theory.
@article{agrell2002closest,
title = {{Closest point search in lattices}},
author = {Erik Agrell, Thomas Eriksson, Alexander Vardy and K. Zeger},
journal = {IEEE Transactions on Information Theory},
year = {2002},
doi = {10.1109/tit.2002.800499},
url = {https://doi.org/10.1109/tit.2002.800499}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/agrell-2002-closest-point-search-lattices/