Research log Small Model Experimentation
GitHub

Qwen3.5-4B Operator Inventory Scaling Stress

Finished2026-06-24imported · line ZOperator and Skill InventoriesGitHub ↗
Right answer always present, still hard to pick

The one idea you need

Picture a recipe with two blanks, each filled from a spice rack of 512 interchangeable spices. That is a quarter-million possible pairings, and many taste identical on the handful of dishes you sampled, so the samples alone cannot reveal which pairing is truly the right one.

The question

When you build little programs by filling blanks from a growing toolbox of number-crunching functions, does scaling to hundreds of tools break your ability to find the right program?

What we found

It depends on what you mean by break. The correct program always stays inside the pile you search, even with two blanks and 512 tools. But picking it out from a few examples alone drops to under half, versus always solved with a single blank, and the search balloons to over a quarter-million combinations per problem. The wall is ambiguity and compute cost, not reachability.

Why it matters

Do not brute-force two-blank program search over a large toolbox: cost grows with the square of the tool count. Train a small model to shortlist a few likely tools, then ask a couple of targeted examples to break the remaining ties.

Correct program always reachable in the pile100%still true even with two blanks and 512 tools
Picking it right from examples alone, at 512 tools100% → 46%single blank always solved; two blanks land under half
Combinations to search per problem262,144two blanks at 512 tools, versus 512 for one blank
Lift from three targeted example questions46% → 71%two blanks at 512 tools, practical rule; best-possible reaches 83%
On this page
  1. Results at a glance
  2. Overview
  3. Report
    1. Summary
    2. Key Scaling Rows
    3. Template Breakdown
    4. Active Query Diagnostic
    5. Fixed Candidate-Budget Diagnostic
    6. Decision
    7. Artifacts
  4. Experiment log
  5. Figures
  6. Data files
  7. Reproduce
  8. Related

Results at a glance 4

Picking the right program from examples as the toolbox grows

How to read

The horizontal axis is toolbox size, from a handful of tools up to 512. The vertical axis is how often a few examples alone pick the exact right program; higher is better. One line is single-blank programs, the other is two-blank.

20%40%60%80%100%120%200400one-hole templatestwo-hole templates

Takeaway → Single-blank programs stay near always-solved throughout, while two-blank programs sag toward half as the toolbox grows and identical-looking combinations pile up.

Data table
Operator library sizeone-hole templatestwo-hole templates
8100%75%
16100%62.5%
3291.7%50%
6487.5%45.8%
12883.3%37.5%
25691.7%54.2%
512100%45.8%

Numbers from reports/library_depth_summary.csv

Technical framing

Zero-query program selection as the operator library grows — The target always stays reachable, but zero-query selection for two-hole programs falls to ~46% at 512 operators as ambiguity grows.

Would checking only a fixed shortlist still catch the answer?

How to read

The horizontal axis is toolbox size. The vertical axis is how often the correct two-blank program still falls inside a capped shortlist of combinations you agree to check; higher is better. Each line is a different shortlist size.

0%50%100%150%200400budget 16384budget 4096budget 1024

Takeaway → Every capped shortlist catches the answer for small toolboxes, then collapses toward zero once the toolbox reaches the dozens, so a fixed shortlist stops working.

Data table
Operator library sizebudget 1024budget 4096budget 16384
8100%100%100%
16100%100%100%
32100%100%100%
6437.5%100%100%
1280%29.2%100%
2564.2%8.3%37.5%
5120%4.2%12.5%

Numbers from reports/prefix_summary.csv

Technical framing

Would a small fixed candidate budget still contain the target? (two-hole) — Naive fixed budgets collapse for two-hole search past 64 operators (0-12.5% at 512), quantifying what a learned top-k shortlister must beat.

Asking for a few extra examples to recover the right pick

How to read

The horizontal axis is how many extra targeted examples you request. The vertical axis is how often you then pick the exact right two-blank program at the largest toolbox; higher is better. One line is a practical question-picking rule, one is the best-possible questions.

40%60%80%100%0123oracle eliminationmax-split heuristicmax-split heurist…

Takeaway → Both lines climb sharply from under half with no extra examples to the seventies or eighties after three, so a few well-chosen clues recover most of the lost accuracy.

Data table
Query budgetmax-split heuristicoracle elimination
045.8%45.8%
162.5%66.7%
266.7%83.3%
370.8%83.3%

Numbers from reports/active_summary.csv

Technical framing

Active queries recover selection at 512 operators (two-hole) — A few active queries lift selection from 46% to 71-83%, but only after the full N^2 candidate set has already been enumerated.

One two-blank program shape is far harder to pin down

How to read

Bars show how often examples pick the exact right two-blank program, at two toolbox sizes, for two program shapes: a scale-and-remainder arithmetic shape versus a compare-two-things-and-choose shape. Taller bars are better.

0%20%40%60%80%128 operators128 operators75%0%512 operators512 operators66.7%25%

Takeaway → The compare-and-choose shape sits near zero to a quarter while the arithmetic shape stays two-thirds or better, because comparing reveals too little to separate the look-alikes.

Data table
Operator library sizepair_affine_modpair_compare_gate
128 operators75%0%
512 operators66.7%25%

Numbers from reports/library_template_summary.csv

Technical framing

Which two-hole template is hard: low-information comparison gates — The comparison-gate template leaves thousands of visible-consistent candidates, so zero-query selection collapses relative to affine-mod.

In the author’s words from the Report · “Summary”

Target coverage remains 100.0% for two-hole programs because the target is still in the library and visible cases retain it, but zero-query selection drops to 45.8% as visible-consistent ambiguity grows. The practical bottleneck is now compute budget and residual ambiguity, not target reachability. For two-hole programs at 512 operators, fixed prefix coverage is 1024: 0.0%, 4096: 4.2%, 16384: 12.5%; a deployable top-k shortlister must preserve target coverage while avoiding full N^2 enumeration.

Overview

Standalone scaling stress test for typed operator inventory search.

The experiment expands a same-signature operator library from single digits to hundreds of list[int] -> int operators, then compares exhaustive operator-hole search across one-hole and two-hole program templates. The goal is to find where full inventory enumeration remains cheap and identifiable, and where a Qwen3.5-4B inventory-conditioned top-k shortlister would become necessary.

Large artifacts, if any are produced later, belong outside this directory:

/workspace/large_artifacts/qwen35_4b_operator_inventory_scaling_stress

Layout

  • configs/: experiment configuration.
  • data/: generated scaling benchmark records.
  • logs/: chronological experiment log.
  • reports/: result JSON, CSVs, figures, and final report.
  • run_logs/: captured command output.
  • scripts/: dataset, evaluation, and reporting entry points.
  • src/: standalone operator library, task generator, and vectorized search.

Main Commands

python scripts/build_dataset.py
python scripts/eval_scaling.py --data data/operator_scaling_eval.jsonl --output reports/operator_scaling_results.json
python scripts/make_report.py

Report

Rendered from reports/qwen35_4b_operator_inventory_scaling_stress_report.md

Summary

This standalone no-training experiment scales a same-signature list[int] -> int operator inventory from 8 to 512 operators. It measures one-hole templates, where exhaustive search scales as N, and two-hole templates, where exhaustive search scales as N^2.

At 512 operators, one-hole exhaustive search enumerates 512 candidates per record, while two-hole exhaustive search enumerates 262144 candidates per record. Target coverage remains 100.0% for two-hole programs because the target is still in the library and visible cases retain it, but zero-query selection drops to 45.8% as visible-consistent ambiguity grows.

The practical bottleneck is now compute budget and residual ambiguity, not target reachability. For two-hole programs at 512 operators, fixed prefix coverage is 1024: 0.0%, 4096: 4.2%, 16384: 12.5%; a deployable top-k shortlister must preserve target coverage while avoiding full N^2 enumeration.

Key Scaling Rows

libraryholesrecordsraw candidatestarget visible %oracle %selected %visible candidatestarget rank p90
81248100.00100.00100.001.007.00
822464100.00100.0075.002.4243.10
6412464100.00100.0087.501.9659.10
642244096100.00100.0045.80300.793027.10
512124512100.00100.00100.0026.54459.80
512224262144100.00100.0045.808695.79226195.10

Raw candidate cost

Coverage and selection

Visible ambiguity

Template Breakdown

The hard case is the low-information comparison template. At 512 operators, pair_compare_gate leaves far more visible-consistent candidates than pair_affine_mod, and zero-query selection falls accordingly.

librarytemplateselected %visible candidatestarget rank p90
128pair_affine_mod75.002.8313415.40
128pair_compare_gate0.003729.9210655.40
512pair_affine_mod66.70357.50229748.60
512pair_compare_gate25.0017034.08220053.90

Active Query Diagnostic

For two-hole programs, active querying reduces ambiguity but does not remove the search-cost issue. It helps after the full candidate set has already been generated and filtered. The oracle-elimination curve is a ceiling on query choice quality; max-split is the deployable heuristic.

librarypolicybudgetselected %candidate count
64active_max_split045.80300.79
64active_max_split150.00138.29
64active_max_split270.8071.71
64active_max_split383.3037.54
64oracle_elimination045.80300.79
64oracle_elimination170.8020.83
64oracle_elimination287.509.42
64oracle_elimination395.806.33
512active_max_split045.808695.79
512active_max_split162.504199.46
512active_max_split266.701990.25
512active_max_split370.801110.21
512oracle_elimination045.808695.79
512oracle_elimination166.701451.33
512oracle_elimination283.30573.33
512oracle_elimination383.30403.04

Active query lift two hole

Fixed Candidate-Budget Diagnostic

The fixed-prefix diagnostic is deliberately simple: it asks whether a small canonical candidate budget would contain the target before semantic shortlisting. The answer becomes no as two-hole search grows, which quantifies the budget a learned shortlister has to beat.

Fixed budget prefix coverage

Decision

The target remains reachable under exhaustive inventory search through 512 operators, including two-operator compositions. The reason to train an inventory-conditioned Qwen3.5-4B sketcher is now sharply defined: top-k shortlisting for large two-hole libraries. The training target should be coverage at fixed candidate budgets, especially 1024, 4096, and 16384, with active querying retained as a post-shortlist disambiguator.

Artifacts

  • Dataset: data/operator_scaling_eval.jsonl
  • Dataset manifest: data/dataset_manifest.json
  • Full result JSON: reports/operator_scaling_results.json
  • CSVs: reports/library_depth_summary.csv, reports/library_template_summary.csv, reports/target_bucket_summary.csv, reports/prefix_summary.csv, reports/active_summary.csv
  • Large artifacts: /workspace/large_artifacts/qwen35_4b_operator_inventory_scaling_stress

Experiment log 4

Show the running log (4 entries, 2026-06-24)

2026-06-24

Initialized a standalone operator inventory scaling stress test.

Design commitments:

  • Generate a large library of same-signature list[int] -> int operators.
  • Sweep inventory sizes from 8 through 512 operators.
  • Include both one-hole and two-hole templates so candidate count scales as N and N^2.
  • Keep the first run no-training: measure exhaustive search cost, coverage, visible ambiguity, active-query lift, and fixed-budget prefix coverage.
  • Store any future model artifacts outside the experiment directory.

Initial implementation:

  • Added a standalone library generator with 512 same-signature operators across core, order-statistic, count, modular, and bounded aggregate families.
  • Added four templates:

    • single_mod
    • single_offset
    • pair_affine_mod
    • pair_compare_gate
  • Added vectorized exhaustive search over one-hole and two-hole candidate ids.
  • Added active query evaluation for max-split and oracle-elimination policies.
  • Added reporting with CSV summaries and PNG figures.

Smoke Validation

Commands:

python -m py_compile scripts/*.py src/*.py
python scripts/build_dataset.py --library-sizes 8,16 --records-per-template 2 > run_logs/dataset_smoke_console.log 2>&1
python scripts/eval_scaling.py \
  --data data/operator_scaling_eval.jsonl \
  --output reports/_smoke_operator_scaling_results.json \
  > run_logs/eval_smoke_console.log 2>&1

Result:

  • Syntax check passed.
  • Smoke dataset contained 16 records.
  • Candidate rows: 16.
  • Active rows: 128.
  • Target-visible coverage was 100% for both one-hole and two-hole records.
  • Two-hole ambiguity appeared immediately: average visible-consistent candidates rose from 1.5 at 8 operators to 11.75 at 16 operators.

Full Scaling Sweep

Commands:

python scripts/build_dataset.py > run_logs/dataset_build_console.log 2>&1
python scripts/eval_scaling.py \
  --data data/operator_scaling_eval.jsonl \
  --output reports/operator_scaling_results.json \
  > run_logs/eval_scaling_console.log 2>&1
python scripts/make_report.py > run_logs/report_generation_console.log 2>&1

Dataset:

  • 336 total records.
  • Library sizes: 8, 16, 32, 64, 128, 256, 512.
  • 48 records per library size.
  • 24 one-hole records and 24 two-hole records per library size.
  • 6 visible cases, 18 hidden cases, and 48 query-pool cases per record.
  • 512 generated same-signature operators.

Primary result by library size and hole count:

libraryholesrecordsraw candidatestarget visibleoracle hidden-allselected hidden-allvisible candidates
81248100.0%100.0%100.0%1.00
822464100.0%100.0%75.0%2.42
6412464100.0%100.0%87.5%1.96
642244096100.0%100.0%45.8%300.79
512124512100.0%100.0%100.0%26.54
512224262144100.0%100.0%45.8%8695.79

Two-hole template breakdown:

librarytemplateselected hidden-allvisible candidates
128pair_affine_mod75.0%2.83
128pair_compare_gate0.0%3729.92
512pair_affine_mod66.7%357.50
512pair_compare_gate25.0%17034.08

Active-query result on two-hole records:

librarypolicybudget 0budget 1budget 2budget 3
64max-split45.8%50.0%70.8%83.3%
64oracle-elimination45.8%70.8%87.5%95.8%
512max-split45.8%62.5%66.7%70.8%
512oracle-elimination45.8%66.7%83.3%83.3%

Fixed-prefix coverage on two-hole records:

library1024 candidates4096 candidates16384 candidates
6437.5%100.0%100.0%
1280.0%29.2%100.0%
2564.2%8.3%37.5%
5120.0%4.2%12.5%

Interpretation:

  • Exhaustive target reachability remains 100% through 512 operators because the target is in the inventory and full search enumerates all candidates.
  • The real failure mode is the combination of quadratic candidate growth and residual visible ambiguity.
  • pair_compare_gate is the stress case: binary outputs leave thousands of visible-consistent two-operator candidates at large library sizes.
  • Active querying helps, but it operates after full enumeration and does not solve the candidate-budget problem.
  • The next trained experiment should target Qwen3.5-4B inventory-conditioned top-k shortlisting for two-hole programs, measured by coverage at fixed budgets of 1024, 4096, and 16384 candidates.

Generated artifacts:

  • Report: reports/qwen35_4b_operator_inventory_scaling_stress_report.md
  • Full results: reports/operator_scaling_results.json
  • CSV summaries: reports/library_depth_summary.csv, reports/library_template_summary.csv, reports/target_bucket_summary.csv, reports/prefix_summary.csv, reports/active_summary.csv
  • Figures: reports/figures/*.png

Final Audit

Commands/checks:

python -m py_compile scripts/*.py src/*.py
find . -type d -name __pycache__ -prune -exec rm -rf {} +
find . -type f -size +50M -print
du -sh . /workspace/large_artifacts/qwen35_4b_operator_inventory_scaling_stress

Audit result:

  • Final syntax check passed.
  • No Python cache directories remain.
  • No file larger than 50 MB is present in the experiment directory.
  • Experiment directory size: 4.0 MB.
  • External large-artifact directory size: 0.
  • A dynamic text scan against sibling experiment directory names found no references.
  • No standalone-forbidden temporal references were found.
  • PNG figures were opened and verified with PIL.

Figures 5

active query lift two hole
active query lift two hole · reports/figures/
coverage and selection
coverage and selection · reports/figures/
fixed budget prefix coverage
fixed budget prefix coverage · reports/figures/
raw candidate cost
raw candidate cost · reports/figures/
visible ambiguity
visible ambiguity · reports/figures/

Data files 6

Result tables and metrics copied from the experiment folder — preview inline or open the raw file.

Reproduce

Run steps are documented inside the experiment folder (README and scripts).

Browse the experiment folder on GitHub ↗