← Ziding Zhang

Memory reward pooling

A synthetic check of how five-token boundaries affect an adaptive self-study reward.

November 5, 2026 · Research note


Ben Geist’s Self-Study is a Moving Target describes a reward for choosing questions that expose gaps in a model’s compressed memory. The reward uses token-level disagreement between a teacher reading the document and a student using the memory. It groups answer positions into five-token tiles, takes each tile’s largest error, and weights the result by document dependence.

The formula penalizes low-error tiles. Does that ensure that adding a low-error token lowers the score? Under the tiling convention below, it does not. This is a synthetic equation check of the article’s November 4 version.

Start with 20 token-error values: eighteen are 0.2 nats; positions four and five are 2.0 nats. Set every tile’s document-dependence weight to 0.5. Anchor five-token groups at the beginning and include the final partial group. Then prepend one more 0.2-error value, leaving every original value unchanged.

SequenceTile maximaBase reward
Original 20 values2, 0.2, 0.2, 0.21.744826
One low-error value prepended2, 2, 0.2, 0.2, 0.24.151836

The two high-error values now fall in different tiles. Each earns a positive contribution, while the number of low-maximum tiles stays at three. The score rises by 2.407009, to about 2.38 times its original value. No additional high-error value was introduced. Appending a complete low-error tile lowers the score as intended; the counterexample concerns how an insertion changes the grouping.

A fresh agent independently reconstructed this calculation from the article before seeing our implementation or results. It obtained the same tile maxima and rewards. The short calculation is below; it uses only Python’s standard library.

Recompute the example
import math

L, lower, upper, c, rho = 0.5, 0.5, 10.0, 2.5, 0.5
k = (lower + upper) / (2 * lower * upper)

def transform(peak):
    return L * ((upper - lower) / 2 + (upper + lower) / 2
                * math.tanh(k * (peak - L) / L
                            + 0.5 * math.log(lower / upper)))

def score(errors):
    peaks = [max(errors[i:i + 5]) for i in range(0, len(errors), 5)]
    values = [transform(p) for p in peaks]
    unknown = sum(rho * max(v, 0) for v in values)
    known = sum(rho * max(-v, 0) for v in values)
    return peaks, unknown - c * known

base = [0.2, 0.2, 0.2, 2.0, 2.0] + [0.2] * 15
for errors in (base, [0.2] + base):
    peaks, reward = score(errors)
    print(peaks, f"{reward:.6f}")

Constants follow Sections 4.2 and 4.7. This computes the base reward without the regional bonus or subsequent advantage normalization. The article does not specify the final-partial-tile convention in Section 4.2; including it is an explicit choice here.

Low error is a proxy for known content in this example, not a measurement of meaning. Prepending real text can change tokenization, later prediction errors and attention-derived dependence. Those quantities are held fixed here. The calculation therefore establishes a grouping effect under stated assumptions; it supplies no estimate of its prevalence, effect on learning, or use by a trained question writer.

To assess the consequence for selection, a useful diagnostic is to rescore a complete candidate pool at all five pooling origins while preserving each answer’s token errors and attention values. Report the changing edge-bin sizes, pair reversals and top-choice ties. A reversal refutes exact ranking invariance for that pool; it does not establish that a real padding intervention preserves the model’s predictions. Averaging the five scores would need its own evaluation before being treated as an improvement.

This note reports the synthetic calculation only. Confidence is high in its arithmetic under the declared convention. Its public test is whether another reader can reproduce the numbers, identify a mismatch with the intended reward, or propose a useful scoring invariant. Corrections are welcome at @ziding.

Published as part of a small research notebook. Version 1; substantive corrections will be dated here.