SMC weighted accuracy vs checkpoint
IS-weighted correctness over the M particles, per checkpoint, one line per particle count. Error bars = prompt-level bootstrap 95% CI.
SMC validity (no-error rate) vs checkpoint
Fraction of programs that run without error. Rises with M; no skyline (validity is not an accuracy).
iid sampling vs SMC weighted accuracy
Pure iid sampling from the proposal (no SMC, N=50 samples/prompt) overlaid on the SMC weighted-accuracy lines per M. Same prompt-level bootstrap 95% CI on every line (see Methods). The honest picture: iid ≈ SMC at M=1 (the twist only acts through resampling, which is inert at M=1) and the SMC lift at higher M stays within the CIs — on this held-out eval the no-error twist gives no measurable accuracy gain over raw sampling.
Per-prompt: base vs best checkpoint (interactive)
Hover any point for the prompt text. Below the diagonal = the best checkpoint (iter 13000) improved that prompt. Color = library; marker symbol = difficulty (✕ hard, ◆ medium, ● easy). Difficulty (cross-setting ceiling): hard 76medium 51easy 127 of 254.
Per-library net-gain (base → best, per M)
Δmean = mean(best) − mean(base) per library. Every library is net-positive at every M.
| M | library | n | base | best | Δmean | gained | worsened |
|---|---|---|---|---|---|---|---|
| 1 | Numpy | 66 | 0.263 | 0.374 | +0.111 | 20 | 6 |
| 1 | Pandas | 87 | 0.157 | 0.303 | +0.146 | 30 | 5 |
| 1 | Pytorch | 20 | 0.150 | 0.283 | +0.133 | 6 | 2 |
| 1 | Scipy | 32 | 0.177 | 0.354 | +0.177 | 11 | 3 |
| 1 | Sklearn | 35 | 0.171 | 0.352 | +0.181 | 12 | 3 |
| 1 | Tensorflow | 14 | 0.238 | 0.405 | +0.167 | 5 | 2 |
| 1 | ALL | 254 | 0.193 | 0.339 | +0.146 | 84 | 21 |
| 5 | Numpy | 66 | 0.328 | 0.447 | +0.119 | 29 | 15 |
| 5 | Pandas | 87 | 0.176 | 0.275 | +0.098 | 27 | 15 |
| 5 | Pytorch | 20 | 0.227 | 0.303 | +0.076 | 8 | 4 |
| 5 | Scipy | 32 | 0.255 | 0.322 | +0.067 | 12 | 3 |
| 5 | Sklearn | 35 | 0.164 | 0.357 | +0.192 | 20 | 5 |
| 5 | Tensorflow | 14 | 0.295 | 0.368 | +0.073 | 5 | 3 |
| 5 | ALL | 254 | 0.234 | 0.344 | +0.110 | 101 | 45 |
| 10 | Numpy | 66 | 0.312 | 0.372 | +0.060 | 21 | 22 |
| 10 | Pandas | 87 | 0.208 | 0.261 | +0.053 | 28 | 20 |
| 10 | Pytorch | 20 | 0.161 | 0.342 | +0.181 | 10 | 2 |
| 10 | Scipy | 32 | 0.308 | 0.341 | +0.032 | 13 | 7 |
| 10 | Sklearn | 35 | 0.259 | 0.434 | +0.175 | 19 | 6 |
| 10 | Tensorflow | 14 | 0.265 | 0.410 | +0.145 | 6 | 2 |
| 10 | ALL | 254 | 0.254 | 0.338 | +0.084 | 97 | 59 |
| 20 | Numpy | 66 | 0.334 | 0.404 | +0.069 | 33 | 16 |
| 20 | Pandas | 87 | 0.216 | 0.241 | +0.025 | 29 | 19 |
| 20 | Pytorch | 20 | 0.285 | 0.348 | +0.064 | 9 | 6 |
| 20 | Scipy | 32 | 0.264 | 0.326 | +0.062 | 12 | 10 |
| 20 | Sklearn | 35 | 0.231 | 0.415 | +0.185 | 18 | 8 |
| 20 | Tensorflow | 14 | 0.355 | 0.416 | +0.061 | 7 | 3 |
| 20 | ALL | 254 | 0.268 | 0.336 | +0.068 | 108 | 62 |
Methods
Bootstrap 95% CIs — the error bars on the line plots
A prompt-level percentile bootstrap, done independently for each (checkpoint, M) cell. The two things to keep straight: (i) we bootstrap one number per prompt (M and R are collapsed first), and (ii) the CI is a pair of percentiles, not an average of averages.
- Collapse M and R → one scalar per prompt. For prompt p, run SMC R = 3 times; each run gives an
IS-weighted correctness (Σi weighti·correcti over its M particles); average the R runs
→ waccp ∈ [0, 1]. This yields a vector
v = [wacc₁, …, wacc₂₅₄]of length n = 254 — one value per held-out prompt (not per raw sample). - Resample
vwith replacement to size n. The unit resampled is the prompt (some prompts repeat, some drop out) — not individual samples. - Mean of that resample = one replicate. Repeat B = 2000× → 2000 bootstrap means.
- Point estimate = mean(
v) (the plotted marker). 95% CI = the 2.5th and 97.5th percentiles of the 2000 bootstrap means (the error bar). It is not the mean of the 2000 means.
def boot(v): # v = 254 per-prompt weighted accuracies
means = [mean(resample_with_replacement(v, size=len(v))) for _ in range(2000)]
return mean(v), percentile(means, 2.5), percentile(means, 97.5) # point, lo, hi
Fixed seed. Because the unit is the prompt, the interval reflects how much the mean would move on a different draw of held-out prompts; the percentile method keeps it inside [0, 1]. (This is the macro mean — equal weight per prompt; it does not bootstrap the within-prompt Monte-Carlo noise, which would be a separate 2-level bootstrap.)
Skyline CI (the red band) — a different estimator
The skyline (0.378 [0.332, 0.424]) is pooled, not macro: Σp correctp / Σp validp — a ratio of sums across prompts, so a prompt is implicitly weighted by how many valid samples it has. Its bootstrap re-pools each resample, so the interval is around the pooled value, not the per-prompt mean used above. The skyline band and the line-plot CIs are therefore not the same kind of interval.
iid sampling
“iid sampling” draws N = 50 independent samples per prompt straight from the proposal (temperature 0.6, no SMC, no twist). Per-prompt correctness = fraction of the 50 that run correctly; the plotted point is the macro-mean over the 254 prompts, with the same prompt-level bootstrap 95% CI as the SMC lines above. On this held-out eval the twisted SMC delivers no measurable lift over iid — iid ≈ SMC at M=1 (the twist acts only through resampling, which is inert at M=1) and the SMC lift at higher M stays within the CIs.
Difficulty — the scatter marker symbol
A fixed per-prompt “ceiling” = the max weighted accuracy that prompt reaches across every setting (base iter-0 and best iter-13000, over all M ∈ {1, 5, 10, 20}). hard: ceiling < 0.10 (no configuration solves it); medium: 0.10 ≤ ceiling < 0.50; easy: ceiling ≥ 0.50.