paper-with-me

홈 › Papers

Teaching Transformers Modular Arithmetic at Scale

2024-10-04 · Eshika Saxena, Alberto Alfarano, Emily Wenger, Kristin Lauter

Modular addition is, on its face, a simple operation: given $N$ elements in $\mathbb{Z}_q$, compute their sum modulo $q$. Yet, scalable machine learning solutions to this problem remain elusive: prior work trains ML models that sum $N \le 6$ elements mod $q \le 1000$. Promising applications of ML models for cryptanalysis-which often involve modular arithmetic with large $N$ and $q$-motivate reconsideration of this problem. This work proposes three changes to the modular addition model training pipeline: more diverse training data, an angular embedding, and a custom loss function. With these changes, we demonstrate success with our approach for $N = 256, q = 3329$, a case which is interesting for cryptographic applications, and a significant increase in $N$ and $q$ over prior work. These techniques also generalize to other modular arithmetic problems, motivating future work.

📄 PDF Abstract BibTeX arXiv:2410.03569

Code (0)

등록된 구현이 없습니다.

Tasks

Cryptanalysis

Similar Papers 제목 키워드 기반

Teaching Arithmetic to Small Transformers

2023-07-07 · Nayoung Lee, Kartik Sreenivasan, Jason D. Lee, Kangwook Lee 외

Large language models like GPT-4 exhibit emergent capabilities across general-purpose tasks, such as basic arithmetic, when trained on extensive text data, even though these tasks are not explicitly encoded by the unsupe…

Low-Rank Matrix CompletionMatrix Completion

Towards Empirical Interpretation of Internal Circuits and Properties in Grokked Transformers on Modular Polynomials

2024-02-26 · Hiroki Furuta, Gouki Minegishi, Yusuke Iwasawa, Yutaka Matsuo

Grokking has been actively explored to reveal the mystery of delayed generalization and identifying interpretable representations and algorithms inside the grokked models is a suggestive hint to understanding its mechani…

SALSA: Attacking Lattice Cryptography with Transformers

2022-07-11 · Emily Wenger, Mingjie Chen, François Charton, Kristin Lauter

Currently deployed public-key cryptosystems will be vulnerable to attacks by full-scale quantum computers. Consequently, "quantum resistant" cryptosystems are in high demand, and lattice-based cryptosystems, based on a h…

Cryptanalysis

Fourier Circuits in Neural Networks and Transformers: A Case Study of Modular Arithmetic with Multiple Inputs

2024-02-12 · Chenyang Li, YIngyu Liang, Zhenmei Shi, Zhao Song 외

In the evolving landscape of machine learning, a pivotal challenge lies in deciphering the internal representations harnessed by neural networks and Transformers. Building on recent progress toward comprehending how netw…

2kMathematical Reasoning

Weight Decay Regimes in Grokking Transformers: Cheap Online Diagnostics

2026-05-19 · Lucky Verma arxiv

Transformers trained on modular arithmetic exhibit sharp transitions between memorization, generalization, and collapse. We show that weight decay acts as a scalar empirical control parameter for these regimes, and intro…