Lune

ICML2025Top-tier venue

Making Hard Problems Easier with Custom Data Distributions and Loss Regularization: A Case Study in Modular Arithmetic

Eshika Saxena, Alberto Alfarano, Emily Wenger, Kristin E. Lauter

Abstract

Recent work showed that ML-based attacks on Learning with Errors (LWE), a hard problem used in post-quantum cryptography, outperform classical algebraic attacks in certain settings. Although promising, ML attacks struggle to scale to more complex LWE settings. Prior work connected this issue to the difficulty of training ML models to do modular arithmetic, a core feature of the LWE problem. To address this, we develop techniques that significantly boost the performance of ML models on modular arithmetic tasks-enabling the models to sum up to N = 128 elements modulo q ≤ 974269. Our core innovation is the use of custom training data distributions and a carefully designed loss function that better represents the problem structure. We apply an initial proof of concept of our techniques to LWE specifically and find that they allow recovery of 2x harder secrets than prior work. Our techniques also help ML models learn other well-studied problems better, including copy, associative recall, and parity, motivating further study.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Learning Pseudorandom Numbers with Transformers: Permuted Congruential Generators, Curricula, and Interpretability cites Progress measures for grokking via mechanistic interpretability
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Improving ML Attacks on LWE with Data Repetition and Stepwise RegressionAlberto Alfarano, Eshika Saxena, Emily Wenger, Francois Charton et al.ICML 2026
  2. Learning Pseudorandom Numbers with Transformers: Permuted Congruential Generators, Curricula, and InterpretabilityTao Tao, Maissam BarkeshliICLR 2026

Builds on10

  1. Global Lyapunov functions: a long-standing open problem in mathematics, with symbolic transformersAlberto Alfarano, François Charton, Amaury HayatNeurIPS 2024 · 54 citations
  2. Progress measures for grokking via mechanistic interpretabilityNeel Nanda, Lawrence Chan, Tom Lieberum, Jess Smith et al.ICLR 2023 · 54 citations
  3. Physics of Language Models: Part 4.1, Architecture Design and the Magic of Canon LayersZeyuan Allen-ZhuNeurIPS 2025 · 44 citations
  4. Provable Advantage of Curriculum Learning on Parity Targets with Mixed InputsEmmanuel Abbe, Elisabetta Cornacchia, Aryo LotfiNeurIPS 2023 · 29 citations
  5. SALSA VERDE: a machine learning attack on LWE with sparse small secretsCathy Yuanchen Li, Emily Wenger, Zeyuan Allen-Zhu, François Charton et al.NeurIPS 2023 · 13 citations

Related papers

  1. SalsaPicante: A Machine Learning Attack on LWE with Binary SecretsCathy Yuanchen Li, Jana Sotáková, Emily Wenger, Mohamed Malhou et al.CCS 2023 · 11 citations
  2. SALSA: Attacking Lattice Cryptography with TransformersEmily Wenger, Mingjie Chen, François Charton, Kristin E. LauterNeurIPS 2022 · 61 citations
  3. Module Learning With Errors and Structured Extrapolated Dihedral CosetsWeiqiang Wen, Jinwei ZhengCRYPTO 2026 · 1 citation
  4. Continuous LWEJoan Bruna, Oded Regev, Min Jae Song, Yi TangSTOC 2021 · 18 citations
  5. LWE with Quantum Amplitudes: Algorithm, Hardness, and Oblivious SamplingYilei Chen, Zihan Hu, Qipeng Liu, Han Luo et al.CRYPTO 2025 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines