youkad's picture
Add four-chain fit tables and their fitting settings
3e9e30f verified
|
Raw History Blame Contribute Delete
8.8 kB
metadata
license: mit
language:
  - en
pretty_name: SynthStats demonstrations
size_categories:
  - 1K<n<10K
tags:
  - probabilistic-programming
  - pymc
  - bayesian-inference
  - boxinggym
configs:
  - config_name: programs
    data_files: programs.csv
    default: true
  - config_name: dugongs_program_summary
    data_files: dugongs/dugongs-program-summary.csv
  - config_name: dugongs_observations
    data_files: dugongs/dugongs-observations.csv
  - config_name: dugongs_heldout_predictions
    data_files: dugongs/dugongs-heldout-predictions.csv
  - config_name: dugongs_predictive_curves
    data_files: dugongs/dugongs-predictive-curves.csv
  - config_name: dugongs_four_chain_fits
    data_files: dugongs/dugongs-four-chain-fits.csv
  - config_name: disease_spread_program_summary
    data_files: disease-spread/disease-spread-program-summary.csv
  - config_name: disease_spread_observations
    data_files: disease-spread/disease-spread-observations.csv
  - config_name: disease_spread_heldout_predictions
    data_files: disease-spread/disease-spread-heldout-predictions.csv
  - config_name: disease_spread_predictive_curves
    data_files: disease-spread/disease-spread-predictive-curves.csv
  - config_name: disease_spread_four_chain_fits
    data_files: disease-spread/disease-spread-four-chain-fits.csv

SynthStats demonstrations

This dataset (SynthStats/synthstats-demonstrations, released under the MIT licence) holds the observations, programs, held-out predictions and predictive curves behind the two statistical modelling demonstrations on synthstats.org/demonstrations from the SynthStats project site. Both tasks come from BoxingGym, which can be thought of as a benchmark of simulated scientific environments: in dugong growth, the length of a dugong (length) is simulated from its age (age) with the environment's own growth curve, priors and noise, whereas in disease spread the response is the number of infected individuals (Infected_Count) at a given time (Time).

Each scored program is fitted to the 80 visible observations, then assessed by summing its log predictive densities at the other 20. Higher scores are better, but can be compared only within the same task. The comparisons below use a floor model, which predicts the same distribution at every input, and a simulator-informed reference program.

In the dugong task, the prompted language model Qwen3.6-35B-A3B wrote eight PyMC programs (PyMC is a Python library for probability models). On the 20 held-out observations of this one simulated dataset, two scored above the reference program's -4.5586 by more than two Monte Carlo standard errors (the errors from estimating scores with 200 posterior draws): single attempt 2 (-3.1969) and single attempt 4 (-3.2267), with gains of 1.3617 (Monte Carlo standard error 0.0784) and 1.3319 (0.0787). Loop proposal 4 (-4.5121) had a positive gain of 0.0465 (0.1162), within two Monte Carlo standard errors of the reference. The floor model scored -14.0898.

For disease spread, none of its programs reached the reference (-45.6085), whereas all six of those that scored beat the floor model (-262.1291).

In each task the language model received a description in English together with 80 observations of one simulated dataset, the other 20 being held out for scoring, and the prompt also contained a table of the columns together with the summary statistics of the 80 visible rows.

As for the eight programs that it wrote per task, four are single attempts, while the other four come from a loop of two rounds, between which the language model, called again as a critic, reads the first round's fitted programs and their predictions, its comments going into the prompt for the last two.

For dugong growth, the reference program can be thought of as the environment's growth curve written in PyMC: three parameters with the environment's own priors, plus a fixed noise scale. We sample the reference's posterior over |lam|, whose prior density for r > 0 is p(r) + p(−r), with p the Normal(0.4, 0.5) density of lam, which leaves its predictive distribution unchanged.

With the reference and floor model included, each task has ten programs, numbered 01 to 10. The reference is 01 and the floor model 02, followed at 03 to 06 by single attempts 1 to 4, then at 07 to 10 by loop proposals 1 to 4 (proposals 1 and 2 come from round 1, proposals 3 and 4 from round 2).

For disease spread, the two programs whose outcome in programs and disease_spread_program_summary is failure at model build are single attempt 4 and loop proposal 2. The prediction and curve tables have rows for programs that pass all the checks and receive a score.

Fitting

Setting Value
Fitting rows the 80 visible observations
Chains 1 for the comparison; 4 for the four-chain fits
Tuning iterations 200 for the comparison; 1,000 per chain for the four-chain fits
Retained posterior draws 200 for the comparison; 1,000 per chain for the four-chain fits
New observations simulated per draw and input 20 for the comparison
Predictions per input 4,000 for the comparison
Predictive interval used for coverage 90%, from the 5th to the 95th percentile of the predictions
Libraries PyMC 5.21.1, PyTensor 2.28.3, ArviZ 0.23.4

Configurations

Configuration Rows One row Columns
programs (default) 20 one program task (dugongs or disease-spread), program_id, role, outcome (scored or failed), failure, heldout_log_score, source (the PyMC program, as published at synthstats.org/programs/dugongs and synthstats.org/programs/disease-spread)
dugongs_program_summary, disease_spread_program_summary 10 each one program program_id, role, outcome, failure, heldout_log_score, avg_heldout_log_score (score / 20), covered_count, total (20), empirical_coverage (covered_count / 20), program_mcse (Monte Carlo standard error of the program's total held-out log score)
dugongs_observations, disease_spread_observations 100 each one observation input, response, split (visible: 80 fitting rows; heldout: 20 scoring rows), row
dugongs_predictive_curves, disease_spread_predictive_curves 1,210 (10 programs) and 968 (8 programs) one program at one of 121 grid inputs program_id, role, row, input, predictive_q05, predictive_median, predictive_q95 (5th, 50th and 95th percentiles of the 4,000 predictions at that input)
dugongs_four_chain_fits, disease_spread_four_chain_fits 10 and 8 one program program_id, program_file, role, heldout_log_score, program_mcse, max_rhat, min_ess_bulk, min_ess_tail, divergences
dugongs_heldout_predictions, disease_spread_heldout_predictions 200 (10 programs) and 160 (8 programs) one program at one held-out observation the seven curve columns, observed_length or observed_Infected_Count, covered (True when the response lies between predictive_q05 and predictive_q95), log_predictive_density (log predictive density at this observation), heldout_log_score, avg_heldout_log_score, program_mcse (Monte Carlo standard error of the program's total held-out log score)

In the held-out prediction files, each row refers to an observation, while heldout_log_score and avg_heldout_log_score refer to the program, so the same scores recur on its rows.

Loading

from datasets import load_dataset

programs = load_dataset("SynthStats/synthstats-demonstrations", "programs", split="train")
summary = load_dataset("SynthStats/synthstats-demonstrations", "dugongs_program_summary", split="train")

Generation records

Path Contents
generation/generation.json Program roles, outcomes, scores, source hashes, model settings and disease-spread calls
generation/environment.json Simulator reference source hashes, scoring and prediction settings, and library versions
generation/split.json Visible and held-out row indices, split seed and published observation CSV hashes
generation/prompts/ Configured common prompts for both tasks; captured disease-spread messages and returned text
generation/requests/ Captured disease-spread program-generation and critic requests
generation/responses/ Captured disease-spread program-generation and critic responses
generation/simulator/ Reference copies of the BoxingGym dugong and disease-spread simulator sources, with their MIT licence