Qwen3.5-4B Operator Inventory Search Pilot
The one idea you need
Several math operations — add up, keep the largest, keep the first — all take a list of numbers and return one number, so they look identical from outside, like kitchen gadgets that each take a bowl and hand back one item. Only running each on the same inputs reveals which one matches.
The question
When several math operations all turn a list of numbers into one number and look identical from the outside, can a program figure out which one was actually used?
What we found
Yes, but only if that operation sits on the program's list of candidates. Given the full set of seven operations, the program recovered the correct hidden one every time — matching against examples alone already solved about nine in ten cases, and a couple of extra probing inputs closed the rest to perfect. A shorter list that left the operation out recovered zero. Search was never the bottleneck; stocking the candidate was.
Why it matters
When a small model must identify which operation produced some outputs, spend effort widening the roster of candidate operations and adding a couple of probing test inputs — not on training the model to recover operations that plain example-matching already handles.
On this page
Results at a glance 3
How to read
Two groups of bars compare a short three-operation list against the full seven-operation list. In each group, one bar shows whether the right operation was even among the candidates, the other whether it was actually picked. Taller is better.
Takeaway → Both bars sit flat at zero for the short list but leap to full and near-full height for the complete list — the missing operations become recoverable only once they are included.
Data table
| operator inventory arm | target in candidates | selected correctly (budget 0) |
|---|---|---|
| closed vocab (sum/first/last) | 0% | 0% |
| full inventory (7 operators) | 100% | 92.5% |
Numbers from reports/qwen35_4b_operator_inventory_search_pilot_report.md status-summary table (also reports/status_summary.csv)
Technical framing
Held-out operator recovery: closed vocabulary vs full inventory — Type-colliding held-out operators are unreachable with a closed vocabulary but fully recoverable once the inventory contains them.
How to read
Lines track how often the right operation gets picked as the number of extra probing test inputs rises from none up to three. Two lines use the full seven-operation list; a flat bottom line uses the short list. Higher is better.
Takeaway → The full-list lines climb from about nine in ten to a perfect score within one or two inputs, while the short-list line never leaves zero.
Data table
| active query budget | active max-split | oracle elimination | closed vocab (either policy) |
|---|---|---|---|
| 0 | 92.5% | 92.5% | 0% |
| 1 | 99.2% | 100% | 0% |
| 2 | 100% | 100% | 0% |
| 3 | 100% | 100% | 0% |
Numbers from reports/qwen35_4b_operator_inventory_search_pilot_report.md active-query table (also reports/active_summary.csv)
Technical framing
Active queries close the gap on held-out records (full inventory) — One or two disambiguating queries push full-inventory selection from 92.5% to 100%; no budget rescues the closed vocabulary.
How to read
One bar per operation shows how often the search picked it correctly using the full seven-operation list, covering both newly added operations and ones already stocked. Taller is better.
Takeaway → Most bars reach near the top; greatest-common-divisor and first-element sit lowest because their outputs most often match another operation on the examples.
Data table
| operator | selected correctly |
|---|---|
| gcd (held-out) | 76.7% |
| max (held-out) | 100% |
| min (held-out) | 96.7% |
| prod (held-out) | 96.7% |
| first (in-bank) | 83.3% |
| last (in-bank) | 93.3% |
| sum (in-bank) | 93.3% |
Technical framing
Per-operator selection accuracy with the full inventory — Most operators are near-perfect; gcd and first collide most with other candidates and need active disambiguation.
In the author’s words from the Report · “Summary”
This standalone no-training pilot tests the search-side ceiling for type-colliding operator identification. Every aggregate candidate has signature list[int] -> int; the task is to recover the correct operator from execution cases, not from type. Two arms are compared: arm1_closed_vocab: closed operator set sum, first, last. arm0_full_inventory: full operator inventory sum, first, last, max, min, prod, gcd.
Overview
Standalone no-training pilot for open-vocabulary operator identification.
The experiment tests whether type-colliding held-out aggregate operators can be recovered by operator-level inventory search before training an inventory-conditioned Qwen3.5-4B sketcher. Every aggregate candidate has signature list[int] -> int, so type alone cannot identify the operator.
Large artifacts, if any are produced later, belong outside this directory:
/workspace/large_artifacts/qwen35_4b_operator_inventory_search_pilot
Layout
configs/: experiment configuration.data/: generated operator-collision task 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 executor, task generator, and operator-hole search.
Main Commands
python scripts/build_dataset.py
python scripts/eval_operator_search.py --data data/operator_inventory_eval.jsonl --output reports/operator_search_results.json
python scripts/make_report.pyReport
Rendered from reports/qwen35_4b_operator_inventory_search_pilot_report.md
Summary
This standalone no-training pilot tests the search-side ceiling for type-colliding operator identification. Every aggregate candidate has signature list[int] -> int; the task is to recover the correct operator from execution cases, not from type.
Two arms are compared:
arm1_closed_vocab: closed operator setsum,first,last.arm0_full_inventory: full operator inventorysum,first,last,max,min,prod,gcd.
Key Findings
- Closed vocabulary held-out target coverage was
0.0%; full inventory held-out target coverage was100.0%. - Full inventory recovered the held-out target in visible-consistent candidates for
100.0%of records. - Full inventory visible selection solved
92.5%of held-out records at budget 0, versus0.0%for closed vocabulary. - Active max-split on full inventory held-out records improved from
92.5%at budget 0 to100.0%at budget 2. - Oracle-elimination querying reached
100.0%on full inventory held-out records by budget 1. - Search cost stayed small in this pilot: full inventory enumerated
56.0raw candidates per held-out record.
Interpretation: the search/bank side can recover the held-out type-colliding operators in this substrate. The missing piece is not program-level search coverage; it is a deployable way for the model to name or shortlist inventory operators as the library scales.
Status Summary
| arm | operator_status | records | target_raw_pct | target_visible_pct | oracle_hidden_all_pct | selected_hidden_all_pct | avg_raw_candidate_count | avg_visible_consistent_operator_count |
|---|---|---|---|---|---|---|---|---|
| arm0_full_inventory | held_out | 120 | 100.0 | 100.0 | 100.0 | 92.5 | 56.0 | 1.20 |
| arm0_full_inventory | in_bank | 90 | 100.0 | 100.0 | 100.0 | 90.0 | 56.0 | 1.32 |
| arm1_closed_vocab | held_out | 120 | 0.0 | 0.0 | 0.0 | 0.0 | 24.0 | 0.09 |
| arm1_closed_vocab | in_bank | 90 | 100.0 | 100.0 | 100.0 | 93.3 | 24.0 | 1.11 |



Operator Breakdown
Full inventory by operator:
| operator | status | records | target_raw_pct | selected_hidden_all_pct | avg_visible_consistent_operator_count |
|---|---|---|---|---|---|
| gcd | held_out | 30 | 100.0 | 76.7 | 1.37 |
| max | held_out | 30 | 100.0 | 100.0 | 1.10 |
| min | held_out | 30 | 100.0 | 96.7 | 1.30 |
| prod | held_out | 30 | 100.0 | 96.7 | 1.03 |
| first | in_bank | 30 | 100.0 | 83.3 | 1.50 |
| last | in_bank | 30 | 100.0 | 93.3 | 1.27 |
| sum | in_bank | 30 | 100.0 | 93.3 | 1.20 |

Active Query Diagnostic
| arm | status | policy | budget | records | selected_hidden_all_pct | avg_operator_candidate_count |
|---|---|---|---|---|---|---|
| arm0_full_inventory | held_out | active_max_split | 0 | 120 | 92.5 | 1.20 |
| arm0_full_inventory | held_out | active_max_split | 1 | 120 | 99.2 | 1.02 |
| arm0_full_inventory | held_out | active_max_split | 2 | 120 | 100.0 | 1.00 |
| arm0_full_inventory | held_out | active_max_split | 3 | 120 | 100.0 | 1.00 |
| arm0_full_inventory | held_out | oracle_elimination | 0 | 120 | 92.5 | 1.20 |
| arm0_full_inventory | held_out | oracle_elimination | 1 | 120 | 100.0 | 1.00 |
| arm0_full_inventory | held_out | oracle_elimination | 2 | 120 | 100.0 | 1.00 |
| arm0_full_inventory | held_out | oracle_elimination | 3 | 120 | 100.0 | 1.00 |
| arm0_full_inventory | in_bank | active_max_split | 0 | 90 | 90.0 | 1.32 |
| arm0_full_inventory | in_bank | active_max_split | 1 | 90 | 94.4 | 1.11 |
| arm0_full_inventory | in_bank | active_max_split | 2 | 90 | 97.8 | 1.02 |
| arm0_full_inventory | in_bank | active_max_split | 3 | 90 | 100.0 | 1.00 |
| arm0_full_inventory | in_bank | oracle_elimination | 0 | 90 | 90.0 | 1.32 |
| arm0_full_inventory | in_bank | oracle_elimination | 1 | 90 | 97.8 | 1.02 |
| arm0_full_inventory | in_bank | oracle_elimination | 2 | 90 | 100.0 | 1.00 |
| arm0_full_inventory | in_bank | oracle_elimination | 3 | 90 | 100.0 | 1.00 |
| arm1_closed_vocab | held_out | active_max_split | 0 | 120 | 0.0 | 0.09 |
| arm1_closed_vocab | held_out | active_max_split | 1 | 120 | 0.0 | 0.05 |
| arm1_closed_vocab | held_out | active_max_split | 2 | 120 | 0.0 | 0.03 |
| arm1_closed_vocab | held_out | active_max_split | 3 | 120 | 0.0 | 0.02 |
| arm1_closed_vocab | held_out | oracle_elimination | 0 | 120 | 0.0 | 0.09 |
| arm1_closed_vocab | held_out | oracle_elimination | 1 | 120 | 0.0 | 0.00 |
| arm1_closed_vocab | held_out | oracle_elimination | 2 | 120 | 0.0 | 0.00 |
| arm1_closed_vocab | held_out | oracle_elimination | 3 | 120 | 0.0 | 0.00 |
| arm1_closed_vocab | in_bank | active_max_split | 0 | 90 | 93.3 | 1.11 |
| arm1_closed_vocab | in_bank | active_max_split | 1 | 90 | 98.9 | 1.02 |
| arm1_closed_vocab | in_bank | active_max_split | 2 | 90 | 100.0 | 1.00 |
| arm1_closed_vocab | in_bank | active_max_split | 3 | 90 | 100.0 | 1.00 |
| arm1_closed_vocab | in_bank | oracle_elimination | 0 | 90 | 93.3 | 1.11 |
| arm1_closed_vocab | in_bank | oracle_elimination | 1 | 90 | 100.0 | 1.00 |
| arm1_closed_vocab | in_bank | oracle_elimination | 2 | 90 | 100.0 | 1.00 |
| arm1_closed_vocab | in_bank | oracle_elimination | 3 | 90 | 100.0 | 1.00 |

Decision
Arm 0 already reaches the coverage ceiling on held-out operators at small search cost. That means the immediate fix lives on the bank/search side for this substrate: grow the operator inventory and apply operator-level active disambiguation. A trained inventory-conditioned sketcher is still useful, but its job should be top-k operator shortlisting for larger libraries, not recovering coverage that search cannot find.
Artifacts
- Dataset:
data/operator_inventory_eval.jsonl - Dataset manifest:
data/dataset_manifest.json - Full result JSON:
reports/operator_search_results.json - CSVs:
reports/status_summary.csv,reports/operator_summary.csv,reports/template_summary.csv,reports/active_summary.csv - Large artifacts:
/workspace/large_artifacts/qwen35_4b_operator_inventory_search_pilot
Experiment log 4
Show the running log (4 entries, 2026-06-24)
2026-06-24
Initialized a standalone no-training operator inventory search pilot.
Design commitments:
- Test type-colliding aggregate operators with identical signature
list[int] -> int. - Run the cheap pilot before any QLoRA training.
Compare:
arm1_closed_vocab: current closed operator set,sum,first,last.arm0_full_inventory: full in-context operator inventory,sum,first,last,max,min,prod,gcd.
- Keep downstream verified completion and active query logic unchanged in spirit: enumerate candidates, filter by visible execution, optionally request active query cases, score hidden cases.
- Track search cost via raw candidate counts and visible-consistent candidate counts.
- Store any future large model artifacts outside the experiment directory.
Initial implementation:
- Created standalone experiment package.
- Added local executor with
sum,first,last,max,min,prod, andgcd. Added benchmark generator with three templates:
mod_formatoffset_formatthreshold_gate
- Added operator-hole completion and active query evaluator.
- Added README, config, and large-artifact manifest.
Smoke Validation
Commands:
python -m py_compile scripts/*.py src/*.py
python scripts/build_dataset.py --records-per-family 2 > run_logs/dataset_smoke_console.log 2>&1
python scripts/eval_operator_search.py \
--data data/operator_inventory_eval.jsonl \
--output reports/_smoke_operator_search_results.json \
--max-records 8 \
> run_logs/eval_smoke_console.log 2>&1Result:
- Syntax check passed.
- Smoke dataset contained 42 records.
- On the first 8 records,
arm0_full_inventoryrecovered the target for all 5 held-out records;arm1_closed_vocabrecovered 0 of 5 held-out records. - This matched the intended falsification shape, so I proceeded to the full no-training pilot.
Full No-Training Pilot
Commands:
python scripts/build_dataset.py > run_logs/dataset_build_console.log 2>&1
python scripts/eval_operator_search.py \
--data data/operator_inventory_eval.jsonl \
--output reports/operator_search_results.json \
> run_logs/eval_operator_search_console.log 2>&1
python scripts/make_report.py > run_logs/report_generation_console.log 2>&1Dataset:
- 210 total records.
- 90 in-bank operator records:
sum,first,last. - 120 held-out operator records:
max,min,prod,gcd. - All aggregate operators share signature
list[int] -> int. - Each record has 6 visible cases, 18 hidden cases, and 48 active-query pool cases.
- Templates:
mod_format,offset_format,threshold_gate.
Primary result by operator status:
| arm | status | records | target raw | target visible | oracle hidden-all | selected hidden-all | avg raw candidates | avg visible-consistent operators |
|---|---|---|---|---|---|---|---|---|
arm0_full_inventory | held-out | 120 | 100.0% | 100.0% | 100.0% | 92.5% | 56.0 | 1.20 |
arm0_full_inventory | in-bank | 90 | 100.0% | 100.0% | 100.0% | 90.0% | 56.0 | 1.32 |
arm1_closed_vocab | held-out | 120 | 0.0% | 0.0% | 0.0% | 0.0% | 24.0 | 0.09 |
arm1_closed_vocab | in-bank | 90 | 100.0% | 100.0% | 100.0% | 93.3% | 24.0 | 1.11 |
Held-out operator breakdown for arm0_full_inventory:
| operator | records | target raw | selected hidden-all | avg visible-consistent operators |
|---|---|---|---|---|
gcd | 30 | 100.0% | 76.7% | 1.37 |
max | 30 | 100.0% | 100.0% | 1.10 |
min | 30 | 100.0% | 96.7% | 1.30 |
prod | 30 | 100.0% | 96.7% | 1.03 |
Active-query result on held-out operators:
| arm | policy | budget 0 | budget 1 | budget 2 | budget 3 |
|---|---|---|---|---|---|
arm0_full_inventory | max-split | 92.5% | 99.2% | 100.0% | 100.0% |
arm0_full_inventory | oracle-elimination | 92.5% | 100.0% | 100.0% | 100.0% |
arm1_closed_vocab | max-split | 0.0% | 0.0% | 0.0% | 0.0% |
arm1_closed_vocab | oracle-elimination | 0.0% | 0.0% | 0.0% | 0.0% |
Interpretation:
- The held-out operator target is always present once the inventory is allowed into the operator hole.
- Six visible cases underdetermine a small fraction of records, especially
gcd, but operator-level active querying closes that ambiguity. - At this scale, this is a bank/search-side fix rather than a training-side fix. A trained inventory-conditioned sketcher should be treated as a later top-k shortlisting mechanism for larger libraries, not as the immediate way to recover missing coverage.
Generated artifacts:
- Report:
reports/qwen35_4b_operator_inventory_search_pilot_report.md - Full results:
reports/operator_search_results.json - CSV summaries:
reports/status_summary.csv,reports/operator_summary.csv,reports/template_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_search_pilotAudit 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.4 MB.
- External large-artifact directory size: 0.
- A dynamic text scan against sibling experiment directory names found no references.
- No references to external experiment paths were found.
- PNG figures were opened and verified with PIL.
Figures 5
Data files 5
Result tables and metrics copied from the experiment folder — preview inline or open the raw file.
reports/_smoke_operator_search_results.json135 kBreports/active_summary.csv2.4 kBreports/operator_summary.csv1.3 kBreports/status_summary.csv505 Breports/template_summary.csv1.2 kB
Reproduce
Run steps are documented inside the experiment folder (README and scripts).