Isolate local subtraction and repeated prediction by supplying each item’s peer mean.
Supplying the mean alongside each value removes the aggregation problem. The model only needs to learn subtraction and return the result at the correct item coordinate. This is a diagnostic control for the harder peer proofs.
Seed 3700 on gpu: 3 of 3 behavioral checks met. See the measurements below.
Insights
Supplying the peer mean makes this a test of local subtraction, not learned aggregation. Each hidden deviation has both operands beside it at the same coordinate. The repeated decoder can use those visible siblings together with ancestor context to return an item-specific Number.
This control helps localize a failure before asking a model to infer a mean or select peers. Its low error cannot establish either of those harder capabilities, because the input already supplies the statistic. The recorded failed compression contrast was exploratory and is not a general impossibility result. Compare the raw-value proof to assess aggregation; use this case to check whether local arithmetic and repeated decoding work.
Setup
Code
"""Subtract a supplied peer mean and write each result to its item coordinate.The mean is deliberately provided beside every value. This diagnostic removesaggregation and peer selection, isolating local subtraction and repeatedprediction writeback.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 ="P034"ITEMS =6
A new collection can have the same deviations around a different mean. A negative raw value does not necessarily imply a negative deviation: −0.4 is 0.6 above this collection’s mean.
These correct targets are half the first example’s deviations. All three examples supply the mean explicitly, so they illustrate the local arithmetic control rather than evidence for learned collection aggregation.
Synthetic data and controls
Code
def records(*, rows: int, seed: int) -> Iterator[dict]:"""Generate collections with independent locations and centered residuals.""" rng = np.random.default_rng(seed)for _ inrange(rows): basis = rng.normal(size=ITEMS) basis -= basis.mean() basis /= np.sqrt(np.mean(np.square(basis))) scale =float(rng.uniform(0.25, 1.1)) mean =float(rng.uniform(-3.5, 3.5)) deviations = scale * basis values = mean + deviations items: list[dict[str, float]] = []for value, deviation inzip(values, deviations, strict=True): item = {"value": float(value), "deviation": float(deviation)} item["peer_mean"] = mean items.append(item)yield {"items": items}def targets(rows: list[dict]) -> np.ndarray:return np.asarray([item["deviation"] for row in rows for item in row["items"]])def predict(model: rf.Model, rows: list[dict]) -> np.ndarray: inputs = [ {"items": [{key: value for key, value in item.items() if key !="deviation"} for item in row["items"]]}for row in rows ] output = model.predict(inputs).to_pylist()return np.asarray( [value["content"] for row in output for value in row["predictions"]["collection/items/deviation"]] )def rmse(actual: np.ndarray, predicted: np.ndarray |float) ->float:returnfloat(np.sqrt(np.mean(np.square(actual - predicted))))
Model tree
Figure 1: Both branch and root keep all tokens. Each masked deviation has its value and supplied mean at the same coordinate.
Both the item branch and root use reduction=None. There is no group field in this diagnostic rung.
How it works
The repeated decoder can use visible siblings at the same coordinate. Since both operands are already supplied, a failure would point toward local arithmetic or repeated output routing before collection aggregation is tested. The generator varies the collection’s location independently of its centered deviations, so a constant or raw-value shortcut is inadequate.
Repeat three core seeds and ten calibration seeds, then test missing operands and variable lengths. The raw ungrouped case removes the supplied mean to test learned aggregation.
Reproduce
Run by stable ID from the repository root:
uv run python proofs/run.py P034
Or run the self-contained script directly:
PYTHONPATH=proofs uv run python proofs/relational/supplied_peer_mean_control.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.