IV-55 / Part XIV · Fine-Tuning and Alignment
Pretraining, Fine-Tuning and Transfer
Derive two real pretraining updates and a two-output adaptation step, compare prepared and fresh starts, and separate held-out transfer from a dictionary's perfect training fit.
Review the ideas this chapter uses
Suppose we have already adjusted a small model to produce one pair of numbers, and now we want a different pair. Should we keep its adjusted weights or start again from zero? We can answer for one small, completely specified example by calculating both paths. We will also construct a lookup table that gets every training answer right while failing to improve any held-out answer.
Learning objective: Compare which model parameters, data and objectives change in adaptation.
Pretraining means updating parameters on an earlier task before adaptation. Fine-tuning means making further parameter updates for the new task. Transfer is the effect of carrying the earlier parameters into that new task. A prepared start can help, hurt or make no difference; the word “pretrained” alone does not settle the comparison.
In IV-52 — Language-Model Training Steps and Batches, a tiny language model supplied fixed features to a trainable text-class readout. Its objective was next-token cross-entropy, a penalty based on the known next token’s probability. Here we deliberately use regression, predicting two numerical values. Our two fixed ReLU features and four adjustable readout weights make every update manageable by hand. There are no tokens, probabilities, softmax or language-model training in this example. We do not learn the hidden features or differentiate a whole neural network.
For matrix shapes, review II.9 — Matrix × vector and II.10 — Matrix × matrix as composition. For why training and held-out examples have different jobs, review III-04 — Training, Validation, Testing and Generalization. III-07 — Linear Regression and III-09 — Gradient Descent for Linear Regression connect squared-error regression to gradient descent. The prerequisite IV-52 — Language-Model Training Steps and Batches supplies the earlier distinction between a diagnostic gradient and an actual parameter replacement.
Pretraining, Fine-Tuning and Transfer
Learn one simple numeric task, then ask the same small network to do a related task. Compare adapting weights that the lab actually prepared with learning the new task from zero. A lookup table provides a third comparison: perfect training fit can coexist with unadapted held-out predictions.
Change PRE updates, ADAPT updates, ADAPT scope or ADAPT η. PRE always starts at zero and uses η=0.5. The tables read the saved computation, including all final evaluations; inspection selectors only choose which saved details to show.
Exact starting inputs for this saved calculation
fineTunedValidationLoss 0.08418624420301057. freshValidationLoss 0.13904571533203125. memorizerValidationLoss 0.11825338006019592. trainableAdaptParameters 4. Set up a small transfer experiment with two output numbers. Pretraining first learns one numeric target rule. Fine-tuning then changes the desired outputs and updates either all readout entries or just the diagonal. A fresh run supplies a comparison with the same adaptation data and optimizer. These are fixed features with a learned readout, not language-model token probabilities.
Set up a small transfer experiment with two output numbers
W:[2,2]; phi:[2,1]; prediction=W phi:[2,1]; PRE eta=0.5; ADAPT eta=eta; scope0:4 enabled, scope1:2 enabled
Pretraining first learns one numeric target rule. Fine-tuning then changes the desired outputs and updates either all readout entries or just the diagonal. A fresh run supplies a comparison with the same adaptation data and optimizer. These are fixed features with a learned readout, not language-model token probabilities.
Saved inputs
- preUpdates
- 2
- updates
- 1
- scope
- 0
- eta
- 0.5
Saved outputs
- storedParameters
- 4
- trainableAdaptParameters
- 4
- fixedFeatures
- 2
- outputsPerSample
- 2
- trainSamples
- 4
- validationSamples
- 4
- preEta
- 0.5
First learn PRE; then compare the same ADAPT objective
Whole current case: preUpdates=2, updates=1, scope=0, η=0.5. PRE always uses η=0.5 and all four weights. There are 4 stored weights and 4 enabled ADAPT weights. Every raw edit starts the complete experiment again from zero.
A parameter is a stored number that learning can change. A readout multiplies fixed features by those parameters to predict outputs. PRE (pretraining) first learns to copy two features. ADAPT (adaptation or fine-tuning) asks for a new target pair; the prepared cohort (comparison group) starts with the actual final PRE weights, while fresh starts at zero. Their data, loss rule, update count, scope and ADAPT η agree.
| Cohort / stage / next action | W00 | W01 | W10 | W11 | Train mean | Held-out mean |
|---|---|---|---|---|---|---|
| pre 0 / then update | 0 | 0 | 0 | 0 | 0.3125 | 0.15625 |
| pre 1 / then update | 0.15625 | 0 | 0 | 0.15625 | 0.22247314453125 | 0.111236572265625 |
| pre 2 / final diagnostic only | 0.2880859375 | 0 | 0 | 0.2880859375 | 0.15838176012039185 | 0.07919088006019592 |
PRE targets are [φPlus,φMinus]. Its loss measures feature copying. A smaller PRE loss and a larger ADAPT loss can describe the same W because the targets differ. The next table changes targets to [φPlus+φMinus/2,−φPlus/2+φMinus] for both cohorts.
| Cohort / stage / next action | W00 | W01 | W10 | W11 | Train mean | Held-out mean |
|---|---|---|---|---|---|---|
| adapt 0 / then update | 0.2880859375 | 0 | 0 | 0.2880859375 | 0.23650676012039185 | 0.11825338006019592 |
| adapt 1 / final diagnostic only | 0.399322509765625 | 0.078125 | -0.078125 | 0.399322509765625 | 0.16837248840602115 | 0.08418624420301057 |
| fresh 0 / then update | 0 | 0 | 0 | 0 | 0.390625 | 0.1953125 |
| fresh 1 / final diagnostic only | 0.15625 | 0.078125 | -0.078125 | 0.15625 | 0.2780914306640625 | 0.13904571533203125 |
| Method | ADAPT training mean | ADAPT held-out mean | Initialization / prediction rule |
|---|---|---|---|
| Prepared adaptation | 0.16837248840602115 | 0.08418624420301057 | Copy actual final PRE W, then 1 ADAPT steps |
| Fresh adaptation | 0.2780914306640625 | 0.13904571533203125 | Positive-zero W, then 1 ADAPT steps |
| Constructed memorizer | 0 | 0.11825338006019592 | Copy training labels on hits; saved unadapted PRE predictions on misses |
P=2: the prepared start copies genuinely evaluated PRE weights. U=1: each ADAPT cohort performs this many requested transitions. A positive η can be too small to change a stored weight after rounding. Counts alone do not imply strict improvement.
Inspecting Adaptation from actual pretraining, stage 0, sample train0, coordinate W00. These selectors only read the saved root; they preserve the raw controls, trace cursor and graded answers.
Selected trace: setup. Matching operations below are marked current; the trace cursor and local inspection are independent.
adapt stage 0: inputs, both outputs and losses
φ (phi) names a feature column: φPlus=max(0,x), φMinus=max(0,−x). ReLU means keeping a positive part and replacing a negative part by zero. W is a 2×2 matrix: rows select output 0 or 1, columns select φPlus or φMinus. Here W=[0.2880859375, 0, 0, 0.2880859375] in row-major order 00,01,10,11. W:[2,2] times φ:[2,1] gives prediction:[2,1], with four products and two sums, no bias or softmax.
| Sample / role | x | φPlus | φMinus | PRE target 0 | PRE target 1 | ADAPT target 0 | ADAPT target 1 | Prediction 0 | Prediction 1 | Current-task sample loss |
|---|---|---|---|---|---|---|---|---|---|---|
| train0 / training | -1 | 0 | 1 | 0 | 1 | 0.5 | 1 | 0 | 0.2880859375 | 0.37841081619262695 |
| train1 / training | -0.5 | 0 | 0.5 | 0 | 0.5 | 0.25 | 0.5 | 0 | 0.14404296875 | 0.09460270404815674 |
| train2 / training | 0.5 | 0.5 | 0 | 0.5 | 0 | 0.5 | -0.25 | 0.14404296875 | 0 | 0.09460270404815674 |
| train3 / training | 1 | 1 | 0 | 1 | 0 | 1 | -0.5 | 0.2880859375 | 0 | 0.37841081619262695 |
| validation0 / held out | -0.75 | 0 | 0.75 | 0 | 0.75 | 0.375 | 0.75 | 0 | 0.216064453125 | 0.21285608410835266 |
| validation1 / held out | -0.25 | 0 | 0.25 | 0 | 0.25 | 0.125 | 0.25 | 0 | 0.072021484375 | 0.023650676012039185 |
| validation2 / held out | 0.25 | 0.25 | 0 | 0.25 | 0 | 0.25 | -0.125 | 0.072021484375 | 0 | 0.023650676012039185 |
| validation3 / held out | 0.75 | 0.75 | 0 | 0.75 | 0 | 0.75 | -0.375 | 0.216064453125 | 0 | 0.21285608410835266 |
Current task: ADAPT transformed targets. A target is the desired numeric answer; an error is prediction minus target. Each sample loss is error0²/2 + error1²/2. Add four saved sample losses in order from +0, then divide by 4 to get each dataset mean. Sum the two output half-losses before averaging samples; do not divide the sum of sample losses by 8. Training rows alone drive gradients; held-out rows only evaluate W.
All eight forwards: every product and sum at the saved W
| Sample | W00 × φPlus | W01 × φMinus | W10 × φPlus | W11 × φMinus | Prediction 0 | Prediction 1 |
|---|---|---|---|---|---|---|
| train0 | 0 | 0 | 0 | 0.2880859375 | 0 | 0.2880859375 |
| train1 | 0 | 0 | 0 | 0.14404296875 | 0 | 0.14404296875 |
| train2 | 0.14404296875 | 0 | 0 | 0 | 0.14404296875 | 0 |
| train3 | 0.2880859375 | 0 | 0 | 0 | 0.2880859375 | 0 |
| validation0 | 0 | 0 | 0 | 0.216064453125 | 0 | 0.216064453125 |
| validation1 | 0 | 0 | 0 | 0.072021484375 | 0 | 0.072021484375 |
| validation2 | 0.072021484375 | 0 | 0 | 0 | 0.072021484375 | 0 |
| validation3 | 0.216064453125 | 0 | 0 | 0 | 0.216064453125 | 0 |
All eight two-output losses and both ordered means
| Sample | target0 | target1 | error0 | error1 | square0 | square1 | half0 | half1 | sampleLoss |
|---|---|---|---|---|---|---|---|---|---|
| train0 | 0.5 | 1 | -0.5 | -0.7119140625 | 0.25 | 0.5068216323852539 | 0.125 | 0.25341081619262695 | 0.37841081619262695 |
| train1 | 0.25 | 0.5 | -0.25 | -0.35595703125 | 0.0625 | 0.12670540809631348 | 0.03125 | 0.06335270404815674 | 0.09460270404815674 |
| train2 | 0.5 | -0.25 | -0.35595703125 | 0.25 | 0.12670540809631348 | 0.0625 | 0.06335270404815674 | 0.03125 | 0.09460270404815674 |
| train3 | 1 | -0.5 | -0.7119140625 | 0.5 | 0.5068216323852539 | 0.25 | 0.25341081619262695 | 0.125 | 0.37841081619262695 |
| validation0 | 0.375 | 0.75 | -0.375 | -0.533935546875 | 0.140625 | 0.2850871682167053 | 0.0703125 | 0.14254358410835266 | 0.21285608410835266 |
| validation1 | 0.125 | 0.25 | -0.125 | -0.177978515625 | 0.015625 | 0.03167635202407837 | 0.0078125 | 0.015838176012039185 | 0.023650676012039185 |
| validation2 | 0.25 | -0.125 | -0.177978515625 | 0.125 | 0.03167635202407837 | 0.015625 | 0.015838176012039185 | 0.0078125 | 0.023650676012039185 |
| validation3 | 0.75 | -0.375 | -0.533935546875 | 0.375 | 0.2850871682167053 | 0.140625 | 0.14254358410835266 | 0.0703125 | 0.21285608410835266 |
adapt_stage_0_mean_0: Average four saved sample losses in their original order
sum starts at +0; sum0=initialSum+loss0; sum1=sum0+loss1; sum2=sum1+loss2; sum3=sum2+loss3; mean=sum3/4
Dataset zero is training; dataset one is held-out validation. Both means are computed independently from their saved sample losses. Validation never contributes a gradient. This ordered average does not divide each output error by eight.
Saved inputs
- dataset
- 0
- initialSum
- 0
- divisor
- 4
- loss0
- 0.37841081619262695
- loss1
- 0.09460270404815674
- loss2
- 0.09460270404815674
- loss3
- 0.37841081619262695
Saved outputs
- sum0
- 0.37841081619262695
- sum1
- 0.4730135202407837
- sum2
- 0.5676162242889404
- sum3
- 0.9460270404815674
- mean
- 0.23650676012039185
adapt_stage_0_mean_1: Average four saved sample losses in their original order
sum starts at +0; sum0=initialSum+loss0; sum1=sum0+loss1; sum2=sum1+loss2; sum3=sum2+loss3; mean=sum3/4
Dataset zero is training; dataset one is held-out validation. Both means are computed independently from their saved sample losses. Validation never contributes a gradient. This ordered average does not divide each output error by eight.
Saved inputs
- dataset
- 1
- initialSum
- 0
- divisor
- 4
- loss0
- 0.21285608410835266
- loss1
- 0.023650676012039185
- loss2
- 0.023650676012039185
- loss3
- 0.21285608410835266
Saved outputs
- sum0
- 0.21285608410835266
- sum1
- 0.23650676012039185
- sum2
- 0.26015743613243103
- sum3
- 0.4730135202407837
- mean
- 0.11825338006019592
Selected sample: actual feature construction, forward and loss operands
data_0: Prepare the two fixed features and both target pairs
negatedX=-x; phiPlus=max(0,x); phiMinus=max(0,negatedX); preTarget0=phiPlus; preTarget1=phiMinus; scaledMinus=0.5*phiMinus; adaptTarget0=phiPlus+scaledMinus; scaledPlus=-0.5*phiPlus; adaptTarget1=scaledPlus+phiMinus
A feature is a number supplied to the readout. These ReLU features keep the positive and negative parts of the input separate. Pretraining asks for the features themselves; adaptation changes the desired two outputs. The first four authored inputs train the readout and the last four only evaluate it. Features and targets are prepared once.
Saved inputs
- sample
- 0
- training
- 1
- x
- -1
- positiveZero
- 0
- positiveHalf
- 0.5
- negativeHalf
- -0.5
Saved outputs
- negatedX
- 1
- phiPlus
- 0
- phiMinus
- 1
- preTarget0
- 0
- preTarget1
- 1
- scaledMinus
- 0.5
- adaptTarget0
- 0.5
- scaledPlus
- -0
- adaptTarget1
- 1
adapt_stage_0_forward_0: Read out two numbers from the same fixed feature column
product00=w00*phiPlus; product01=w01*phiMinus; product10=w10*phiPlus; product11=w11*phiMinus; prediction0=product00+product01; prediction1=product10+product11
W has two output rows and two feature columns. Multiplying W:[2,2] by phi:[2,1] gives a two-number column. All four products and both sums are performed, including zero products. Every sample in this evaluation uses these same four weights, with no bias or softmax.
Saved inputs
- sample
- 0
- x
- -1
- phiPlus
- 0
- phiMinus
- 1
- w00
- 0.2880859375
- w01
- 0
- w10
- 0
- w11
- 0.2880859375
Saved outputs
- product00
- 0
- product01
- 0
- product10
- 0
- product11
- 0.2880859375
- prediction0
- 0
- prediction1
- 0.2880859375
adapt_stage_0_loss_0: Measure the two output errors for one sample
error0=prediction0-target0; error1=prediction1-target1; square0=error0*error0; square1=error1*error1; half0=square0/2; half1=square1/2; sampleLoss=half0+half1
Each output is a scalar regression value, so its signed error is a difference of numbers. Squaring makes either error direction costly. Add the two half-losses to obtain one sample loss; the later average counts four samples, not eight output coordinates.
Saved inputs
- sample
- 0
- task
- 1
- prediction0
- 0
- prediction1
- 0.2880859375
- target0
- 0.5
- target1
- 1
- divisor
- 2
Saved outputs
- error0
- -0.5
- error1
- -0.7119140625
- square0
- 0.25
- square1
- 0.5068216323852539
- half0
- 0.125
- half1
- 0.25341081619262695
- sampleLoss
- 0.37841081619262695
Why the gradient can exist for a frozen weight
A mathematical gradient G tells how the underlying real training mean changes for a small weight change. For W[o,i], o names an output and i a feature. Differentiating error²/2 gives error, then multiplying by the prediction’s derivative gives error[o]×φ[i]. Sum these contributions over four training rows and divide by 4. Features stay fixed, so this is a smooth quadratic in W even though ReLU as a function of x has a corner.
| Coordinate | Saved W | Enabled | Mathematical G | Effective G |
|---|---|---|---|---|
| W00 | 0.2880859375 | 1 | -0.22247314453125 | -0.22247314453125 |
| W01 | 0 | 1 | -0.15625 | -0.15625 |
| W10 | 0 | 1 | 0.15625 | 0.15625 |
| W11 | 0.2880859375 | 1 | -0.22247314453125 | -0.22247314453125 |
Enabled=1 selects the mathematical derivative; enabled=0 selects effective +0. A disabled weight can still have a nonzero mathematical derivative. PRE always enables all four; diagonal ADAPT freezes cross weights W01/W10. Frozen means preserve the old stored value, including a nonzero value or −0; it never means force the weight to zero.
| Training row | Error for selected output | Selected fixed feature | Error × feature | Ordered running sum |
|---|---|---|---|---|
| train0 | -0.5 | 0 | -0 | 0 |
| train1 | -0.25 | 0 | -0 | 0 |
| train2 | -0.35595703125 | 0.5 | -0.177978515625 | -0.177978515625 |
| train3 | -0.7119140625 | 1 | -0.7119140625 | -0.889892578125 |
Final running sum / 4 = -0.22247314453125 for W00. Four row contributions here become sixteen products across all four coordinates, even at a final diagnostic stage.
| Coordinate | old | mathematical | effective | enabled | delta | proposed | committed |
|---|---|---|---|---|---|---|---|
| W00 | 0.2880859375 | -0.22247314453125 | -0.22247314453125 | 1 | -0.111236572265625 | 0.399322509765625 | 0.399322509765625 |
| W01 | 0 | -0.15625 | -0.15625 | 1 | -0.078125 | 0.078125 | 0.078125 |
| W10 | 0 | 0.15625 | 0.15625 | 1 | 0.078125 | -0.078125 | -0.078125 |
| W11 | 0.2880859375 | -0.22247314453125 | -0.22247314453125 | 1 | -0.111236572265625 | 0.399322509765625 | 0.399322509765625 |
η (eta) is the step size: delta=η×effective, proposed=old−delta. Compute these for all four coordinates from the same old W; enabled coordinates commit their proposals and frozen coordinates commit their exact old words. Publish all four together, then evaluate the new state. This selected cohort uses η=0.5.
Selected coordinate proposal and simultaneous commit
adapt_update_1_coordinate_0: Propose one weight change from the same old state
delta=eta*effective; proposed=old-delta; committed=enabled==1?proposed:old
Subtracting a positive gradient lowers a weight; subtracting a negative one raises it. Every coordinate gets a real multiplication and subtraction, including frozen coordinates. A frozen weight keeps its exact old value and zero sign. All proposals use the unchanged old weights and saved gradients.
Saved inputs
- coordinate
- 0
- old
- 0.2880859375
- mathematical
- -0.22247314453125
- effective
- -0.22247314453125
- enabled
- 1
- eta
- 0.5
Saved outputs
- delta
- -0.111236572265625
- proposed
- 0.399322509765625
- committed
- 0.399322509765625
adapt_update_1_commit: Publish all four proposed coordinates together
nextWeights=[committed0,committed1,committed2,committed3]
This simultaneous publication completes one optimizer step. No coordinate update changes a gradient used for another coordinate. A later stage evaluates the resulting weights again; its final diagnostic gradient causes no additional step.
Saved inputs
- old0
- 0.2880859375
- old1
- 0
- old2
- 0
- old3
- 0.2880859375
Saved outputs
- weight0
- 0.399322509765625
- weight1
- 0.078125
- weight2
- -0.078125
- weight3
- 0.399322509765625
Exact initialization, mask selection and stage boundary
adapt_initial: Copy the actual prepared readout into adaptation
weights=[sourceWeight0,sourceWeight1,sourceWeight2,sourceWeight3]; enabled=mask
These source weights are the genuinely evaluated final PRE weights. Copy every value exactly before any adaptation. The two target columns now change to ADAPT while inputs, fixed features and the squared-error loss form stay the same.
Saved inputs
- cohort
- 1
- task
- 1
- requestedUpdates
- 1
- eta
- 0.5
- sourceWeight0
- 0.2880859375
- sourceWeight1
- 0
- sourceWeight2
- 0
- sourceWeight3
- 0.2880859375
- mask0
- 1
- mask1
- 1
- mask2
- 1
- mask3
- 1
Saved outputs
- weight0
- 0.2880859375
- weight1
- 0
- weight2
- 0
- weight3
- 0.2880859375
- enabled0
- 1
- enabled1
- 1
- enabled2
- 1
- enabled3
- 1
adapt_stage_0_gradient_0: Differentiate one readout coordinate using training errors
contribution_j=error_j*feature_j; sum starts at +0 and adds contributions in training-row order; mathematical=sum3/4
A gradient says how the training mean changes when one weight changes slightly. For this linear readout, a weight changes its output in proportion to its feature, giving error times feature. Average the four training contributions. Compute every coordinate even when adaptation will freeze it; final-stage gradients are observations, not extra updates.
Saved inputs
- coordinate
- 0
- output
- 0
- feature
- 0
- initialSum
- 0
- divisor
- 4
- error0
- -0.5
- feature0
- 0
- error1
- -0.25
- feature1
- 0
- error2
- -0.35595703125
- feature2
- 0.5
- error3
- -0.7119140625
- feature3
- 1
Saved outputs
- contribution0
- -0
- sum0
- 0
- contribution1
- -0
- sum1
- 0
- contribution2
- -0.177978515625
- sum2
- -0.177978515625
- contribution3
- -0.7119140625
- sum3
- -0.889892578125
- mathematical
- -0.22247314453125
adapt_stage_0_mask: Choose which derivatives the optimizer may use
effective_i=enabled_i==1?mathematical_i:+0
The mathematical derivative describes the loss even for a frozen weight. The effective derivative is the optimizer input: retain that derivative for an enabled weight and select positive zero otherwise. This is a conditional choice, not multiplication by a mask.
Saved inputs
- positiveZero
- 0
- mathematical0
- -0.22247314453125
- enabled0
- 1
- mathematical1
- -0.15625
- enabled1
- 1
- mathematical2
- 0.15625
- enabled2
- 1
- mathematical3
- -0.22247314453125
- enabled3
- 1
Saved outputs
- effective0
- -0.22247314453125
- effective1
- -0.15625
- effective2
- 0.15625
- effective3
- -0.22247314453125
adapt_stage_0_stats: Save this evaluated state and whether an update follows
diagnosticOnly=(stage==requestedUpdates); hasNextUpdate=(stage<requestedUpdates); losses belong to this same saved W
Stage zero is evaluated before any step. Each later point follows a real simultaneous update and a fresh eight-sample evaluation. At the final requested stage, retain all four gradients for inspection but perform no additional optimizer step. Only actual evaluated points appear in the trajectory.
Saved inputs
- cohort
- 1
- task
- 1
- stage
- 0
- requestedUpdates
- 1
- weight0
- 0.2880859375
- weight1
- 0
- weight2
- 0
- weight3
- 0.2880859375
- trainHalfMSE
- 0.23650676012039185
- validationHalfMSE
- 0.11825338006019592
Saved outputs
- trainHalfMSE
- 0.23650676012039185
- validationHalfMSE
- 0.11825338006019592
- diagnosticOnly
- 0
- hasNextUpdate
- 1
A lookup can fit training without adapting held-out predictions
The memorizer is an explicit dictionary, not another trained network. Store each of the four training x keys with its two ADAPT targets. On a matching input, copy that label pair; on a miss, copy the same sample’s already saved final-PRE predictions. No new neural forward, gradient or SGD step is called. There are 12 extra numeric dictionary slots plus 4 already retained prepared weights; this is no measured byte or time claim.
| Training key index j | x | ADAPT target 0 | ADAPT target 1 |
|---|---|---|---|
| 0 | -1 | 0.5 | 1 |
| 1 | -0.5 | 0.25 | 0.5 |
| 2 | 0.5 | 0.5 | -0.25 |
| 3 | 1 | 1 | -0.5 |
| Sample | match | sourceKind | sourceSample | sourceIndex0 | sourceIndex1 | source0 | source1 | prediction0 | prediction1 |
|---|---|---|---|---|---|---|---|---|---|
| train0 | 0 | 0 | 0 | 1 | 2 | 0.5 | 1 | 0.5 | 1 |
| train1 | 1 | 0 | 1 | 4 | 5 | 0.25 | 0.5 | 0.25 | 0.5 |
| train2 | 2 | 0 | 2 | 7 | 8 | 0.5 | -0.25 | 0.5 | -0.25 |
| train3 | 3 | 0 | 3 | 10 | 11 | 1 | -0.5 | 1 | -0.5 |
| validation0 | -1 | 1 | 4 | 8 | 9 | 0 | 0.216064453125 | 0 | 0.216064453125 |
| validation1 | -1 | 1 | 5 | 10 | 11 | 0 | 0.072021484375 | 0 | 0.072021484375 |
| validation2 | -1 | 1 | 6 | 12 | 13 | 0.072021484375 | 0 | 0.072021484375 | 0 |
| validation3 | -1 | 1 | 7 | 14 | 15 | 0.216064453125 | 0 | 0.216064453125 | 0 |
match=−1 means no key matched. sourceKind=0 means dictionary, whose actual [4,3] storage includes x: targets are at 3j+1 and 3j+2, not 2j and 2j+1. sourceKind=1 means the saved prepared prediction array [8,2]: sample s has positions 2s and 2s+1. sourceSample identifies j on a hit and s on a miss. source0/source1 are copied to prediction0/prediction1. The selector record includes matchedDictionary operands only on a hit; it never invents zeros for a missing pair.
All 32 key comparisons, including after a match
| Sample / key index | x | keyX | equal | oldMatch | match |
|---|---|---|---|---|---|
| train0 / 0 | -1 | -1 | 1 | -1 | 0 |
| train0 / 1 | -1 | -0.5 | 0 | 0 | 0 |
| train0 / 2 | -1 | 0.5 | 0 | 0 | 0 |
| train0 / 3 | -1 | 1 | 0 | 0 | 0 |
| train1 / 0 | -0.5 | -1 | 0 | -1 | -1 |
| train1 / 1 | -0.5 | -0.5 | 1 | -1 | 1 |
| train1 / 2 | -0.5 | 0.5 | 0 | 1 | 1 |
| train1 / 3 | -0.5 | 1 | 0 | 1 | 1 |
| train2 / 0 | 0.5 | -1 | 0 | -1 | -1 |
| train2 / 1 | 0.5 | -0.5 | 0 | -1 | -1 |
| train2 / 2 | 0.5 | 0.5 | 1 | -1 | 2 |
| train2 / 3 | 0.5 | 1 | 0 | 2 | 2 |
| train3 / 0 | 1 | -1 | 0 | -1 | -1 |
| train3 / 1 | 1 | -0.5 | 0 | -1 | -1 |
| train3 / 2 | 1 | 0.5 | 0 | -1 | -1 |
| train3 / 3 | 1 | 1 | 1 | -1 | 3 |
| validation0 / 0 | -0.75 | -1 | 0 | -1 | -1 |
| validation0 / 1 | -0.75 | -0.5 | 0 | -1 | -1 |
| validation0 / 2 | -0.75 | 0.5 | 0 | -1 | -1 |
| validation0 / 3 | -0.75 | 1 | 0 | -1 | -1 |
| validation1 / 0 | -0.25 | -1 | 0 | -1 | -1 |
| validation1 / 1 | -0.25 | -0.5 | 0 | -1 | -1 |
| validation1 / 2 | -0.25 | 0.5 | 0 | -1 | -1 |
| validation1 / 3 | -0.25 | 1 | 0 | -1 | -1 |
| validation2 / 0 | 0.25 | -1 | 0 | -1 | -1 |
| validation2 / 1 | 0.25 | -0.5 | 0 | -1 | -1 |
| validation2 / 2 | 0.25 | 0.5 | 0 | -1 | -1 |
| validation2 / 3 | 0.25 | 1 | 0 | -1 | -1 |
| validation3 / 0 | 0.75 | -1 | 0 | -1 | -1 |
| validation3 / 1 | 0.75 | -0.5 | 0 | -1 | -1 |
| validation3 / 2 | 0.75 | 0.5 | 0 | -1 | -1 |
| validation3 / 3 | 0.75 | 1 | 0 | -1 | -1 |
Start oldMatch at −1. At every key compare x==keyX, then retain the first matching index. All four comparisons occur even after a hit; coherent duplicate keys at the helper boundary would still select the first one. The fixed data has 4 matches and 4 misses.
Memorizer losses for all eight selected pairs and both means
| Sample | target0 | target1 | error0 | error1 | square0 | square1 | half0 | half1 | sampleLoss |
|---|---|---|---|---|---|---|---|---|---|
| train0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| train1 | 0.25 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| train2 | 0.5 | -0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| train3 | 1 | -0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| validation0 | 0.375 | 0.75 | -0.375 | -0.533935546875 | 0.140625 | 0.2850871682167053 | 0.0703125 | 0.14254358410835266 | 0.21285608410835266 |
| validation1 | 0.125 | 0.25 | -0.125 | -0.177978515625 | 0.015625 | 0.03167635202407837 | 0.0078125 | 0.015838176012039185 | 0.023650676012039185 |
| validation2 | 0.25 | -0.125 | -0.177978515625 | 0.125 | 0.03167635202407837 | 0.015625 | 0.015838176012039185 | 0.0078125 | 0.023650676012039185 |
| validation3 | 0.75 | -0.375 | -0.533935546875 | 0.375 | 0.2850871682167053 | 0.140625 | 0.14254358410835266 | 0.0703125 | 0.21285608410835266 |
memorizer_mean_0: Average four saved sample losses in their original order
sum starts at +0; sum0=initialSum+loss0; sum1=sum0+loss1; sum2=sum1+loss2; sum3=sum2+loss3; mean=sum3/4
Dataset zero is training; dataset one is held-out validation. Both means are computed independently from their saved sample losses. Validation never contributes a gradient. This ordered average does not divide each output error by eight.
Saved inputs
- dataset
- 0
- initialSum
- 0
- divisor
- 4
- loss0
- 0
- loss1
- 0
- loss2
- 0
- loss3
- 0
Saved outputs
- sum0
- 0
- sum1
- 0
- sum2
- 0
- sum3
- 0
- mean
- 0
memorizer_mean_1: Average four saved sample losses in their original order
sum starts at +0; sum0=initialSum+loss0; sum1=sum0+loss1; sum2=sum1+loss2; sum3=sum2+loss3; mean=sum3/4
Dataset zero is training; dataset one is held-out validation. Both means are computed independently from their saved sample losses. Validation never contributes a gradient. This ordered average does not divide each output error by eight.
Saved inputs
- dataset
- 1
- initialSum
- 0
- divisor
- 4
- loss0
- 0.21285608410835266
- loss1
- 0.023650676012039185
- loss2
- 0.023650676012039185
- loss3
- 0.21285608410835266
Saved outputs
- sum0
- 0.21285608410835266
- sum1
- 0.23650676012039185
- sum2
- 0.26015743613243103
- sum3
- 0.4730135202407837
- mean
- 0.11825338006019592
Selected memorizer sample: scan, branch-specific operands and loss
memorizer_dictionary: Copy four training keys and their two desired outputs
dictionary_j=[trainX_j,adaptTarget0_j,adaptTarget1_j], j=0..3
This explicit lookup stores four keys and eight target values, twelve extra numeric slots. It is a constructed counterexample, not a neural network trained by gradient descent. Its fallback will reuse the already saved prepared predictions.
Saved inputs
- dataX0
- -1
- dataTarget0_0
- 0.5
- dataTarget0_1
- 1
- dataX1
- -0.5
- dataTarget1_0
- 0.25
- dataTarget1_1
- 0.5
- dataX2
- 0.5
- dataTarget2_0
- 0.5
- dataTarget2_1
- -0.25
- dataX3
- 1
- dataTarget3_0
- 1
- dataTarget3_1
- -0.5
Saved outputs
- key0
- -1
- target0_0
- 0.5
- target0_1
- 1
- key1
- -0.5
- target1_0
- 0.25
- target1_1
- 0.5
- key2
- 0.5
- target2_0
- 0.5
- target2_1
- -0.25
- key3
- 1
- target3_0
- 1
- target3_1
- -0.5
memorizer_scan_0: Compare this input with every stored training key
match starts at -1; for key0..3: equal=(x==keyX); match=(oldMatch==-1 and equal==1)?keyIndex:oldMatch
Perform all four equality comparisons even after finding a match. Keep the first matching index; minus one means none. The fixed eight inputs have four training matches and four held-out misses. If a caller supplies duplicate coherent keys, the first match still wins.
Saved inputs
- sample
- 0
- x
- -1
- noMatch
- -1
- key0
- -1
- key1
- -0.5
- key2
- 0.5
- key3
- 1
Saved outputs
- equal0
- 1
- match0
- 0
- equal1
- 0
- match1
- 0
- equal2
- 0
- match2
- 0
- equal3
- 0
- match3
- 0
memorizer_select_0: Copy a matched target pair or this sample's saved prepared pair
sourceKind=match==-1?1:0; sourceSample=match==-1?sample:match; sourceIndex0=match==-1?2*sample:3*match+1; sourceIndex1=sourceIndex0+1; source0=match==-1?prepared0:matchedDictionary0; source1=match==-1?prepared1:matchedDictionary1; prediction0=source0; prediction1=source1
Source zero is the dictionary target pair at the first matching training index: in the stored [4,3] dictionary, flat positions 3*match+1 and 3*match+2 skip its x key. Source one is the saved prepared-network prediction at this same sample, at flat positions 2*sample and 2*sample+1 before adaptation. Copy both output values without another neural forward. A perfect lookup fit on training keys says nothing about the missing inputs.
Saved inputs
- sample
- 0
- match
- 0
- prepared0
- 0
- prepared1
- 0.2880859375
- matchedDictionary0
- 0.5
- matchedDictionary1
- 1
Saved outputs
- sourceKind
- 0
- sourceSample
- 0
- sourceIndex0
- 1
- sourceIndex1
- 2
- source0
- 0.5
- source1
- 1
- prediction0
- 0.5
- prediction1
- 1
memorizer_loss_0: Measure the two output errors for one sample
error0=prediction0-target0; error1=prediction1-target1; square0=error0*error0; square1=error1*error1; half0=square0/2; half1=square1/2; sampleLoss=half0+half1
Each output is a scalar regression value, so its signed error is a difference of numbers. Squaring makes either error direction costly. Add the two half-losses to obtain one sample loss; the later average counts four samples, not eight output coordinates.
Saved inputs
- sample
- 0
- task
- 1
- prediction0
- 0.5
- prediction1
- 1
- target0
- 0.5
- target1
- 1
- divisor
- 2
Saved outputs
- error0
- 0
- error1
- 0
- square0
- 0
- square1
- 0
- half0
- 0
- half1
- 0
- sampleLoss
- 0
Actual dictionary training mean=0; held-out mean=0.11825338006019592. The held-out fallback keeps the unadapted prepared ADAPT mean=0.11825338006019592, irrespective of the fine-tuning steps. Zero training loss follows from the actual selected-label subtractions, and does not imply the ADAPT rule was learned on missing keys.
Count evaluations, updates and dictionary work separately
| Quantity | Actual count |
|---|---|
| Fixed feature maps (once) | |
| Feature negations | |
| ReLU max selections | |
| PRE target copies | |
| ADAPT target half-scalings | |
| ADAPT target additions | |
| Prepared weight copies | |
| PRE evaluated stages | |
| Prepared ADAPT evaluated stages | |
| Fresh ADAPT evaluated stages | |
| Total network stages S | |
| Network sample forwards | |
| Forward products | |
| Forward output sums | |
| Gradient batches (including final diagnostics) | |
| Coordinate gradient contractions | |
| Training rows in gradient batches (4S) | |
| Coordinate-by-row gradient multiplications (16S) | |
| Completed optimizer batches K | |
| Rows used by optimizer batches | |
| All-coordinate proposal records | |
| Enabled-coordinate commits | |
| Final diagnostic gradient batches | |
| Loss sample evaluations (networks plus memorizer) | |
| Component errors | |
| Error squares | |
| Half-loss divisions | |
| Two-output half-loss sums | |
| Ordered loss accumulation additions | |
| Dataset mean divisions | |
| Dictionary key comparisons | |
| Dictionary prediction selections | |
| Dictionary matches | |
| Dictionary misses | |
| Extra numeric dictionary slots | |
| Retained prepared weights | |
| Extra memorizer neural forwards | |
| Memorizer gradient batches | |
| Memorizer optimizer batches | |
| Saved operation frames | |
| Saved tensors |
P means preUpdates and U means updates per ADAPT cohort. K=P+2U counts transitions; S=K+3 counts evaluated states because each of the three cohorts also evaluates its start. Each state computes eight forwards, four training rows and sixteen gradient products. There are four proposals per transition regardless of scope, three final diagnostic batches without updates, and independent dictionary losses without new network forwards. At η=0 these requested operations still count. These are algorithmic counts, not hardware speed or throughput.
Whole-root final summary and saved work-copy operands
finish: Compare the final adaptation results and the lookup counterexample
report actual final losses and completed work; final diagnostics add no optimizer steps; dictionary comparisons add no neural forwards
Prepared and fresh losses measure the same ADAPT rule after the same number of adaptation steps. The dictionary can obtain zero training error by copying labels while keeping unadapted predictions on held-out misses. Counts describe this small algorithm, not elapsed time, memory bytes or a general benefit of pretraining.
Saved inputs
- preUpdates
- 2
- updates
- 1
- scope
- 0
- eta
- 0.5
- trainableAdaptParameters
- 4
- fineTunedValidationLoss
- 0.08418624420301057
- freshValidationLoss
- 0.13904571533203125
- memorizerValidationLoss
- 0.11825338006019592
- fineTunedTrainLoss
- 0.16837248840602115
- freshTrainLoss
- 0.2780914306640625
- memorizerTrainLoss
- 0
- featureMaps
- 8
- featureNegations
- 8
- featureMaxSelections
- 16
- preTargetCopies
- 16
- adaptTargetScalings
- 16
- adaptTargetAdditions
- 16
- preparedWeightCopies
- 4
- pretrainingStages
- 3
- preparedAdaptStages
- 2
- freshAdaptStages
- 2
- stageCount
- 7
- forwardSampleEvaluations
- 56
- forwardProducts
- 224
- forwardSums
- 112
- gradientBatches
- 7
- gradientContractions
- 28
- gradientRowContributions
- 28
- gradientProducts
- 112
- optimizerBatches
- 4
- usedForUpdateRows
- 16
- storedCoordinateUpdateRecords
- 16
- enabledCoordinateUpdates
- 16
- finalDiagnosticBatches
- 3
- lossSampleEvaluations
- 64
- lossComponentErrors
- 128
- lossSquares
- 128
- lossHalfDivisions
- 128
- lossOutputSums
- 64
- orderedLossAdditions
- 64
- datasetMeanDivisions
- 16
- memorizerComparisons
- 32
- memorizerSelections
- 8
- memorizerMatches
- 4
- memorizerMisses
- 4
- dictionaryExtraSlots
- 12
- retainedPreparedWeights
- 4
- memorizerForwardEvaluations
- 0
- memorizerGradientBatches
- 0
- memorizerOptimizerBatches
- 0
Saved outputs
- fineTunedValidationLoss
- 0.08418624420301057
- freshValidationLoss
- 0.13904571533203125
- memorizerValidationLoss
- 0.11825338006019592
- fineTunedTrainLoss
- 0.16837248840602115
- freshTrainLoss
- 0.2780914306640625
- memorizerTrainLoss
- 0
- featureMaps
- 8
- featureNegations
- 8
- featureMaxSelections
- 16
- preTargetCopies
- 16
- adaptTargetScalings
- 16
- adaptTargetAdditions
- 16
- preparedWeightCopies
- 4
- pretrainingStages
- 3
- preparedAdaptStages
- 2
- freshAdaptStages
- 2
- stageCount
- 7
- forwardSampleEvaluations
- 56
- forwardProducts
- 224
- forwardSums
- 112
- gradientBatches
- 7
- gradientContractions
- 28
- gradientRowContributions
- 28
- gradientProducts
- 112
- optimizerBatches
- 4
- usedForUpdateRows
- 16
- storedCoordinateUpdateRecords
- 16
- enabledCoordinateUpdates
- 16
- finalDiagnosticBatches
- 3
- lossSampleEvaluations
- 64
- lossComponentErrors
- 128
- lossSquares
- 128
- lossHalfDivisions
- 128
- lossOutputSums
- 64
- orderedLossAdditions
- 64
- datasetMeanDivisions
- 16
- memorizerComparisons
- 32
- memorizerSelections
- 8
- memorizerMatches
- 4
- memorizerMisses
- 4
- dictionaryExtraSlots
- 12
- retainedPreparedWeights
- 4
- memorizerForwardEvaluations
- 0
- memorizerGradientBatches
- 0
- memorizerOptimizerBatches
- 0
Default worked mathematics: preparation, adaptation and comparison
This fixed hand case is preUpdates=2, updates=1, scope=0, η=1/2. Fractions here explain the default; the tables above always use the current saved root. At PRE stage 0, W is zero. For x=−1, φ=[0,1]ᵀ, prediction=[0,0], target=[0,1], errors=[0,−1], squares=[0,1], halves=[0,1/2], sample loss=1/2. Training sample losses in order are [1/2,1/8,1/8,1/2]. Starting at +0 gives partial sums 1/2,5/8,3/4,5/4; divide by 4 to obtain 5/16.
Initially G00=(0+0−1/4−1)/4=−5/16 and G11=(−1−1/4+0+0)/4=−5/16; cross derivatives are zero. Subtracting ηG gives first PRE diagonal 5/32. Its diagonal derivative is (5/16)(5/32−1)=−135/512, so the second step gives 5/32+135/1024=295/1024. All eight rows are evaluated at each of these actual stages; no historical trained weights are supplied.
Now change targets to Tφ with T=[[1,1/2],[−1/2,1]]. At x=−1, compute scaledMinus=(1/2)×1=1/2, target0=0+1/2=1/2, scaledPlus=(−1/2)×0=−0, target1=−0+1=1. Prepared prediction=[0,295/1024], errors=[−1/2,−729/1024]. Squares are [1/4,531441/1048576], halves [1/8,531441/2097152], sum 793585/2097152. The ±1/2 samples have one quarter of this loss; the four-sample mean is 3967925/16777216.
Prepared initial G in 00,01,10,11 order is [−3645/16384,−5/32,+5/32,−3645/16384]. For G00 the negative-x products are −0; positive rows contribute −729/4096 and −729/1024, giving sum −3645/4096 then /4. Full fine-tuning subtracts half of each G: W=[13085/32768,5/64,−5/64,13085/32768]. At x=−1 the four products are [0,5/64,−0,13085/32768]; predictions=[5/64,13085/32768], errors=[−27/64,−19683/32768]. Their squares are [729/4096,387420489/1073741824], halves [729/8192,387420489/2147483648], sum 578523465/2147483648. Ordered averaging of the four losses gives 2892617325/17179869184; held-out mean is 2892617325/34359738368.
Fresh initial ADAPT G=[−5/16,−5/32,+5/32,−5/16]. One η=1/2 step gives [5/32,5/64,−5/64,5/32], training mean 18225/65536 and held-out 18225/131072. Prepared diagonal-only scope instead keeps its old cross weights and has training mean 3279279725/17179869184, held-out 3279279725/34359738368. The dictionary’s four hits copy exact ADAPT labels, giving zero training error; its four misses keep the unadapted prepared validation mean 3967925/33554432.
For four feature rows F:[4,2], predictions are F Wᵀ:[4,2]; the transpose turns the single-sample column equation into row-batch storage. The feature Gram matrix H=FᵀF/4 summarizes average feature products. Training has H=diag(5/16,5/16). For target matrix A (I for PRE or T for ADAPT), G=(W−A)H and real Ltrain=(5/32)Σ(Woi−Aoi)². This explains why each full η=1/2 step contracts the residual by 27/32. These identities explain the ordered sample arithmetic; they do not replace it with a second numeric engine.
What this held-out grid can tell us
All eight inputs lie on the same two feature rays: [positive,0] or [0,positive]. Validation merely changes magnitudes. Its Gram matrix is 5I/32, half of training’s 5I/16 (I is the 2×2 identity). For any fixed W and either homogeneous matrix target, real Lvalidation=Ltrain/2. The two means are nevertheless computed independently and can round in represented arithmetic. This relationship does not apply to the dictionary’s lookup rule. It tests neither new directions, nonlinear target rules, a distribution nor population generalization.
The saved decimals are round-trip representations of binary64 values; −0 is kept visible. Separate products, sums and divisions can round. A scoped exact centered-gradient identity at η=+0.5 covers PRE stages and only ADAPT stage 0 or the first updated state on enabled coordinates, with h=2⁻¹²; it gives no blanket exactness promise for later ADAPT stages or arbitrary η. No finite-difference experiment runs in this view.
Pretraining changes the starting weights; fine-tuning changes selected weights for a new target rule; held-out loss evaluates inputs excluded from gradients. The memorizer shows why training fit alone is insufficient. This two-output regression lab trains a fixed-feature readout, unlike IV-52’s token cross-entropy; it establishes no universal transfer benefit, LLM training result, cognition, safety or alignment claim. IV-56 next asks how an additive low-rank change can adapt a readout; in this tiny 2×2 case factorization does not automatically save trainable parameters.
Inspect all stored values, text metadata and tensor storage
Every scalar output, including flattened operation outputs
Exact text evidence from the same record
These are the stored values, shown without display rounding. Each tensor names its axes, dtype and display precision. Empty arrays are omitted rather than padded.
Data
Sample=8 × DataField=7 · float64 · precision 8 · Actual once-prepared authored inputs, features and both target pairs in texts.dataFields order; first four training, last four validation.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -1 |
| 1 | 0 |
| 2 | 1 |
| 3 | 0 |
| 4 | 1 |
| 5 | 0.5 |
| 6 | 1 |
| 7 | -0.5 |
| 8 | 0 |
| 9 | 0.5 |
| 10 | 0 |
| 11 | 0.5 |
| 12 | 0.25 |
| 13 | 0.5 |
| 14 | 0.5 |
| 15 | 0.5 |
| 16 | 0 |
| 17 | 0.5 |
| 18 | 0 |
| 19 | 0.5 |
| 20 | -0.25 |
| 21 | 1 |
| 22 | 1 |
| 23 | 0 |
| 24 | 1 |
| 25 | 0 |
| 26 | 1 |
| 27 | -0.5 |
| 28 | -0.75 |
| 29 | 0 |
| 30 | 0.75 |
| 31 | 0 |
| 32 | 0.75 |
| 33 | 0.375 |
| 34 | 0.75 |
| 35 | -0.25 |
| 36 | 0 |
| 37 | 0.25 |
| 38 | 0 |
| 39 | 0.25 |
| 40 | 0.125 |
| 41 | 0.25 |
| 42 | 0.25 |
| 43 | 0.25 |
| 44 | 0 |
| 45 | 0.25 |
| 46 | 0 |
| 47 | 0.25 |
| 48 | -0.125 |
| 49 | 0.75 |
| 50 | 0.75 |
| 51 | 0 |
| 52 | 0.75 |
| 53 | 0 |
| 54 | 0.75 |
| 55 | -0.375 |
AdaptMask
Output=2 × Feature=2 · int32 · precision 0 · Actual scope-dependent ADAPT selectors in row-major W order; PRE always enables all four coordinates.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
pre_InitialWeights
Output=2 × Feature=2 · float64 · precision 8 · Actual cohort initialization: PRE/fresh copy authored positive zeros; prepared ADAPT copies the saved final-PRE weight words.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
pre_stage_0_Weights
Output=2 × Feature=2 · float64 · precision 8 · Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
pre_stage_0_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
pre_stage_0_Forward
Sample=8 × ForwardField=6 · float64 · precision 8 · Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0 |
| 17 | 0 |
| 18 | 0 |
| 19 | 0 |
| 20 | 0 |
| 21 | 0 |
| 22 | 0 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0 |
| 27 | 0 |
| 28 | 0 |
| 29 | 0 |
| 30 | 0 |
| 31 | 0 |
| 32 | 0 |
| 33 | 0 |
| 34 | 0 |
| 35 | 0 |
| 36 | 0 |
| 37 | 0 |
| 38 | 0 |
| 39 | 0 |
| 40 | 0 |
| 41 | 0 |
| 42 | 0 |
| 43 | 0 |
| 44 | 0 |
| 45 | 0 |
| 46 | 0 |
| 47 | 0 |
pre_stage_0_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 0 |
| 3 | -1 |
| 4 | 0 |
| 5 | 1 |
| 6 | 0 |
| 7 | 0.5 |
| 8 | 0.5 |
| 9 | 0 |
| 10 | 0.5 |
| 11 | 0 |
| 12 | -0.5 |
| 13 | 0 |
| 14 | 0.25 |
| 15 | 0 |
| 16 | 0.125 |
| 17 | 0.125 |
| 18 | 0.5 |
| 19 | 0 |
| 20 | -0.5 |
| 21 | 0 |
| 22 | 0.25 |
| 23 | 0 |
| 24 | 0.125 |
| 25 | 0 |
| 26 | 0.125 |
| 27 | 1 |
| 28 | 0 |
| 29 | -1 |
| 30 | 0 |
| 31 | 1 |
| 32 | 0 |
| 33 | 0.5 |
| 34 | 0 |
| 35 | 0.5 |
| 36 | 0 |
| 37 | 0.75 |
| 38 | 0 |
| 39 | -0.75 |
| 40 | 0 |
| 41 | 0.5625 |
| 42 | 0 |
| 43 | 0.28125 |
| 44 | 0.28125 |
| 45 | 0 |
| 46 | 0.25 |
| 47 | 0 |
| 48 | -0.25 |
| 49 | 0 |
| 50 | 0.0625 |
| 51 | 0 |
| 52 | 0.03125 |
| 53 | 0.03125 |
| 54 | 0.25 |
| 55 | 0 |
| 56 | -0.25 |
| 57 | 0 |
| 58 | 0.0625 |
| 59 | 0 |
| 60 | 0.03125 |
| 61 | 0 |
| 62 | 0.03125 |
| 63 | 0.75 |
| 64 | 0 |
| 65 | -0.75 |
| 66 | 0 |
| 67 | 0.5625 |
| 68 | 0 |
| 69 | 0.28125 |
| 70 | 0 |
| 71 | 0.28125 |
pre_stage_0_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.5 |
| 1 | 0 |
| 2 | 0.5 |
| 3 | 0.125 |
| 4 | 0.5 |
| 5 | 0.625 |
| 6 | 0.125 |
| 7 | 0.625 |
| 8 | 0.75 |
| 9 | 0.5 |
| 10 | 0.75 |
| 11 | 1.25 |
| 12 | 0.28125 |
| 13 | 0 |
| 14 | 0.28125 |
| 15 | 0.03125 |
| 16 | 0.28125 |
| 17 | 0.3125 |
| 18 | 0.03125 |
| 19 | 0.3125 |
| 20 | 0.34375 |
| 21 | 0.28125 |
| 22 | 0.34375 |
| 23 | 0.625 |
pre_stage_0_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.3125 |
| 1 | 0.15625 |
pre_stage_0_GradientRows
Coordinate=4 × TrainSample=4 × GradientRowField=5 · float64 · precision 8 · Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -0.5 |
| 11 | 0.5 |
| 12 | -0.25 |
| 13 | 0 |
| 14 | -0.25 |
| 15 | -1 |
| 16 | 1 |
| 17 | -1 |
| 18 | -0.25 |
| 19 | -1.25 |
| 20 | 0 |
| 21 | 1 |
| 22 | 0 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0.5 |
| 27 | 0 |
| 28 | 0 |
| 29 | 0 |
| 30 | -0.5 |
| 31 | 0 |
| 32 | -0 |
| 33 | 0 |
| 34 | 0 |
| 35 | -1 |
| 36 | 0 |
| 37 | -0 |
| 38 | 0 |
| 39 | 0 |
| 40 | -1 |
| 41 | 0 |
| 42 | -0 |
| 43 | 0 |
| 44 | 0 |
| 45 | -0.5 |
| 46 | 0 |
| 47 | -0 |
| 48 | 0 |
| 49 | 0 |
| 50 | 0 |
| 51 | 0.5 |
| 52 | 0 |
| 53 | 0 |
| 54 | 0 |
| 55 | 0 |
| 56 | 1 |
| 57 | 0 |
| 58 | 0 |
| 59 | 0 |
| 60 | -1 |
| 61 | 1 |
| 62 | -1 |
| 63 | 0 |
| 64 | -1 |
| 65 | -0.5 |
| 66 | 0.5 |
| 67 | -0.25 |
| 68 | -1 |
| 69 | -1.25 |
| 70 | 0 |
| 71 | 0 |
| 72 | 0 |
| 73 | -1.25 |
| 74 | -1.25 |
| 75 | 0 |
| 76 | 0 |
| 77 | 0 |
| 78 | -1.25 |
| 79 | -1.25 |
pre_stage_0_MathematicalGradient
Output=2 × Feature=2 · float64 · precision 8 · All four actual derivatives of the current training objective; the final cohort stage is diagnostic only.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.3125 |
| 1 | 0 |
| 2 | 0 |
| 3 | -0.3125 |
pre_stage_0_EffectiveGradient
Output=2 × Feature=2 · float64 · precision 8 · Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.3125 |
| 1 | 0 |
| 2 | 0 |
| 3 | -0.3125 |
pre_stage_0_Mask
Output=2 × Feature=2 · int32 · precision 0 · Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
pre_stage_0_Stats
StageField=4 · float64 · precision 8 · Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.3125 |
| 1 | 0.15625 |
| 2 | 0 |
| 3 | 1 |
pre_update_1_Update
Coordinate=4 × UpdateField=7 · float64 · precision 8 · Actual old,mathematical,effective,enabled,delta,proposed,committed; enabled is an integer VALUE in this mixed float table. Frozen commits copy the old word, including nonzero values and negative zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | -0.3125 |
| 2 | -0.3125 |
| 3 | 1 |
| 4 | -0.15625 |
| 5 | 0.15625 |
| 6 | 0.15625 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 1 |
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0 |
| 17 | 1 |
| 18 | 0 |
| 19 | 0 |
| 20 | 0 |
| 21 | 0 |
| 22 | -0.3125 |
| 23 | -0.3125 |
| 24 | 1 |
| 25 | -0.15625 |
| 26 | 0.15625 |
| 27 | 0.15625 |
pre_stage_1_Weights
Output=2 × Feature=2 · float64 · precision 8 · Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.15625 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.15625 |
pre_stage_1_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0.15625 |
| 2 | 0 |
| 3 | 0.078125 |
| 4 | 0.078125 |
| 5 | 0 |
| 6 | 0.15625 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0.1171875 |
| 10 | 0 |
| 11 | 0.0390625 |
| 12 | 0.0390625 |
| 13 | 0 |
| 14 | 0.1171875 |
| 15 | 0 |
pre_stage_1_Forward
Sample=8 × ForwardField=6 · float64 · precision 8 · Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.15625 |
| 4 | 0 |
| 5 | 0.15625 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0.078125 |
| 10 | 0 |
| 11 | 0.078125 |
| 12 | 0.078125 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0.078125 |
| 17 | 0 |
| 18 | 0.15625 |
| 19 | 0 |
| 20 | 0 |
| 21 | 0 |
| 22 | 0.15625 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0 |
| 27 | 0.1171875 |
| 28 | 0 |
| 29 | 0.1171875 |
| 30 | 0 |
| 31 | 0 |
| 32 | 0 |
| 33 | 0.0390625 |
| 34 | 0 |
| 35 | 0.0390625 |
| 36 | 0.0390625 |
| 37 | 0 |
| 38 | 0 |
| 39 | 0 |
| 40 | 0.0390625 |
| 41 | 0 |
| 42 | 0.1171875 |
| 43 | 0 |
| 44 | 0 |
| 45 | 0 |
| 46 | 0.1171875 |
| 47 | 0 |
pre_stage_1_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 0 |
| 3 | -0.84375 |
| 4 | 0 |
| 5 | 0.7119140625 |
| 6 | 0 |
| 7 | 0.35595703125 |
| 8 | 0.35595703125 |
| 9 | 0 |
| 10 | 0.5 |
| 11 | 0 |
| 12 | -0.421875 |
| 13 | 0 |
| 14 | 0.177978515625 |
| 15 | 0 |
| 16 | 0.0889892578125 |
| 17 | 0.0889892578125 |
| 18 | 0.5 |
| 19 | 0 |
| 20 | -0.421875 |
| 21 | 0 |
| 22 | 0.177978515625 |
| 23 | 0 |
| 24 | 0.0889892578125 |
| 25 | 0 |
| 26 | 0.0889892578125 |
| 27 | 1 |
| 28 | 0 |
| 29 | -0.84375 |
| 30 | 0 |
| 31 | 0.7119140625 |
| 32 | 0 |
| 33 | 0.35595703125 |
| 34 | 0 |
| 35 | 0.35595703125 |
| 36 | 0 |
| 37 | 0.75 |
| 38 | 0 |
| 39 | -0.6328125 |
| 40 | 0 |
| 41 | 0.40045166015625 |
| 42 | 0 |
| 43 | 0.200225830078125 |
| 44 | 0.200225830078125 |
| 45 | 0 |
| 46 | 0.25 |
| 47 | 0 |
| 48 | -0.2109375 |
| 49 | 0 |
| 50 | 0.04449462890625 |
| 51 | 0 |
| 52 | 0.022247314453125 |
| 53 | 0.022247314453125 |
| 54 | 0.25 |
| 55 | 0 |
| 56 | -0.2109375 |
| 57 | 0 |
| 58 | 0.04449462890625 |
| 59 | 0 |
| 60 | 0.022247314453125 |
| 61 | 0 |
| 62 | 0.022247314453125 |
| 63 | 0.75 |
| 64 | 0 |
| 65 | -0.6328125 |
| 66 | 0 |
| 67 | 0.40045166015625 |
| 68 | 0 |
| 69 | 0.200225830078125 |
| 70 | 0 |
| 71 | 0.200225830078125 |
pre_stage_1_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.35595703125 |
| 1 | 0 |
| 2 | 0.35595703125 |
| 3 | 0.0889892578125 |
| 4 | 0.35595703125 |
| 5 | 0.4449462890625 |
| 6 | 0.0889892578125 |
| 7 | 0.4449462890625 |
| 8 | 0.533935546875 |
| 9 | 0.35595703125 |
| 10 | 0.533935546875 |
| 11 | 0.889892578125 |
| 12 | 0.200225830078125 |
| 13 | 0 |
| 14 | 0.200225830078125 |
| 15 | 0.022247314453125 |
| 16 | 0.200225830078125 |
| 17 | 0.22247314453125 |
| 18 | 0.022247314453125 |
| 19 | 0.22247314453125 |
| 20 | 0.244720458984375 |
| 21 | 0.200225830078125 |
| 22 | 0.244720458984375 |
| 23 | 0.4449462890625 |
pre_stage_1_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.22247314453125 |
| 1 | 0.111236572265625 |
pre_stage_1_GradientRows
Coordinate=4 × TrainSample=4 × GradientRowField=5 · float64 · precision 8 · Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -0.421875 |
| 11 | 0.5 |
| 12 | -0.2109375 |
| 13 | 0 |
| 14 | -0.2109375 |
| 15 | -0.84375 |
| 16 | 1 |
| 17 | -0.84375 |
| 18 | -0.2109375 |
| 19 | -1.0546875 |
| 20 | 0 |
| 21 | 1 |
| 22 | 0 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0.5 |
| 27 | 0 |
| 28 | 0 |
| 29 | 0 |
| 30 | -0.421875 |
| 31 | 0 |
| 32 | -0 |
| 33 | 0 |
| 34 | 0 |
| 35 | -0.84375 |
| 36 | 0 |
| 37 | -0 |
| 38 | 0 |
| 39 | 0 |
| 40 | -0.84375 |
| 41 | 0 |
| 42 | -0 |
| 43 | 0 |
| 44 | 0 |
| 45 | -0.421875 |
| 46 | 0 |
| 47 | -0 |
| 48 | 0 |
| 49 | 0 |
| 50 | 0 |
| 51 | 0.5 |
| 52 | 0 |
| 53 | 0 |
| 54 | 0 |
| 55 | 0 |
| 56 | 1 |
| 57 | 0 |
| 58 | 0 |
| 59 | 0 |
| 60 | -0.84375 |
| 61 | 1 |
| 62 | -0.84375 |
| 63 | 0 |
| 64 | -0.84375 |
| 65 | -0.421875 |
| 66 | 0.5 |
| 67 | -0.2109375 |
| 68 | -0.84375 |
| 69 | -1.0546875 |
| 70 | 0 |
| 71 | 0 |
| 72 | 0 |
| 73 | -1.0546875 |
| 74 | -1.0546875 |
| 75 | 0 |
| 76 | 0 |
| 77 | 0 |
| 78 | -1.0546875 |
| 79 | -1.0546875 |
pre_stage_1_MathematicalGradient
Output=2 × Feature=2 · float64 · precision 8 · All four actual derivatives of the current training objective; the final cohort stage is diagnostic only.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.263671875 |
| 1 | 0 |
| 2 | 0 |
| 3 | -0.263671875 |
pre_stage_1_EffectiveGradient
Output=2 × Feature=2 · float64 · precision 8 · Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.263671875 |
| 1 | 0 |
| 2 | 0 |
| 3 | -0.263671875 |
pre_stage_1_Mask
Output=2 × Feature=2 · int32 · precision 0 · Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
pre_stage_1_Stats
StageField=4 · float64 · precision 8 · Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.22247314453125 |
| 1 | 0.111236572265625 |
| 2 | 0 |
| 3 | 1 |
pre_update_2_Update
Coordinate=4 × UpdateField=7 · float64 · precision 8 · Actual old,mathematical,effective,enabled,delta,proposed,committed; enabled is an integer VALUE in this mixed float table. Frozen commits copy the old word, including nonzero values and negative zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.15625 |
| 1 | -0.263671875 |
| 2 | -0.263671875 |
| 3 | 1 |
| 4 | -0.1318359375 |
| 5 | 0.2880859375 |
| 6 | 0.2880859375 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 1 |
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0 |
| 17 | 1 |
| 18 | 0 |
| 19 | 0 |
| 20 | 0 |
| 21 | 0.15625 |
| 22 | -0.263671875 |
| 23 | -0.263671875 |
| 24 | 1 |
| 25 | -0.1318359375 |
| 26 | 0.2880859375 |
| 27 | 0.2880859375 |
pre_stage_2_Weights
Output=2 × Feature=2 · float64 · precision 8 · Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.2880859375 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.2880859375 |
pre_stage_2_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0.2880859375 |
| 2 | 0 |
| 3 | 0.14404296875 |
| 4 | 0.14404296875 |
| 5 | 0 |
| 6 | 0.2880859375 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0.216064453125 |
| 10 | 0 |
| 11 | 0.072021484375 |
| 12 | 0.072021484375 |
| 13 | 0 |
| 14 | 0.216064453125 |
| 15 | 0 |
pre_stage_2_Forward
Sample=8 × ForwardField=6 · float64 · precision 8 · Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.2880859375 |
| 4 | 0 |
| 5 | 0.2880859375 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0.14404296875 |
| 10 | 0 |
| 11 | 0.14404296875 |
| 12 | 0.14404296875 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0.14404296875 |
| 17 | 0 |
| 18 | 0.2880859375 |
| 19 | 0 |
| 20 | 0 |
| 21 | 0 |
| 22 | 0.2880859375 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0 |
| 27 | 0.216064453125 |
| 28 | 0 |
| 29 | 0.216064453125 |
| 30 | 0 |
| 31 | 0 |
| 32 | 0 |
| 33 | 0.072021484375 |
| 34 | 0 |
| 35 | 0.072021484375 |
| 36 | 0.072021484375 |
| 37 | 0 |
| 38 | 0 |
| 39 | 0 |
| 40 | 0.072021484375 |
| 41 | 0 |
| 42 | 0.216064453125 |
| 43 | 0 |
| 44 | 0 |
| 45 | 0 |
| 46 | 0.216064453125 |
| 47 | 0 |
pre_stage_2_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 0 |
| 3 | -0.7119140625 |
| 4 | 0 |
| 5 | 0.5068216323852539 |
| 6 | 0 |
| 7 | 0.25341081619262695 |
| 8 | 0.25341081619262695 |
| 9 | 0 |
| 10 | 0.5 |
| 11 | 0 |
| 12 | -0.35595703125 |
| 13 | 0 |
| 14 | 0.12670540809631348 |
| 15 | 0 |
| 16 | 0.06335270404815674 |
| 17 | 0.06335270404815674 |
| 18 | 0.5 |
| 19 | 0 |
| 20 | -0.35595703125 |
| 21 | 0 |
| 22 | 0.12670540809631348 |
| 23 | 0 |
| 24 | 0.06335270404815674 |
| 25 | 0 |
| 26 | 0.06335270404815674 |
| 27 | 1 |
| 28 | 0 |
| 29 | -0.7119140625 |
| 30 | 0 |
| 31 | 0.5068216323852539 |
| 32 | 0 |
| 33 | 0.25341081619262695 |
| 34 | 0 |
| 35 | 0.25341081619262695 |
| 36 | 0 |
| 37 | 0.75 |
| 38 | 0 |
| 39 | -0.533935546875 |
| 40 | 0 |
| 41 | 0.2850871682167053 |
| 42 | 0 |
| 43 | 0.14254358410835266 |
| 44 | 0.14254358410835266 |
| 45 | 0 |
| 46 | 0.25 |
| 47 | 0 |
| 48 | -0.177978515625 |
| 49 | 0 |
| 50 | 0.03167635202407837 |
| 51 | 0 |
| 52 | 0.015838176012039185 |
| 53 | 0.015838176012039185 |
| 54 | 0.25 |
| 55 | 0 |
| 56 | -0.177978515625 |
| 57 | 0 |
| 58 | 0.03167635202407837 |
| 59 | 0 |
| 60 | 0.015838176012039185 |
| 61 | 0 |
| 62 | 0.015838176012039185 |
| 63 | 0.75 |
| 64 | 0 |
| 65 | -0.533935546875 |
| 66 | 0 |
| 67 | 0.2850871682167053 |
| 68 | 0 |
| 69 | 0.14254358410835266 |
| 70 | 0 |
| 71 | 0.14254358410835266 |
pre_stage_2_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.25341081619262695 |
| 1 | 0 |
| 2 | 0.25341081619262695 |
| 3 | 0.06335270404815674 |
| 4 | 0.25341081619262695 |
| 5 | 0.3167635202407837 |
| 6 | 0.06335270404815674 |
| 7 | 0.3167635202407837 |
| 8 | 0.38011622428894043 |
| 9 | 0.25341081619262695 |
| 10 | 0.38011622428894043 |
| 11 | 0.6335270404815674 |
| 12 | 0.14254358410835266 |
| 13 | 0 |
| 14 | 0.14254358410835266 |
| 15 | 0.015838176012039185 |
| 16 | 0.14254358410835266 |
| 17 | 0.15838176012039185 |
| 18 | 0.015838176012039185 |
| 19 | 0.15838176012039185 |
| 20 | 0.17421993613243103 |
| 21 | 0.14254358410835266 |
| 22 | 0.17421993613243103 |
| 23 | 0.3167635202407837 |
pre_stage_2_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.15838176012039185 |
| 1 | 0.07919088006019592 |
pre_stage_2_GradientRows
Coordinate=4 × TrainSample=4 × GradientRowField=5 · float64 · precision 8 · Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -0.35595703125 |
| 11 | 0.5 |
| 12 | -0.177978515625 |
| 13 | 0 |
| 14 | -0.177978515625 |
| 15 | -0.7119140625 |
| 16 | 1 |
| 17 | -0.7119140625 |
| 18 | -0.177978515625 |
| 19 | -0.889892578125 |
| 20 | 0 |
| 21 | 1 |
| 22 | 0 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0.5 |
| 27 | 0 |
| 28 | 0 |
| 29 | 0 |
| 30 | -0.35595703125 |
| 31 | 0 |
| 32 | -0 |
| 33 | 0 |
| 34 | 0 |
| 35 | -0.7119140625 |
| 36 | 0 |
| 37 | -0 |
| 38 | 0 |
| 39 | 0 |
| 40 | -0.7119140625 |
| 41 | 0 |
| 42 | -0 |
| 43 | 0 |
| 44 | 0 |
| 45 | -0.35595703125 |
| 46 | 0 |
| 47 | -0 |
| 48 | 0 |
| 49 | 0 |
| 50 | 0 |
| 51 | 0.5 |
| 52 | 0 |
| 53 | 0 |
| 54 | 0 |
| 55 | 0 |
| 56 | 1 |
| 57 | 0 |
| 58 | 0 |
| 59 | 0 |
| 60 | -0.7119140625 |
| 61 | 1 |
| 62 | -0.7119140625 |
| 63 | 0 |
| 64 | -0.7119140625 |
| 65 | -0.35595703125 |
| 66 | 0.5 |
| 67 | -0.177978515625 |
| 68 | -0.7119140625 |
| 69 | -0.889892578125 |
| 70 | 0 |
| 71 | 0 |
| 72 | 0 |
| 73 | -0.889892578125 |
| 74 | -0.889892578125 |
| 75 | 0 |
| 76 | 0 |
| 77 | 0 |
| 78 | -0.889892578125 |
| 79 | -0.889892578125 |
pre_stage_2_MathematicalGradient
Output=2 × Feature=2 · float64 · precision 8 · All four actual derivatives of the current training objective; the final cohort stage is diagnostic only.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.22247314453125 |
| 1 | 0 |
| 2 | 0 |
| 3 | -0.22247314453125 |
pre_stage_2_EffectiveGradient
Output=2 × Feature=2 · float64 · precision 8 · Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.22247314453125 |
| 1 | 0 |
| 2 | 0 |
| 3 | -0.22247314453125 |
pre_stage_2_Mask
Output=2 × Feature=2 · int32 · precision 0 · Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
pre_stage_2_Stats
StageField=4 · float64 · precision 8 · Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.15838176012039185 |
| 1 | 0.07919088006019592 |
| 2 | 1 |
| 3 | 0 |
pre_StageMetrics
Stage=3 × Dataset=2 · float64 · precision 8 · Only actual cohort stages zero through its requested update count; training then independently computed validation mean.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.3125 |
| 1 | 0.15625 |
| 2 | 0.22247314453125 |
| 3 | 0.111236572265625 |
| 4 | 0.15838176012039185 |
| 5 | 0.07919088006019592 |
pre_StageWeights
Stage=3 × Coordinate=4 · float64 · precision 8 · Only actual evaluated cohort weights in row-major 00,01,10,11 order; final weights have a real final evaluation.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0.15625 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0.15625 |
| 8 | 0.2880859375 |
| 9 | 0 |
| 10 | 0 |
| 11 | 0.2880859375 |
adapt_InitialWeights
Output=2 × Feature=2 · float64 · precision 8 · Actual cohort initialization: PRE/fresh copy authored positive zeros; prepared ADAPT copies the saved final-PRE weight words.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.2880859375 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.2880859375 |
adapt_stage_0_Weights
Output=2 × Feature=2 · float64 · precision 8 · Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.2880859375 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.2880859375 |
adapt_stage_0_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0.2880859375 |
| 2 | 0 |
| 3 | 0.14404296875 |
| 4 | 0.14404296875 |
| 5 | 0 |
| 6 | 0.2880859375 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0.216064453125 |
| 10 | 0 |
| 11 | 0.072021484375 |
| 12 | 0.072021484375 |
| 13 | 0 |
| 14 | 0.216064453125 |
| 15 | 0 |
adapt_stage_0_Forward
Sample=8 × ForwardField=6 · float64 · precision 8 · Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.2880859375 |
| 4 | 0 |
| 5 | 0.2880859375 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0.14404296875 |
| 10 | 0 |
| 11 | 0.14404296875 |
| 12 | 0.14404296875 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0.14404296875 |
| 17 | 0 |
| 18 | 0.2880859375 |
| 19 | 0 |
| 20 | 0 |
| 21 | 0 |
| 22 | 0.2880859375 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0 |
| 27 | 0.216064453125 |
| 28 | 0 |
| 29 | 0.216064453125 |
| 30 | 0 |
| 31 | 0 |
| 32 | 0 |
| 33 | 0.072021484375 |
| 34 | 0 |
| 35 | 0.072021484375 |
| 36 | 0.072021484375 |
| 37 | 0 |
| 38 | 0 |
| 39 | 0 |
| 40 | 0.072021484375 |
| 41 | 0 |
| 42 | 0.216064453125 |
| 43 | 0 |
| 44 | 0 |
| 45 | 0 |
| 46 | 0.216064453125 |
| 47 | 0 |
adapt_stage_0_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.5 |
| 1 | 1 |
| 2 | -0.5 |
| 3 | -0.7119140625 |
| 4 | 0.25 |
| 5 | 0.5068216323852539 |
| 6 | 0.125 |
| 7 | 0.25341081619262695 |
| 8 | 0.37841081619262695 |
| 9 | 0.25 |
| 10 | 0.5 |
| 11 | -0.25 |
| 12 | -0.35595703125 |
| 13 | 0.0625 |
| 14 | 0.12670540809631348 |
| 15 | 0.03125 |
| 16 | 0.06335270404815674 |
| 17 | 0.09460270404815674 |
| 18 | 0.5 |
| 19 | -0.25 |
| 20 | -0.35595703125 |
| 21 | 0.25 |
| 22 | 0.12670540809631348 |
| 23 | 0.0625 |
| 24 | 0.06335270404815674 |
| 25 | 0.03125 |
| 26 | 0.09460270404815674 |
| 27 | 1 |
| 28 | -0.5 |
| 29 | -0.7119140625 |
| 30 | 0.5 |
| 31 | 0.5068216323852539 |
| 32 | 0.25 |
| 33 | 0.25341081619262695 |
| 34 | 0.125 |
| 35 | 0.37841081619262695 |
| 36 | 0.375 |
| 37 | 0.75 |
| 38 | -0.375 |
| 39 | -0.533935546875 |
| 40 | 0.140625 |
| 41 | 0.2850871682167053 |
| 42 | 0.0703125 |
| 43 | 0.14254358410835266 |
| 44 | 0.21285608410835266 |
| 45 | 0.125 |
| 46 | 0.25 |
| 47 | -0.125 |
| 48 | -0.177978515625 |
| 49 | 0.015625 |
| 50 | 0.03167635202407837 |
| 51 | 0.0078125 |
| 52 | 0.015838176012039185 |
| 53 | 0.023650676012039185 |
| 54 | 0.25 |
| 55 | -0.125 |
| 56 | -0.177978515625 |
| 57 | 0.125 |
| 58 | 0.03167635202407837 |
| 59 | 0.015625 |
| 60 | 0.015838176012039185 |
| 61 | 0.0078125 |
| 62 | 0.023650676012039185 |
| 63 | 0.75 |
| 64 | -0.375 |
| 65 | -0.533935546875 |
| 66 | 0.375 |
| 67 | 0.2850871682167053 |
| 68 | 0.140625 |
| 69 | 0.14254358410835266 |
| 70 | 0.0703125 |
| 71 | 0.21285608410835266 |
adapt_stage_0_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.37841081619262695 |
| 1 | 0 |
| 2 | 0.37841081619262695 |
| 3 | 0.09460270404815674 |
| 4 | 0.37841081619262695 |
| 5 | 0.4730135202407837 |
| 6 | 0.09460270404815674 |
| 7 | 0.4730135202407837 |
| 8 | 0.5676162242889404 |
| 9 | 0.37841081619262695 |
| 10 | 0.5676162242889404 |
| 11 | 0.9460270404815674 |
| 12 | 0.21285608410835266 |
| 13 | 0 |
| 14 | 0.21285608410835266 |
| 15 | 0.023650676012039185 |
| 16 | 0.21285608410835266 |
| 17 | 0.23650676012039185 |
| 18 | 0.023650676012039185 |
| 19 | 0.23650676012039185 |
| 20 | 0.26015743613243103 |
| 21 | 0.21285608410835266 |
| 22 | 0.26015743613243103 |
| 23 | 0.4730135202407837 |
adapt_stage_0_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.23650676012039185 |
| 1 | 0.11825338006019592 |
adapt_stage_0_GradientRows
Coordinate=4 × TrainSample=4 × GradientRowField=5 · float64 · precision 8 · Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.5 |
| 1 | 0 |
| 2 | -0 |
| 3 | 0 |
| 4 | 0 |
| 5 | -0.25 |
| 6 | 0 |
| 7 | -0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -0.35595703125 |
| 11 | 0.5 |
| 12 | -0.177978515625 |
| 13 | 0 |
| 14 | -0.177978515625 |
| 15 | -0.7119140625 |
| 16 | 1 |
| 17 | -0.7119140625 |
| 18 | -0.177978515625 |
| 19 | -0.889892578125 |
| 20 | -0.5 |
| 21 | 1 |
| 22 | -0.5 |
| 23 | 0 |
| 24 | -0.5 |
| 25 | -0.25 |
| 26 | 0.5 |
| 27 | -0.125 |
| 28 | -0.5 |
| 29 | -0.625 |
| 30 | -0.35595703125 |
| 31 | 0 |
| 32 | -0 |
| 33 | -0.625 |
| 34 | -0.625 |
| 35 | -0.7119140625 |
| 36 | 0 |
| 37 | -0 |
| 38 | -0.625 |
| 39 | -0.625 |
| 40 | -0.7119140625 |
| 41 | 0 |
| 42 | -0 |
| 43 | 0 |
| 44 | 0 |
| 45 | -0.35595703125 |
| 46 | 0 |
| 47 | -0 |
| 48 | 0 |
| 49 | 0 |
| 50 | 0.25 |
| 51 | 0.5 |
| 52 | 0.125 |
| 53 | 0 |
| 54 | 0.125 |
| 55 | 0.5 |
| 56 | 1 |
| 57 | 0.5 |
| 58 | 0.125 |
| 59 | 0.625 |
| 60 | -0.7119140625 |
| 61 | 1 |
| 62 | -0.7119140625 |
| 63 | 0 |
| 64 | -0.7119140625 |
| 65 | -0.35595703125 |
| 66 | 0.5 |
| 67 | -0.177978515625 |
| 68 | -0.7119140625 |
| 69 | -0.889892578125 |
| 70 | 0.25 |
| 71 | 0 |
| 72 | 0 |
| 73 | -0.889892578125 |
| 74 | -0.889892578125 |
| 75 | 0.5 |
| 76 | 0 |
| 77 | 0 |
| 78 | -0.889892578125 |
| 79 | -0.889892578125 |
adapt_stage_0_MathematicalGradient
Output=2 × Feature=2 · float64 · precision 8 · All four actual derivatives of the current training objective; the final cohort stage is diagnostic only.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.22247314453125 |
| 1 | -0.15625 |
| 2 | 0.15625 |
| 3 | -0.22247314453125 |
adapt_stage_0_EffectiveGradient
Output=2 × Feature=2 · float64 · precision 8 · Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.22247314453125 |
| 1 | -0.15625 |
| 2 | 0.15625 |
| 3 | -0.22247314453125 |
adapt_stage_0_Mask
Output=2 × Feature=2 · int32 · precision 0 · Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
adapt_stage_0_Stats
StageField=4 · float64 · precision 8 · Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.23650676012039185 |
| 1 | 0.11825338006019592 |
| 2 | 0 |
| 3 | 1 |
adapt_update_1_Update
Coordinate=4 × UpdateField=7 · float64 · precision 8 · Actual old,mathematical,effective,enabled,delta,proposed,committed; enabled is an integer VALUE in this mixed float table. Frozen commits copy the old word, including nonzero values and negative zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.2880859375 |
| 1 | -0.22247314453125 |
| 2 | -0.22247314453125 |
| 3 | 1 |
| 4 | -0.111236572265625 |
| 5 | 0.399322509765625 |
| 6 | 0.399322509765625 |
| 7 | 0 |
| 8 | -0.15625 |
| 9 | -0.15625 |
| 10 | 1 |
| 11 | -0.078125 |
| 12 | 0.078125 |
| 13 | 0.078125 |
| 14 | 0 |
| 15 | 0.15625 |
| 16 | 0.15625 |
| 17 | 1 |
| 18 | 0.078125 |
| 19 | -0.078125 |
| 20 | -0.078125 |
| 21 | 0.2880859375 |
| 22 | -0.22247314453125 |
| 23 | -0.22247314453125 |
| 24 | 1 |
| 25 | -0.111236572265625 |
| 26 | 0.399322509765625 |
| 27 | 0.399322509765625 |
adapt_stage_1_Weights
Output=2 × Feature=2 · float64 · precision 8 · Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.399322509765625 |
| 1 | 0.078125 |
| 2 | -0.078125 |
| 3 | 0.399322509765625 |
adapt_stage_1_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.078125 |
| 1 | 0.399322509765625 |
| 2 | 0.0390625 |
| 3 | 0.1996612548828125 |
| 4 | 0.1996612548828125 |
| 5 | -0.0390625 |
| 6 | 0.399322509765625 |
| 7 | -0.078125 |
| 8 | 0.05859375 |
| 9 | 0.29949188232421875 |
| 10 | 0.01953125 |
| 11 | 0.09983062744140625 |
| 12 | 0.09983062744140625 |
| 13 | -0.01953125 |
| 14 | 0.29949188232421875 |
| 15 | -0.05859375 |
adapt_stage_1_Forward
Sample=8 × ForwardField=6 · float64 · precision 8 · Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0.078125 |
| 2 | -0 |
| 3 | 0.399322509765625 |
| 4 | 0.078125 |
| 5 | 0.399322509765625 |
| 6 | 0 |
| 7 | 0.0390625 |
| 8 | -0 |
| 9 | 0.1996612548828125 |
| 10 | 0.0390625 |
| 11 | 0.1996612548828125 |
| 12 | 0.1996612548828125 |
| 13 | 0 |
| 14 | -0.0390625 |
| 15 | 0 |
| 16 | 0.1996612548828125 |
| 17 | -0.0390625 |
| 18 | 0.399322509765625 |
| 19 | 0 |
| 20 | -0.078125 |
| 21 | 0 |
| 22 | 0.399322509765625 |
| 23 | -0.078125 |
| 24 | 0 |
| 25 | 0.05859375 |
| 26 | -0 |
| 27 | 0.29949188232421875 |
| 28 | 0.05859375 |
| 29 | 0.29949188232421875 |
| 30 | 0 |
| 31 | 0.01953125 |
| 32 | -0 |
| 33 | 0.09983062744140625 |
| 34 | 0.01953125 |
| 35 | 0.09983062744140625 |
| 36 | 0.09983062744140625 |
| 37 | 0 |
| 38 | -0.01953125 |
| 39 | 0 |
| 40 | 0.09983062744140625 |
| 41 | -0.01953125 |
| 42 | 0.29949188232421875 |
| 43 | 0 |
| 44 | -0.05859375 |
| 45 | 0 |
| 46 | 0.29949188232421875 |
| 47 | -0.05859375 |
adapt_stage_1_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.5 |
| 1 | 1 |
| 2 | -0.421875 |
| 3 | -0.600677490234375 |
| 4 | 0.177978515625 |
| 5 | 0.3608134472742677 |
| 6 | 0.0889892578125 |
| 7 | 0.18040672363713384 |
| 8 | 0.26939598144963384 |
| 9 | 0.25 |
| 10 | 0.5 |
| 11 | -0.2109375 |
| 12 | -0.3003387451171875 |
| 13 | 0.04449462890625 |
| 14 | 0.09020336181856692 |
| 15 | 0.022247314453125 |
| 16 | 0.04510168090928346 |
| 17 | 0.06734899536240846 |
| 18 | 0.5 |
| 19 | -0.25 |
| 20 | -0.3003387451171875 |
| 21 | 0.2109375 |
| 22 | 0.09020336181856692 |
| 23 | 0.04449462890625 |
| 24 | 0.04510168090928346 |
| 25 | 0.022247314453125 |
| 26 | 0.06734899536240846 |
| 27 | 1 |
| 28 | -0.5 |
| 29 | -0.600677490234375 |
| 30 | 0.421875 |
| 31 | 0.3608134472742677 |
| 32 | 0.177978515625 |
| 33 | 0.18040672363713384 |
| 34 | 0.0889892578125 |
| 35 | 0.26939598144963384 |
| 36 | 0.375 |
| 37 | 0.75 |
| 38 | -0.31640625 |
| 39 | -0.45050811767578125 |
| 40 | 0.1001129150390625 |
| 41 | 0.20295756409177557 |
| 42 | 0.05005645751953125 |
| 43 | 0.10147878204588778 |
| 44 | 0.15153523956541903 |
| 45 | 0.125 |
| 46 | 0.25 |
| 47 | -0.10546875 |
| 48 | -0.15016937255859375 |
| 49 | 0.0111236572265625 |
| 50 | 0.02255084045464173 |
| 51 | 0.00556182861328125 |
| 52 | 0.011275420227320865 |
| 53 | 0.016837248840602115 |
| 54 | 0.25 |
| 55 | -0.125 |
| 56 | -0.15016937255859375 |
| 57 | 0.10546875 |
| 58 | 0.02255084045464173 |
| 59 | 0.0111236572265625 |
| 60 | 0.011275420227320865 |
| 61 | 0.00556182861328125 |
| 62 | 0.016837248840602115 |
| 63 | 0.75 |
| 64 | -0.375 |
| 65 | -0.45050811767578125 |
| 66 | 0.31640625 |
| 67 | 0.20295756409177557 |
| 68 | 0.1001129150390625 |
| 69 | 0.10147878204588778 |
| 70 | 0.05005645751953125 |
| 71 | 0.15153523956541903 |
adapt_stage_1_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.26939598144963384 |
| 1 | 0 |
| 2 | 0.26939598144963384 |
| 3 | 0.06734899536240846 |
| 4 | 0.26939598144963384 |
| 5 | 0.3367449768120423 |
| 6 | 0.06734899536240846 |
| 7 | 0.3367449768120423 |
| 8 | 0.40409397217445076 |
| 9 | 0.26939598144963384 |
| 10 | 0.40409397217445076 |
| 11 | 0.6734899536240846 |
| 12 | 0.15153523956541903 |
| 13 | 0 |
| 14 | 0.15153523956541903 |
| 15 | 0.016837248840602115 |
| 16 | 0.15153523956541903 |
| 17 | 0.16837248840602115 |
| 18 | 0.016837248840602115 |
| 19 | 0.16837248840602115 |
| 20 | 0.18520973724662326 |
| 21 | 0.15153523956541903 |
| 22 | 0.18520973724662326 |
| 23 | 0.3367449768120423 |
adapt_stage_1_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.16837248840602115 |
| 1 | 0.08418624420301057 |
adapt_stage_1_GradientRows
Coordinate=4 × TrainSample=4 × GradientRowField=5 · float64 · precision 8 · Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.421875 |
| 1 | 0 |
| 2 | -0 |
| 3 | 0 |
| 4 | 0 |
| 5 | -0.2109375 |
| 6 | 0 |
| 7 | -0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -0.3003387451171875 |
| 11 | 0.5 |
| 12 | -0.15016937255859375 |
| 13 | 0 |
| 14 | -0.15016937255859375 |
| 15 | -0.600677490234375 |
| 16 | 1 |
| 17 | -0.600677490234375 |
| 18 | -0.15016937255859375 |
| 19 | -0.7508468627929688 |
| 20 | -0.421875 |
| 21 | 1 |
| 22 | -0.421875 |
| 23 | 0 |
| 24 | -0.421875 |
| 25 | -0.2109375 |
| 26 | 0.5 |
| 27 | -0.10546875 |
| 28 | -0.421875 |
| 29 | -0.52734375 |
| 30 | -0.3003387451171875 |
| 31 | 0 |
| 32 | -0 |
| 33 | -0.52734375 |
| 34 | -0.52734375 |
| 35 | -0.600677490234375 |
| 36 | 0 |
| 37 | -0 |
| 38 | -0.52734375 |
| 39 | -0.52734375 |
| 40 | -0.600677490234375 |
| 41 | 0 |
| 42 | -0 |
| 43 | 0 |
| 44 | 0 |
| 45 | -0.3003387451171875 |
| 46 | 0 |
| 47 | -0 |
| 48 | 0 |
| 49 | 0 |
| 50 | 0.2109375 |
| 51 | 0.5 |
| 52 | 0.10546875 |
| 53 | 0 |
| 54 | 0.10546875 |
| 55 | 0.421875 |
| 56 | 1 |
| 57 | 0.421875 |
| 58 | 0.10546875 |
| 59 | 0.52734375 |
| 60 | -0.600677490234375 |
| 61 | 1 |
| 62 | -0.600677490234375 |
| 63 | 0 |
| 64 | -0.600677490234375 |
| 65 | -0.3003387451171875 |
| 66 | 0.5 |
| 67 | -0.15016937255859375 |
| 68 | -0.600677490234375 |
| 69 | -0.7508468627929688 |
| 70 | 0.2109375 |
| 71 | 0 |
| 72 | 0 |
| 73 | -0.7508468627929688 |
| 74 | -0.7508468627929688 |
| 75 | 0.421875 |
| 76 | 0 |
| 77 | 0 |
| 78 | -0.7508468627929688 |
| 79 | -0.7508468627929688 |
adapt_stage_1_MathematicalGradient
Output=2 × Feature=2 · float64 · precision 8 · All four actual derivatives of the current training objective; the final cohort stage is diagnostic only.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.1877117156982422 |
| 1 | -0.1318359375 |
| 2 | 0.1318359375 |
| 3 | -0.1877117156982422 |
adapt_stage_1_EffectiveGradient
Output=2 × Feature=2 · float64 · precision 8 · Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.1877117156982422 |
| 1 | -0.1318359375 |
| 2 | 0.1318359375 |
| 3 | -0.1877117156982422 |
adapt_stage_1_Mask
Output=2 × Feature=2 · int32 · precision 0 · Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
adapt_stage_1_Stats
StageField=4 · float64 · precision 8 · Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.16837248840602115 |
| 1 | 0.08418624420301057 |
| 2 | 1 |
| 3 | 0 |
adapt_StageMetrics
Stage=2 × Dataset=2 · float64 · precision 8 · Only actual cohort stages zero through its requested update count; training then independently computed validation mean.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.23650676012039185 |
| 1 | 0.11825338006019592 |
| 2 | 0.16837248840602115 |
| 3 | 0.08418624420301057 |
adapt_StageWeights
Stage=2 × Coordinate=4 · float64 · precision 8 · Only actual evaluated cohort weights in row-major 00,01,10,11 order; final weights have a real final evaluation.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.2880859375 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0.2880859375 |
| 4 | 0.399322509765625 |
| 5 | 0.078125 |
| 6 | -0.078125 |
| 7 | 0.399322509765625 |
fresh_InitialWeights
Output=2 × Feature=2 · float64 · precision 8 · Actual cohort initialization: PRE/fresh copy authored positive zeros; prepared ADAPT copies the saved final-PRE weight words.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
fresh_stage_0_Weights
Output=2 × Feature=2 · float64 · precision 8 · Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
fresh_stage_0_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
fresh_stage_0_Forward
Sample=8 × ForwardField=6 · float64 · precision 8 · Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0 |
| 17 | 0 |
| 18 | 0 |
| 19 | 0 |
| 20 | 0 |
| 21 | 0 |
| 22 | 0 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0 |
| 27 | 0 |
| 28 | 0 |
| 29 | 0 |
| 30 | 0 |
| 31 | 0 |
| 32 | 0 |
| 33 | 0 |
| 34 | 0 |
| 35 | 0 |
| 36 | 0 |
| 37 | 0 |
| 38 | 0 |
| 39 | 0 |
| 40 | 0 |
| 41 | 0 |
| 42 | 0 |
| 43 | 0 |
| 44 | 0 |
| 45 | 0 |
| 46 | 0 |
| 47 | 0 |
fresh_stage_0_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.5 |
| 1 | 1 |
| 2 | -0.5 |
| 3 | -1 |
| 4 | 0.25 |
| 5 | 1 |
| 6 | 0.125 |
| 7 | 0.5 |
| 8 | 0.625 |
| 9 | 0.25 |
| 10 | 0.5 |
| 11 | -0.25 |
| 12 | -0.5 |
| 13 | 0.0625 |
| 14 | 0.25 |
| 15 | 0.03125 |
| 16 | 0.125 |
| 17 | 0.15625 |
| 18 | 0.5 |
| 19 | -0.25 |
| 20 | -0.5 |
| 21 | 0.25 |
| 22 | 0.25 |
| 23 | 0.0625 |
| 24 | 0.125 |
| 25 | 0.03125 |
| 26 | 0.15625 |
| 27 | 1 |
| 28 | -0.5 |
| 29 | -1 |
| 30 | 0.5 |
| 31 | 1 |
| 32 | 0.25 |
| 33 | 0.5 |
| 34 | 0.125 |
| 35 | 0.625 |
| 36 | 0.375 |
| 37 | 0.75 |
| 38 | -0.375 |
| 39 | -0.75 |
| 40 | 0.140625 |
| 41 | 0.5625 |
| 42 | 0.0703125 |
| 43 | 0.28125 |
| 44 | 0.3515625 |
| 45 | 0.125 |
| 46 | 0.25 |
| 47 | -0.125 |
| 48 | -0.25 |
| 49 | 0.015625 |
| 50 | 0.0625 |
| 51 | 0.0078125 |
| 52 | 0.03125 |
| 53 | 0.0390625 |
| 54 | 0.25 |
| 55 | -0.125 |
| 56 | -0.25 |
| 57 | 0.125 |
| 58 | 0.0625 |
| 59 | 0.015625 |
| 60 | 0.03125 |
| 61 | 0.0078125 |
| 62 | 0.0390625 |
| 63 | 0.75 |
| 64 | -0.375 |
| 65 | -0.75 |
| 66 | 0.375 |
| 67 | 0.5625 |
| 68 | 0.140625 |
| 69 | 0.28125 |
| 70 | 0.0703125 |
| 71 | 0.3515625 |
fresh_stage_0_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.625 |
| 1 | 0 |
| 2 | 0.625 |
| 3 | 0.15625 |
| 4 | 0.625 |
| 5 | 0.78125 |
| 6 | 0.15625 |
| 7 | 0.78125 |
| 8 | 0.9375 |
| 9 | 0.625 |
| 10 | 0.9375 |
| 11 | 1.5625 |
| 12 | 0.3515625 |
| 13 | 0 |
| 14 | 0.3515625 |
| 15 | 0.0390625 |
| 16 | 0.3515625 |
| 17 | 0.390625 |
| 18 | 0.0390625 |
| 19 | 0.390625 |
| 20 | 0.4296875 |
| 21 | 0.3515625 |
| 22 | 0.4296875 |
| 23 | 0.78125 |
fresh_stage_0_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.390625 |
| 1 | 0.1953125 |
fresh_stage_0_GradientRows
Coordinate=4 × TrainSample=4 × GradientRowField=5 · float64 · precision 8 · Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.5 |
| 1 | 0 |
| 2 | -0 |
| 3 | 0 |
| 4 | 0 |
| 5 | -0.25 |
| 6 | 0 |
| 7 | -0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -0.5 |
| 11 | 0.5 |
| 12 | -0.25 |
| 13 | 0 |
| 14 | -0.25 |
| 15 | -1 |
| 16 | 1 |
| 17 | -1 |
| 18 | -0.25 |
| 19 | -1.25 |
| 20 | -0.5 |
| 21 | 1 |
| 22 | -0.5 |
| 23 | 0 |
| 24 | -0.5 |
| 25 | -0.25 |
| 26 | 0.5 |
| 27 | -0.125 |
| 28 | -0.5 |
| 29 | -0.625 |
| 30 | -0.5 |
| 31 | 0 |
| 32 | -0 |
| 33 | -0.625 |
| 34 | -0.625 |
| 35 | -1 |
| 36 | 0 |
| 37 | -0 |
| 38 | -0.625 |
| 39 | -0.625 |
| 40 | -1 |
| 41 | 0 |
| 42 | -0 |
| 43 | 0 |
| 44 | 0 |
| 45 | -0.5 |
| 46 | 0 |
| 47 | -0 |
| 48 | 0 |
| 49 | 0 |
| 50 | 0.25 |
| 51 | 0.5 |
| 52 | 0.125 |
| 53 | 0 |
| 54 | 0.125 |
| 55 | 0.5 |
| 56 | 1 |
| 57 | 0.5 |
| 58 | 0.125 |
| 59 | 0.625 |
| 60 | -1 |
| 61 | 1 |
| 62 | -1 |
| 63 | 0 |
| 64 | -1 |
| 65 | -0.5 |
| 66 | 0.5 |
| 67 | -0.25 |
| 68 | -1 |
| 69 | -1.25 |
| 70 | 0.25 |
| 71 | 0 |
| 72 | 0 |
| 73 | -1.25 |
| 74 | -1.25 |
| 75 | 0.5 |
| 76 | 0 |
| 77 | 0 |
| 78 | -1.25 |
| 79 | -1.25 |
fresh_stage_0_MathematicalGradient
Output=2 × Feature=2 · float64 · precision 8 · All four actual derivatives of the current training objective; the final cohort stage is diagnostic only.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.3125 |
| 1 | -0.15625 |
| 2 | 0.15625 |
| 3 | -0.3125 |
fresh_stage_0_EffectiveGradient
Output=2 × Feature=2 · float64 · precision 8 · Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.3125 |
| 1 | -0.15625 |
| 2 | 0.15625 |
| 3 | -0.3125 |
fresh_stage_0_Mask
Output=2 × Feature=2 · int32 · precision 0 · Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
fresh_stage_0_Stats
StageField=4 · float64 · precision 8 · Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.390625 |
| 1 | 0.1953125 |
| 2 | 0 |
| 3 | 1 |
fresh_update_1_Update
Coordinate=4 × UpdateField=7 · float64 · precision 8 · Actual old,mathematical,effective,enabled,delta,proposed,committed; enabled is an integer VALUE in this mixed float table. Frozen commits copy the old word, including nonzero values and negative zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | -0.3125 |
| 2 | -0.3125 |
| 3 | 1 |
| 4 | -0.15625 |
| 5 | 0.15625 |
| 6 | 0.15625 |
| 7 | 0 |
| 8 | -0.15625 |
| 9 | -0.15625 |
| 10 | 1 |
| 11 | -0.078125 |
| 12 | 0.078125 |
| 13 | 0.078125 |
| 14 | 0 |
| 15 | 0.15625 |
| 16 | 0.15625 |
| 17 | 1 |
| 18 | 0.078125 |
| 19 | -0.078125 |
| 20 | -0.078125 |
| 21 | 0 |
| 22 | -0.3125 |
| 23 | -0.3125 |
| 24 | 1 |
| 25 | -0.15625 |
| 26 | 0.15625 |
| 27 | 0.15625 |
fresh_stage_1_Weights
Output=2 × Feature=2 · float64 · precision 8 · Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.15625 |
| 1 | 0.078125 |
| 2 | -0.078125 |
| 3 | 0.15625 |
fresh_stage_1_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.078125 |
| 1 | 0.15625 |
| 2 | 0.0390625 |
| 3 | 0.078125 |
| 4 | 0.078125 |
| 5 | -0.0390625 |
| 6 | 0.15625 |
| 7 | -0.078125 |
| 8 | 0.05859375 |
| 9 | 0.1171875 |
| 10 | 0.01953125 |
| 11 | 0.0390625 |
| 12 | 0.0390625 |
| 13 | -0.01953125 |
| 14 | 0.1171875 |
| 15 | -0.05859375 |
fresh_stage_1_Forward
Sample=8 × ForwardField=6 · float64 · precision 8 · Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0.078125 |
| 2 | -0 |
| 3 | 0.15625 |
| 4 | 0.078125 |
| 5 | 0.15625 |
| 6 | 0 |
| 7 | 0.0390625 |
| 8 | -0 |
| 9 | 0.078125 |
| 10 | 0.0390625 |
| 11 | 0.078125 |
| 12 | 0.078125 |
| 13 | 0 |
| 14 | -0.0390625 |
| 15 | 0 |
| 16 | 0.078125 |
| 17 | -0.0390625 |
| 18 | 0.15625 |
| 19 | 0 |
| 20 | -0.078125 |
| 21 | 0 |
| 22 | 0.15625 |
| 23 | -0.078125 |
| 24 | 0 |
| 25 | 0.05859375 |
| 26 | -0 |
| 27 | 0.1171875 |
| 28 | 0.05859375 |
| 29 | 0.1171875 |
| 30 | 0 |
| 31 | 0.01953125 |
| 32 | -0 |
| 33 | 0.0390625 |
| 34 | 0.01953125 |
| 35 | 0.0390625 |
| 36 | 0.0390625 |
| 37 | 0 |
| 38 | -0.01953125 |
| 39 | 0 |
| 40 | 0.0390625 |
| 41 | -0.01953125 |
| 42 | 0.1171875 |
| 43 | 0 |
| 44 | -0.05859375 |
| 45 | 0 |
| 46 | 0.1171875 |
| 47 | -0.05859375 |
fresh_stage_1_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.5 |
| 1 | 1 |
| 2 | -0.421875 |
| 3 | -0.84375 |
| 4 | 0.177978515625 |
| 5 | 0.7119140625 |
| 6 | 0.0889892578125 |
| 7 | 0.35595703125 |
| 8 | 0.4449462890625 |
| 9 | 0.25 |
| 10 | 0.5 |
| 11 | -0.2109375 |
| 12 | -0.421875 |
| 13 | 0.04449462890625 |
| 14 | 0.177978515625 |
| 15 | 0.022247314453125 |
| 16 | 0.0889892578125 |
| 17 | 0.111236572265625 |
| 18 | 0.5 |
| 19 | -0.25 |
| 20 | -0.421875 |
| 21 | 0.2109375 |
| 22 | 0.177978515625 |
| 23 | 0.04449462890625 |
| 24 | 0.0889892578125 |
| 25 | 0.022247314453125 |
| 26 | 0.111236572265625 |
| 27 | 1 |
| 28 | -0.5 |
| 29 | -0.84375 |
| 30 | 0.421875 |
| 31 | 0.7119140625 |
| 32 | 0.177978515625 |
| 33 | 0.35595703125 |
| 34 | 0.0889892578125 |
| 35 | 0.4449462890625 |
| 36 | 0.375 |
| 37 | 0.75 |
| 38 | -0.31640625 |
| 39 | -0.6328125 |
| 40 | 0.1001129150390625 |
| 41 | 0.40045166015625 |
| 42 | 0.05005645751953125 |
| 43 | 0.200225830078125 |
| 44 | 0.25028228759765625 |
| 45 | 0.125 |
| 46 | 0.25 |
| 47 | -0.10546875 |
| 48 | -0.2109375 |
| 49 | 0.0111236572265625 |
| 50 | 0.04449462890625 |
| 51 | 0.00556182861328125 |
| 52 | 0.022247314453125 |
| 53 | 0.02780914306640625 |
| 54 | 0.25 |
| 55 | -0.125 |
| 56 | -0.2109375 |
| 57 | 0.10546875 |
| 58 | 0.04449462890625 |
| 59 | 0.0111236572265625 |
| 60 | 0.022247314453125 |
| 61 | 0.00556182861328125 |
| 62 | 0.02780914306640625 |
| 63 | 0.75 |
| 64 | -0.375 |
| 65 | -0.6328125 |
| 66 | 0.31640625 |
| 67 | 0.40045166015625 |
| 68 | 0.1001129150390625 |
| 69 | 0.200225830078125 |
| 70 | 0.05005645751953125 |
| 71 | 0.25028228759765625 |
fresh_stage_1_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.4449462890625 |
| 1 | 0 |
| 2 | 0.4449462890625 |
| 3 | 0.111236572265625 |
| 4 | 0.4449462890625 |
| 5 | 0.556182861328125 |
| 6 | 0.111236572265625 |
| 7 | 0.556182861328125 |
| 8 | 0.66741943359375 |
| 9 | 0.4449462890625 |
| 10 | 0.66741943359375 |
| 11 | 1.11236572265625 |
| 12 | 0.25028228759765625 |
| 13 | 0 |
| 14 | 0.25028228759765625 |
| 15 | 0.02780914306640625 |
| 16 | 0.25028228759765625 |
| 17 | 0.2780914306640625 |
| 18 | 0.02780914306640625 |
| 19 | 0.2780914306640625 |
| 20 | 0.30590057373046875 |
| 21 | 0.25028228759765625 |
| 22 | 0.30590057373046875 |
| 23 | 0.556182861328125 |
fresh_stage_1_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.2780914306640625 |
| 1 | 0.13904571533203125 |
fresh_stage_1_GradientRows
Coordinate=4 × TrainSample=4 × GradientRowField=5 · float64 · precision 8 · Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.421875 |
| 1 | 0 |
| 2 | -0 |
| 3 | 0 |
| 4 | 0 |
| 5 | -0.2109375 |
| 6 | 0 |
| 7 | -0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -0.421875 |
| 11 | 0.5 |
| 12 | -0.2109375 |
| 13 | 0 |
| 14 | -0.2109375 |
| 15 | -0.84375 |
| 16 | 1 |
| 17 | -0.84375 |
| 18 | -0.2109375 |
| 19 | -1.0546875 |
| 20 | -0.421875 |
| 21 | 1 |
| 22 | -0.421875 |
| 23 | 0 |
| 24 | -0.421875 |
| 25 | -0.2109375 |
| 26 | 0.5 |
| 27 | -0.10546875 |
| 28 | -0.421875 |
| 29 | -0.52734375 |
| 30 | -0.421875 |
| 31 | 0 |
| 32 | -0 |
| 33 | -0.52734375 |
| 34 | -0.52734375 |
| 35 | -0.84375 |
| 36 | 0 |
| 37 | -0 |
| 38 | -0.52734375 |
| 39 | -0.52734375 |
| 40 | -0.84375 |
| 41 | 0 |
| 42 | -0 |
| 43 | 0 |
| 44 | 0 |
| 45 | -0.421875 |
| 46 | 0 |
| 47 | -0 |
| 48 | 0 |
| 49 | 0 |
| 50 | 0.2109375 |
| 51 | 0.5 |
| 52 | 0.10546875 |
| 53 | 0 |
| 54 | 0.10546875 |
| 55 | 0.421875 |
| 56 | 1 |
| 57 | 0.421875 |
| 58 | 0.10546875 |
| 59 | 0.52734375 |
| 60 | -0.84375 |
| 61 | 1 |
| 62 | -0.84375 |
| 63 | 0 |
| 64 | -0.84375 |
| 65 | -0.421875 |
| 66 | 0.5 |
| 67 | -0.2109375 |
| 68 | -0.84375 |
| 69 | -1.0546875 |
| 70 | 0.2109375 |
| 71 | 0 |
| 72 | 0 |
| 73 | -1.0546875 |
| 74 | -1.0546875 |
| 75 | 0.421875 |
| 76 | 0 |
| 77 | 0 |
| 78 | -1.0546875 |
| 79 | -1.0546875 |
fresh_stage_1_MathematicalGradient
Output=2 × Feature=2 · float64 · precision 8 · All four actual derivatives of the current training objective; the final cohort stage is diagnostic only.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.263671875 |
| 1 | -0.1318359375 |
| 2 | 0.1318359375 |
| 3 | -0.263671875 |
fresh_stage_1_EffectiveGradient
Output=2 × Feature=2 · float64 · precision 8 · Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -0.263671875 |
| 1 | -0.1318359375 |
| 2 | 0.1318359375 |
| 3 | -0.263671875 |
fresh_stage_1_Mask
Output=2 × Feature=2 · int32 · precision 0 · Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 1 |
| 1 | 1 |
| 2 | 1 |
| 3 | 1 |
fresh_stage_1_Stats
StageField=4 · float64 · precision 8 · Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.2780914306640625 |
| 1 | 0.13904571533203125 |
| 2 | 1 |
| 3 | 0 |
fresh_StageMetrics
Stage=2 × Dataset=2 · float64 · precision 8 · Only actual cohort stages zero through its requested update count; training then independently computed validation mean.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.390625 |
| 1 | 0.1953125 |
| 2 | 0.2780914306640625 |
| 3 | 0.13904571533203125 |
fresh_StageWeights
Stage=2 × Coordinate=4 · float64 · precision 8 · Only actual evaluated cohort weights in row-major 00,01,10,11 order; final weights have a real final evaluation.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0.15625 |
| 5 | 0.078125 |
| 6 | -0.078125 |
| 7 | 0.15625 |
memorizer_Dictionary
TrainKey=4 × DictionaryField=3 · float64 · precision 8 · Actual copied training x,adaptTarget0,adaptTarget1; four keys plus eight target values, twelve extra numeric slots.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -1 |
| 1 | 0.5 |
| 2 | 1 |
| 3 | -0.5 |
| 4 | 0.25 |
| 5 | 0.5 |
| 6 | 0.5 |
| 7 | 0.5 |
| 8 | -0.25 |
| 9 | 1 |
| 10 | 1 |
| 11 | -0.5 |
memorizer_Comparisons
Sample=8 × TrainKey=4 × ComparisonField=5 · float64 · precision 8 · Actual x,keyX,equal,oldMatch,match for all 32 comparisons; equal and both match columns are integer VALUE positions in this mixed float table.
| Zero-based storage index | Stored value |
|---|---|
| 0 | -1 |
| 1 | -1 |
| 2 | 1 |
| 3 | -1 |
| 4 | 0 |
| 5 | -1 |
| 6 | -0.5 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | -1 |
| 11 | 0.5 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | -1 |
| 16 | 1 |
| 17 | 0 |
| 18 | 0 |
| 19 | 0 |
| 20 | -0.5 |
| 21 | -1 |
| 22 | 0 |
| 23 | -1 |
| 24 | -1 |
| 25 | -0.5 |
| 26 | -0.5 |
| 27 | 1 |
| 28 | -1 |
| 29 | 1 |
| 30 | -0.5 |
| 31 | 0.5 |
| 32 | 0 |
| 33 | 1 |
| 34 | 1 |
| 35 | -0.5 |
| 36 | 1 |
| 37 | 0 |
| 38 | 1 |
| 39 | 1 |
| 40 | 0.5 |
| 41 | -1 |
| 42 | 0 |
| 43 | -1 |
| 44 | -1 |
| 45 | 0.5 |
| 46 | -0.5 |
| 47 | 0 |
| 48 | -1 |
| 49 | -1 |
| 50 | 0.5 |
| 51 | 0.5 |
| 52 | 1 |
| 53 | -1 |
| 54 | 2 |
| 55 | 0.5 |
| 56 | 1 |
| 57 | 0 |
| 58 | 2 |
| 59 | 2 |
| 60 | 1 |
| 61 | -1 |
| 62 | 0 |
| 63 | -1 |
| 64 | -1 |
| 65 | 1 |
| 66 | -0.5 |
| 67 | 0 |
| 68 | -1 |
| 69 | -1 |
| 70 | 1 |
| 71 | 0.5 |
| 72 | 0 |
| 73 | -1 |
| 74 | -1 |
| 75 | 1 |
| 76 | 1 |
| 77 | 1 |
| 78 | -1 |
| 79 | 3 |
| 80 | -0.75 |
| 81 | -1 |
| 82 | 0 |
| 83 | -1 |
| 84 | -1 |
| 85 | -0.75 |
| 86 | -0.5 |
| 87 | 0 |
| 88 | -1 |
| 89 | -1 |
| 90 | -0.75 |
| 91 | 0.5 |
| 92 | 0 |
| 93 | -1 |
| 94 | -1 |
| 95 | -0.75 |
| 96 | 1 |
| 97 | 0 |
| 98 | -1 |
| 99 | -1 |
| 100 | -0.25 |
| 101 | -1 |
| 102 | 0 |
| 103 | -1 |
| 104 | -1 |
| 105 | -0.25 |
| 106 | -0.5 |
| 107 | 0 |
| 108 | -1 |
| 109 | -1 |
| 110 | -0.25 |
| 111 | 0.5 |
| 112 | 0 |
| 113 | -1 |
| 114 | -1 |
| 115 | -0.25 |
| 116 | 1 |
| 117 | 0 |
| 118 | -1 |
| 119 | -1 |
| 120 | 0.25 |
| 121 | -1 |
| 122 | 0 |
| 123 | -1 |
| 124 | -1 |
| 125 | 0.25 |
| 126 | -0.5 |
| 127 | 0 |
| 128 | -1 |
| 129 | -1 |
| 130 | 0.25 |
| 131 | 0.5 |
| 132 | 0 |
| 133 | -1 |
| 134 | -1 |
| 135 | 0.25 |
| 136 | 1 |
| 137 | 0 |
| 138 | -1 |
| 139 | -1 |
| 140 | 0.75 |
| 141 | -1 |
| 142 | 0 |
| 143 | -1 |
| 144 | -1 |
| 145 | 0.75 |
| 146 | -0.5 |
| 147 | 0 |
| 148 | -1 |
| 149 | -1 |
| 150 | 0.75 |
| 151 | 0.5 |
| 152 | 0 |
| 153 | -1 |
| 154 | -1 |
| 155 | 0.75 |
| 156 | 1 |
| 157 | 0 |
| 158 | -1 |
| 159 | -1 |
memorizer_Selections
Sample=8 × SelectionField=9 · float64 · precision 8 · Actual match,sourceKind,sourceSample,sourceIndex0,sourceIndex1,source0,source1,prediction0,prediction1; first five columns are integer VALUE positions. Source zero indexes target columns at 3*match+1 and 3*match+2 in the flat stored Dictionary:[4,3]; source one indexes 2*sample and 2*sample+1 in the flat saved prepared Predictions:[8,2].
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 1 |
| 4 | 2 |
| 5 | 0.5 |
| 6 | 1 |
| 7 | 0.5 |
| 8 | 1 |
| 9 | 1 |
| 10 | 0 |
| 11 | 1 |
| 12 | 4 |
| 13 | 5 |
| 14 | 0.25 |
| 15 | 0.5 |
| 16 | 0.25 |
| 17 | 0.5 |
| 18 | 2 |
| 19 | 0 |
| 20 | 2 |
| 21 | 7 |
| 22 | 8 |
| 23 | 0.5 |
| 24 | -0.25 |
| 25 | 0.5 |
| 26 | -0.25 |
| 27 | 3 |
| 28 | 0 |
| 29 | 3 |
| 30 | 10 |
| 31 | 11 |
| 32 | 1 |
| 33 | -0.5 |
| 34 | 1 |
| 35 | -0.5 |
| 36 | -1 |
| 37 | 1 |
| 38 | 4 |
| 39 | 8 |
| 40 | 9 |
| 41 | 0 |
| 42 | 0.216064453125 |
| 43 | 0 |
| 44 | 0.216064453125 |
| 45 | -1 |
| 46 | 1 |
| 47 | 5 |
| 48 | 10 |
| 49 | 11 |
| 50 | 0 |
| 51 | 0.072021484375 |
| 52 | 0 |
| 53 | 0.072021484375 |
| 54 | -1 |
| 55 | 1 |
| 56 | 6 |
| 57 | 12 |
| 58 | 13 |
| 59 | 0.072021484375 |
| 60 | 0 |
| 61 | 0.072021484375 |
| 62 | 0 |
| 63 | -1 |
| 64 | 1 |
| 65 | 7 |
| 66 | 14 |
| 67 | 15 |
| 68 | 0.216064453125 |
| 69 | 0 |
| 70 | 0.216064453125 |
| 71 | 0 |
memorizer_Predictions
Sample=8 × Output=2 · float64 · precision 8 · Actual selected two-output values; no new neural forward, gradient or optimizer step.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.5 |
| 1 | 1 |
| 2 | 0.25 |
| 3 | 0.5 |
| 4 | 0.5 |
| 5 | -0.25 |
| 6 | 1 |
| 7 | -0.5 |
| 8 | 0 |
| 9 | 0.216064453125 |
| 10 | 0 |
| 11 | 0.072021484375 |
| 12 | 0.072021484375 |
| 13 | 0 |
| 14 | 0.216064453125 |
| 15 | 0 |
memorizer_Matches
Sample=8 · int32 · precision 0 · Actual first matching training-key index or minus one for every sample; fixed data gives four matches and four misses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | -1 |
| 5 | -1 |
| 6 | -1 |
| 7 | -1 |
memorizer_Loss
Sample=8 × LossField=9 · float64 · precision 8 · Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0.5 |
| 1 | 1 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0.25 |
| 10 | 0.5 |
| 11 | 0 |
| 12 | 0 |
| 13 | 0 |
| 14 | 0 |
| 15 | 0 |
| 16 | 0 |
| 17 | 0 |
| 18 | 0.5 |
| 19 | -0.25 |
| 20 | 0 |
| 21 | 0 |
| 22 | 0 |
| 23 | 0 |
| 24 | 0 |
| 25 | 0 |
| 26 | 0 |
| 27 | 1 |
| 28 | -0.5 |
| 29 | 0 |
| 30 | 0 |
| 31 | 0 |
| 32 | 0 |
| 33 | 0 |
| 34 | 0 |
| 35 | 0 |
| 36 | 0.375 |
| 37 | 0.75 |
| 38 | -0.375 |
| 39 | -0.533935546875 |
| 40 | 0.140625 |
| 41 | 0.2850871682167053 |
| 42 | 0.0703125 |
| 43 | 0.14254358410835266 |
| 44 | 0.21285608410835266 |
| 45 | 0.125 |
| 46 | 0.25 |
| 47 | -0.125 |
| 48 | -0.177978515625 |
| 49 | 0.015625 |
| 50 | 0.03167635202407837 |
| 51 | 0.0078125 |
| 52 | 0.015838176012039185 |
| 53 | 0.023650676012039185 |
| 54 | 0.25 |
| 55 | -0.125 |
| 56 | -0.177978515625 |
| 57 | 0.125 |
| 58 | 0.03167635202407837 |
| 59 | 0.015625 |
| 60 | 0.015838176012039185 |
| 61 | 0.0078125 |
| 62 | 0.023650676012039185 |
| 63 | 0.75 |
| 64 | -0.375 |
| 65 | -0.533935546875 |
| 66 | 0.375 |
| 67 | 0.2850871682167053 |
| 68 | 0.140625 |
| 69 | 0.14254358410835266 |
| 70 | 0.0703125 |
| 71 | 0.21285608410835266 |
memorizer_Reductions
Dataset=2 × DatasetSample=4 × ReductionField=3 · float64 · precision 8 · Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0 |
| 2 | 0 |
| 3 | 0 |
| 4 | 0 |
| 5 | 0 |
| 6 | 0 |
| 7 | 0 |
| 8 | 0 |
| 9 | 0 |
| 10 | 0 |
| 11 | 0 |
| 12 | 0.21285608410835266 |
| 13 | 0 |
| 14 | 0.21285608410835266 |
| 15 | 0.023650676012039185 |
| 16 | 0.21285608410835266 |
| 17 | 0.23650676012039185 |
| 18 | 0.023650676012039185 |
| 19 | 0.23650676012039185 |
| 20 | 0.26015743613243103 |
| 21 | 0.21285608410835266 |
| 22 | 0.26015743613243103 |
| 23 | 0.4730135202407837 |
memorizer_Means
Dataset=2 · float64 · precision 8 · Actual independent training and validation means; each divides its own ordered four-sample sum by floating four.
| Zero-based storage index | Stored value |
|---|---|
| 0 | 0 |
| 1 | 0.11825338006019592 |
Check your understanding
Use the inputs stated in each question. Live questions use the current calculation. Each option pairs a value or conclusion with its mechanism. Editing a raw input, resetting or selecting a trace step clears graded answers; local inspection selectors preserve them.
Exactly five graded questions use the saved calculation. Fixed cases name all four raw inputs; the live question uses the complete current root. Inspection preserves answers; raw edits, reset and trace navigation clear answers. The chapter’s source panels explain the corresponding Python calculation.
Follow the saved experiment
The default case requests two PRE updates, one ADAPT update per comparison group, full ADAPT scope and ADAPT learning rate . PRE always starts from zero, trains all four weights and uses its own fixed rate . Editing a raw input starts the complete calculation again, including PRE; it does not continue from the locally inspected weights. There is no text input in this lab.
| Raw field | Control label | Permitted values | Default |
|---|---|---|---|
preUpdates () | PRE updates from zero (learning rate fixed at 0.5) | Integers 0–3 | 2 |
updates () | ADAPT updates (each of prepared and fresh) | Integers 0–3 | 1 |
scope | ADAPT scope (PRE always trains all four weights) | 0: train W00, W01, W10 and W11; 1: train W00 and W11, freeze old cross weights | 0 |
eta () | ADAPT learning rate η (eta; from 0 to 2) | Any finite number in [0,2] | 0.5 |
The four summary cards report fineTunedValidationLoss, freshValidationLoss, memorizerValidationLoss and trainableAdaptParameters. The first three measure the final ADAPT objective for prepared, fresh and lookup predictions; the fourth counts enabled ADAPT weights. They do not report the locally selected stage. The separate table PRE objective only: every saved stage and weight reports the earlier feature-copy task. Use ADAPT objective: every saved prepared and fresh stage and weight and Whole current root: final ADAPT comparison to compare the new task fairly.
Four further selectors inspect already saved evidence. Cohort (inspection only) starts at option 1, prepared ADAPT; Evaluated stage (inspection only) starts at stage 0, before its first fine step. Sample (inspection only) starts at train0 (); Readout coordinate (inspection only) starts at W00. Cohorts 0, 1 and 2 are PRE, prepared ADAPT and fresh ADAPT. Samples 0–3 train; 4–7 are held out. Coordinate options follow W00, W01, W10, W11. Stage options run from 0 through that cohort’s requested update count, with its last stage marked final diagnostic.
Inspection changes neither raw inputs nor the calculation, trace cursor or graded answers. Each local index is bounded to the new saved domain before any stage or tensor lookup. If stage 3 is selected and you reduce its update count to 0, inspection reads stage 0 immediately. The remembered stage choice may reappear when the larger domain returns. Reset example restores the four raw defaults and trace start; choose prepared cohort and stage 0 explicitly when returning to this walkthrough, because local inspection has its own state.
At the default prepared stage 0, open Selected sample: actual feature construction, forward and loss operands. For train0 it shows the once-computed features, the copied PRE weights, and the new ADAPT error calculation derived below. Then read the four mathematical/effective gradients, the selected coordinate’s four training contributions, and adapt update 1: four proposals from the same old W. Select stage 1 to inspect the evaluated committed result: it has diagnostic gradients and no outgoing proposal table. The lookup tables separately expose all dictionary rows, all eight selections, all 32 comparisons and all eight losses, including source indices and copied operands.
Previous step, Next step and Calculation step navigate the saved operation sequence; this trace selection is independent of local inspection. Matching operations in an open evidence disclosure are marked current. Raw edits, reset and trace navigation clear graded answers. The four inspection selectors preserve answers. Invalid raw drafts show an explicit reason and remove the unavailable results and questions until corrected. A very small positive rate can round a proposed change away; a requested step does not guarantee numerical movement or a strict loss decrease. Positive and negative zero remain visible as different stored words.
Open Inspect all stored values, text metadata and tensor storage for every scalar output, complete text evidence, tensor axes, dtype, display precision and flat storage index. The named table regions can receive keyboard focus and scroll horizontally; the same numbers and operation descriptions are available as text. The five corrective questions appear only inside the lab. Their fixed cases state all four inputs, while the live question reads the entire current calculation independently of inspection.
What we keep and what we change
A sample is one input and its target answer. A feature is a number computed from that input. A readout combines features into outputs. A parameter is a stored model number that an update may replace. A target is the answer against which we compare a prediction; it is not another prediction.
Here the scalar input is . “Scalar” means one number. The feature column is
The symbol names the feature function. ReLU, the rectified linear unit, keeps a positive argument and replaces a negative argument with zero. At , the two arguments are and , so the feature column is . The superscript means transpose: writing the pair across the page and transposing makes it a column. At positive inputs only is nonzero; at negative inputs only is nonzero. Neither feature is adjustable.
| Ingredient | PRE: earlier task | ADAPT: new task |
|---|---|---|
| Inputs and features | Four fixed training inputs and four held-out inputs; fixed | The same inputs and features |
| Targets | Copy the two feature values | Mix them by the explicit rule below |
| Stored parameters | Four readout weights, starting at positive zero | Four weights, copied from final PRE or freshly zeroed |
| Loss form | Sum two output half-squared errors, then average four samples | The same form, against ADAPT targets |
| Updated coordinates | All four | All four, or only the two diagonal coordinates |
| Learning rate | Fixed | Chosen ; default |
The earlier and later objectives have the same formula but different targets. Even at identical weights they are different functions. Compare prepared and fresh starts on the ADAPT objective; comparing a PRE loss with an ADAPT loss would mix the task change into the initialization comparison.
Four weights, two output rows
Let be the weight matrix, and the prediction column. A hat marks a prediction rather than a target:
Indices start at zero. The first index of chooses output row ; the second chooses feature column . Feature index 0 means plus, and index 1 means minus. There is no bias or extra constant term. Each sample requires four products followed by two row sums, including products whose numerical value is zero.
| Quantity | Shape | Axes and meaning |
|---|---|---|
[2,1] | Feature, singleton column | |
[2,2] | Output, Feature | |
| and target | [2,1] | Output, singleton column |
| Stored flat weights | [4] | , row-major order |
| Training feature rows | [4,2] | Sample, Feature; row is |
| Batch predictions | [4,2] | Sample, Output |
“Row-major” means store the first row before the second row. A batch places samples in rows, so its multiplication uses : [4,2] times [2,2] gives [4,2]. This is the transpose of the single-sample calculation, not a silent switch in what the weights mean. A tensor is an array with named axes; the names tell us what each index selects.
Eight authored samples and two actual target rules
These inputs and rules are authored teaching data. They are nonrandom, not observations from a population. Training uses in that order. Validation uses in that order. No validation error enters a gradient.
PRE copies the features: . ADAPT uses the fixed target matrix
specifies the target rule; it is not the adjustable . Construct ADAPT targets by computing , adding it to , computing , then adding it to . Those are two half-scalings and two additions per sample. PRE simply copies two features; it does not need a fictitious identity-matrix computation.
| Split | Input | Positive feature | Negative feature | PRE | PRE | ADAPT | ADAPT |
|---|---|---|---|---|---|---|---|
| Train 0 | −1 | 0 | 1 | 0 | 1 | 1/2 | 1 |
| Train 1 | −1/2 | 0 | 1/2 | 0 | 1/2 | 1/4 | 1/2 |
| Train 2 | 1/2 | 1/2 | 0 | 1/2 | 0 | 1/2 | −1/4 |
| Train 3 | 1 | 1 | 0 | 1 | 0 | 1 | −1/2 |
| Validation 0 | −3/4 | 0 | 3/4 | 0 | 3/4 | 3/8 | 3/4 |
| Validation 1 | −1/4 | 0 | 1/4 | 0 | 1/4 | 1/8 | 1/4 |
| Validation 2 | 1/4 | 1/4 | 0 | 1/4 | 0 | 1/4 | −1/8 |
| Validation 3 | 3/4 | 3/4 | 0 | 3/4 | 0 | 3/4 | −3/8 |
Each numerical data row has seven fields: input, two features, two PRE targets, two ADAPT targets. The split label in this table is explanatory. Features and targets are prepared once for all three training paths. Changing the task chooses target columns; it does not regenerate features or change the held-out inputs.
The loss: sum two outputs, average four samples
Write for the signed error of output on sample . The index selects one of the four samples in the split being evaluated. For one sample, compute each error, each square and each half before adding the outputs:
names a sample loss and a dataset mean. Validation has the identical reduction over its own four losses. This chapter’s two-output half-MSE is the mean over samples of the sum of two output half-losses. We divide by 4, not 8. Averaging eight output coordinates would define a different loss and halve every gradient.
The ordered calculation starts a sum at floating positive zero, adds the four saved sample losses in row order, then divides once by 4. It evaluates all eight samples using the same weights before any replacement. Validation is independently computed from its own predictions, not filled in by halving a training result.
For example, at fresh zero weights on ADAPT, predicts against . Its errors are , squares , halves , and sample loss . At everything scales by half before squaring, giving halves and sample loss . The four training losses are ; running sums are . Their mean is .
Why all four derivatives have an error times a feature
A gradient collects the derivatives of a loss with respect to its parameters. A derivative tells us the local loss change per small parameter change. Gradient descent subtracts a scaled gradient: moving opposite that local slope is the reason for the minus sign. A learning rate sets the scale of that subtraction. Here a full training batch means all four training samples, with no stochastic sample selection.
For one output, the chain rule differentiates half the squared error, then the error, then the prediction. The target and features stay fixed:
Only its own output row depends on a weight. Thus all four chains, including the other output’s zero contribution, are
The computed contractions need only the surviving error-feature products; those extra zero terms explain the calculus, not additional numerical operations. Define . For each coordinate, multiply its four training errors by its feature, accumulate in training order from positive zero, and divide by 4:
The summation symbol means add the terms for the indicated indices. There is no derivative of a validation loss in , and no derivative of ReLU with respect to a learned hidden weight: there is no such learned weight here.
First actually prepare the model: PRE stages 0, 1 and 2
A stage is an evaluated weight state; an update is a transition to a new state. Two updates require three evaluations: before either update, after the first, and after the second. PRE always starts with four positive-zero weights, uses all four coordinates, and has learning rate .
At PRE stage 0 every prediction is zero. For the four training rows, output errors are . Applying the four chains gives these ordered products:
| Coordinate | Four error-feature products | Running sums | Divide last sum by 4 |
|---|---|---|---|
| 00 | |||
| 01 | |||
| 10 | |||
| 11 |
The tables use rational zero; signed floating zero is discussed below. Subtracting half the gradient produces
At stage 1, has four forward products in coordinate order 00,01,10,11. Row sums give ; subtracting gives . The squares are , the halves , and the sample loss is . At magnitude the active error is , its square , and its half . The positive inputs exchange which output carries that error.
The second update must use stage 1 errors. Its diagonal products and sums are
Their four running sums are respectively and . Both off-diagonal product lists and sums are zero. Therefore each diagonal becomes
is the two-by-two identity matrix: diagonal entries 1 and off-diagonal entries 0. The final PRE error magnitude per unit input is . Its square is . We evaluate this final state and its gradient; that diagnostic does not cause a third pretraining update.
| PRE stage | Diagonal weights | Training mean | Validation mean | Each diagonal gradient |
|---|---|---|---|---|
| 0 | 0 | |||
| 1 | ||||
| 2 |
These fractions are hand-derived consequences of the updates, not weights or losses to insert as canned program inputs. For a third allowed PRE update, the same subtraction gives diagonal .
Complete sample arithmetic without hiding the repeated rows
A shared calculation lets us inspect every sample at each default state. In this paragraph is a diagonal weight, the upper-right weight, and the lower-left weight is in real arithmetic. Write for PRE or for ADAPT, for the diagonal shortfall and for the cross-output shortfall. The input magnitude is , a nonnegative number.
At a negative input, features are . The four forward products are ; row sums give . Targets are ; errors are ; squares are ; halves are . At a positive input the products are , predictions , targets , errors , and the two square/half columns exchange places.
Define , the sum of the two squared shortfalls, and , the loss at magnitude . These symbols only abbreviate the hand table. The actual loss computation still forms both squares and halves before summing.
| State | Diagonal weight | Cross weight | Diagonal shortfall | Cross shortfall | Squared diagonal shortfall | Squared cross shortfall | Squared-shortfall sum |
|---|---|---|---|---|---|---|---|
| PRE 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 |
| PRE 1 | 0 | 0 | 0 | ||||
| PRE 2 | 0 | 0 | 0 | ||||
| Prepared ADAPT 0 | 0 | ||||||
| Prepared ADAPT 1, full | |||||||
| Fresh ADAPT 0 | 0 | 0 | 1 | 1 | |||
| Fresh ADAPT 1, full |
Use each row above in the following eight-row table. It explicitly gives the squared magnitudes, halves, losses and running sums for both splits; “negative” and “positive” select the error ordering just derived. This supplies all samples at PRE 1/PRE 2 and at both ADAPT starts and first full fine steps.
| Sample | Side | Input magnitude | Squared magnitude | Half-square pair | Sample loss | Split running loss sum |
|---|---|---|---|---|---|---|
| Train 0 | Negative | 1 | 1 | |||
| Train 1 | Negative | |||||
| Train 2 | Positive | |||||
| Train 3 | Positive | 1 | 1 | |||
| Validation 0 | Negative | |||||
| Validation 1 | Negative | |||||
| Validation 2 | Positive | |||||
| Validation 3 | Positive |
Divide each split’s final running sum by 4: training mean and validation mean . For example, PRE 1 uses ; PRE 2 uses . Prepared ADAPT 0 uses and prepared ADAPT 1 uses . Fresh ADAPT 0 uses and fresh ADAPT 1 uses . Every fraction in the state-loss tables follows from these individual losses and ordered sums.
The same values also specify every intermediate gradient contraction at these states, including the final diagnostics. Each list below uses only the four training rows. Substitute a state row’s ; for example PRE 2 uses , whereas prepared ADAPT 0 uses . This table is real-arithmetic shorthand; the numerical calculation retains each signed-zero product as well.
| Coordinate | Four error-feature products | Four running sums from positive zero | Final sum /4 |
|---|---|---|---|
| 00 | |||
| 01 | |||
| 10 | |||
| 11 |
Change the task; compare two honest starts
The prepared ADAPT path starts from an exact separate copy of the final PRE weights. Fine-tuning must not mutate that saved PRE state. The fresh ADAPT path starts from four positive-zero weights. Both paths use the same ADAPT labels, learning rate and parameter mask. They are two separately computed training paths, not an earlier and later stage of one path.
At the default prepared start, still predicts but now targets . Its errors are , not the PRE errors. Their squares are , halves , and sum .
| Sample input | Prediction | Error |
|---|---|---|
| −1 | ||
| −1/2 | ||
| 1/2 | ||
| 1 | ||
| −3/4 | ||
| −1/4 | ||
| 1/4 | ||
| 3/4 |
For the default prepared start, the four complete training gradient contractions are
| Coordinate | Four products in train order | Four running sums | Gradient after /4 |
|---|---|---|---|
| 00 | |||
| 01 | |||
| 10 | |||
| 11 |
For the fresh start substitute diagonal shortfall 1 for : the 00 products become and the 11 products , with the PRE-0 running sums already shown. The 01 and 10 lists stay exactly as in this table. Thus fresh ADAPT’s initial gradient is , in row-major order.
One fine step: old weights first, simultaneous replacement
An optimizer is the rule that turns a gradient and settings into replacement parameters. We use the SGD (stochastic gradient descent) update rule, but here each step uses the whole fixed four-sample batch, with no random sampling. Thus the example’s parameter updates are deterministic.
A mask is a four-entry list telling us which coordinates may change. Full adaptation uses . Diagonal adaptation uses . “Diagonal” means positions 00 and 11. The mask applies to both ADAPT paths; PRE always enables all four.
For each coordinate let be its 0-or-1 mask value. Distinguish the mathematical gradient , the effective gradient , the subtracted change , a proposed weight and the committed new weight :
All four gradients come from the same old matrix. Calculate all four proposals before publishing any new coordinate. Using an already updated row to calculate another derivative would implement a different algorithm. Even frozen coordinates retain their mathematical gradient and proposal arithmetic. Freezing means copying the old stored value, including its sign if it is zero; it does not mean replacing a nonzero value with zero.
At default , full prepared adaptation gives:
| Coordinate | Old | Mathematical = effective gradient | Update amount | Proposal = committed new weight |
|---|---|---|---|---|
| 00 | ||||
| 01 | 0 | |||
| 10 | 0 | |||
| 11 |
Fresh full adaptation subtracts from four zeros, yielding
For a concrete prepared fine1 forward at , products are and predictions . Errors are ; squares ; halves . Aligning the half denominators gives sample loss . At , prediction is ; errors are and the half columns exchange. All remaining magnitudes use the eight-row arithmetic table.
For fresh fine1 at , prediction is ; errors ; squares ; halves ; sample loss . Scaling by , or before squaring supplies its other samples.
The final fine1 gradient is still computed. The same four product chains with prepared give row-major . Fresh fine1 gives . These are diagnostics, not instructions for an unrequested second fine step.
| ADAPT path and stage | Training mean | Validation mean |
|---|---|---|
| Prepared initial, before fine-tuning | ||
| Fresh initial, before fine-tuning | ||
| Prepared full fine1 | ||
| Fresh full fine1 | ||
| Prepared diagonal-only fine1 | ||
| Fresh diagonal-only fine1 |
For diagonal-only adaptation, both diagonals take the same steps as above. Cross-coordinate mathematical gradients are still initially, but effective gradients and default deltas are positive zero; proposals are old minus zero, and commits copy the old zero words. Prepared fine1 then has . Its is . Fresh diagonal fine1 has , so . The sample table and its /4 reductions produce the two diagonal-only means above. The unchanged cross shortfall explains the remaining error; the loss did not become insensitive to those weights merely because we froze them.
This particular earlier task prepares both diagonal coefficients in a direction useful for this particular later task. Both paths spend the same number of fine updates; only the prepared path spends the additional PRE updates. Lower final prepared loss is evidence about these target rules and this budget, not a universal benefit or a fair claim of lower total compute.
Zero counts and zero learning rates have different meanings
The four raw inputs, in order, are preUpdates, updates, scope, eta. Their default values are 2, 1, 0, 0.5. The first two are integer update counts from 0 through 3; scope 0 means all four ADAPT coordinates and scope 1 means the two diagonals. Eta is a finite ADAPT learning rate from 0 through 2. PRE’s learning rate remains .
With preUpdates=0, PRE stage 0 is evaluated but no pretraining happens. Prepared and fresh then start numerically alike; calling that case “benefit from pretraining” would be false. With updates=0, each ADAPT path evaluates its initial state and gradient but makes no fine transition. With eta=0 and positive updates, all requested transitions, proposals, commits and subsequent evaluations still occur, though weight magnitudes do not move. Both +0 and -0 rates follow the actual multiplication/subtraction schedule; enabled zero signs can depend on those operations, while frozen entries copy their exact old words. Eta must be valid even when updates=0.
A subnormal is a representable nonzero floating-point number very close to zero, below the normal exponent range. A positive subnormal eta can be valid yet produce changes that underflow to zero or round away when subtracted from an old weight. The same can happen to some changes at larger rates when the change is small relative to the old number. Read the saved deltas, proposals and losses rather than treating a positive rate or a nonzero update count as proof of progress. A numerically unchanged final matrix does not remove the intervening operations from the record.
Invalid counts, invalid scope and out-of-range finite eta are invalid inputs, rather than requests to clamp to a nearby case. The object must supply exactly the four own data fields; accessors, extra fields and missing fields are rejected. Their descriptors are all captured before their values are consumed. All four values must then be actual finite numbers before any numerical-domain test: a later nonfinite eta takes precedence over an earlier finite out-of-range count. Booleans and numeric strings are not numbers at this boundary. A zero count does not excuse an invalid unused value. Only local inspection indices are bounded to available saved evidence; raw model inputs are never silently clamped.
Count work without calling it a speed measurement
Let be preUpdates and be updates. The three paths evaluate network states and perform optimizer transitions. Each evaluated state computes all eight two-output forwards and four training gradient contractions. Each transition retains four coordinate proposals, even when two coordinates are frozen.
At the default , that means seven state evaluations, four optimizer transitions, 56 sample forwards, seven gradient batches and 16 coordinate proposals. The three final evaluations have diagnostic gradients but no outgoing update. The full-mask case commits 16 enabled-coordinate updates; diagonal scope commits 8 PRE coordinates plus 4 ADAPT coordinates, for 12. There are always four stored weights per path; “two trainable” does not mean two stored.
Each state uses 32 forward multiplications and 16 row additions; 16 error subtractions, 16 squares, 16 divisions by 2 and eight sample-loss additions; eight loss-accumulator additions and two mean divisions; and 16 gradient products, 16 gradient-accumulator additions and four gradient divisions. Each transition uses four eta multiplications and four proposal subtractions before conditional commits. Feature preparation occurs once for eight samples, not once per stage. These are arithmetic counts, not elapsed time, memory bytes, energy, processor instructions or a performance benchmark. Displaying a final diagnostic does not authorize counting an additional training step.
In the stored counters, gradientRowContributions counts the four training rows per gradient batch, so it is for saved network states. gradientProducts counts their reuse across four coordinates, so it is . At the default these are 28 training-row uses and 112 error-feature multiplications, respectively. Dictionary losses add eight loss evaluations and two means, but no gradient rows, gradient products or neural forwards.
How the complete saved record is organized
The defined result has five fields in order: status, outputs, steps, tensors, texts. Each operation step contains id, label, equation, explanation, inputs, outputs; each tensor contains id, shape, axes, dtype, values, provenance, precision. An unavailable result instead has status, code, reason. There is no extra hidden evaluation field in the public result.
The numerical evaluation helper’s TransferEvaluation has eight fields: weights, predictions, trainHalfMSE, validationHalfMSE, mathematicalGradient, effectiveGradient, mask, tensors. Its ten evaluation tensors supply the detailed arithmetic; they are not ten extra scalar return fields. The wrapper adds stage boundaries, trajectories and the whole-experiment comparisons.
There are 76 scalar summaries, beginning with the four visible cards, followed by one alias for every operation output, in operation order. An alias is the step ID, an underscore and its output name; for example adapt_stage_0_gradient_0_mathematical copies that saved gradient. Inputs do not receive these aliases. Copied initialization weights and masks, stage statistics and final metrics retain their actual source operands in the corresponding step inputs. The copies are evidence, not another training step.
Let and . Counting the source’s actual groups gives operation frames, tensors and scalar outputs including all aliases. At default , this is 228 frames, 100 tensors and 1,600 outputs. At , , it is 373 frames, 160 tensors and 2,470 outputs. Every defined case has 35 text entries. These are manual source inventories, not measured run results; the saved inspector exposes the computed record when the lab is used.
A dictionary gets training perfect and transfers nothing here
Now construct a different predictor. Store the four training inputs as exact keys and their two ADAPT targets as values. On an exact key match, copy its stored target pair. On a miss, copy the same sample’s saved final PRE prediction, before adaptation. The fallback therefore remains unadapted even if the separate fine-tuning paths have taken more steps.
For each of the eight inputs compare all four keys, in order, including after finding a match. Select the first matching index, or if none matches. Our fixed keys are distinct; the first-match rule also makes the selection policy explicit. In the following table T/F means the result of each equality comparison, not a probability.
| Input | Compare −1 | Compare −1/2 | Compare 1/2 | Compare 1 | Match index | Selected prediction at default PRE 2 |
|---|---|---|---|---|---|---|
| −1 | T | F | F | F | 0 | Stored target |
| −1/2 | F | T | F | F | 1 | Stored target |
| 1/2 | F | F | T | F | 2 | Stored target |
| 1 | F | F | F | T | 3 | Stored target |
| −3/4 | F | F | F | F | −1 | Saved PRE prediction |
| −1/4 | F | F | F | F | −1 | Saved PRE prediction |
| 1/4 | F | F | F | F | −1 | Saved PRE prediction |
| 3/4 | F | F | F | F | −1 | Saved PRE prediction |
That is 32 key comparisons, eight pair selections, four matches and four misses. The dictionary adds four numeric keys and eight target scalars: 12 extra numeric slots, alongside the four already retained prepared weights. This is not a byte count. There is no new neural forward, gradient or SGD step in this lookup procedure. Copying a saved prediction does not run the model again.
The source indices refer to the arrays actually stored. A dictionary row is [x,adaptTarget0,adaptTarget1], with three fields. For matching training-key index , its two targets occupy flat indices and ; using would address different fields. The saved PRE prediction array has two fields per sample, so a miss for sample copies and . sourceKind=0 selects the dictionary and sourceKind=1 the same-sample saved PRE pair; sourceSample identifies or , respectively. All eight computed fields—source kind, source sample, both indices, both source values and both prediction copies—are selection outputs. Matched-target input operands exist only on hits. A miss has no invented zero target pair. If coherent duplicate keys are supplied to the reusable helper, all four comparisons still occur and the first match wins.
Compute losses from the selected predictions. On training inputs both errors are target minus the identical target: their squares, halves and sum are zero, so all four running loss sums and the final training mean are zero. For validation, the errors are exactly the four saved prepared-initial ADAPT errors shown earlier. With , their losses are , running sums , and mean .
The dictionary therefore has zero training loss while retaining the unadapted prepared validation loss. The full fine-tuned prepared network has nonzero training loss and a lower validation loss. This counterexample disproves the inference “perfect training fit guarantees improvement on held-out inputs.” It does not prove every memorizer behaves alike, nor that our finite validation set detects every possible kind of memorization. The dictionary is explicitly constructed from training answers, not described as a network trained by SGD.
Why these held-out results are unusually easy to predict
A feature ray here is one nonnegative feature direction with varying magnitude. All positive inputs lie on ; all negative inputs lie on . The validation grid merely chooses different on those same two rays. It contains no new feature direction and tests no new nonlinear rule.
On each training ray, the sum of squared magnitudes is . On each validation ray it is , exactly half as much. Since every fixed-weight prediction and both target rules scale linearly with , every squared error scales with . Both splits divide by four. Consequently, for any fixed on either of these homogeneous target tasks,
This relation is a property of the authored geometry, not evidence that validation examples improved the weights. It need not hold for the dictionary: its key-dependent selection changes the prediction rule between training matches and validation misses. It also should not be imposed as a floating-point assignment; independently ordered rounded computations for arbitrary eta can differ slightly from an exact half relation.
These four held-out inputs check behavior between selected magnitudes on known rays. They do not constitute a sampled test population, independent test set, uncertainty estimate, safety evaluation or evidence about production language-model cognition. Reusing them to choose settings would also make them part of model selection, as explained in III-04 — Training, Validation, Testing and Generalization and III-35 — Cross-Validation and Hyperparameter Tuning. No universal transfer, generalization, alignment or safety claim follows.
Optional matrix explanation of the loss and update
The Gram matrix averages feature outer products. An outer product is a two-by-two matrix with entry . Because one feature is zero in every sample, off-diagonal entries vanish. The two training diagonal entries are , so ; validation gives .
Let mean the target matrix, either for PRE or for ADAPT, and the residual matrix. The squared Frobenius norm means the sum of the squares of its four entries. Then
This matrix shorthand checks the four explicit chains; it does not replace their actual ordered reductions. With learning rate , each enabled coordinate’s residual is multiplied in real arithmetic by . A frozen coordinate’s residual stays unchanged. At the fixed PRE rate , the factor is , and after PRE steps the diagonal is . Here counts completed PRE updates and names that diagonal value. It explains , and .
For ADAPT from a PRE diagonal , the initial shortfalls are . A full fine step at multiplies both by ; a diagonal-only step multiplies only . This yields the loss comparisons above. These recurrences describe this particular quadratic objective; changing features, labels or loss changes the derivation.
Optional numerical limits: rational equality and signed floating words
A binary64 floating-point number has a 53-bit significant precision. A dyadic fraction has a power-of-two denominator; sufficiently small dyadic operations can be exact in binary64, but being dyadic alone is not enough. Ordered sums, representable endpoints and numerator widths matter. Rational zero also forgets a distinction binary64 retains: positive and negative zero have different stored words.
For example, prepared ADAPT’s negative output-0 errors multiplied by the inactive positive feature produce negative zero in the first two 00 gradient products. Accumulation starts at positive zero; later nonzero terms give the negative gradient already derived. In PRE, off-diagonal gradient sums end at positive zero under round-to-nearest-even, although some individual products can be negative zero. The hand tables display rational zeros and do not claim every displayed zero has the same word. Frozen weights and all saved copies must retain their actual words. Eta negative zero must also survive input capture; it is not permission to cancel requested transitions.
A prior, narrowly scoped central-difference derivation uses , perturbing a weight while keeping features and targets fixed. The central difference is , where is a matrix with 1 only at that coordinate. The derivative comparison covers only eta positive , PRE stages 0 through , and prepared/fresh ADAPT stages 0 through , for enabled coordinates. PRE enables all four. This is a mathematical scope, not a report that any check ran.
For PRE old stage , the parameter grid exponent is . For the first prepared ADAPT transition it is ; for the fresh transition it is , not 0. Quarter-valued training targets require that extra bit. Fresh fine1 therefore needs a grid, and the prepared next grid is , at worst . The largest selected weight is , below .
On that scope the corrected prior proof bounds endpoint errors on the grid with magnitude below 2, square numerators below , ordered two-output/four-sample loss numerators below and endpoint-mean difference numerators below . The endpoints are distinct, and the quadratic’s exact central difference has zero truncation residual. Applying this argument to a source record still requires the complete central record, actual shared data, endpoint helper returns and ordered primitive identities, plus a separate signed-word argument. It is not a shortcut to verifying only final scalar losses.
No exact finite-difference or zero-rounding claim is extended to arbitrary eta or ADAPT stages 2 and 3. Those cases need their full independent primitive-rounding evidence. No numerical check, Python execution, runtime comparison or browser validation is claimed by this manuscript.
Read the complete saved tensor shapes
The tables below name every tensor family in the actual calculation. A shape lists axis lengths in the same order as the axis names. Values are flat, with the last axis changing fastest. E means a saved evaluation prefix such as adapt_stage_0; C means pre, adapt or fresh; Q means an actual update prefix such as adapt_update_1. For a cohort, is its own number of evaluated stages: for PRE or for either ADAPT path.
| Tensor ID or family | Shape | Named axes, in order | Stored meaning |
|---|---|---|---|
Data | [8,7] | Sample, DataField | x, phiPlus, phiMinus, preTarget0, preTarget1, adaptTarget0, adaptTarget1; training first |
AdaptMask | [2,2] | Output, Feature | Actual scope-selected ADAPT mask |
C_InitialWeights | [2,2] | Output, Feature | Four exact copied starting weights |
E_Stats | [4] | StageField | trainHalfMSE, validationHalfMSE, diagnosticOnly, hasNextUpdate |
C_StageMetrics | [N,2] | Stage, Dataset | Every actual stage’s training and validation mean |
C_StageWeights | [N,4] | Stage, Coordinate | Every actual stage’s W00, W01, W10, W11 |
Q_Update | [4,7] | Coordinate, UpdateField | old, mathematical, effective, enabled, delta, proposed, committed; only where an update exists |
Each evaluation supplies these ten tensors, in the listed order. The shared loss families also appear in the memorizer, whose predictions come from selection rather than a forward calculation.
| Evaluation tensor | Shape | Named axes, in order | Field or coordinate order |
|---|---|---|---|
E_Weights | [2,2] | Output, Feature | W00, W01, W10, W11 |
E_Predictions | [8,2] | Sample, Output | Output 0, output 1 for each sample |
E_Forward | [8,6] | Sample, ForwardField | product00, product01, product10, product11, prediction0, prediction1 |
E_Loss | [8,9] | Sample, LossField | target0, target1, error0, error1, square0, square1, half0, half1, sampleLoss |
E_Reductions | [2,4,3] | Dataset, DatasetSample, ReductionField | Training then validation; loss, oldSum, sum for each row |
E_Means | [2] | Dataset | Training mean, validation mean |
E_GradientRows | [4,4,5] | Coordinate, TrainSample, GradientRowField | error, feature, contribution, oldSum, sum; coordinate-major, then training-row order |
E_MathematicalGradient | [2,2] | Output, Feature | All four mathematical derivatives in W order |
E_EffectiveGradient | [2,2] | Output, Feature | Mathematical value if enabled; positive zero otherwise |
E_Mask | [2,2] | Output, Feature | Four numeric zero-or-one selectors |
| Memorizer tensor | Shape | Named axes, in order | Field order |
|---|---|---|---|
memorizer_Dictionary | [4,3] | TrainKey, DictionaryField | x, adaptTarget0, adaptTarget1 |
memorizer_Comparisons | [8,4,5] | Sample, TrainKey, ComparisonField | x, keyX, equal, oldMatch, match |
memorizer_Selections | [8,9] | Sample, SelectionField | match, sourceKind, sourceSample, sourceIndex0, sourceIndex1, source0, source1, prediction0, prediction1 |
memorizer_Predictions | [8,2] | Sample, Output | The two actually selected prediction copies |
memorizer_Matches | [8] | Sample | First matching key index or −1 |
memorizer_Loss | [8,9] | Sample, LossField | Same nine loss fields as the evaluation table, on ADAPT targets |
memorizer_Reductions | [2,4,3] | Dataset, DatasetSample, ReductionField | Training then validation; loss, oldSum, sum |
memorizer_Means | [2] | Dataset | Independently computed training and validation means |
AdaptMask, each evaluation’s Mask, and memorizer Matches use int32 with display precision 0. Every other tensor uses float64 with display precision 8. Precision describes presentation; it does not round the stored values. Integer positions within mixed float tables still denote decisions or indices: Update column 3 (enabled), Stats positions 2–3, Comparisons columns 2–4, and Selections columns 0–4, all counted from zero. They are not measured floating quantities. Arithmetic values, source copies, products, accumulators and frozen weights retain their binary64 words, including negative zero. Raw P/U/scope are discrete integer values; eta is a floating word.
Tensor order starts with Data and AdaptMask, then visits PRE, prepared ADAPT and fresh ADAPT. For each cohort it stores InitialWeights; at each stage it stores the ten evaluation tensors, Stats and an Update only if another stage follows; its two trajectory tensors come last. The eight memorizer tensors follow all three cohorts. The largest single tensor is Comparisons, with 160 cells; many separate tensors do not form one oversized tensor. The inspector’s provenance states where every family came from.
Python from the same ordered operations
The following panels display both complete actual reference files, helper first and wrapper second. They are imported as source text from the repository, including comments and explicit checks. The two adjacent files form the project-source closure; Python’s standard library and NumPy are their dependencies. They import no earlier chapter mechanism or independent mathematical authority. Displaying source does not establish Python execution, self-check, cross-language comparison or rendered-page validation results.
First, storage and scalar mechanisms: transfer_reference.py
Start at raw_state. It captures exactly four dictionary entries, rejects booleans and nonfinite values before testing any field’s domain, then normalizes count/selectors to integers and eta to a float. A huge finite Python integer is tested against its domain before any float conversion can overflow. DEFAULT_IV55 is a read-only mapping with P=2, U=1, scope=0, eta=0.5; callers request a detached default using dict(DEFAULT_IV55).
fixed_data() creates NumPy float64 storage for the eight inputs and eight-by-seven data. Its scalar loop computes negative x, the two max selections, PRE copies and the two scaled/additive ADAPT targets, retaining each construction operand. _evaluate stores W as two output rows and two feature columns. It explicitly multiplies all four weight-feature pairs before either output sum for each sample. NumPy supplies storage; no BLAS contraction, dot product, matrix multiplication operator or NumPy reduction silently changes the arithmetic schedule.
Next, _losses forms both errors, both squares, both halves and their sample sum. _mean starts at floating positive zero and saves the old sum and new sum at each of four additions before dividing by 4. _evaluate then contracts each coordinate’s four training error-feature products, retaining old sums, new sums and the final division. Only after all mathematical derivatives does it select each effective derivative. evaluate_transfer is the guarded reusable entry point; its richer internal evidence is later serialized into the public step/tensor record.
_sgd first builds four proposals from the saved old weights, then publishes the conditional commits. transfer_sgd checks dense arrays, finite values, mask/eta domains and exact effective-gradient word consistency. A disabled entry requires effective positive zero and keeps its old word even if old is nonzero or negative zero. _memorize scans all four keys per input, retains the first match, uses the physical three-field dictionary indices or the two-field saved-prediction indices, and calls the same loss routine on the selected pairs. memorize_transfer guards that entry point. These helpers accept structurally valid finite ambient arrays; they do not certify that caller-supplied features, targets or gradients came from this experiment.
Finally, _cohort evaluates stages 0 through the requested count and performs a transition only when another stage follows. mechanics_experiment(value) builds PRE at fixed 0.5, copies its actual final weights for prepared ADAPT, runs fresh ADAPT from positive zero with the same new task/settings, and supplies saved final-PRE predictions to the lookup. Its detached internal evidence is mutable Python data; changing a returned copy cannot change another saved copy. This evidence packet is not the public result.
Read the complete executable Python / NumPy source
This is the actual reference file, imported directly from the repository. Comments explain each operation. It is provided for later execution; no validation run is claimed.
"""IV55 canonical scalar mechanisms — SOURCE ONLY, ALL EXECUTION UNRUN.
The independent numerical FIRST is retained; the owner-adopted public inventory
is bound by adjacent iv55.py. NumPy stores arrays; Python float primitives do
all arithmetic in declared order, without BLAS, reductions or implicit checks.
"""
from copy import deepcopy
import math
import struct
import sys
from types import MappingProxyType
import numpy as np
RAW_KEYS = ("preUpdates", "updates", "scope", "eta")
DEFAULT_IV55 = MappingProxyType(dict(preUpdates=2, updates=1, scope=0, eta=0.5))
class NumericalFault(ValueError):
"""Only known input/numerical faults become public unavailable records."""
def __init__(self, code, reason):
super().__init__(reason)
self.code = code
def _number(value, label):
# Arbitrary-size ints are finite; inspect domains before converting to float.
if type(value) not in (int, float) or (type(value) is float and not math.isfinite(value)):
raise NumericalFault("NONFINITE", f"{label} must be an actual finite number.")
return value
def _finite(value, label):
if not math.isfinite(value):
raise NumericalFault("NONFINITE", f"{label} must be finite.")
return value
def raw_state(value):
"""Capture exact dict data, check ALL finite types, then policy domains."""
if type(value) is not dict:
raise NumericalFault("INVALID_INPUT", "state must be a plain object.")
if len(value) != 4 or any(type(key) is not str for key in value) or set(value) != set(RAW_KEYS):
raise NumericalFault("INVALID_INPUT", "state must have exactly preUpdates, updates, scope, eta as own fields.")
saved = {key: value[key] for key in RAW_KEYS}
for key in RAW_KEYS:
_number(saved[key], key)
for key in RAW_KEYS[:2]:
if not 0 <= saved[key] <= 3 or int(saved[key]) != saved[key]:
raise NumericalFault("INVALID_INPUT", f"{key} must be an integer from 0 to 3.")
if saved["scope"] not in (0, 1):
raise NumericalFault("INVALID_INPUT", "scope must be numeric 0 or 1.")
if not 0.0 <= saved["eta"] <= 2.0:
raise NumericalFault("INVALID_INPUT", "eta must be between 0 and 2.")
return dict(preUpdates=int(saved["preUpdates"]), updates=int(saved["updates"]),
scope=int(saved["scope"]), eta=float(saved["eta"]))
def _vector(value, size, label):
"""Capture every shape before any number or domain consumption."""
if type(value) is not list:
raise NumericalFault("INVALID_INPUT", f"{label} must be a dense ordinary array.")
if len(value) != size:
raise NumericalFault("SHAPE_MISMATCH", f"{label} requires exactly {size} entries.")
return value[:]
def _data(value):
return [_vector(row, 7, f"data[{i}]") for i, row in enumerate(_vector(value, 8, "data"))]
def _numbers(groups):
for label, values in groups:
for i, value in enumerate(values):
_number(value, f"{label}[{i}]")
def _binary64(groups):
for label, values in groups:
for value in values:
if not -sys.float_info.max <= value <= sys.float_info.max:
raise NumericalFault("NONFINITE", f"{label} requires representable finite binary64 values.")
return [[float(value) for value in values] for _, values in groups]
def _mask(values):
for i, value in enumerate(values):
if value not in (0, 1):
raise NumericalFault("INVALID_INPUT", f"mask[{i}] must be numeric 0 or 1.")
return [int(value) for value in values]
def _word(value):
return struct.pack(">d", value)
def fixed_data():
"""Prepare the fixed features and both target pairs once, before cohorts."""
xs = np.array([-1.0, -0.5, 0.5, 1.0, -0.75, -0.25, 0.25, 0.75], dtype=np.float64)
matrix = np.empty((8, 7), dtype=np.float64)
construction = []
for i in range(8):
x = float(xs[i])
negative = _finite(-x, "negated x")
plus, minus = max(0.0, x), max(0.0, negative)
scaled_minus = _finite(0.5 * minus, "scaled negative feature")
adapt0 = _finite(plus + scaled_minus, "adaptation target 0")
scaled_plus = _finite(-0.5 * plus, "scaled positive feature")
adapt1 = _finite(scaled_plus + minus, "adaptation target 1")
matrix[i] = [x, plus, minus, plus, minus, adapt0, adapt1]
construction.append(dict(x=x, negativeX=negative, zero=0.0,
phiPlus=plus, phiMinus=minus, preTarget0=plus,
preTarget1=minus, positiveScale=0.5, negativeScale=-0.5,
scaledMinus=scaled_minus, adaptTarget0=adapt0,
scaledPlus=scaled_plus, adaptTarget1=adapt1))
return dict(data=matrix.tolist(), construction=construction)
def _mean(values):
total, additions = 0.0, []
for i, value in enumerate(values):
old = total
total = _finite(old + value, "dataset loss sum")
additions.append(dict(index=i, old=old, value=value, total=total))
mean = _finite(total / 4.0, "dataset mean")
return dict(initialSum=0.0, additions=additions, sum=total, divisor=4.0, mean=mean)
def _losses(predictions, data, task):
rows = []
target_start = 3 if task == 0 else 5
for i in range(8):
p0, p1 = predictions[2 * i:2 * i + 2]
t0, t1 = data[i][target_start:target_start + 2]
e0 = _finite(p0 - t0, "output 0 error")
e1 = _finite(p1 - t1, "output 1 error")
s0 = _finite(e0 * e0, "output 0 square")
s1 = _finite(e1 * e1, "output 1 square")
h0 = _finite(s0 / 2.0, "output 0 half-loss")
h1 = _finite(s1 / 2.0, "output 1 half-loss")
sample_loss = _finite(h0 + h1, "sample loss")
components = [dict(prediction=p0, target=t0, error=e0, square=s0, divisor=2.0, half=h0),
dict(prediction=p1, target=t1, error=e1, square=s1, divisor=2.0, half=h1)]
rows.append(dict(components=components, sampleLoss=sample_loss))
# Both datasets independently reduce four SAVED sums of two output halves.
train = _mean([rows[i]["sampleLoss"] for i in range(4)])
validation = _mean([rows[i]["sampleLoss"] for i in range(4, 8)])
return dict(rows=rows, train=train, validation=validation)
def _evaluate(weights, data, task, mask):
"""Scalar W:[2,2] times phi:[2,1]; batch storage uses explicit row samples."""
stored = np.array(weights, dtype=np.float64).reshape((2, 2))
features = np.array([[row[1], row[2]] for row in data], dtype=np.float64)
predictions, forwards = [], []
for i in range(8):
products = []
for o in range(2):
for feature in range(2):
left, right = float(stored[o, feature]), float(features[i, feature])
product = _finite(left * right, f"forward product {o}{feature}")
products.append(dict(weight=left, feature=right, product=product))
# All four products precede the two sums, just as in the adopted source.
prediction0 = _finite(products[0]["product"] + products[1]["product"], "prediction 0")
prediction1 = _finite(products[2]["product"] + products[3]["product"], "prediction 1")
values = [prediction0, prediction1]
predictions.extend(values)
forwards.append(dict(products=products, predictions=values))
losses = _losses(predictions, data, task)
mathematical, effective, gradients = [], [], []
for o in range(2):
for feature in range(2):
total, contributions = 0.0, []
for i in range(4):
error = losses["rows"][i]["components"][o]["error"]
phi = float(features[i, feature])
product = _finite(error * phi, "gradient contribution")
old = total
total = _finite(old + product, "gradient sum")
contributions.append(dict(sample=i, error=error, feature=phi, product=product,
old=old, total=total))
gradient = _finite(total / 4.0, "mathematical gradient")
mathematical.append(gradient)
gradients.append(dict(initialSum=0.0, contributions=contributions,
sum=total, divisor=4.0, mathematical=gradient))
# Mathematical contractions complete before the conditional optimizer mask.
for i, gradient in enumerate(gradients):
used = mathematical[i] if mask[i] else 0.0
effective.append(used)
gradient.update(enabled=mask[i], effective=used)
return dict(weights=weights[:], task=task, mask=mask[:], forwards=forwards,
predictions=predictions, losses=losses, gradients=gradients,
trainHalfMSE=losses["train"]["mean"],
validationHalfMSE=losses["validation"]["mean"],
mathematicalGradient=mathematical, effectiveGradient=effective)
def evaluate_transfer(weights_value, data_value, task_value, mask_value):
"""Accept ambient finite arrays; numerical coherence remains caller-owned."""
weights = _vector(weights_value, 4, "weights")
data = _data(data_value)
mask = _vector(mask_value, 4, "mask")
groups = [("weights", weights), *[(f"data[{i}]", row) for i, row in enumerate(data)],
("task", [task_value]), ("mask", mask)]
_numbers(groups)
if task_value not in (0, 1):
raise NumericalFault("INVALID_INPUT", "task must be numeric 0 or 1.")
mask = _mask(mask)
converted = _binary64(groups)
return _evaluate(converted[0], converted[1:9], int(task_value), mask)
def _sgd(weights, mathematical, effective, mask, eta):
rows, proposals = [], []
for i in range(4):
delta = _finite(eta * effective[i], "SGD delta")
proposed = _finite(weights[i] - delta, "SGD proposed")
proposals.append(proposed)
rows.append(dict(old=weights[i], mathematical=mathematical[i],
effective=effective[i], enabled=mask[i], eta=eta,
delta=delta, proposed=proposed))
# All proposals precede publication. A frozen coordinate copies its OLD WORD.
committed = [proposals[i] if mask[i] else weights[i] for i in range(4)]
for i in range(4):
rows[i]["committed"] = committed[i]
return dict(weights=committed, coordinates=rows)
def transfer_sgd(weights_value, mathematical_value, effective_value, mask_value, eta_value):
weights = _vector(weights_value, 4, "weights")
mathematical = _vector(mathematical_value, 4, "mathematical")
effective = _vector(effective_value, 4, "effective")
mask = _vector(mask_value, 4, "mask")
groups = [("weights", weights), ("mathematical", mathematical), ("effective", effective),
("mask", mask), ("eta", [eta_value])]
_numbers(groups)
mask = _mask(mask)
if not 0.0 <= eta_value <= 2.0:
raise NumericalFault("INVALID_INPUT", "eta must be between 0 and 2.")
weights, mathematical, effective, _, eta = _binary64(groups)
eta = eta[0]
for i in range(4):
expected = mathematical[i] if mask[i] else 0.0
if _word(effective[i]) != _word(expected):
raise NumericalFault("INVALID_INPUT", f"effective[{i}] must match the conditional mathematical gradient.")
return _sgd(weights, mathematical, effective, mask, eta)
def _memorize(data, prepared_predictions):
# The actual dictionary has x,target0,target1 columns, hence physical stride3.
dictionary = [[data[i][0], data[i][5], data[i][6]] for i in range(4)]
keys = [row[0] for row in dictionary]
targets = [row[1:3] for row in dictionary]
predictions, matches, selections = [], [], []
for i in range(8):
comparisons, first = [], -1
for k in range(4):
equal = data[i][0] == dictionary[k][0]
old = first
if equal and first == -1:
first = k
comparisons.append(dict(keyIndex=k, x=data[i][0], key=dictionary[k][0],
equal=int(equal), oldMatch=old, match=first))
kind, source_row = (0, first) if first >= 0 else (1, i)
index0 = 3 * first + 1 if first >= 0 else 2 * i
source = dictionary[first][1:3] if first >= 0 else prepared_predictions[2 * i:2 * i + 2]
predictions.extend(source)
matches.append(first)
selections.append(dict(sample=i, comparisons=comparisons, match=first,
dictionary=int(first >= 0), sourceRow=source_row,
sourceKind=kind, sourceIndex0=index0, sourceIndex1=index0 + 1,
sourceValues=source[:], prediction=source[:]))
losses = _losses(predictions, data, 1)
return dict(keys=keys, targets=targets, dictionary=dictionary,
preparedPredictions=prepared_predictions[:], predictions=predictions,
matches=matches, selections=selections, losses=losses,
trainHalfMSE=losses["train"]["mean"], validationHalfMSE=losses["validation"]["mean"])
def memorize_transfer(data_value, prepared_predictions_value):
data = _data(data_value)
predictions = _vector(prepared_predictions_value, 16, "preparedPredictions")
groups = [*[(f"data[{i}]", row) for i, row in enumerate(data)], ("preparedPredictions", predictions)]
_numbers(groups)
converted = _binary64(groups)
return _memorize(converted[:8], converted[8])
def _cohort(start, data, task, mask, updates, eta):
stages, transitions, weights = [], [], start[:]
for stage in range(updates + 1):
evaluated = _evaluate(weights, data, task, mask)
evaluated["stage"] = stage
evaluated["diagnosticOnly"] = int(stage == updates)
stages.append(evaluated)
if stage < updates:
transition = _sgd(weights, evaluated["mathematicalGradient"], evaluated["effectiveGradient"], mask, eta)
transitions.append(transition)
weights = transition["weights"][:]
return dict(initialWeights=start[:], task=task, mask=mask[:], eta=eta,
stages=stages, transitions=transitions)
def mechanics_experiment(value):
"""Real PRE, copied-prepared ADAPT, fresh ADAPT and saved-prediction lookup."""
state = raw_state(value)
prepared_data = fixed_data()
data = prepared_data["data"]
pre = _cohort([0.0, 0.0, 0.0, 0.0], data, 0, [1, 1, 1, 1], state["preUpdates"], 0.5)
pre_final = pre["stages"][-1]
copied = pre_final["weights"][:]
mask = [1, 1, 1, 1] if state["scope"] == 0 else [1, 0, 0, 1]
prepared = _cohort(copied, data, 1, mask, state["updates"], state["eta"])
fresh = _cohort([0.0, 0.0, 0.0, 0.0], data, 1, mask, state["updates"], state["eta"])
memorizer = _memorize(data, pre_final["predictions"])
return deepcopy(dict(state=state, data=data, construction=prepared_data["construction"],
preparedCopy=dict(sourceWeights=pre_final["weights"][:], weights=copied[:]),
pre=pre, prepared=prepared, fresh=fresh, memorizer=memorizer))
Second, the full public record and command line: iv55.py
iv55.py loads its sibling using the wrapper’s own file path. Its literal prose and tensor metadata explain the retained arithmetic. _loss_records, _evaluation_records, _update_records, _cohort_records and _memorizer_records arrange the already computed evidence into ordered steps and tensors; they do not substitute hand fractions for a trajectory. Stage statistics copy the actual evaluated means, and the finish step retains the actual metric/work copies as inputs and outputs.
The public entry point is derive_iv55(value). It returns the ordered five-field defined result described above, or the three-field unavailable record for a known NumericalFault. It does not fill missing raw fields. Scalar summaries precede all once-only operation-output aliases, and texts include the truthful P=0 prepared label. A known shape, domain or numerical fault becomes data; unexpected program errors propagate. Ordinary derivation and import call no self-checks.
strict_json(source) rejects duplicate object keys, nonstandard NaN/Infinity constants, malformed syntax and extra JSON content. Its integer parser preserves a literal JSON -0 as negative floating zero. A syntactically valid exponent such as 1e999 instead reaches numeric validation and is unavailable as nonfinite. The zero-argument run() reads command-line arguments itself: no argument uses dict(DEFAULT_IV55); one JSON argument completely replaces the raw state; - reads that replacement from standard input. Missing fields in {} are an error, not a request for defaults.
The following are examples to use from the Book IV project root. Keep both source files adjacent and provide NumPy in that Python environment.
# Default whole result: P=2, U=1, scope=0, eta=0.5.
python3 code/python/p14/iv55.py
# Full replacement, with no adaptation transitions.
python3 code/python/p14/iv55.py '{"preUpdates":2,"updates":0,"scope":1,"eta":0.5}'
# The same full-replacement interface through stdin; retain negative-zero eta.
python3 code/python/p14/iv55.py - <<'JSON'
{"preUpdates":0,"updates":1,"scope":0,"eta":-0}
JSON
# Explicit checks only.
python3 code/python/p14/iv55.py --self-check
Normal defined queries and known unavailable queries both print JSON and return exit status 0. More than one argument prints usage to standard error and returns 2. The single special argument --self-check deliberately calls source_self_check() outside the parse/query catches. The ordinary JSON-parsing catch surrounds only strict_json and catches only ValueError; it does not surround semantic evaluation, serialization or checks. Unexpected semantic failures, parser resource failures such as OverflowError/RecursionError, and assertion failures escape instead of being disguised as ordinary unavailable inputs.
The explicit check aggregator requires assertions enabled and calls eight leaves in order: check_raw_guards, check_hand_anchors, check_helper_guards_and_words, check_memorizer, check_controls_and_structure, check_public_record, check_query_check_isolation, check_cli_boundary. The final two distinguish ordinary default/JSON/stdin queries from deliberate self-check execution. They are authored checks. Their presence in the panel is source evidence, not a passing result.
Read the complete executable Python / NumPy source
This is the actual reference file, imported directly from the repository. Comments explain each operation. It is provided for later execution; no validation run is claimed.
"""IV55 complete canonical public record — SOURCE ONLY, ALL EXECUTION UNRUN.
Adjacent NumPy storage and scalar mechanisms supply actual retained operands.
This file binds the owner-adopted ordered root, steps, aliases, tensors and texts.
Project closure: exactly iv55.py and adjacent transfer_reference.py.
Import and ordinary queries never run self-checks; explicit --self-check does.
"""
import importlib.util
from pathlib import Path
_spec = importlib.util.spec_from_file_location(
"_p14_iv55_transfer_reference", Path(__file__).resolve().with_name("transfer_reference.py"))
if _spec is None or _spec.loader is None:
raise ImportError("Cannot load adjacent transfer_reference.py")
_reference = importlib.util.module_from_spec(_spec)
_spec.loader.exec_module(_reference)
DEFAULT_IV55 = _reference.DEFAULT_IV55
NumericalFault = _reference.NumericalFault
raw_state = _reference.raw_state
fixed_data = _reference.fixed_data
evaluate_transfer = _reference.evaluate_transfer
transfer_sgd = _reference.transfer_sgd
memorize_transfer = _reference.memorize_transfer
mechanics_experiment = _reference.mechanics_experiment
def _same_words(actual, expected):
assert len(actual) == len(expected)
for left, right in zip(actual, expected):
assert type(left) is float and type(right) is float
assert _reference._word(left) == _reference._word(right)
def _expect_fault(code, operation, *args):
try:
operation(*args)
except NumericalFault as fault:
assert fault.code == code
else:
raise AssertionError(f"Expected {code}")
def check_raw_guards():
"""Finite-before-domain precedence, bool rejection and inactive raw controls."""
default = dict(DEFAULT_IV55)
assert tuple(raw_state(default)) == ("preUpdates", "updates", "scope", "eta")
for bad in (None, [], (), {**default, "extra": 0}, {key: default[key] for key in default if key != "eta"}):
_expect_fault("INVALID_INPUT", raw_state, bad)
class DictSubclass(dict):
pass
_expect_fault("INVALID_INPUT", raw_state, DictSubclass(default))
for key in default:
for bad in (True, False, None, "0", float("nan"), float("inf"), -float("inf")):
_expect_fault("NONFINITE", raw_state, {**default, key: bad})
_expect_fault("INVALID_INPUT", raw_state, {**default, key: 10 ** 400})
for key in ("preUpdates", "updates"):
for bad in (-1, 4, 0.5):
_expect_fault("INVALID_INPUT", raw_state, {**default, key: bad})
for key, bad in (("scope", 2), ("eta", -0.5), ("eta", 2.5)):
_expect_fault("INVALID_INPUT", raw_state, {**default, key: bad})
# A late nonfinite wins over an earlier finite-domain defect (even huge int).
for bad in (4, 10 ** 400):
_expect_fault("NONFINITE", raw_state, {**default, "preUpdates": bad, "eta": float("nan")})
_expect_fault("INVALID_INPUT", raw_state, dict(preUpdates=0, updates=0, scope=0, eta=3.0))
negative_zero = raw_state(dict(preUpdates=0, updates=0, scope=1, eta=-0.0))
_same_words([negative_zero["eta"]], [-0.0])
for p in range(4):
for u in range(4):
for scope in (0, 1):
for eta in (0.0, -0.0, 0.5, 2.0):
state = raw_state(dict(preUpdates=p, updates=u, scope=scope, eta=eta))
assert state["preUpdates"] == p and state["updates"] == u and state["scope"] == scope
_same_words([state["eta"]], [eta])
def check_hand_anchors():
"""Literal dyadic expectations derived on paper, never fed to the mechanism."""
result = mechanics_experiment(dict(DEFAULT_IV55))
assert result["data"] == [
[-1.0, 0.0, 1.0, 0.0, 1.0, 0.5, 1.0],
[-0.5, 0.0, 0.5, 0.0, 0.5, 0.25, 0.5],
[0.5, 0.5, 0.0, 0.5, 0.0, 0.5, -0.25],
[1.0, 1.0, 0.0, 1.0, 0.0, 1.0, -0.5],
[-0.75, 0.0, 0.75, 0.0, 0.75, 0.375, 0.75],
[-0.25, 0.0, 0.25, 0.0, 0.25, 0.125, 0.25],
[0.25, 0.25, 0.0, 0.25, 0.0, 0.25, -0.125],
[0.75, 0.75, 0.0, 0.75, 0.0, 0.75, -0.375],
]
pre = result["pre"]["stages"]
for stage, diagonal in zip(pre, (0.0, 5.0 / 32.0, 295.0 / 1024.0)):
_same_words(stage["weights"], [diagonal, 0.0, 0.0, diagonal])
assert pre[0]["trainHalfMSE"] == 5.0 / 16.0
assert pre[1]["trainHalfMSE"] == 3645.0 / 16384.0
assert pre[2]["trainHalfMSE"] == 2657205.0 / 16777216.0
prepared = result["prepared"]["stages"]
_same_words(prepared[0]["mathematicalGradient"],
[-3645.0 / 16384.0, -5.0 / 32.0, 5.0 / 32.0, -3645.0 / 16384.0])
_same_words(prepared[1]["weights"],
[13085.0 / 32768.0, 5.0 / 64.0, -5.0 / 64.0, 13085.0 / 32768.0])
_same_words([row["product"] for row in prepared[0]["gradients"][0]["contributions"]],
[-0.0, -0.0, -729.0 / 4096.0, -729.0 / 1024.0])
assert prepared[0]["trainHalfMSE"] == 3967925.0 / 16777216.0
assert prepared[1]["trainHalfMSE"] == 2892617325.0 / 17179869184.0
assert prepared[1]["validationHalfMSE"] == 2892617325.0 / 34359738368.0
fresh = result["fresh"]["stages"]
assert fresh[0]["trainHalfMSE"] == 25.0 / 64.0
_same_words(fresh[1]["weights"], [5.0 / 32.0, 5.0 / 64.0, -5.0 / 64.0, 5.0 / 32.0])
assert fresh[1]["trainHalfMSE"] == 18225.0 / 65536.0
assert fresh[1]["validationHalfMSE"] == 18225.0 / 131072.0
diagonal = mechanics_experiment({**dict(DEFAULT_IV55), "scope": 1})["prepared"]["stages"][-1]
_same_words(diagonal["weights"], [13085.0 / 32768.0, 0.0, 0.0, 13085.0 / 32768.0])
assert diagonal["trainHalfMSE"] == 3279279725.0 / 17179869184.0
assert diagonal["validationHalfMSE"] == 3279279725.0 / 34359738368.0
p3 = mechanics_experiment(dict(preUpdates=3, updates=0, scope=0, eta=0.5))
_same_words(p3["pre"]["stages"][-1]["weights"],
[13085.0 / 32768.0, 0.0, 0.0, 13085.0 / 32768.0])
def check_helper_guards_and_words():
"""Ambient states, OLD WORD frozen entries, representability and errors."""
data, mask, zeros = fixed_data()["data"], [1, 1, 1, 1], [0.0, 0.0, 0.0, 0.0]
_expect_fault("SHAPE_MISMATCH", evaluate_transfer, zeros[:3], data, 0, mask)
_expect_fault("SHAPE_MISMATCH", evaluate_transfer, zeros, data[:7], 0, mask)
_expect_fault("INVALID_INPUT", evaluate_transfer, zeros, data, 2, mask)
_expect_fault("INVALID_INPUT", evaluate_transfer, zeros, data, 10 ** 400, mask)
_expect_fault("INVALID_INPUT", evaluate_transfer, zeros, data, 0, [1, 2, 1, 1])
_expect_fault("INVALID_INPUT", evaluate_transfer, zeros, data, 0, [1, 10 ** 400, 1, 1])
_expect_fault("NONFINITE", evaluate_transfer, zeros, data, 2, [1, True, 1, 1])
_expect_fault("NONFINITE", evaluate_transfer, [10 ** 400, 0.0, 0.0, 0.0], data, 0, mask)
_expect_fault("NONFINITE", evaluate_transfer, [float.fromhex("0x1.fffffffffffffp+1023"), 0.0, 0.0, 0.0], data, 0, mask)
_expect_fault("INVALID_INPUT", transfer_sgd, zeros, zeros, [-0.0, 0.0, 0.0, 0.0], [0, 0, 0, 0], 0.5)
_expect_fault("INVALID_INPUT", transfer_sgd, zeros, [1.0] * 4, zeros, mask, 0.5)
_expect_fault("NONFINITE", transfer_sgd, zeros, zeros, zeros, [2, 1, 1, 1], float("nan"))
_expect_fault("INVALID_INPUT", transfer_sgd, zeros, zeros, zeros, mask, 10 ** 400)
_expect_fault("INVALID_INPUT", transfer_sgd, zeros, zeros, zeros, [1, 10 ** 400, 1, 1], 0.5)
signed = transfer_sgd(zeros, [-0.0, 0.0, 0.0, 0.0], [-0.0, 0.0, 0.0, 0.0], mask, -0.0)
_same_words([signed["coordinates"][0]["mathematical"], signed["coordinates"][0]["effective"]], [-0.0, -0.0])
_same_words([signed["coordinates"][0]["eta"], signed["coordinates"][0]["delta"]], [-0.0, 0.0])
_expect_fault("INVALID_INPUT", transfer_sgd, zeros, [-0.0, 0.0, 0.0, 0.0], zeros, mask, 0.5)
for eta in (0.0, -0.0, 0.5, 2.0):
old, mathematical, frozen_mask = [1.25, -0.0, -2.5, 0.0], [2.0, -1.0, 3.0, 0.0], [0, 0, 0, 0]
transition = transfer_sgd(old, mathematical, zeros, frozen_mask, eta)
_same_words(transition["weights"], old)
for i, row in enumerate(transition["coordinates"]):
_same_words([row["old"], row["committed"], row["effective"]], [old[i], old[i], 0.0])
_same_words([row["delta"]], [eta * 0.0])
mixed = transfer_sgd([1.0, 2.0, -0.0, 4.0], [1.0, -2.0, 3.0, 4.0],
[1.0, 0.0, 0.0, 4.0], [1, 0, 0, 1], 0.5)
_same_words(mixed["weights"], [0.5, 2.0, -0.0, 2.0])
ambient = evaluate_transfer([1.0, 2.0, 3.0, 4.0], data, 1, [0, 0, 0, 0])
_same_words(ambient["effectiveGradient"], zeros)
assert any(value != 0.0 for value in ambient["mathematicalGradient"])
# No origin/coherence assertion: shape-correct ambient rows remain accepted.
ambient_data = [row[:] for row in data]
ambient_data[0] = [3.0, 2.0, 3.0, 0.5, -0.5, 1.25, -1.25]
assert evaluate_transfer([1.0, 2.0, 3.0, 4.0], ambient_data, 1, mask)["predictions"][:2] == [8.0, 18.0]
captured = evaluate_transfer(zeros, data, 0, mask)
data[0][1], zeros[0], mask[0] = 123.0, 123.0, 0
assert captured["weights"][0] == 0.0 and captured["mask"][0] == 1
assert captured["forwards"][0]["products"][0]["feature"] == 0.0
def check_memorizer():
result = mechanics_experiment(dict(DEFAULT_IV55))
memo, pre = result["memorizer"], result["pre"]["stages"][-1]
assert memo["matches"] == [0, 1, 2, 3, -1, -1, -1, -1]
assert sum(len(row["comparisons"]) for row in memo["selections"]) == 32
assert len(memo["keys"]) + sum(len(pair) for pair in memo["targets"]) == 12
assert memo["trainHalfMSE"] == 0.0
assert memo["validationHalfMSE"] == 3967925.0 / 33554432.0
_same_words(memo["preparedPredictions"], pre["predictions"])
_same_words(memo["predictions"][8:], pre["predictions"][8:])
for i in range(4):
_same_words(memo["predictions"][2 * i:2 * i + 2], result["data"][i][5:7])
data, saved = fixed_data()["data"], [-0.0, 0.0] * 8
_expect_fault("SHAPE_MISMATCH", memorize_transfer, data, saved[:15])
_expect_fault("NONFINITE", memorize_transfer, data, [True] + saved[1:])
_expect_fault("NONFINITE", memorize_transfer, data, [10 ** 400] + saved[1:])
data[1] = data[0][:] # coherent duplicate key/feature/target, first index wins
duplicated = memorize_transfer(data, saved)
assert duplicated["matches"][:2] == [0, 0]
assert len(duplicated["selections"][0]["comparisons"]) == 4
assert duplicated["selections"][0]["comparisons"][1]["equal"] == 1
_same_words(duplicated["predictions"][8:], saved[8:])
saved[8], data[0][5] = 17.0, 17.0
_same_words(duplicated["predictions"][8:10], [-0.0, 0.0])
assert duplicated["targets"][0][0] == 0.5
def check_controls_and_structure():
"""Every bounded loop count, final diagnostics, eta0 and saved-state isolation."""
for p in range(4):
for u in range(4):
for scope in (0, 1):
for eta in (0.0, -0.0, 0.5, 2.0):
result = mechanics_experiment(dict(preUpdates=p, updates=u, scope=scope, eta=eta))
assert len(result["construction"]) == 8
for name, updates in (("pre", p), ("prepared", u), ("fresh", u)):
cohort = result[name]
assert len(cohort["stages"]) == updates + 1 and len(cohort["transitions"]) == updates
for stage, evaluated in enumerate(cohort["stages"]):
assert evaluated["diagnosticOnly"] == int(stage == updates)
assert len(evaluated["forwards"]) == 8 and len(evaluated["predictions"]) == 16
assert len(evaluated["gradients"]) == 4
for gradient in evaluated["gradients"]:
assert len(gradient["contributions"]) == 4
for row in evaluated["forwards"]:
assert len(row["products"]) == 4
for split in ("train", "validation"):
assert len(evaluated["losses"][split]["additions"]) == 4
assert evaluated["losses"][split]["divisor"] == 4.0
for stage, transition in enumerate(cohort["transitions"]):
_same_words(transition["weights"], cohort["stages"][stage + 1]["weights"])
for i, coordinate in enumerate(transition["coordinates"]):
_same_words([coordinate["old"]], [cohort["stages"][stage]["weights"][i]])
if not coordinate["enabled"]:
_same_words([coordinate["committed"]], [coordinate["old"]])
if name != "pre" and eta == 0.0:
# Numeric invariance; enabled zero signs still follow arithmetic.
assert cohort["stages"][-1]["weights"] == cohort["stages"][0]["weights"]
_same_words(result["prepared"]["initialWeights"], result["pre"]["stages"][-1]["weights"])
_same_words(result["fresh"]["initialWeights"], [0.0] * 4)
if p == 0:
assert result["prepared"]["stages"][0]["weights"] == result["fresh"]["stages"][0]["weights"]
assert result["memorizer"]["trainHalfMSE"] == 0.0
# Independent fresh calls and later mutable records cannot alter earlier states.
result = mechanics_experiment(dict(preUpdates=3, updates=3, scope=0, eta=0.5))
original = result["pre"]["stages"][-1]["weights"][:]
result["prepared"]["initialWeights"][0] = 123.0
result["prepared"]["stages"][-1]["weights"][0] = 456.0
_same_words(result["pre"]["stages"][-1]["weights"], original)
_same_words(result["prepared"]["stages"][0]["weights"], original)
assert mechanics_experiment(dict(DEFAULT_IV55))["pre"]["stages"][-1]["weights"][0] == 295.0 / 1024.0
def source_self_check():
"""Eight explicit terminal checks; ordinary queries reach none of them."""
if not __debug__:
raise RuntimeError("Explicit source checks require assertions enabled.")
check_raw_guards()
check_hand_anchors()
check_helper_guards_and_words()
check_memorizer()
check_controls_and_structure()
check_public_record()
check_query_check_isolation()
check_cli_boundary()
# Literal public prose copied from the owner-adopted current sources, not parsed.
_STEP_PROSE = {
"setup": (
"Set up a small transfer experiment with two output numbers",
"W:[2,2]; phi:[2,1]; prediction=W phi:[2,1]; PRE eta=0.5; ADAPT eta=eta; scope0:4 enabled, scope1:2 enabled",
"Pretraining first learns one numeric target rule. Fine-tuning then changes the desired outputs and updates either all readout entries or just the diagonal. A fresh run supplies a comparison with the same adaptation data and optimizer. These are fixed features with a learned readout, not language-model token probabilities."),
"data": (
"Prepare the two fixed features and both target pairs",
"negatedX=-x; phiPlus=max(0,x); phiMinus=max(0,negatedX); preTarget0=phiPlus; preTarget1=phiMinus; scaledMinus=0.5*phiMinus; adaptTarget0=phiPlus+scaledMinus; scaledPlus=-0.5*phiPlus; adaptTarget1=scaledPlus+phiMinus",
"A feature is a number supplied to the readout. These ReLU features keep the positive and negative parts of the input separate. Pretraining asks for the features themselves; adaptation changes the desired two outputs. The first four authored inputs train the readout and the last four only evaluate it. Features and targets are prepared once."),
"initial": (
"Start this cohort from positive-zero weights",
"weights=[sourceWeight0,sourceWeight1,sourceWeight2,sourceWeight3]; enabled=mask",
"All four source weights are positive zero. PRE will learn the feature-copy task; the fresh comparison learns ADAPT directly. Neither start uses hand-set pretrained weights."),
"prepared": (
"Copy the actual prepared readout into adaptation",
"weights=[sourceWeight0,sourceWeight1,sourceWeight2,sourceWeight3]; enabled=mask",
"These source weights are the genuinely evaluated final PRE weights. Copy every value exactly before any adaptation. The two target columns now change to ADAPT while inputs, fixed features and the squared-error loss form stay the same."),
"forward": (
"Read out two numbers from the same fixed feature column",
"product00=w00*phiPlus; product01=w01*phiMinus; product10=w10*phiPlus; product11=w11*phiMinus; prediction0=product00+product01; prediction1=product10+product11",
"W has two output rows and two feature columns. Multiplying W:[2,2] by phi:[2,1] gives a two-number column. All four products and both sums are performed, including zero products. Every sample in this evaluation uses these same four weights, with no bias or softmax."),
"loss": (
"Measure the two output errors for one sample",
"error0=prediction0-target0; error1=prediction1-target1; square0=error0*error0; square1=error1*error1; half0=square0/2; half1=square1/2; sampleLoss=half0+half1",
"Each output is a scalar regression value, so its signed error is a difference of numbers. Squaring makes either error direction costly. Add the two half-losses to obtain one sample loss; the later average counts four samples, not eight output coordinates."),
"mean": (
"Average four saved sample losses in their original order",
"sum starts at +0; sum0=initialSum+loss0; sum1=sum0+loss1; sum2=sum1+loss2; sum3=sum2+loss3; mean=sum3/4",
"Dataset zero is training; dataset one is held-out validation. Both means are computed independently from their saved sample losses. Validation never contributes a gradient. This ordered average does not divide each output error by eight."),
"gradient": (
"Differentiate one readout coordinate using training errors",
"contribution_j=error_j*feature_j; sum starts at +0 and adds contributions in training-row order; mathematical=sum3/4",
"A gradient says how the training mean changes when one weight changes slightly. For this linear readout, a weight changes its output in proportion to its feature, giving error times feature. Average the four training contributions. Compute every coordinate even when adaptation will freeze it; final-stage gradients are observations, not extra updates."),
"mask": (
"Choose which derivatives the optimizer may use",
"effective_i=enabled_i==1?mathematical_i:+0",
"The mathematical derivative describes the loss even for a frozen weight. The effective derivative is the optimizer input: retain that derivative for an enabled weight and select positive zero otherwise. This is a conditional choice, not multiplication by a mask."),
"stats": (
"Save this evaluated state and whether an update follows",
"diagnosticOnly=(stage==requestedUpdates); hasNextUpdate=(stage<requestedUpdates); losses belong to this same saved W",
"Stage zero is evaluated before any step. Each later point follows a real simultaneous update and a fresh eight-sample evaluation. At the final requested stage, retain all four gradients for inspection but perform no additional optimizer step. Only actual evaluated points appear in the trajectory."),
"coordinate": (
"Propose one weight change from the same old state",
"delta=eta*effective; proposed=old-delta; committed=enabled==1?proposed:old",
"Subtracting a positive gradient lowers a weight; subtracting a negative one raises it. Every coordinate gets a real multiplication and subtraction, including frozen coordinates. A frozen weight keeps its exact old value and zero sign. All proposals use the unchanged old weights and saved gradients."),
"commit": (
"Publish all four proposed coordinates together",
"nextWeights=[committed0,committed1,committed2,committed3]",
"This simultaneous publication completes one optimizer step. No coordinate update changes a gradient used for another coordinate. A later stage evaluates the resulting weights again; its final diagnostic gradient causes no additional step."),
"dictionary": (
"Copy four training keys and their two desired outputs",
"dictionary_j=[trainX_j,adaptTarget0_j,adaptTarget1_j], j=0..3",
"This explicit lookup stores four keys and eight target values, twelve extra numeric slots. It is a constructed counterexample, not a neural network trained by gradient descent. Its fallback will reuse the already saved prepared predictions."),
"scan": (
"Compare this input with every stored training key",
"match starts at -1; for key0..3: equal=(x==keyX); match=(oldMatch==-1 and equal==1)?keyIndex:oldMatch",
"Perform all four equality comparisons even after finding a match. Keep the first matching index; minus one means none. The fixed eight inputs have four training matches and four held-out misses. If a caller supplies duplicate coherent keys, the first match still wins."),
"select": (
"Copy a matched target pair or this sample's saved prepared pair",
"sourceKind=match==-1?1:0; sourceSample=match==-1?sample:match; sourceIndex0=match==-1?2*sample:3*match+1; sourceIndex1=sourceIndex0+1; source0=match==-1?prepared0:matchedDictionary0; source1=match==-1?prepared1:matchedDictionary1; prediction0=source0; prediction1=source1",
"Source zero is the dictionary target pair at the first matching training index: in the stored [4,3] dictionary, flat positions 3*match+1 and 3*match+2 skip its x key. Source one is the saved prepared-network prediction at this same sample, at flat positions 2*sample and 2*sample+1 before adaptation. Copy both output values without another neural forward. A perfect lookup fit on training keys says nothing about the missing inputs."),
"finish": (
"Compare the final adaptation results and the lookup counterexample",
"report actual final losses and completed work; final diagnostics add no optimizer steps; dictionary comparisons add no neural forwards",
"Prepared and fresh losses measure the same ADAPT rule after the same number of adaptation steps. The dictionary can obtain zero training error by copying labels while keeping unadapted predictions on held-out misses. Counts describe this small algorithm, not elapsed time, memory bytes or a general benefit of pretraining."),
}
# Each metadata tuple names the actual row-major table, never an idealized value.
_TENSOR_META = {
"Data": ([8, 7], ["Sample", "DataField"], "Actual once-prepared authored inputs, features and both target pairs in texts.dataFields order; first four training, last four validation."),
"AdaptMask": ([2, 2], ["Output", "Feature"], "Actual scope-dependent ADAPT selectors in row-major W order; PRE always enables all four coordinates."),
"InitialWeights": ([2, 2], ["Output", "Feature"], "Actual cohort initialization: PRE/fresh copy authored positive zeros; prepared ADAPT copies the saved final-PRE weight words."),
"Weights": ([2, 2], ["Output", "Feature"], "Detached actual same-state W, row-major 00,01,10,11; arbitrary finite represented weights are permitted."),
"Predictions": ([8, 2], ["Sample", "Output"], "Actual two-output predictions from all four products and both sums per sample, with the same W for all eight rows."),
"Forward": ([8, 6], ["Sample", "ForwardField"], "Actual product00,product01,product10,product11,prediction0,prediction1; no zero-product shortcut."),
"Loss": ([8, 9], ["Sample", "LossField"], "Actual target0,target1,error0,error1,square0,square1,half0,half1,sampleLoss in sample order; each sample loss sums both output half-losses."),
"Reductions": ([2, 4, 3], ["Dataset", "DatasetSample", "ReductionField"], "Actual saved loss, oldSum, sum for each ordered four-sample reduction, training then validation, each initialized at floating positive zero."),
"Means": ([2], ["Dataset"], "Actual independent training and validation means; each divides its own ordered four-sample sum by floating four."),
"GradientRows": ([4, 4, 5], ["Coordinate", "TrainSample", "GradientRowField"], "Actual error,feature,contribution,oldSum,sum in coordinate-major then training-row order; each contraction starts at floating positive zero."),
"MathematicalGradient": ([2, 2], ["Output", "Feature"], "All four actual derivatives of the current training objective; the final cohort stage is diagnostic only."),
"EffectiveGradient": ([2, 2], ["Output", "Feature"], "Actual conditional mathematical-gradient or floating-positive-zero selection, in row-major W order."),
"Mask": ([2, 2], ["Output", "Feature"], "Actual numeric zero-or-one selectors in row-major W order; integer values select effective gradients, never rescale features."),
"Stats": ([4], ["StageField"], "Actual training mean,validation mean,diagnosticOnly,hasNextUpdate in texts.stageFields order; last two positions are integer VALUE selectors."),
"Update": ([4, 7], ["Coordinate", "UpdateField"], "Actual old,mathematical,effective,enabled,delta,proposed,committed; enabled is an integer VALUE in this mixed float table. Frozen commits copy the old word, including nonzero values and negative zero."),
"Dictionary": ([4, 3], ["TrainKey", "DictionaryField"], "Actual copied training x,adaptTarget0,adaptTarget1; four keys plus eight target values, twelve extra numeric slots."),
"Comparisons": ([8, 4, 5], ["Sample", "TrainKey", "ComparisonField"], "Actual x,keyX,equal,oldMatch,match for all 32 comparisons; equal and both match columns are integer VALUE positions in this mixed float table."),
"Selections": ([8, 9], ["Sample", "SelectionField"], "Actual match,sourceKind,sourceSample,sourceIndex0,sourceIndex1,source0,source1,prediction0,prediction1; first five columns are integer VALUE positions. Source zero indexes target columns at 3*match+1 and 3*match+2 in the flat stored Dictionary:[4,3]; source one indexes 2*sample and 2*sample+1 in the flat saved prepared Predictions:[8,2]."),
"MemorizerPredictions": ([8, 2], ["Sample", "Output"], "Actual selected two-output values; no new neural forward, gradient or optimizer step."),
"Matches": ([8], ["Sample"], "Actual first matching training-key index or minus one for every sample; fixed data gives four matches and four misses."),
"StageMetrics": (None, ["Stage", "Dataset"], "Only actual cohort stages zero through its requested update count; training then independently computed validation mean."),
"StageWeights": (None, ["Stage", "Coordinate"], "Only actual evaluated cohort weights in row-major 00,01,10,11 order; final weights have a real final evaluation."),
}
def _texts(raw):
return {
"trainingScope": "A tiny neural regression readout maps two fixed ReLU features to two scalar outputs. W has four learned entries and no bias. Unlike IV52 text cross-entropy, the loss here measures squared numeric errors; neither hidden features nor a Transformer are trained.",
"shapePolicy": "For one sample phi=[max(0,x),max(0,-x)]^T:[2,1], W:[2,2], prediction=W phi:[2,1]. Flat W order is 00,01,10,11. With feature rows F:[4,2], batch outputs are F W^T:[4,2]; the transpose explicitly converts column-vector mathematics to row samples.",
"dataPolicy": "Eight authored nonzero inputs: training [-1,-0.5,0.5,1], held-out [-0.75,-0.25,0.25,0.75]. Features are computed once. PRE targets copy the features; ADAPT targets are T phi with T=[[1,0.5],[-0.5,1]], computed by two half-scalings and two additions. No random sample or unseen test set is implied.",
"preparationPolicy": "PRE starts at four positive-zero weights and really performs preUpdates full-coordinate steps at fixed learning rate 0.5. Save every evaluated stage from zero through preUpdates. Prepared adaptation copies the final PRE weights exactly; fresh adaptation starts at four positive zeros.",
"adaptationPolicy": "Both adaptation cohorts use the ADAPT training targets, the same requested updates, learning rate eta and scope. Scope zero enables all four entries; scope one enables only W00 and W11. Inputs, features and loss form stay the same while the target rule changes. Compare actual evaluated states, not fitted curves or ideal optima.",
"zeroPolicy": "With preUpdates zero, no pretraining has occurred and prepared and fresh starts coincide. With updates zero, both adaptation starts are still evaluated but neither is updated. Eta zero, including negative zero, keeps every requested step and evaluation; multiplication and subtraction still take place.",
"objectivePolicy": "For each sample compute both predictions, error_o=prediction_o-target_o, square_o=error_o*error_o, half_o=square_o/2, then sampleLoss=half_0+half_1. Each dataset mean adds its four saved sample losses from positive zero in row order and divides by four. This averages samples after summing the two output half-losses; it does not divide by eight.",
"gradientPolicy": "For each W[o,i], sum the four training products error[o]*phi[i] from positive zero in row order, then divide by four. All four mathematical derivatives belong to the same saved W and objective. Validation never supplies gradients. Each cohort has a final diagnostic gradient with no additional update.",
"updatePolicy": "Select effective_i=enabled_i?mathematical_i:+0. Compute delta=eta*effective and proposed=old-delta for all four coordinates; commit proposed for enabled entries and the exact old word for frozen entries. Publish all four together. Frozen means preserve the old value, including a nonzero value or negative zero; it never means reset to zero.",
"memorizerPolicy": "The dictionary copies four training x keys and their eight ADAPT target scalars: twelve extra numeric slots, in addition to the four retained prepared weights. For every input compare all four keys, keeping the first match. Copy a matching target pair or, on a miss, that same sample's saved final-PRE predictions. Compute its losses independently. This constructed lookup is not another neural forward or an SGD-trained network.",
"evaluationPolicy": "The four held-out inputs have different magnitudes on the same two feature rays. For either homogeneous matrix target and any fixed W, real-arithmetic validation mean equals half the training mean because their feature Gram matrices are 5I/32 and 5I/16. Both means are still computed independently; arbitrary represented arithmetic can round. This grid does not test new directions, nonlinear rules or a population.",
"transferLimits": "A prepared start can help this adaptation experiment, but this is not a universal transfer benefit. The dictionary fits the four training pairs exactly while retaining unadapted prepared predictions at all four held-out inputs. Perfect training fit alone therefore does not guarantee even this limited held-out performance. These numbers cannot establish LLM cognition, safety or alignment.",
"computePolicy": "Counts describe actual feature preparation, network evaluations, ordered loss and gradient arithmetic, stored-coordinate proposals and enabled commits. Each gradient batch uses four training rows, counted by gradientRowContributions, and performs sixteen coordinate-by-row multiplications, counted by gradientProducts. Final diagnostics count as gradient work but not optimizer steps. Dictionary comparisons and copies are separate. Counts are not measured seconds, bytes, throughput or hardware savings.",
"numericPolicy": "Separate finite binary64 additions, subtractions, multiplications and divisions use round-to-nearest ties-to-even, with no fused multiply-add or reordered contraction. Fixed max and comparisons have explicit operands. Raw eta, copied values, products, sums, deltas and proposals retain zero signs; displayed rounding never feeds computation.",
"diagnosticPolicy": "For eta=positive 0.5, centered differences with h=2^-12 have an exact arithmetic identity only at PRE stages0..preUpdates and prepared/fresh ADAPT stages0..min(1,updates), on enabled coordinates. The first fresh ADAPT state after a step needs the 2^-6 weight grid; the largest selected grid exponent is20. The objective is quadratic in W because features stay fixed. Later ADAPT states and arbitrary eta need complete rounding analysis; zero signs require their own word comparison.",
"provenance": "Inputs and both target rules are authored examples. Each calculation starts from declared positive-zero weights, actually prepares the PRE state through its requested updates, and copies that state for adaptation. The dictionary is explicitly constructed from training labels; no historical pretrained checkpoint or measured training run is supplied.",
"rawFields": ["preUpdates", "updates", "scope", "eta"],
"parameterKeys": ["W00", "W01", "W10", "W11"],
"cohortKeys": ["pre", "adapt", "fresh"],
"cohortLabels": ["Pretraining from zero", "Prepared start: no pretraining steps" if raw["preUpdates"] == 0 else "Adaptation from actual pretraining", "Adaptation from fresh zero weights"],
"taskKeys": ["PRE", "ADAPT"],
"dataFields": ["x", "phiPlus", "phiMinus", "preTarget0", "preTarget1", "adaptTarget0", "adaptTarget1"],
"sampleKeys": ["train0", "train1", "train2", "train3", "validation0", "validation1", "validation2", "validation3"],
"forwardFields": ["product00", "product01", "product10", "product11", "prediction0", "prediction1"],
"lossFields": ["target0", "target1", "error0", "error1", "square0", "square1", "half0", "half1", "sampleLoss"],
"datasetKeys": ["training", "validation"],
"reductionFields": ["loss", "oldSum", "sum"],
"gradientRowFields": ["error", "feature", "contribution", "oldSum", "sum"],
"updateFields": ["old", "mathematical", "effective", "enabled", "delta", "proposed", "committed"],
"stageFields": ["trainHalfMSE", "validationHalfMSE", "diagnosticOnly", "hasNextUpdate"],
"dictionaryFields": ["x", "adaptTarget0", "adaptTarget1"],
"comparisonFields": ["x", "keyX", "equal", "oldMatch", "match"],
"selectionFields": ["match", "sourceKind", "sourceSample", "sourceIndex0", "sourceIndex1", "source0", "source1", "prediction0", "prediction1"],
"predictionSources": ["dictionary target pair", "same-sample saved prepared prediction pair"],
"integerValuePolicy": "Mixed float64 tables retain integer values at Update.enabled, Stats.diagnosticOnly/hasNextUpdate, Comparisons.equal/oldMatch/match, and Selections.match/sourceKind/sourceSample/sourceIndex0/sourceIndex1. Masks and matches have int32 dtype and precision zero. These integer selectors and indices are not rounded floating measurements.",
}
def _step(steps, identifier, family, inputs, outputs):
label, equation, explanation = _STEP_PROSE[family]
steps.append(dict(id=identifier, label=label, equation=equation,
explanation=explanation, inputs=inputs, outputs=outputs))
def _tensor(identifier, family, values, shape=None):
fixed_shape, axes, provenance = _TENSOR_META[family]
integer = family in ("Mask", "AdaptMask", "Matches")
return dict(id=identifier, shape=list(fixed_shape if shape is None else shape),
axes=axes[:], dtype="int32" if integer else "float64", values=values[:],
provenance=provenance, precision=0 if integer else 8)
def _loss_records(evidence, predictions, task, prefix, steps):
rows, reductions = [], []
for sample, row in enumerate(evidence["rows"]):
c0, c1 = row["components"]
inputs = dict(sample=sample, task=task, prediction0=predictions[2 * sample],
prediction1=predictions[2 * sample + 1], target0=c0["target"],
target1=c1["target"], divisor=2.0)
outputs = dict(error0=c0["error"], error1=c1["error"], square0=c0["square"],
square1=c1["square"], half0=c0["half"], half1=c1["half"], sampleLoss=row["sampleLoss"])
_step(steps, f"{prefix}_loss_{sample}", "loss", inputs, outputs)
rows.extend([c0["target"], c1["target"], *outputs.values()])
means = []
for dataset, key in enumerate(("train", "validation")):
reduced = evidence[key]
inputs = dict(dataset=dataset, initialSum=reduced["initialSum"], divisor=reduced["divisor"])
outputs = {}
for i, addition in enumerate(reduced["additions"]):
inputs[f"loss{i}"] = addition["value"]
outputs[f"sum{i}"] = addition["total"]
reductions.extend([addition["value"], addition["old"], addition["total"]])
outputs["mean"] = reduced["mean"]
means.append(reduced["mean"])
_step(steps, f"{prefix}_mean_{dataset}", "mean", inputs, outputs)
return [_tensor(f"{prefix}_Loss", "Loss", rows),
_tensor(f"{prefix}_Reductions", "Reductions", reductions),
_tensor(f"{prefix}_Means", "Means", means)]
def _evaluation_records(evaluated, data, prefix, steps):
weights, predictions = evaluated["weights"], evaluated["predictions"]
forward_rows, gradient_rows = [], []
for sample, row in enumerate(evaluated["forwards"]):
inputs = dict(sample=sample, x=data[sample][0], phiPlus=data[sample][1], phiMinus=data[sample][2],
w00=weights[0], w01=weights[1], w10=weights[2], w11=weights[3])
products = [entry["product"] for entry in row["products"]]
outputs = dict(zip(("product00", "product01", "product10", "product11"), products))
outputs.update(prediction0=row["predictions"][0], prediction1=row["predictions"][1])
forward_rows.extend(outputs.values())
_step(steps, f"{prefix}_forward_{sample}", "forward", inputs, outputs)
measured = _loss_records(evaluated["losses"], predictions, evaluated["task"], prefix, steps)
for coordinate, gradient in enumerate(evaluated["gradients"]):
inputs = dict(coordinate=coordinate, output=coordinate // 2, feature=coordinate % 2,
initialSum=gradient["initialSum"], divisor=gradient["divisor"])
outputs = {}
for sample, contribution in enumerate(gradient["contributions"]):
inputs[f"error{sample}"] = contribution["error"]
inputs[f"feature{sample}"] = contribution["feature"]
outputs[f"contribution{sample}"] = contribution["product"]
outputs[f"sum{sample}"] = contribution["total"]
gradient_rows.extend(contribution[key] for key in ("error", "feature", "product", "old", "total"))
outputs["mathematical"] = gradient["mathematical"]
_step(steps, f"{prefix}_gradient_{coordinate}", "gradient", inputs, outputs)
inputs, outputs = dict(positiveZero=0.0), {}
for coordinate in range(4):
inputs[f"mathematical{coordinate}"] = evaluated["mathematicalGradient"][coordinate]
inputs[f"enabled{coordinate}"] = evaluated["mask"][coordinate]
outputs[f"effective{coordinate}"] = evaluated["effectiveGradient"][coordinate]
_step(steps, f"{prefix}_mask", "mask", inputs, outputs)
return [_tensor(f"{prefix}_Weights", "Weights", weights),
_tensor(f"{prefix}_Predictions", "Predictions", predictions),
_tensor(f"{prefix}_Forward", "Forward", forward_rows), *measured,
_tensor(f"{prefix}_GradientRows", "GradientRows", gradient_rows),
_tensor(f"{prefix}_MathematicalGradient", "MathematicalGradient", evaluated["mathematicalGradient"]),
_tensor(f"{prefix}_EffectiveGradient", "EffectiveGradient", evaluated["effectiveGradient"]),
_tensor(f"{prefix}_Mask", "Mask", evaluated["mask"])]
def _update_records(transition, prefix, steps):
rows = []
for coordinate, row in enumerate(transition["coordinates"]):
inputs = dict(coordinate=coordinate, old=row["old"], mathematical=row["mathematical"],
effective=row["effective"], enabled=row["enabled"], eta=row["eta"])
outputs = {key: row[key] for key in ("delta", "proposed", "committed")}
_step(steps, f"{prefix}_coordinate_{coordinate}", "coordinate", inputs, outputs)
rows.extend(row[key] for key in ("old", "mathematical", "effective", "enabled", "delta", "proposed", "committed"))
_step(steps, f"{prefix}_commit", "commit",
{f"old{i}": row["old"] for i, row in enumerate(transition["coordinates"])},
{f"weight{i}": value for i, value in enumerate(transition["weights"])})
return _tensor(f"{prefix}_Update", "Update", rows)
def _cohort_records(cohort, number, key, data, steps, tensors):
initial, mask, task = cohort["initialWeights"], cohort["mask"], cohort["task"]
requested = len(cohort["transitions"])
inputs = dict(cohort=number, task=task, requestedUpdates=requested, eta=cohort["eta"])
inputs.update({f"sourceWeight{i}": value for i, value in enumerate(initial)})
inputs.update({f"mask{i}": value for i, value in enumerate(mask)})
outputs = {f"weight{i}": value for i, value in enumerate(initial)}
outputs.update({f"enabled{i}": value for i, value in enumerate(mask)})
_step(steps, f"{key}_initial", "prepared" if number == 1 else "initial", inputs, outputs)
tensors.append(_tensor(f"{key}_InitialWeights", "InitialWeights", initial))
metrics, weights = [], []
for stage, evaluated in enumerate(cohort["stages"]):
prefix = f"{key}_stage_{stage}"
tensors.extend(_evaluation_records(evaluated, data, prefix, steps))
stats = [evaluated["trainHalfMSE"], evaluated["validationHalfMSE"],
int(stage == requested), int(stage < requested)]
tensors.append(_tensor(f"{prefix}_Stats", "Stats", stats))
inputs = dict(cohort=number, task=task, stage=stage, requestedUpdates=requested)
inputs.update({f"weight{i}": value for i, value in enumerate(evaluated["weights"])})
inputs.update(trainHalfMSE=stats[0], validationHalfMSE=stats[1])
_step(steps, f"{prefix}_stats", "stats", inputs,
dict(zip(("trainHalfMSE", "validationHalfMSE", "diagnosticOnly", "hasNextUpdate"), stats)))
metrics.extend(stats[:2])
weights.extend(evaluated["weights"])
if stage < requested:
tensors.append(_update_records(cohort["transitions"][stage], f"{key}_update_{stage + 1}", steps))
tensors.extend([_tensor(f"{key}_StageMetrics", "StageMetrics", metrics, [len(cohort["stages"]), 2]),
_tensor(f"{key}_StageWeights", "StageWeights", weights, [len(cohort["stages"]), 4])])
def _memorizer_records(memo, steps):
inputs, outputs, dictionary = {}, {}, []
for key, row in enumerate(memo["dictionary"]):
x, pair = row[0], row[1:3]
inputs.update({f"dataX{key}": x, f"dataTarget{key}_0": pair[0], f"dataTarget{key}_1": pair[1]})
outputs.update({f"key{key}": x, f"target{key}_0": pair[0], f"target{key}_1": pair[1]})
dictionary.extend([x, *pair])
_step(steps, "memorizer_dictionary", "dictionary", inputs, outputs)
comparisons, selections = [], []
for sample, selection in enumerate(memo["selections"]):
inputs = dict(sample=sample, x=selection["comparisons"][0]["x"], noMatch=-1)
outputs = {}
for key, comparison in enumerate(selection["comparisons"]):
inputs[f"key{key}"] = comparison["key"]
outputs[f"equal{key}"] = comparison["equal"]
outputs[f"match{key}"] = comparison["match"]
comparisons.extend(comparison[name] for name in ("x", "key", "equal", "oldMatch", "match"))
_step(steps, f"memorizer_scan_{sample}", "scan", inputs, outputs)
match = selection["match"]
inputs = dict(sample=sample, match=match, prepared0=memo["preparedPredictions"][2 * sample],
prepared1=memo["preparedPredictions"][2 * sample + 1])
if match != -1:
inputs.update(matchedDictionary0=memo["dictionary"][match][1], matchedDictionary1=memo["dictionary"][match][2])
# Physical Dictionary[4,3] target positions skip x; fallback uses stride2.
index0 = selection["sourceIndex0"]
source0, source1 = selection["sourceValues"]
outputs = dict(sourceKind=selection["sourceKind"],
sourceSample=selection["sourceRow"], sourceIndex0=index0, sourceIndex1=selection["sourceIndex1"],
source0=source0, source1=source1,
prediction0=selection["prediction"][0], prediction1=selection["prediction"][1])
selections.extend([match, *outputs.values()])
_step(steps, f"memorizer_select_{sample}", "select", inputs, outputs)
measured = _loss_records(memo["losses"], memo["predictions"], 1, "memorizer", steps)
return [_tensor("memorizer_Dictionary", "Dictionary", dictionary),
_tensor("memorizer_Comparisons", "Comparisons", comparisons),
_tensor("memorizer_Selections", "Selections", selections),
_tensor("memorizer_Predictions", "MemorizerPredictions", memo["predictions"]),
_tensor("memorizer_Matches", "Matches", memo["matches"]), *measured]
def derive_iv55(value):
"""Bind actual independent scalar evidence to the complete adopted root."""
try:
evidence = mechanics_experiment(value)
raw, data = evidence["state"], evidence["data"]
pre, adapt, fresh = evidence["pre"], evidence["prepared"], evidence["fresh"]
memo = evidence["memorizer"]
trainable = sum(adapt["mask"])
steps, tensors = [], []
_step(steps, "setup", "setup", raw.copy(),
dict(storedParameters=4, trainableAdaptParameters=trainable, fixedFeatures=2,
outputsPerSample=2, trainSamples=4, validationSamples=4, preEta=0.5))
for sample, row in enumerate(evidence["construction"]):
inputs = dict(sample=sample, training=int(sample < 4), x=row["x"], positiveZero=row["zero"],
positiveHalf=row["positiveScale"], negativeHalf=row["negativeScale"])
outputs = dict(negatedX=row["negativeX"])
outputs.update({key: row[key] for key in ("phiPlus", "phiMinus", "preTarget0", "preTarget1", "scaledMinus", "adaptTarget0", "scaledPlus", "adaptTarget1")})
_step(steps, f"data_{sample}", "data", inputs, outputs)
tensors.extend([_tensor("Data", "Data", [entry for row in data for entry in row]),
_tensor("AdaptMask", "AdaptMask", adapt["mask"])])
for number, (key, cohort) in enumerate((("pre", pre), ("adapt", adapt), ("fresh", fresh))):
_cohort_records(cohort, number, key, data, steps, tensors)
tensors.extend(_memorizer_records(memo, steps))
p, u = raw["preUpdates"], raw["updates"]
k, s = p + 2 * u, p + 2 * u + 3
measured = 8 * (s + 1)
work = dict(
featureMaps=len(data), featureNegations=len(data), featureMaxSelections=2 * len(data),
preTargetCopies=2 * len(data), adaptTargetScalings=2 * len(data), adaptTargetAdditions=2 * len(data),
preparedWeightCopies=len(pre["stages"][-1]["weights"]), pretrainingStages=len(pre["stages"]),
preparedAdaptStages=len(adapt["stages"]), freshAdaptStages=len(fresh["stages"]),
stageCount=s, forwardSampleEvaluations=8 * s, forwardProducts=32 * s, forwardSums=16 * s,
gradientBatches=s, gradientContractions=4 * s, gradientRowContributions=4 * s, gradientProducts=16 * s,
optimizerBatches=k, usedForUpdateRows=4 * k, storedCoordinateUpdateRecords=4 * k,
enabledCoordinateUpdates=4 * p + 2 * u * trainable, finalDiagnosticBatches=3,
lossSampleEvaluations=measured, lossComponentErrors=2 * measured, lossSquares=2 * measured,
lossHalfDivisions=2 * measured, lossOutputSums=measured, orderedLossAdditions=measured,
datasetMeanDivisions=2 * (s + 1), memorizerComparisons=len(data) * 4,
memorizerSelections=len(memo["predictions"]) // 2,
memorizerMatches=sum(match != -1 for match in memo["matches"]),
memorizerMisses=sum(match == -1 for match in memo["matches"]),
dictionaryExtraSlots=12, retainedPreparedWeights=len(pre["stages"][-1]["weights"]),
memorizerForwardEvaluations=0, memorizerGradientBatches=0, memorizerOptimizerBatches=0)
pf, af, ff = pre["stages"][-1], adapt["stages"][-1], fresh["stages"][-1]
metrics = dict(fineTunedValidationLoss=af["validationHalfMSE"], freshValidationLoss=ff["validationHalfMSE"],
memorizerValidationLoss=memo["validationHalfMSE"], fineTunedTrainLoss=af["trainHalfMSE"],
freshTrainLoss=ff["trainHalfMSE"], memorizerTrainLoss=memo["trainHalfMSE"])
finish_inputs = {**raw, "trainableAdaptParameters": trainable, **metrics, **work}
_step(steps, "finish", "finish", finish_inputs, {**metrics, **work})
outputs = dict(fineTunedValidationLoss=metrics["fineTunedValidationLoss"], freshValidationLoss=metrics["freshValidationLoss"],
memorizerValidationLoss=metrics["memorizerValidationLoss"], trainableAdaptParameters=trainable,
**raw, storedParameters=4, fixedFeatures=2, outputsPerSample=2, trainSamples=4, validationSamples=4, preEta=0.5,
pretrainingTrainLoss=pf["trainHalfMSE"], pretrainingValidationLoss=pf["validationHalfMSE"],
preparedInitialTrainLoss=adapt["stages"][0]["trainHalfMSE"],
preparedInitialValidationLoss=adapt["stages"][0]["validationHalfMSE"],
freshInitialTrainLoss=fresh["stages"][0]["trainHalfMSE"],
freshInitialValidationLoss=fresh["stages"][0]["validationHalfMSE"],
fineTunedTrainLoss=metrics["fineTunedTrainLoss"], freshTrainLoss=metrics["freshTrainLoss"], memorizerTrainLoss=metrics["memorizerTrainLoss"])
for prefix, evaluated in (("pre", pf), ("fine", af), ("fresh", ff)):
outputs.update({f"{prefix}Weight{i}": value for i, value in enumerate(evaluated["weights"])})
outputs.update(work)
outputs.update(frames=len(steps), tensorCount=len(tensors))
for step in steps:
for key, entry in step["outputs"].items():
alias = f"{step['id']}_{key}"
if alias in outputs:
raise RuntimeError("IV55 output aliases must be unique.")
outputs[alias] = entry
# Repeated evidence is detached too: callers cannot mutate another copy.
return _reference.deepcopy(dict(status="defined", outputs=outputs, steps=steps, tensors=tensors, texts=_texts(raw)))
except NumericalFault as fault:
return dict(status="unavailable", code=fault.code, reason=str(fault))
def strict_json(source):
"""Reject ambiguous JSON objects/constants and retain the word of JSON -0."""
import json
def pairs(entries):
result = {}
for key, value in entries:
if key in result:
raise ValueError("Duplicate JSON object key.")
result[key] = value
return result
def constant(_value):
raise ValueError("Nonfinite JSON constant.")
def integer(token):
return -0.0 if token == "-0" else int(token)
return json.loads(source, object_pairs_hook=pairs, parse_constant=constant, parse_int=integer)
def run():
"""Default/JSON/stdin queries run no checks; --self-check is explicit."""
import json
import sys
args = sys.argv[1:]
if args == ["--self-check"]:
source_self_check() # Deliberate dispatch, outside parse and query catches.
print("IV55 canonical source self-checks completed (8 terminal checks).")
return 0
if len(args) > 1:
print("Usage: iv55.py [JSON|-|--self-check]", file=sys.stderr)
return 2
if not args:
value = dict(DEFAULT_IV55)
else:
source = sys.stdin.read() if args[0] == "-" else args[0]
try:
value = strict_json(source)
except ValueError as fault:
print(json.dumps(dict(status="unavailable", code="INVALID_INPUT", reason=str(fault)), allow_nan=False))
return 0
# No parsing catch encloses semantic evaluation, serialization or self-checks.
print(json.dumps(derive_iv55(value), allow_nan=False))
return 0
def check_public_record():
"""Adopted ordering, complete aliases, retained words and physical sources."""
summaries = (
"fineTunedValidationLoss freshValidationLoss memorizerValidationLoss trainableAdaptParameters "
"preUpdates updates scope eta storedParameters fixedFeatures outputsPerSample trainSamples validationSamples preEta "
"pretrainingTrainLoss pretrainingValidationLoss preparedInitialTrainLoss preparedInitialValidationLoss "
"freshInitialTrainLoss freshInitialValidationLoss fineTunedTrainLoss freshTrainLoss memorizerTrainLoss "
"preWeight0 preWeight1 preWeight2 preWeight3 fineWeight0 fineWeight1 fineWeight2 fineWeight3 "
"freshWeight0 freshWeight1 freshWeight2 freshWeight3 "
"featureMaps featureNegations featureMaxSelections preTargetCopies adaptTargetScalings adaptTargetAdditions "
"preparedWeightCopies pretrainingStages preparedAdaptStages freshAdaptStages stageCount forwardSampleEvaluations "
"forwardProducts forwardSums gradientBatches gradientContractions gradientRowContributions gradientProducts "
"optimizerBatches usedForUpdateRows storedCoordinateUpdateRecords enabledCoordinateUpdates finalDiagnosticBatches "
"lossSampleEvaluations lossComponentErrors lossSquares lossHalfDivisions lossOutputSums orderedLossAdditions "
"datasetMeanDivisions memorizerComparisons memorizerSelections memorizerMatches memorizerMisses "
"dictionaryExtraSlots retainedPreparedWeights memorizerForwardEvaluations memorizerGradientBatches "
"memorizerOptimizerBatches frames tensorCount"
).split()
assert len(summaries) == 76
for p in range(4):
for u in range(4):
for scope in (0, 1):
raw = dict(preUpdates=p, updates=u, scope=scope, eta=0.5)
record = derive_iv55(raw)
assert tuple(record) == ("status", "outputs", "steps", "tensors", "texts")
assert record["status"] == "defined"
outputs, steps, tensors = record["outputs"], record["steps"], record["tensors"]
k, s = p + 2 * u, p + 2 * u + 3
assert len(steps) == outputs["frames"] == 112 + 29 * k
assert len(tensors) == outputs["tensorCount"] == 52 + 12 * k
assert len(outputs) == 904 + 174 * k and len(record["texts"]) == 35
assert list(outputs)[:76] == summaries
assert outputs["gradientRowContributions"] == 4 * s
assert outputs["gradientProducts"] == 16 * s
assert outputs["enabledCoordinateUpdates"] == 4 * p + 2 * u * (4 if scope == 0 else 2)
assert record["texts"]["cohortLabels"][1] == (
"Prepared start: no pretraining steps" if p == 0 else "Adaptation from actual pretraining")
aliases = []
for step in steps:
assert tuple(step) == ("id", "label", "equation", "explanation", "inputs", "outputs")
for key, value in step["outputs"].items():
alias = f"{step['id']}_{key}"
aliases.append(alias)
assert _reference._word(outputs[alias]) == _reference._word(value)
assert list(outputs)[76:] == aliases and len(set(aliases)) == len(aliases)
assert len({step["id"] for step in steps}) == len(steps)
assert len({tensor["id"] for tensor in tensors}) == len(tensors)
for tensor in tensors:
assert tuple(tensor) == ("id", "shape", "axes", "dtype", "values", "provenance", "precision")
assert len(tensor["shape"]) == len(tensor["axes"])
cells = 1
for dimension in tensor["shape"]:
assert 1 <= dimension <= 64
cells *= dimension
assert len(tensor["values"]) == cells <= 4096
integer = tensor["id"] == "AdaptMask" or tensor["id"].endswith(("_Mask", "_Matches"))
assert tensor["dtype"] == ("int32" if integer else "float64")
assert tensor["precision"] == (0 if integer else 8)
by_id = {tensor["id"]: tensor for tensor in tensors}
source_predictions = by_id[f"pre_stage_{p}_Predictions"]["values"]
dictionary = by_id["memorizer_Dictionary"]["values"]
for sample in range(8):
select = next(step for step in steps if step["id"] == f"memorizer_select_{sample}")
assert tuple(select["outputs"]) == ("sourceKind", "sourceSample", "sourceIndex0", "sourceIndex1", "source0", "source1", "prediction0", "prediction1")
assert tuple(select["inputs"]) == (("sample", "match", "prepared0", "prepared1", "matchedDictionary0", "matchedDictionary1")
if sample < 4 else ("sample", "match", "prepared0", "prepared1"))
chosen = select["outputs"]
assert chosen["sourceIndex0"] == (3 * sample + 1 if sample < 4 else 2 * sample)
assert chosen["sourceIndex1"] == chosen["sourceIndex0"] + 1
storage = dictionary if sample < 4 else source_predictions
_same_words([chosen["source0"], chosen["source1"]],
[storage[chosen["sourceIndex0"]], storage[chosen["sourceIndex1"]]])
for name, requested in (("pre", p), ("adapt", u), ("fresh", u)):
stats = [step for step in steps if step["id"].startswith(f"{name}_stage_") and step["id"].endswith("_stats")]
assert len(stats) == requested + 1
assert sum(step["outputs"]["diagnosticOnly"] for step in stats) == 1
for stage, step in enumerate(stats):
for field in ("trainHalfMSE", "validationHalfMSE"):
_same_words([step["inputs"][field]], [step["outputs"][field]])
_same_words([step["inputs"][f"weight{i}"] for i in range(4)],
by_id[f"{name}_stage_{stage}_Weights"]["values"])
finish = steps[-1]
for field, value in finish["outputs"].items():
assert _reference._word(finish["inputs"][field]) == _reference._word(value)
for eta in (0.0, -0.0, float.fromhex("0x0.0000000000001p-1022"), 0.1, 2.0):
record = derive_iv55(dict(preUpdates=3, updates=3, scope=1, eta=eta))
assert record["status"] == "defined"
_same_words([record["outputs"]["eta"], record["steps"][0]["inputs"]["eta"], record["steps"][-1]["inputs"]["eta"]], [eta] * 3)
for step in record["steps"]:
if "eta" in step["inputs"] and not step["id"].startswith("pre_"):
_same_words([step["inputs"]["eta"]], [eta])
record = derive_iv55(dict(DEFAULT_IV55))
_same_words([record["outputs"]["fineTunedValidationLoss"], record["outputs"]["freshValidationLoss"], record["outputs"]["memorizerValidationLoss"]],
[2892617325.0 / 34359738368.0, 18225.0 / 131072.0, 3967925.0 / 33554432.0])
source = record["tensors"][0]["values"][0]
record["tensors"][0]["values"][0] = 123.0
assert record["steps"][1]["inputs"]["x"] == source
record["steps"][0]["outputs"]["storedParameters"] = 123
assert record["outputs"]["setup_storedParameters"] == 4
for raw, code, reason in (
(None, "INVALID_INPUT", "state must be a plain object."),
({}, "INVALID_INPUT", "state must have exactly preUpdates, updates, scope, eta as own fields."),
({**dict(DEFAULT_IV55), "preUpdates": 4}, "INVALID_INPUT", "preUpdates must be an integer from 0 to 3."),
({**dict(DEFAULT_IV55), "updates": 0.5}, "INVALID_INPUT", "updates must be an integer from 0 to 3."),
({**dict(DEFAULT_IV55), "scope": 2}, "INVALID_INPUT", "scope must be numeric 0 or 1."),
({**dict(DEFAULT_IV55), "updates": 0, "eta": 3}, "INVALID_INPUT", "eta must be between 0 and 2."),
({**dict(DEFAULT_IV55), "preUpdates": 10 ** 400, "eta": True}, "NONFINITE", "eta must be an actual finite number.")):
assert derive_iv55(raw) == dict(status="unavailable", code=code, reason=reason)
def check_query_check_isolation():
"""Import/query graph has no reachable self-check, even through the CLI."""
import contextlib
import io
import sys
names = ("source_self_check", "check_raw_guards", "check_hand_anchors", "check_helper_guards_and_words",
"check_memorizer", "check_controls_and_structure", "check_public_record",
"check_query_check_isolation", "check_cli_boundary")
saved = {name: globals()[name] for name in names}
original_argv, original_stdin = sys.argv, sys.stdin
def forbidden_check(*_args, **_kwargs):
raise AssertionError("An ordinary query reached a self-check.")
try:
for name in names:
globals()[name] = forbidden_check
assert derive_iv55(dict(DEFAULT_IV55))["status"] == "defined"
assert derive_iv55(None)["status"] == "unavailable"
for args, source in (([], ""), (["{}"], ""), (["-"], '{"preUpdates":0,"updates":0,"scope":1,"eta":-0}'), (["{"], "")):
sys.argv, sys.stdin = ["iv55.py", *args], io.StringIO(source)
with contextlib.redirect_stdout(io.StringIO()):
assert run() == 0
finally:
globals().update(saved)
sys.argv, sys.stdin = original_argv, original_stdin
def check_cli_boundary():
"""Known parse faults return JSON; unexpected semantic/resource errors escape."""
import contextlib
import io
import json
import sys
saved_argv, saved_stdin = sys.argv, sys.stdin
def invoke(args, source=""):
sys.argv, sys.stdin = ["iv55.py", *args], io.StringIO(source)
out, err = io.StringIO(), io.StringIO()
with contextlib.redirect_stdout(out), contextlib.redirect_stderr(err):
status = run()
return status, out.getvalue(), err.getvalue()
try:
for args, source in (([], ""), (["-"], '{"preUpdates":0,"updates":0,"scope":1,"eta":-0}'),
(['{"preUpdates":2,"updates":1,"scope":0,"eta":0.5}'], "")):
code, output, error = invoke(args, source)
assert code == 0 and not error
value = json.loads(output)
assert value["status"] == "defined"
if args == ["-"]:
_same_words([value["outputs"]["eta"]], [-0.0])
for source in ("{", "{} {}", '{"eta":0,"eta":1}', "NaN", "Infinity", "-Infinity", "1" * 5000):
code, output, error = invoke([source])
assert code == 0 and not error
result = json.loads(output)
assert tuple(result) == ("status", "code", "reason")
assert result["status"] == "unavailable" and result["code"] == "INVALID_INPUT"
for source in ("{}", "null", "[]", "true", '{"preUpdates":2,"updates":1,"scope":0,"eta":1e999}'):
code, output, error = invoke([source])
assert code == 0 and not error and json.loads(output)["status"] == "unavailable"
code, output, error = invoke(["{}", "{}"])
assert code == 2 and not output and "Usage:" in error
original_semantics = globals()["mechanics_experiment"]
try:
for fault in (RuntimeError("unexpected semantics"), json.JSONDecodeError("semantic sentinel", "", 0)):
def broken_semantics(_value):
raise fault
globals()["mechanics_experiment"] = broken_semantics
try:
invoke(["{}"])
except type(fault) as raised:
assert raised is fault
else:
raise AssertionError("Semantic failure was caught as a query result.")
finally:
globals()["mechanics_experiment"] = original_semantics
original_parser = globals()["strict_json"]
try:
for fault in (OverflowError("parser sentinel"), RecursionError("parser sentinel")):
def broken_parser(_source):
raise fault
globals()["strict_json"] = broken_parser
try:
invoke(["{}"])
except type(fault) as raised:
assert raised is fault
else:
raise AssertionError("Unknown parser/resource failure was swallowed.")
finally:
globals()["strict_json"] = original_parser
original_check = globals()["source_self_check"]
calls = []
try:
def explicit_check():
calls.append("explicit")
globals()["source_self_check"] = explicit_check
code, output, error = invoke(["--self-check"])
assert code == 0 and not error and calls == ["explicit"]
assert "8 terminal checks" in output
sentinel = AssertionError("explicit check sentinel")
def failed_check():
raise sentinel
globals()["source_self_check"] = failed_check
try:
invoke(["--self-check"])
except AssertionError as raised:
assert raised is sentinel
else:
raise AssertionError("Self-check failure was swallowed.")
finally:
globals()["source_self_check"] = original_check
finally:
sys.argv, sys.stdin = saved_argv, saved_stdin
if __name__ == "__main__":
raise SystemExit(run())
Take away the right comparison
- Pretraining changes actual readout weights from zero on PRE; adaptation changes a copied state on ADAPT. A fresh baseline uses the same ADAPT task and fine-update budget.
- Each output has its own error-feature chains. Sum the two output half-losses, then average the four samples; compute all proposals from the same old weights.
- Freezing removes a coordinate from permitted changes, not from mathematical sensitivity, stored state or diagnostic evidence.
- Perfect lookup fit can coexist with unchanged held-out error. Our held-out grid itself probes only rescaled known feature rays.
The next planned chapter, IV-56 — Low-Rank Adaptation (LoRA), will ask how the structured addition can replace full weight adaptation, with rank , factor shapes and gradients made explicit. Matrix composition in II.10 — Matrix × matrix as composition prepares that question. In this two-by-two example a rank-1 pair of factors already has four trainable entries, and rank 2 has eight, compared with four for full adaptation; it does not automatically save parameters here. The next chapter must also explain its zero-initialized branch’s update policy. No LoRA implementation or result is assumed in this lesson.