mlsanityData to 14 Oct 2026

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

arXiv 2410.03569 ↗First posted 4 Oct 2024cs.LGcited by 4

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 19 of its 32 references that are in the map. First posted on arXiv 4 Oct 2024.

Builds on

19 of 32 references.

References · 19

  1. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  2. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  3. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  4. 2014Neural Turing Machinescited by 644
  5. 2023Grokking modular arithmeticcited by 83
  6. 2017Failures of Gradient-Based Deep Learningcited by 80
  7. 2023Length Generalization in Arithmetic Transformerscited by 66
  8. 2021Linear algebra with transformerscited by 63
  9. 2024Why Do You Grok? A Theoretical Analysis of Grokking Modular Additioncited by 36
  10. 2023Learning the greatest common divisor: explaining transformer predictionscited by 33
  11. 2022SALSA: Attacking Lattice Cryptography with Transformerscited by 28
  12. 2023Provable Advantage of Curriculum Learning on Parity Targets with Mixed Inputscited by 22
7 more
  1. 2024Grokking Modular Polynomialscited by 18
  2. 2023SALSA PICANTE: a machine learning attack on LWE with binary secretscited by 11
  3. 2021Analyzing the Nuances of Transformers' Polynomial Simplification Abilitiescited by 9
  4. 2023Learning to Compute Gr"obner Basescited by 7
  5. 2024Salsa Fresca: Angular Embeddings and Pre-Training for ML Attacks on Learning With Errorscited by 7
  6. 2024Benchmarking Attacks on Learning with Errorscited by 4
  7. 2024Machine learning for modular multiplicationcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.