TL;DR
TAPAS introduces a suite of five large-scale, open-source preprocessed datasets designed to accelerate AI-driven cryptanalysis of the Learning with Errors (LWE) problem, a cornerstone of post-quantum cryptography. By eliminating the massive computational and domain-expertise barriers required to generate this data, TAPAS enables AI researchers to easily prototype attacks and study scaling laws.
What Problem Does This Paper Address?
The security of the future internet relies heavily on post-quantum cryptography (PQC), much of which is built on the hardness of the Learning with Errors (LWE) problem. LWE asks an attacker to recover a secret vector given a set of linear equations corrupted by small amounts of random noise.
Recently, a novel paradigm has emerged: using AI models (like transformers) to find patterns in LWE data and recover these secrets. In certain settings, these AI attacks rival or outperform classical algebraic methods. However, AI practitioners face a massive roadblock: training these models requires millions of preprocessed (lattice-reduced) LWE samples. Generating this data is computationally grueling, takes days to weeks, and requires deep expertise in lattice cryptography. Prior open-source datasets were capped at a few million samples, severely limiting the ability to train larger models or discover scaling laws.
Methods
The authors bridge this gap by creating a standardized data-generation pipeline. They use a "subsampling trick" to amplify a small set of initial LWE equations into millions of distinct matrices. To preprocess the data, they interleave two popular lattice reduction algorithms—BKZ2.0 and flatter—followed by a specialized polishing step.
A key algorithmic contribution is their dynamic switching criteria: the pipeline monitors the reduction progress and automatically swaps or stops algorithms when the reduction quality begins to plateau, optimizing the massive computational cost.
Datasets
The authors introduce TAPAS (Toolkit for Analysis of Post-quantum cryptography using AI Systems), which consists of 5 distinct datasets hosted on Hugging Face. These datasets scale up prior work by 10x to 100x, offering a total of hundreds of millions of samples across various hardness settings:
- Dimension 256, $\log_2 q = 20$: 400 Million samples (designed for large-scale scaling law studies).
- Dimension 512, $\log_2 q = 12$: 40 Million samples.
- Dimension 512, $\log_2 q = 28$: 40 Million samples.
- Dimension 512, $\log_2 q = 41$: 40 Million samples.
- Dimension 1024, $\log_2 q = 26$: 40 Million samples (targeting larger, more realistic PQC dimensions).
Key Insights and Ideas
- Data-Centric Cryptanalysis: Traditional cryptanalysis treats lattice problems purely as abstract math. TAPAS reframes cryptanalysis as a data-pattern mining problem, allowing AI researchers to apply standard machine learning workflows without needing a PhD in lattice theory.
- The "Cliff" Phenomenon: Lattice reduction algorithms inherently introduce a structural asymmetry into the data. The standard deviations of the columns in the preprocessed matrices form a sharp "cliff" shape. The unreduced columns form a "cruel" region where secret bits are hardest to recover, giving researchers a geometric map of where AI models struggle.
- The Compute Bottleneck: The paper underscores just how resource-intensive cryptographic data generation is. The dimension-256 dataset alone required over 40 million CPU hours to generate because of its highly aggressive reduction threshold.
Key Results
The authors established baseline performance metrics on TAPAS using two state-of-the-art AI attacks: SALSA (an encoder-only transformer) and Cool and Cruel (CC) (a hybrid linear regression and brute-force attack).
- Secret Recovery: Both AI attacks successfully broke sparse secrets across all five datasets.
- Peak Performance: In the $n=512, \log_2 q=41$ setting, SALSA successfully recovered binary secrets with a maximum Hamming weight (number of non-zero elements) of 63, while the CC attack topped out at 60.
- For ternary secrets (where secret elements can be -1, 0, or 1), SALSA achieved a maximum recovered Hamming weight of 45 in the same setting.
Limitations and Future Work
- Reduction Quality Cap: While the TAPAS datasets are orders of magnitude larger than previous ones, their reduction quality is on par with prior work. Overcoming harder LWE instances will require fundamental breakthroughs in the underlying classical lattice reduction algorithms themselves.
- Environmental and Compute Costs: Generating these datasets requires massive CPU clusters. The authors suggest that future work should explore data augmentation and synthetic data generation to lower this computational burden.
- Beyond Transformers: Current AI attacks rely almost exclusively on transformers predicting LWE outputs. The authors encourage the community to use TAPAS to explore alternative architectures, reinforcement learning, and new problem formulations (like Decision-LWE).
Summary updated