Preserve enough score and payload association in learned summaries to retrieve the winner.
Can a learned summary retain the association between the highest score and its payload? This repeats the three-candidate retrieval problem through attention reductions instead of retaining every encoded slot.
Seed 23 on gpu: 3 of 3 behavioral checks met. See the measurements below.
Insights
A compressed summary can preserve enough information to retrieve the value attached to the highest score. The summary slots do not represent named candidates. The item branch reduces first, so requesting several root outputs cannot recreate information that the earlier summary failed to retain.
The payload-rotation control removes accuracy while preserving score and payload marginals. That supports relational information surviving the tested route, rather than success from collection statistics alone. The retained-token route records better accuracy on the matched task, but this comparison supplies no speed or memory measurements. Treat summary width as task-specific capacity; longer collections, other payload types, and exact retrieval remain separate questions.
Setup
Code
"""Retrieve the payload paired with the largest of three scores.The root retains three learned Attention outputs and the item branch uses one.Rotating payloads without rotating targets tests whether the score/payloadpairing, rather than their separate distributions, drives the prediction.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 ="P022"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: The item branch learns one summary, then the root learns three summaries. These outputs are not named candidate slots.
The item branch uses rf.Attention() and the root uses rf.Attention(n_outputs=3). These outputs are learned joint summaries; output position does not declare a particular candidate’s identity.
How it works
Item encoding can bind the score and payload before reduction. The learned summaries must retain enough of those associations for the root decoder to recover the winning payload. Rotating payloads while retaining the original answer tests whether success depends on that binding rather than statistics of the collection.
Calibrate across three core seeds and ten calibration seeds. Sweep reduction width and candidate count before treating summary capacity as established; argmin, category payloads, and group-filtered retrieval remain unimplemented. The pass-through proof provides the simpler route comparison. Use exact preprocessing when retrieval must be exact.
Reproduce
Run by stable ID from the repository root:
uv run python proofs/run.py P022
Or run the self-contained script directly:
PYTHONPATH=proofs uv run python proofs/relational/attention_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.