Uniform-Transition Learned Modular Arithmetic
Primary submission artifact for the SAIR Modular Arithmetic Challenge.
This 68,406-parameter scan-register machine processes every raw operand bit
with the same fixed learned transition and emits (a * b) mod p as base-32
digits. Preprocessing performs independent representation conversion only; it
does not reduce the operands.
The transition is composed from learned finite-domain carry, comparison, and borrow monoids plus learned digit resolvers. At inference time, the shipped weights materialize the complete primitive tables. All 15,387 possible learned primitive cells match their specifications, and randomizing the weights collapses accuracy.
Local evaluation with the official pipeline: 1,000/1,000 scored problems, 100% through Tier 10, deterministic, 83.9 seconds inference on Apple MPS.
The included train.py reproduces an exact checkpoint from random
initialization using complete local primitive domains and no end-to-end modular
answers.
Source, audit scripts, paper, and Lean development: github.com/alerad/modarith-model