Disease spread (infected count against time, population 50)
How many of 50 individuals are infected at a given time? The task asks for a PyMC (a Python library for probability models) model of this count, fitted to 80 simulated observations at times between 0 and 2. The counts at 20 more times in the same range are held out for scoring.
The Qwen3.6-35B-A3B language model wrote four programs in separate calls and four in a two-round loop, where critiques of the first two proposals went into the prompts for proposals 3 and 4.
Eight of the ten programs scored. A Monte Carlo standard error (MCSE) measures the error from estimating a score with 200 posterior draws. All six Qwen programs that scored beat the floor model (one shared probability p ~ Beta(1, 1), with Binomial(50, p) at every time) on held-out log score, but were more than two MCSEs below the reference, a program we wrote knowing how the environment generates its data. Their scores ranged from -60.7518 to -59.8279, against -45.6085 for the reference.
Predictions
At time 0.17 the reference program predicts between 5 and 13 infected, and the held-out count there is 4. That count is the only one of the 20 held-out counts outside the reference's band, so the reference covers 19. In every panel, a program's band spans the 5th to the 95th percentile of the counts simulated from its fitted model. The floor model's approximately level sampled band contains four of the twenty held-out counts. The two programs without a score have panels with their observations and no band.
Full-screen interactive predictions
Scores and coverage
Higher scores are better when comparing programs on this same held-out task. Disease-spread scores use probabilities of integer counts, while dugong scores use densities for continuous lengths, whose values depend on the length units. Coverage counts how many of the held-out counts fall inside a program's band.
Single attempt 2 scores 14.2194 below the reference, far more than the combined MCSE of the two fits, sqrt(0.0452^2 + 0.2392^2), which treats the fits as independent. Each of these MCSEs comes from the 200 draws of its fit, in ten consecutive batches of 20: within a batch we average each draw's influence on the total held-out log score, that is, how much the draw raises or lowers that total compared with an average draw, in a linear approximation (the delta method). The MCSE is then the standard deviation of the ten batch means divided by the square root of ten.
| Program | Held-out log score | MCSE | Coverage (of 20) |
|---|---|---|---|
| Reference | -45.6085 | 0.0452 | 19 |
| Floor model | -262.1291 | 0.5574 | 4 |
| Single attempt 1 | -59.9733 | 0.2544 | 17 |
| Single attempt 2 | -59.8279 | 0.2392 | 17 |
| Single attempt 3 | -60.0128 | 0.2010 | 17 |
| Single attempt 4 | failed at model build | ||
| Loop proposal 1 (round 1) | -59.9324 | 0.1301 | 17 |
| Loop proposal 2 (round 1) | failed at model build | ||
| Loop proposal 3 (round 2) | -60.5719 | 0.0794 | 19 |
| Loop proposal 4 (round 2) | -60.7518 | 0.1383 | 19 |
Loop proposals 3 and 4, the two programs from the second round of the loop, use a negative-binomial likelihood, which allows more than 50 infections in a population of 50. Their bands contain 19 of the 20 held-out counts, and the upper end of each band exceeds 50 at 8 of the 20 held-out times. Their held-out log scores, -60.5719 and -60.7518, are below that of loop proposal 1, the binomial proposal from the first round (-59.9324).
Four-chain fits
We also fitted the eight programs that scored with four chains of 1,000 draws after 1,000 tuning steps per chain, using the same programs, priors, and data. All six generated programs that scored remain above the floor model and more than two MCSEs below the reference. All eight fits have largest R-hat below 1.01, bulk and tail effective sample sizes of at least 400, and no divergences.
| Program | Four-chain log score | MCSE | Largest R-hat | Smallest bulk ESS | Divergences |
|---|---|---|---|---|---|
| Reference | -45.7105 | 0.0131 | 1.0007 | 1564.5 | 0 |
| Floor model | -262.4590 | 0.1396 | 1.0015 | 1424.9 | 0 |
| Single attempt 1 | -59.9154 | 0.0487 | 1.0089 | 814.8 | 0 |
| Single attempt 2 | -59.9141 | 0.0350 | 1.0031 | 1011.8 | 0 |
| Single attempt 3 | -59.9346 | 0.0357 | 1.0008 | 2219.8 | 0 |
| Loop proposal 1 (round 1) | -59.8554 | 0.0307 | 1.0012 | 2470.1 | 0 |
| Loop proposal 3 (round 2) | -60.6768 | 0.0157 | 1.0011 | 2479.1 | 0 |
| Loop proposal 4 (round 2) | -60.6474 | 0.0198 | 1.0022 | 2364.0 | 0 |