You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Extremal: Salem-Spencer witnesses and training data

Exact optimal 3-term-arithmetic-progression-free subsets of {1, ..., n} for n=1..115. The corpus contains 115 instance rows and 32,275 distinct (n, set) witnesses. Each row groups the collected optimal sets for one n.

The gemma4_ssset_* configurations additionally provide the offline data used by the Gemma4 Salem-Spencer experiment: rule examples, frontier starting states, expert repair trajectories and the reference roots excluded from expert replay. The default salem_spencer configuration remains the primary witness corpus.

Load

from datasets import load_dataset

instances = load_dataset("seanmamasde/extremal", "salem_spencer", split="train")
for row in instances:
    n = row["n"]
    for solution in row["solutions"]:
        assert len(solution) == row["optimal_size"]

The standalone file is salem_spencer.parquet, also used by the extremal package's optional witness-table loader.

Schema

Column Type Meaning
n int32 Ambient interval {1, ..., n}
optimal_size int32 Published optimal cardinality for this n
solution_count int32 Number of stored sets in the row
solutions list[list[int32]] Distinct feasible sets of that cardinality

A set contains distinct integers in range and no a < b < c with a + c = 2*b. All listed witnesses were checked for feasibility, cardinality and duplication before publication. The corpus was collected by deterministic DFS; validating the listed witnesses is separate from re-running its full enumeration.

Experimental use

The intended setup learns small n and evaluates larger n. This release supplies the n=1..115 corpus; the HF split name train does not add a validation/test partition. Choose parameter cutoffs explicitly for a particular experiment.

Counts vary substantially with n: n=50 has 7,726 stored sets, whereas n=115 has 4. For balanced parameter exposure, sample n first and then a witness, rather than sampling uniformly over every stored set.

The default configuration contains primary integer-set witnesses.

Gemma4 SSSet offline training data

Configuration Split Records Path
gemma4_ssset_rules train 1,536 gemma4_ssset/rules/train.parquet
gemma4_ssset_rules validation 192 gemma4_ssset/rules/val.parquet
gemma4_ssset_roots train 179,208 gemma4_ssset/roots/train.parquet
gemma4_ssset_repairs train 1,568 trajectories / 25,148 actions gemma4_ssset/repairs/train.parquet
gemma4_ssset_repair_exclusions reference 64 roots / 63 symmetry orbits gemma4_ssset/repair_exclusions.parquet
from datasets import load_dataset

rules = load_dataset("seanmamasde/extremal", "gemma4_ssset_rules", split="train")
roots = load_dataset("seanmamasde/extremal", "gemma4_ssset_roots", split="train")
repairs = load_dataset("seanmamasde/extremal", "gemma4_ssset_repairs", split="train")

Record schemas and recipe

  • Rules: n, state, turns_remaining, demonstrated_kind, messages. Each messages list contains a system/user prompt and one assistant action. Random legal states teach ADD/REMOVE/DONE without optimal-set answer targets. Each action kind has 512 training and 64 validation examples. The n range is 5..120; validation uses multiples of 8, training uses the other n values. These are the complete generated pools; the released SFT adapter actually saw 256 unique training examples over 32 updates, with a 96-example validation gate.
  • Roots: n, state, optimal_size, seed_size, len, cls, required_removals, remaining_gap, shift, source_k, has_add. For each n=5..120, choose the largest k<n with r3(k)=r3(n)-1 and cross every witness of k with shifts 0..n-k. There are 4,010 open and 175,198 jammed roots; every root's cardinality gap is 1. The recipe uses 19,942 source witnesses at 27 frontier k values. These are augmented starting-state rows, not independent GT solutions or a record of every root actually sampled during training.
  • Repairs: n, root_index, initial, target, horizon, moves. Each nested move has messages, action JSON in action, integer value, current state, and remaining turns. A translated/reflected target of the required cardinality is selected by minimum symmetric difference. REMOVE-extra then ADD-missing actions are replayed exactly. Seed 20260915+n, a cap of 16 trajectories per n and the original length/budget limits select the bank. Budget observations are retimed to 192 while preserving all states/actions/targets. These are expert imitation examples, not on-policy PPO data. The historical sampler chooses n, then trajectory, then action; uniform flattened-action sampling would be a different training distribution.
  • Exclusions: n, state, root_index, cohort. The two cohorts are original_probe and n_balanced, 32 rows each. Their 63 translation/reflection orbits are excluded from expert replay only. The roots were in the historical RL starting-state pool, so this reference is not an independent held-out RL split.

Reproduce

Generation entry point: llmcosolver/examples/gemma4_ssset/generate_data.py. Detailed instructions and training commands: DATASETS.md.

From that example directory, with extremal, llmcosolver and PyArrow installed:

git clone git@hf.co:datasets/seanmamasde/extremal data/hf
python generate_data.py --witnesses data/hf/salem_spencer.parquet \
  --exclusions data/hf/gemma4_ssset/repair_exclusions.parquet \
  --out data/generated --workers 4

gemma4_ssset/manifest.json records the deterministic recipe and generated counts. The generated records were compared with the original experiment's rules, frontier-root Parquet, and H192 expert JSONL, including row order, prompts, action IDs and budgets. Online policy rollouts are generated during RL and are not part of this offline release. The related adapters are at seanmamasde/gemma4_ssset.

Mathematical references

Downloads last month
11