TL;DR
Researchers have used deep reinforcement learning to outperform the classic, 40-year-old Lenstra-Lenstra-Lovász (LLL) lattice reduction algorithm. By framing lattice reduction as a single-player game, their agent, Delta-Star, discovers novel sequencing strategies that find shorter, more orthogonal basis vectors using fewer operations, while generalizing zero-shot to much larger, unseen dimensions.
What Problem Does This Paper Address?
Lattice reduction is a cornerstone of computational mathematics and modern cryptography. In fact, the security of the post-quantum encryption schemes recently standardized by NIST relies entirely on the hardness of finding short vectors in high-dimensional lattices.
For decades, the workhorse of practical lattice reduction has been the LLL algorithm. LLL works by iteratively applying local operations: "size reduction" (making vectors shorter) and "adjacent swaps" (reordering vectors). The decision to swap is governed by the Lovász condition, a handcrafted heuristic designed to guarantee that the algorithm finishes in polynomial time. However, while sufficient for a fast runtime, this rigid condition is far from optimal for achieving the highest quality reduction (i.e., the shortest vectors).
The authors ask a fundamental question: Can deep reinforcement learning discover a better sequencing policy for LLL’s primitive operations than the classical human-designed algorithm?
Methods
The authors formulate lattice reduction as a single-player Markov Decision Process (MDP) called latticeenv.
Instead of outputting entirely new matrices, the RL agent is restricted to the exact same local action space as LLL:
MOVEUP: Decrement the row cursor.MOVEDOWN: Increment the row cursor.SWAP: Exchange adjacent rows.SIZEREDUCE: Orthogonalize the current vector against predecessors.
To train the agent, they use an AlphaZero-style self-play pipeline with a deep Residual Network (ResNet) backbone. A key algorithmic innovation is their Adaptive-Horizon Monte Carlo Tree Search (MCTS). Standard MCTS expands one node per simulation. Delta-Star’s network predicts multiple steps into the future simultaneously. To prevent the agent from making unreliable long-term commitments, they introduce an entropy-gated expansion mechanism. If the Shannon entropy of a predicted future policy is high (indicating uncertainty), the search tree halts expansion. If the entropy is low (indicating a clear, deterministic path like navigating the cursor), it skips ahead, drastically saving neural network inference costs.
Datasets
The model was trained and evaluated using synthetically generated $q$-ary lattices, which are the primary family of lattices used in cryptography.
- Training Set: Exclusively small, 8-dimensional ($n=8$) lattices with a modulus $q = 251$.
- Evaluation Set: To test generalization, the authors evaluated Delta-Star on higher dimensions (up to $n=32$), unseen moduli ($q$ ranging from 23 to 10,007), and structured Ring-LWE (Learning With Errors) ideal lattices used in actual cryptographic standards.
Key Insights and Ideas
- Autonomous Discovery of "Deep Insertion": By analyzing the action traces, the authors found that Delta-Star independently discovered a strategy resembling "deep-insertion LLL." It aggressively moves down the basis to find a promising vector, then executes a long cascade of swaps to bubble it all the way to the top.
- The Virtuous Cycle of Learning: The adaptive horizon mechanism creates a self-regulating feedback loop. Early in training, the network is uncertain, so the MCTS behaves like standard AlphaZero. As the policy improves and entropy drops, the search tree automatically unrolls longer trajectories, focusing compute on genuine decision points rather than routine cursor movements.
- True Zero-Shot Scaling: By feeding the network a $q$-normalized observation tensor and using adaptive pooling layers, the geometric features learned at dimension $n=8$ successfully scale up to $n=32$ without a single step of retraining or fine-tuning.
Key Results
- Fewer Operations: At the training dimension ($n=8$), Delta-Star achieves the same basis quality as LLL but requires only 55% of the row operations.
- Superior Basis Quality: As the lattice dimension scales up, Delta-Star increasingly outperforms LLL. Up to $n=32$, Delta-Star enters the "target zone" approaching BKZ- $\beta$ (a much stronger, but exponentially slower, reduction algorithm), finding significantly shorter vectors than LLL.
- Continuous Improvement: While LLL quickly plateaus and terminates, Delta-Star continues to make steady progress, acting as an "anytime algorithm" where more compute directly translates to better basis quality.
Limitations and Future Work
The primary limitation is wall-clock time. Because Delta-Star requires a neural network forward pass for its decisions, it is currently much slower in real-world execution time than a highly optimized C++ implementation of classical LLL. The authors view Delta-Star as a tool for algorithm discovery rather than a direct replacement.
Future work will focus on distilling Delta-Star's neural weights into a fast, closed-form classical algorithm. Additionally, the authors plan to apply this self-play methodology to block-based reduction algorithms like BKZ by integrating exact Shortest Vector Problem (SVP) oracles into the action space.
Summary updated