Retrieve the number paired with the highest score while preserving every candidate.
The model must find the highest-scoring item and return that item’s payload. Scores and payloads are independently generated, so predicting a collection average cannot establish the required pairing.
Seed 23 on gpu: 3 of 3 behavioral checks met. See the measurements below.
Insights
The model learns which payload belongs to the highest score, rather than merely predicting a statistic of the whole collection. All candidate scores and payloads are visible, and their shared item coordinates preserve the pairing. The root answer is hidden; its scalar decoder uses the retained encoded evidence to produce one Number.
Rotating payloads preserves both marginal distributions but breaks the original answer’s association with its score. The resulting loss of accuracy supports use of that pairing. It does not establish exact argmax computation or behavior beyond the tested three candidates. Preserve candidate evidence when diagnosing similar learned retrieval tasks; compute a known selection rule directly when its result must be exact.
Setup
Code
"""Retrieve an argmax payload while preserving every candidate token.Both root and item reductions are disabled. Compare held-out and training error,then rotate only visible payloads to test whether the learned answer depends onwhich payload belongs to the largest score.Run this file with --help for seed, training-budget, and reporting options."""from __future__ import annotationsfrom collections.abc import Iteratorfrom functools import partialimport lightning.pytorch as litimport numpy as npimport torchfrom reporting import reportimport relflow as rfPROOF_ID ="P023"LENGTH =3
The third item now has the highest score, so the correct target changes to 5. These labels illustrate the selection rule; they are not model predictions.
This is the first record with its payloads rotated. The control deliberately retains the original target, −3, although the visible winning payload is now 2. Worse error against that retained target shows that the original pairing mattered.
Figure 1: Three score/payload candidates remain available through both item and root reductions; the scalar answer is masked.
Both the item branch and root use reduction=None, keeping encoded candidate slots available to the answer decoder.
How it works
The shared item coordinate binds each score to its payload. Retained item context lets the decoder learn selection by score followed by value retrieval. The paired control rotates only payloads while keeping scores and original answers. Both marginal distributions remain intact; the winning association does not.
Repeat across three core seeds and ten calibration seeds, then vary candidate count, selection rule, and payload type. This establishes a three-candidate learning behavior; exact application retrieval belongs in preprocessing. Compare the attention route.
Reproduce
Run by stable ID from the repository root:
uv run python proofs/run.py P023
Or run the self-contained script directly:
PYTHONPATH=proofs uv run python proofs/relational/pass_through_number_payload.py
Add --accelerator gpu for CUDA or --seed 42 for another seeded experiment. --steps 2 checks execution with a short training budget; it is recorded as a smoke run.