{ "entry_class": "model.ResidueRouterV1", "output_base": 256, "framework": "pytorch", "model_description": "Router over per-tier specialists, selected by the size of p; inputs above the trained regime return [0]. Operands are reduced mod p inside predict_digits, the same two-argument normalization both reference models use (a with p, then b with p, never all three). TIERS 1-2 (p <= 251): a ~2.9M-parameter residue specialist. Each operand residue is embedded through a shared per-(prime, residue) table, the two vectors are combined by addition (a discrete-log inductive bias: logs add under multiplication), a residual MLP trunk transforms the sum, and logits are scored against a per-(prime, class) output table masked to the p classes of the current prime. The answer is one base-256 digit, below p by construction. TIER 3 (251 < p < 65536): two trained shared local-rule step nets (plain GELU MLPs, width 96, depth 3, ~20k parameters each; ~40k total) composed through fixed wiring. After reduction the operands x, y are 16-bit residues. A MULTIPLY step learns the shared carry rule over the carry-save column sums and, composed closed-loop through a fixed parity readout, emits the exact 32-bit product t = x*y. A REDUCTION step learns the shared per-nibble borrow/compare rule and, composed through fixed restoring-division wiring, emits r = t mod p in [0, p). The answer r is emitted as base-256 digits MSB-first (two digits cover a 16-bit residue). The carry-save column sums, parity readout, bit shifts, restoring-division topology, and ge-from-final-borrow decision are fixed scaffold; the two nontrivial decisions, the carry rule and the borrow/compare rule, reside in the trained MLP parameters. Randomizing either step net collapses tier-3 exactness to chance, so the capability is in the trained weights, not the wiring.", "training_description": "Two independent training regimes. TIERS 1-2 specialist: trained from random init on the complete synthetic input space for primes <= 251 (all 995,777 triples (x, y, p) with x, y in [0, p) and label (x*y) mod p, edge rows oversampled 8x); cross-entropy on the p-way classification, AdamW (lr 1e-3, cosine, no weight decay), batch 8192, seed 0, 15 epochs to 0 errors on the full space. Because the training set is the entire reachable input space, accuracy is interpolation over trained points; no cross-prime generalization is claimed there. TIER 3 step nets: each trained from random init, teacher-forced on the local-rule transitions of reference traces, then composed end to end. The MULTIPLY carry step is saturated over its realizable 272-case domain (100 realizable cases) on full-range 16-bit pairs (the carry rule is a property of 16-bit multiply, not of any prime, and never sees p). The REDUCTION nibble-borrow step is trained on the full 512-case domain from restoring-division traces of random triples over TRAIN primes only. Optimizer AdamW (lr 2e-3, cosine, no weight decay), batch 512, 60 epochs each, seed 0, deterministic CPU. Five primes near the 16-bit ceiling (33343, 45137, 54497, 55061, 62071) are held out by identity and appear in no training trace; the composed pipeline is exact (1.0) on all five on uniform residue pairs and the four edge cases. Training code, logs, seeds, and the random-weight-collapse receipt are archived and available on request." }