# Carry Memory Lab v0.1 — pre-fit/pre-test protocol

Identity work:carry-memory-lab:v1. Original exact synthetic integer addition, original implementation/data/weights/results Apache2.0. One actually trained tanh RNN; evaluate normal recurrence and a fixed hidden-reset intervention as TWO inference modes of the SAME weights, not two models/fits. Exact carry algorithm remains the visible reference, not a learned competitor. No pretrained weights, truecarry input, previous gold/predicted bit input, language-model prompt or teacher forcing. Not a new arithmetic algorithm, theorem, universal calculator or financial/engineering arithmetic replacement.

## Integer rule, representations and split

All ordered operand pairs for input widths1..6 (a,b each0..2^w−1),5460representations/2080unique unordered numericpair groups. Inputs are least-significant bits first, currentpair[x_t,y_t], t0..w−1, then one terminal[0,0] at t=w. Target bit t=(a+b>>t)&1, including finaloverflowcarry for w+1positions. Each sequence starts h0=0. Exact reference uses independent XOR/ANDcarry recurrence and asserts equality with arbitrary-precision integer addition. Model never receives target/carry.

Group key `min(a,b),max(a,b)` excludes width and orientation. SHA256ASCII(`carry-memory-v1:`+key) interpretedwholehex%10:0..6fit,7validation,8..9test. Leadingzero/reverse views therefore cannot cross roles. Actualfit3847representations/1460groups;val554/210;test1059/410. Widthfitcounts2/9/40/188/737/2871; val has no width1 rows, explicitly no invented support. Dataset already follows a known deterministic mathematical rule, not a natural or historically blind benchmark. Duplicated representations are dependent views, not distinct integer problems.

Default a1+b15,width6, first ordered width6heldout representation with at least4exactcarry-inones. Selected by input-derived exact carry structure before model predictions, not by model success/error. Retain regardless of score.

## Fixed evaluation inventory

64856unique orderedoperand+width cases,32908unorderednumericpair groups,64882suite memberships (26overlapping memberships); predict each unique case once per inference mode, preserve allsuite labels.633353bitpositions eachmode,1266706mode-bit positions total. Integer values in files are canonical decimalSTRINGS to preserve64bit precision.

- Small group-heldout:all1059test representations, separate width/groupsupport. No training-group leakage.
- Exhaustive new-range width7/8:all orderedpairs with at leastone operand's topbit set,12288/49152cases. They use numeric operands beyond training range, not only addedzero padding. More width and larger values change together; no isolated length-causal claim.
- Fixed random new-range widths16/32/64:500cases each, Pythonrandom seed6142026, uniform independent operands conditioned at leastone highbit, unique unorderedgroups within eachwidth. Fixed finite probes, not general-distribution accuracy assurance.
- Carrychain k1..64:(2^k−1)+1 and swapped, dedupk1=>127cases. Zero/max fourordered combinations eachwidth1..64=>256cases. Known small training/validation/testgroups and exactfitrepresentations explicitly tagged; do not call whole stresssuite unseen.
- Same-value paddingcontrol:64lowest SHA(`padding-control:`+unorderedkey) width6heldoutgroups, bothorientations ifdistinct, widths8/16/32/64=>500views. Samegroups/values repeat overpadding widths, no independentcase claim.

Case inventory is deterministic gzipJSON, mtime0, complete exacttargets/carrytrace/suite/overlap tags retained. Generator must not inspect model outputs or resample after evaluation. All arrays/logits/probabilities/errors must account for every bit and everycase; no drop/repair/retry.

## One real RNN fit

Seed329, inputs2, hidden8tanh, recurrent8×8, output2softmax, biases bothlayers:106parameters. W_x normal/sqrt2, W_h .7*normal/sqrt8, W_o .1*normal, allbias0. Allweights freshfloat64 NumPy2.5.4 CPU singleBLASthread. Hiddenstate reset at sequence start, full BPTT across w+1steps; no truncated creditassignment or hidden carry injection.

80epochs, every3847fit representation exactlyonce/epoch:307760rowvisits/2052000bitvisits. Batch128 within eachwidth, includepartiallast;34updates/epoch/2720total. Withinwidth shuffle NumPy RNG10000+epoch*11+width; batchlist shuffle20000+epoch, no adaptivecurriculum. Crossentropymean across batchvalidbitpositions +.0001/2 times squared Wx/Wh/Wo, biasesunpenalized. Fullgradient globalL2norm clip1.0 beforeAdam, recordactualclipcount/norms. Adam lr.01/betas.9,.999/epsilon1e-8,biascorrected. No LR/seed/width/epoch-budget search or rerun selection.

Each epoch evaluate only all554validation representations, recurrent mode, select earlieststrictlylowest global bit-weighted NLL. Recordcomplete80train/valbitNLL/bitaccuracy/whole-sequenceexactaccuracy/traininggradientstats, selectedvalallbitlogits/probs. NLL computed via stablelogsoftmax fromlogits, never probabilityclipping; displayed rounded/underflowed probabilities are not used to reconstruct loss. Probability confidence is not calibrated. PRETEST binds source/generator/code/initial/selected/trace/bundle/selectedval before first current-model evaluation.

## Frozen evaluation and accounting

Separate hashfrozen evaluator after selection. Modes recurrent and reset-each-bit use identicalselectedparameters; reset erases hiddenstatebeforeeveryinputbit, no retraining. Intervention changeshidden-state distribution, so it tests dependence on recurrence without assigning a causalcarry interpretation to any hiddenunit. Exact integer baseline separate and100%byrule, not model achievement.

Hard bit is firstargmax0tie. Convert fullw+1hardbits to exact integerSTRING. Report whole-sequence/integerexactaccuracy (samefixedwidth), bitaccuracy, bitNLL, wrongbits/positions, allfailurecaseIDs/wrongintegerstrings/probabilities, bysuite/width/carrybucket and overlap tags. Zero support null; every denominator explicit. Allcase outcomes and everybit logits/logprobs/prob1 may use losslessgzipCSV/NPZ; sourceweights and exact reference remain accessible. Do not inflate64882suiteviews into64882unique cases or count two inference modes as two fits. No CIs/significance/independence/theorem from finite passes; highbitaccuracy can coexist with wrongintegeranswers.

## Product and independent verification

Static local JS bothmodes plus exactcarry reference, no API/font/storage. Canonical decimalSTRING operands0..2^64−1 (no sign/exponent/decimal/leadingzeroexcept0), widthinteger1..64>=bothbitlengths. Exactsum may65bits. Never parseoperands through JSNumber. StrictJSONsame a/b strings,width numeric; field/rawJSONmode explicit, seednone(onefixedmodel). Failed input clearsreport/export, no stale data/source claims. Allstates/probabilities/incorrectbits/full65bit handling in downloaded report with fullrawinputs, model/config/sourcehash, bothmodeoutputs, exactcarrytrace/reference andscope/license. Hiddenunitactivations are values, not labeled "the carryneuron".

Independent tiny scalar objective/finite differences allRNNparams inclrecurrentpath, explicitAdam/clipping tests beforefit; independentXORtruth/Pythonplus, split/group/evalexhaustivecoverage audit. Afterfit everyselected-val/evaluationforward viaindependent scalar andJS, allbit/case metrics/failures/suiteoverlap, model/input/mutation/BigInt boundaries, actualnative valid/invalid/custommode/max64/carrycases/report roundtrip/375390keyboard/console, fullscientifictraining/length/errorfigures. Independent existing total owner fresh80fit/fulloracle/actualproduct review oncopy required beforeacceptedidentity. Today no publication; later originaldailyHFfreeStatic only afteracceptance.
