benchmark-results / README.md
jfbrown95's picture
Rerun SubQ with full method context (#43)
17924c1
|
Raw History Blame Contribute Delete
24.1 kB
metadata
language: []
license: cc-by-4.0
pretty_name: Perch Benchmark Results
viewer: false

Perch benchmark results

This dataset is for evaluating SystemOne decision models on finding bugs and security issues in a single method. It also measures how often they flag clean code. Decision models differ from generative LLMs: they answer a specific question about the input and output only a probability. Examples are Jev, Liquid d1, OpenAI's Decisions API and GLiNER-2.5-Decide. We also run generative LLMs, other classifiers and CodeQL on the same pairs for comparison. Each record contains a method before and after a code change, plus input adapted from a Perch scan: method source, imports, callers, callees, and static call-graph edges where available. Models score each version independently, without seeing the repair. Benign reference methods are included, so a before method is not automatically positive.

Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go, Java, C, C++, C#, PHP, and other languages. Bug, security, and user-written semantic lint rules are separate tracks. Public and private splits are disjoint by source repository. See Files and reproduction for how to score any model with the command adapter.

Inference source

Model Where these results were scored
Jev TypeSafe API
DiffusionGemma Jev Beam endpoint
SemiF Beam endpoint
CLM-v0.1-8B Runpod H100 80 GB pod (US-NE-1)
Span-01 Respan scoring API (span-01-pro)
Liquid d1 OpenRouter SystemOne API (liquid/d1)
TypeLLM TypeLLM API (typellm-latest)
CodeQL Local CPU run in Docker; CodeQL CLI 2.27.1
GPT-6 Luna Decisions OpenAI Decisions API (gpt-6-luna)
GLiNER-2.5-Decide Fastino classification API (fastino/GLiNER-2.5-Decide)
Mercury Decide OpenRouter SystemOne API (inception/mercury-decide)
Microsoft-Decision-1 OpenRouter SystemOne API (microsoft/microsoft-decision-1, Azure)
SubQ Snap Preview SubQ Decisions API (subq-snap-preview)

Reading the results

Each point shows a model’s score and cost for the same benchmark. Y is Youden’s J: recall minus false-positive rate. X is the run’s inference cost on a logarithmic scale. Higher and farther left is better. The amber Pareto frontier highlights models offering the best score at their price.

The tables use each run's recorded alert settings. A value of 20% under ‘False-positive rate’ means one in five clean methods received an alert. Models are ranked by Youden’s J. A model that flags every method scores zero. Bold marks the best full-set value in each column; cost compares priced runs captured here.

Failed requests count as incorrect decisions: a failed issue is a miss; a failed clean method is a false positive. Failed cases receive no model score and are included in both the table counts and plotted points.

Bugs

Public pairs

Bugs: Youden’s J versus inference cost

Public — 2,220 pairs

Model Recall False-positive rate Youden’s J Inference cost
GPT-6 Luna Decisions 48.7% 38.7% 10.0% $1.102
DiffusionGemma Jev 33.4% 27.1% 6.3% $0.239
SubQ Snap Preview 15.2% 9.5% 5.7% $0.600
Microsoft-Decision-1 24.0% 18.8% 5.1% $0.481
Jev 17.7% 12.7% 5.0% $0.551
SemiF 43.0% 39.7% 3.3% $0.239
Mercury Decide 8.8% 5.6% 3.2% $0.224
TypeLLM 8.3% 5.5% 2.7% $0.576
Span-01 25.3% 22.6% 2.7% $0.182
Liquid d1 5.4% 3.6% 1.8% $0.875
CodeQL* 5.3% 4.2% 1.1% —
CLM-v0.1-8B 81.9% 80.9% 1.0% ~$0.210
GLiNER-2.5-Decide 2.3% 2.1% 0.2% $0.175

* CodeQL scored 682 pairs in Python, JavaScript, TypeScript, C and C++; 255 additional pairs could not be scored because source recovery, source verification or analysis failed. Details · Method decisions

Private — 498 pairs

Model Recall False-positive rate Youden’s J Inference cost
GPT-6 Luna Decisions 52.4% 41.3% 11.1% $0.247
DiffusionGemma Jev 35.8% 27.3% 8.6% $0.054
SubQ Snap Preview 19.3% 11.2% 8.2% $0.134
TypeLLM 11.3% 5.8% 5.6% $0.129
Microsoft-Decision-1 25.5% 20.6% 4.8% $0.108
Jev 20.0% 15.6% 4.5% $0.123
Mercury Decide 9.4% 5.1% 4.4% $0.050
Span-01 28.5% 24.3% 4.2% $0.040
SemiF 44.3% 41.8% 2.6% $0.054
Liquid d1 6.6% 4.2% 2.4% $0.197
GLiNER-2.5-Decide 1.7% 2.1% -0.4% $0.039
CLM-v0.1-8B 79.5% 80.1% -0.6% ~$0.047

Security

Public pairs

Security: Youden’s J versus inference cost

Public — 1,311 pairs

Model Recall False-positive rate Youden’s J Inference cost
Liquid d1 52.3% 40.7% 11.5% $6.132
Jev 34.6% 23.6% 11.0% $0.507
TypeLLM 27.8% 17.4% 10.5% $0.566
GPT-6 Luna Decisions 54.1% 44.5% 9.7% $1.469
Mercury Decide 27.1% 17.8% 9.3% $0.131
SubQ Snap Preview 24.1% 15.5% 8.6% $0.956
DiffusionGemma Jev 33.1% 25.8% 7.3% $0.208
Microsoft-Decision-1 43.9% 38.2% 5.6% $0.455
Span-01 21.0% 17.2% 3.9% $0.251
CodeQL* 4.8% 1.5% 3.3% —
GLiNER-2.5-Decide 2.1% 1.6% 0.5% $0.434
SemiF 100.0% 99.9% 0.1% $0.208
CLM-v0.1-8B 100.0% 100.0% 0.0% ~$1.432

* CodeQL scored 305 pairs in Python, JavaScript, TypeScript, C and C++; 18 additional pairs could not be scored because source recovery, source verification or analysis failed. Details · Method decisions

Private — 439 pairs

Model Recall False-positive rate Youden’s J Inference cost
GPT-6 Luna Decisions 40.5% 31.5% 9.0% $0.530
Liquid d1 34.7% 29.4% 5.3% $2.362
Jev 20.6% 16.7% 3.9% $0.182
DiffusionGemma Jev 21.9% 18.5% 3.3% $0.074
SubQ Snap Preview 11.1% 8.3% 2.7% $0.344
TypeLLM 8.8% 6.2% 2.5% $0.203
Mercury Decide 11.1% 9.0% 2.1% $0.047
Microsoft-Decision-1 18.1% 16.7% 1.4% $0.163
GLiNER-2.5-Decide 2.0% 1.5% 0.6% $0.142
CLM-v0.1-8B 100.0% 100.0% 0.0% ~$0.528
SemiF 100.0% 100.0% 0.0% $0.074
Span-01 8.0% 8.1% -0.1% $0.091

Perch Lint Bench

Public pairs

Perch Lint Bench: Youden’s J versus inference cost

Public — 214 pairs

Model Recall False-positive rate Youden’s J Inference cost
Mercury Decide 81.8% 6.5% 75.2% $0.020
GPT-6 Luna Decisions 76.6% 4.7% 72.0% $0.093
SubQ Snap Preview 71.0% 2.8% 68.2% $0.053
TypeLLM 61.7% 2.8% 58.9% $0.050
Jev 50.0% 0.5% 49.5% $0.048
DiffusionGemma Jev 52.8% 5.1% 47.7% $0.018
Liquid d1 40.7% 0.5% 40.2% $0.039
Span-01 50.0% 11.2% 38.8% $0.014
Microsoft-Decision-1 38.3% 1.9% 36.4% $0.041
CLM-v0.1-8B 38.8% 37.4% 1.4% ~$0.010
SemiF 32.2% 31.3% 0.9% $0.018
GLiNER-2.5-Decide 0.0% 0.0% 0.0% $0.010

Private — 71 pairs

Model Recall False-positive rate Youden’s J Inference cost
Mercury Decide 87.3% 8.5% 78.9% $0.006
GPT-6 Luna Decisions 84.5% 7.0% 77.5% $0.030
SubQ Snap Preview 71.8% 5.6% 66.2% $0.017
TypeLLM 59.2% 5.6% 53.5% $0.016
Jev 53.5% 1.4% 52.1% $0.016
DiffusionGemma Jev 53.5% 8.5% 45.1% $0.006
Microsoft-Decision-1 43.7% 1.4% 42.3% $0.013
Liquid d1 40.8% 1.4% 39.4% $0.012
Span-01 45.1% 8.5% 36.6% $0.005
CLM-v0.1-8B 50.7% 49.3% 1.4% ~$0.003
GLiNER-2.5-Decide 0.0% 0.0% 0.0% $0.004
SemiF 42.3% 45.1% -2.8% $0.006

Bug and security runs use the question floors recorded with each result. Semantic lint rules use a 70% run-wide floor.

Span-01 uses its behavior-scoring API: the target method is the output, its saved Perch context is the input, and all applicable checks are scored as behaviors in one call. Issue scores use p_present; semantic lint uses p_absent for the rule being satisfied. p_not_observable is saved separately. This is a different model interface from Jev's questions.

Liquid d1 received the same Perch method state and all applicable questions in one API call per method. Semantic lint used the same compiled ensure rule as Jev.

SubQ Snap Preview scores the full saved Perch context through native noul questions, in batches of at most 16. Its documented context window is 393,216 tokens. Perch retains the method source, imports, callers, callees and graph edges within that budget. Input-token usage returned by SubQ is priced at its published $0.05 per million rate.

GLiNER-2.5-Decide scores the answer criteria as native classification labels. Perch sizes each method's context and batches its applicable questions to fit the endpoint. Large methods are read in overlapping source chunks; each question's highest issue score supplies the method decision. Returned label confidences supply the scores. Timeouts and requests that still cannot fit are recorded as failures. Costs use API-reported prompt tokens at the live catalog rate of $0.03 per million input tokens.

Inference costs cover scoring the method sides in each table. Jev costs are estimated from API-reported input tokens at TypeSafe's published rate; for semantic lint, input-token usage was measured by replaying the same 570 requests with jev-1.13.0. Span-01 costs use API-reported input tokens at Respan's published rate. Beam costs are API-reported. CLM cost is an estimated share of a 38.4-minute H100 run costing $2.23 total, allocated by embedding count. Costs are not ranked. TypeLLM cost uses API-reported input tokens at its published rate; no thinking tokens were used.

JevLike (192-byte input), Laya (512-token input), and Kev (packed-branch limit) could not score every full-context method. NanoJev was unavailable on Beam. They are excluded rather than ranked on partial results.

GPT-6 Luna Decisions receives each method's saved context with all applicable checks as two-option choice questions in one request. True and false criteria define the options. Semantic lint scores invert the probability that the rule is satisfied. Costs use API-reported input tokens at $0.10 per million; output and cache operations carry no extra charge.

Liquid d1, Mercury Decide and Microsoft-Decision-1 receive each method's saved context with the applicable checks through OpenRouter's native SystemOne interface. Their returned probabilities use the same question floors and semantic lint cutoff. Costs come from the API's reported usage.cost.

Files and reproduction

  • results-current.jsonl: current-pack aggregate results for public and private splits; no private pair data.
  • results.jsonl: all recorded result versions, identified by run and protocol ID.
  • predictions/current/: public method probabilities from this run. Private predictions are not published.
  • tradeoff.py: rebuilds the public Youden’s J versus cost plots, Pareto frontiers and result tables from saved outcomes.
  • benchmark.py and question-pack.json: reproducible current-pack scorer and frozen questions.
  • span01.py: calls Span-01 with all applicable behaviors in one request per method, saves resumable predictions, and scores the completed dataset.
  • liquid.py: original Liquid direct-API scorer with the frozen Perch question pack.
  • typellm.py: scores each method independently with applicable boolean questions and saves the returned probabilities.
  • gliner_decide.py: runs GLiNER-2.5-Decide through its native classification endpoint, saves returned confidences and failed requests, and scores each completed track.
  • perch-sizing.mjs: uses Perch's source chunking, context sizing, and question batching. Each reading records its source-byte coverage.
  • openai_decisions.py and openai-decisions-manifest.json: resumable Decisions API scorer and public benchmark file checksums.
  • openrouter_decisions.py and openrouter-decisions-manifest.json: resumable native SystemOne scorer and public benchmark file checksums.
  • subq.py: SubQ Decisions scorer using the shared native runner and Perch’s context sizing.
  • perch-lint-bench-public: paired rules and its runnable scorer.

To run Jev with the current pack, set TYPESAFE_API_KEY or PERCH_API_KEY in your environment:

python3 benchmark.py run --domain bug --scorer jev --predictions bug-jev.jsonl --report bug-jev.json
python3 benchmark.py run --domain security --scorer jev --predictions security-jev.jsonl --report security-jev.json

To run Span-01 on the public security pairs, set RESPAN_API_KEY and run:

python3 span01.py --domain security --predictions security-span01.jsonl --report security-span01.json

To run GLiNER-2.5-Decide, install the npm dependencies in a Perch source checkout, set PERCH_SOURCE to that checkout and FASTINO_API_KEY to your API key, then run:

python3 gliner_decide.py --domain lint --out gliner-lint --budget 10
python3 gliner_decide.py --domain bug --out gliner-bug --budget 10
python3 gliner_decide.py --domain security --out gliner-security --budget 10

The runner starts with a 1,200-token state budget and a 1,800-token request budget. --state-budget, --request-budget, and --max-questions set model limits. A size rejection splits the question batch first, then rebuilds the source readings with a smaller state budget. Perch shortens caller and callee excerpts before splitting the target source. If a leading comment outside the target prevents a reading from fitting, it is omitted and recorded. Every target-source byte must remain covered. Saved results include the Perch revision, sizing settings, question scores, and API usage. Bug and security question floors and the 70% semantic lint floor stay unchanged.

For another model, use --scorer command --command 'python3 your_adapter.py' --model-revision YOUR_MODEL. The adapter receives the method state and each applicable detection question and returns its true-answer probability. The runner saves predictions for resumption and reports scores only when every method side is complete.

To run OpenAI Decisions, download each public benchmark.jsonl into public/bug/, public/security/ and public/lint/, then set OPENAI_API_KEY:

python3 openai_decisions.py --protocol choice --manifest openai-decisions-manifest.json --out decisions-results

The runner preserves the configured question floors and 70% semantic-lint violation cutoff. Each side receives only its own context. Timeouts and refusals are recorded as failed requests, without a probability score. The six-set local run used 24 workers and a request limiter of 1.5 million estimated input tokens per minute. Recorded method elapsed times include client throttling and rate-limit backoff. The public manifest contains only the three public sets.

To run Liquid d1, Mercury Decide or Microsoft-Decision-1, download the three public files into the same directories listed above, install httpx, and set OPENROUTER_API_KEY:

python3 -m pip install httpx
python3 openrouter_decisions.py --model liquid/d1 --manifest openrouter-decisions-manifest.json --out liquid-results
python3 openrouter_decisions.py --model inception/mercury-decide --manifest openrouter-decisions-manifest.json --out mercury-results
python3 openrouter_decisions.py --model microsoft/microsoft-decision-1 --manifest openrouter-decisions-manifest.json --out microsoft-results

The paid endpoints use the full saved context. Mercury’s free endpoint is available with --model inception/mercury-decide:free; its daily account quota can pause a run. Rerun the same command to resume saved outcomes.

To run SubQ Snap Preview, use the public files and manifest above, install httpx, and set SUBQ_API_KEY and PERCH_SOURCE to a Perch checkout with its npm dependencies installed. Node must be on your PATH:

python3 subq.py --manifest openrouter-decisions-manifest.json --out subq-results

Rerun the same command to resume saved outcomes.

License

Everything here except the scripts is licensed under CC BY 4.0: the results, predictions, question pack and this card. The scripts (*.py, *.mjs and adapters/) are licensed under MIT. The pair data is in the bug, security and lint datasets, each with its own license. See their cards for the data sources.