Skip to content

Review the token-guess studies and scope the cycle-2 re-run - #13

Draft
Al-does wants to merge 6 commits into
mainfrom
cursor/token-guess-study-review-2c8a
Draft

Review the token-guess studies and scope the cycle-2 re-run#13
Al-does wants to merge 6 commits into
mainfrom
cursor/token-guess-study-review-2c8a

Conversation

@Al-does

@Al-does Al-does commented Jul 25, 2026

Copy link
Copy Markdown
Owner

Review of mess3_token_guess_cycle_1 and mess_3_kelly_cycle_1/2/3 ahead of a re-run, plus the measurement work needed before that re-run can be designed. No training conditions are added.

What the review found

The headline metric is mostly measuring something trivial. An affine probe fitted to the one-hot encoded raw observations, with no network anywhere in the pipeline, scores belief-probe R² = 0.9668. A randomly initialised copy of the study transformer scores 0.8733. The supervised replication reaches 0.9989. So the metric's usable range is 0.032 wide, and reward_only (0.8552) and max_entropy (0.8558) land below the untrained network, while all eight Kelly cycle-2 wager arms land below the raw-observation floor.

Belief-probe R² landscape

Greedy token accuracy is saturated. The trivial repeat-the-previous-token rule scores 0.6732 and an exact Bayesian filter saturates at 0.6883. Every reported arm falls in 0.6733–0.6860, inside a 0.015 range.

None of the published orderings is statistically supported. The Kelly cycles reported mean ± std where the ± was a population standard deviation over three seeds. Recomputed as a t-based interval and paired across shared seeds, 0 of 34 pairwise orderings survive a Holm correction — including the headline PPO-versus-IQN gap, which is +0.095 with a 95% interval of [−0.017, +0.206].

Three-seed intervals against the references

Choosing a better operating point

Cycle 1's parameters are close to the worst choice in the symmetric MESS3 family. A fast-mixing chain lets the belief be approximated by an exponentially weighted average of recent one-hot observations, which is exactly what an affine probe computes.

Metric range across MESS3 parameters

Moving to α=0.70, p=0.995 triples the belief-probe range (floor 0.967 → 0.906) and multiplies the accuracy range by ten (0.015 → 0.145), keeping the task learnable at a Bayes accuracy of 0.68.

Belief-probe R² declines under continued supervised training at a converged cross-entropy (0.9567 → 0.9318 over 6,000 AdamW steps). The decline cycle 1 saw over 20M PPO steps is therefore not caused by reinforcement learning, which makes optimiser and learning rate larger influences on the headline metric than most of the differences between arms.

Two sizing results

Context length is 6x larger than needed. CausalTransformerEncoder bands attention at every layer, so the receptive field is n_layers × context_len — 192 observations at the current settings, verified by perturbing inputs at increasing distance. The belief needs about 32. Dropping to context_len=16 leaves a 50% margin and makes a learner step 3.7x faster, a cached rollout step 3.4x faster, and a whole PPO run 1.6x faster at matched environment steps.

The probe needs to get bigger as the chain gets slower. Running the identical probe 60 times on fresh rollouts, the spread of the answer is 0.0025 at 30,000 test steps on the slower chain against 0.0004 at the cycle-1 parameters — the same size as the smallest seed-to-seed spreads, so probe noise would be indistinguishable from seed variance. It falls to 0.0005 by 500,000 steps, which cost seconds.

Why a slower chain costs probe precision

This also corrects REVIEW.md: the i.i.d. bootstrap there understates the error whenever the chain is slow. A moving-block bootstrap predicted ±0.0047 and replication measured ±0.0047.

What this PR adds

path purpose
REVIEW.md the audit, with every number reproducible
PLAN.md proposed cycle-2 design and the open questions
metric_references.py, references/ task-intrinsic floors and ceilings for both metrics
operating_point.py, task_parameters/ metric range, precision, and context sizing across MESS3 parameters
statistics.py, audit/ seed-level intervals, paired comparison, Holm correction, noncentral-t power planning, and a re-analysis of the committed results

All three leaves are runnable and their outputs are committed:

uv run rl-harness experiments.mess3_token_guess_cycle_2.references.experiment
uv run rl-harness experiments.mess3_token_guess_cycle_2.task_parameters.experiment
uv run rl-harness experiments.mess3_token_guess_cycle_2.audit.experiment

Testing

uv run pytest -q -m "not slow" — 89 passed, 1 skipped. 33 are new, and several encode the findings directly: that the raw-observation floor exceeds three published cycle-1 scores, that only conditional_decoupled_kelly_iqn clears the floor in Kelly cycle 3, that the headline PPO-versus-IQN gap is unresolved at three seeds, that the receptive field is n_layers × context_len, and that replication confirms the slow chain is the noisier probe.

All three leaves were also run at full size and under --smoke.

Note

Running with B2_* configured writes the bucket name into tracked results/. Pass --no-upload-artifacts from an environment where those are secrets.

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 6 commits July 25, 2026 23:40
Belief-probe R2 and greedy token accuracy were reported as bare numbers in
cycle 1. Both have floors and ceilings imposed by the task that are large
relative to the gaps between conditions, so the reported values cannot be read
as a measure of what a training objective induced.

Derive those references from the environment: the accuracy of an exact Bayesian
filter as a function of how many observations it may see, the R2 of the study's
own probe applied to the raw one-hot observations, and the R2 of the same probe
applied to a randomly initialised copy of the study transformer.

Co-authored-by: Alex Vardakostas <Al-does@users.noreply.github.com>
The Kelly cycles reported mean plus-or-minus a population standard deviation
over three seeds and drew orderings from it. Recomputed as a t-based interval
on the mean, and paired across the seeds each pair of arms shares, none of the
34 published pairwise orderings survives a Holm correction, including the
headline PPO-versus-IQN gap.

Add the aggregation the study should have used, and an analysis leaf that
regenerates the audit from the committed results so the claim is checkable.

Co-authored-by: Alex Vardakostas <Al-does@users.noreply.github.com>
REVIEW.md audits cycle 1 and the three Kelly cycles against the references and
the seed-level statistics. PLAN.md proposes a consolidated re-run: ten paired
seeds, a two-stage coefficient sweep on disjoint seeds, log-spaced checkpoint
probing, and a pre-registered comparison family, with the open design questions
left open.

Co-authored-by: Alex Vardakostas <Al-does@users.noreply.github.com>
One axis showing where each condition sits relative to a probe on the raw
observations, an untrained copy of the same transformer, and the supervised
replication, plus a forest plot of the three-seed intervals.

Co-authored-by: Alex Vardakostas <Al-does@users.noreply.github.com>
Cycle 1's parameters are close to the worst choice in this family: a fast-mixing
chain lets the belief be approximated by an exponentially weighted average of
recent one-hot observations, which is what an affine probe computes. Slowing the
chain to a self-transition of 0.995 at alpha 0.70 roughly triples the
belief-probe range and multiplies the accuracy range by ten.

The cost is precision. The state correlation time rises from 7 steps to 133, so a
30,000-step probe rollout collected as sixteen trajectories holds about 100
independent samples rather than 2,300, and the honest block-bootstrap interval
widens from +/-0.0006 to +/-0.0046. Context length is unaffected: 64 observations
still suffice, because the belief converges well before the state decorrelates.

Also record that belief-probe R2 declines under continued supervised training at
a converged cross-entropy, at both the old and the new parameters. The decline
cycle 1 saw over 20M PPO steps is not caused by reinforcement learning, which
makes optimiser and learning rate larger influences on the headline metric than
most of the differences between arms.

Co-authored-by: Alex Vardakostas <Al-does@users.noreply.github.com>
CausalTransformerEncoder bands attention at every layer, so the receptive field
is n_layers * context_len. Confirmed by perturbing inputs at increasing distance:
three layers at context_len 64 reach exactly 192 observations, while the belief
needs about 32. Dropping to context_len 16 leaves a 50% margin, costs nothing
measurable in available belief R2 at any candidate operating point, and makes a
learner step 3.7x faster, a cached rollout step 3.4x faster, and a whole PPO run
1.6x faster at matched environment steps.

Also replace the probe-precision argument with direct replication. Running the
identical probe 60 times on fresh rollouts gives a spread of 0.0025 at 30,000
test steps on the slower chain, against 0.0004 at the cycle-1 parameters, and
falls to 0.0005 by 500,000 steps. This confirms the moving-block bootstrap, which
predicted 0.0047 against a measured 0.0047, and confirms that the i.i.d.
bootstrap used in REVIEW.md understates the error whenever the chain is slow.

Co-authored-by: Alex Vardakostas <Al-does@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants