Plot benchmark performance against inference cost

#40
README.md CHANGED
@@ -20,7 +20,7 @@ Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go
20
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | [Beam endpoint](https://app.beam.cloud/v1/models/jev/semif/invoke) |
21
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | Runpod H100 80 GB pod (US-NE-1) |
22
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | [Respan scoring API](https://api.respan.ai/api/v1/scores) (`span-01-pro`) |
23
- | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | [Liquid decision API](https://api.liquid.ai/decisions/v1/systemone) (`d1:free`) |
24
  | [TypeLLM](https://typellm.ai/docs) | [TypeLLM API](https://api.typellm.ai/v1/generate) (`typellm-latest`) |
25
  | [CodeQL](https://codeql.github.com/) | Local CPU run in Docker; CodeQL CLI 2.27.1 |
26
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | [OpenAI Decisions API](https://api.openai.com/v1/decisions) (`gpt-6-luna`) |
@@ -32,9 +32,9 @@ Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go
32
 
33
  ## Reading the results
34
 
35
- Each point shows a model at the same cutoff used in its table. X is the false-positive rate: the percentage of clean methods wrongly flagged. Y is recall: the percentage of labelled issues found. Higher and farther left is better.
36
 
37
- 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 recall minus that percentage. Bold marks the best full-set value in each column; cost compares priced runs captured here.
38
 
39
  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.
40
 
@@ -42,11 +42,11 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
42
 
43
  [Public pairs](https://huggingface.co/datasets/perchscan/bug-pairs-public)
44
 
45
- ![Bugs: recall versus false-positive rate at table cutoffs](assets/bug-tradeoff.svg)
46
 
47
  ### Public — 2,220 pairs
48
 
49
- | Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
50
  | --- | ---: | ---: | ---: | ---: | ---: |
51
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 48.7% | 38.7% | **10.0%** | **0** | $1.102 |
52
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.4% | 27.1% | 6.3% | **0** | $0.239 |
@@ -56,7 +56,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
56
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 8.8% | 5.6% | 3.2% | 1 | $0.224 |
57
  | [TypeLLM](https://typellm.ai/docs) | 8.3% | 5.5% | 2.7% | **0** | $0.576 |
58
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 25.3% | 22.6% | 2.7% | **0** | $0.182 |
59
- | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 4.1% | 2.5% | 1.6% | **0** | Free tier |
60
  | [CodeQL](https://codeql.github.com/)* | 5.3% | 4.2% | 1.1% | — | — |
61
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **81.9%** | 80.9% | 1.0% | **0** | ~$0.210 |
62
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.3% | **2.1%** | 0.2% | **0** | **$0.175** |
@@ -65,7 +65,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
65
 
66
  ### Private — 498 pairs
67
 
68
- | Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
69
  | --- | ---: | ---: | ---: | ---: | ---: |
70
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 52.4% | 41.3% | **11.1%** | **0** | $0.247 |
71
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 35.8% | 27.3% | 8.6% | **0** | $0.054 |
@@ -75,7 +75,7 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
75
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 9.4% | 5.1% | 4.4% | **0** | $0.050 |
76
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 28.5% | 24.3% | 4.2% | **0** | $0.040 |
77
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.3% | 41.8% | 2.6% | **0** | $0.054 |
78
- | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 5.2% | 3.0% | 2.2% | **0** | Free tier |
79
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 1.7% | **2.1%** | -0.4% | **0** | **$0.039** |
80
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **79.5%** | 80.1% | -0.6% | **0** | ~$0.047 |
81
 
@@ -83,17 +83,17 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
83
 
84
  [Public pairs](https://huggingface.co/datasets/perchscan/security-pairs-public)
85
 
86
- ![Security: recall versus false-positive rate at table cutoffs](assets/security-tradeoff.svg)
87
 
88
  ### Public — 1,311 pairs
89
 
90
- | Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
91
  | --- | ---: | ---: | ---: | ---: | ---: |
92
- | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 34.6% | 23.6% | **11.0%** | **0** | $0.507 |
 
93
  | [TypeLLM](https://typellm.ai/docs) | 27.8% | 17.4% | 10.5% | **0** | $0.566 |
94
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 54.1% | 44.5% | 9.7% | **0** | $1.469 |
95
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 27.1% | 17.8% | 9.3% | **0** | **$0.131** |
96
- | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 55.6% | 46.8% | 8.8% | **0** | Free tier |
97
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.1% | 25.8% | 7.3% | **0** | $0.208 |
98
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.9% | 38.2% | 5.6% | **0** | $0.455 |
99
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 21.0% | 17.2% | 3.9% | **0** | $0.251 |
@@ -106,10 +106,10 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
106
 
107
  ### Private — 439 pairs
108
 
109
- | Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
110
  | --- | ---: | ---: | ---: | ---: | ---: |
111
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 40.5% | 31.5% | **9.0%** | **0** | $0.530 |
112
- | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 34.2% | 29.0% | 5.2% | **0** | Free tier |
113
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.6% | 16.7% | 3.9% | **0** | $0.182 |
114
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 21.9% | 18.5% | 3.3% | **0** | $0.074 |
115
  | [TypeLLM](https://typellm.ai/docs) | 8.8% | 6.2% | 2.5% | **0** | $0.203 |
@@ -124,18 +124,18 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
124
 
125
  [Public pairs](https://huggingface.co/datasets/perchscan/perch-lint-bench-public)
126
 
127
- ![Perch Lint Bench: recall versus false-positive rate at table cutoffs](assets/lint-tradeoff.svg)
128
 
129
  ### Public — 214 pairs
130
 
131
- | Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
132
  | --- | ---: | ---: | ---: | ---: | ---: |
133
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **81.8%** | 6.5% | **75.2%** | **0** | $0.020 |
134
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 76.6% | 4.7% | 72.0% | **0** | $0.093 |
135
  | [TypeLLM](https://typellm.ai/docs) | 61.7% | 2.8% | 58.9% | **0** | $0.050 |
136
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 50.0% | 0.5% | 49.5% | **0** | $0.048 |
137
- | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 49.1% | 0.9% | 48.1% | **0** | Free tier |
138
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 52.8% | 5.1% | 47.7% | **0** | $0.018 |
 
139
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 50.0% | 11.2% | 38.8% | **0** | $0.014 |
140
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 38.3% | 1.9% | 36.4% | **0** | $0.041 |
141
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 38.8% | 37.4% | 1.4% | **0** | **~$0.010** |
@@ -144,15 +144,15 @@ Failed requests count as incorrect decisions: a failed issue is a miss; a failed
144
 
145
  ### Private — 71 pairs
146
 
147
- | Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |
148
  | --- | ---: | ---: | ---: | ---: | ---: |
149
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **87.3%** | 8.5% | **78.9%** | **0** | $0.006 |
150
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 84.5% | 7.0% | 77.5% | **0** | $0.030 |
151
  | [TypeLLM](https://typellm.ai/docs) | 59.2% | 5.6% | 53.5% | **0** | $0.016 |
152
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 53.5% | 1.4% | 52.1% | **0** | $0.016 |
153
- | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 49.3% | 1.4% | 47.9% | **0** | Free tier |
154
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 53.5% | 8.5% | 45.1% | **0** | $0.006 |
155
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.7% | 1.4% | 42.3% | **0** | $0.013 |
 
156
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 45.1% | 8.5% | 36.6% | **0** | $0.005 |
157
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 50.7% | 49.3% | 1.4% | **0** | **~$0.003** |
158
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 0.0% | **0.0%** | 0.0% | **0** | $0.004 |
@@ -168,23 +168,23 @@ Liquid d1 received the same Perch method state and all applicable questions in o
168
 
169
  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.
170
 
171
- Inference costs cover scoring the method sides in each table. Jev costs are estimated from API-reported input tokens at [TypeSafe's published rate](https://typesafe.ai/blog/introducing-system-one-models-and-jev); 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](https://www.respan.ai/docs/documentation/span-01/concept). 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. Liquid d1 was tested on the `d1:free` API tier; a paid per-token price was not published. TypeLLM cost uses API-reported input tokens at its [published rate](https://typellm.ai/pricing); no thinking tokens were used.
172
 
173
  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.
174
 
175
  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](https://developers.openai.com/api/docs/guides/decisions#pricing-and-availability); output and cache operations carry no extra charge.
176
 
177
- 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`.
178
 
179
  ## Files and reproduction
180
 
181
  - [`results-current.jsonl`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/results-current.jsonl): current-pack aggregate results for public and private splits; no private pair data.
182
  - [`results.jsonl`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/results.jsonl): all recorded result versions, identified by run and protocol ID.
183
  - [`predictions/current/`](https://huggingface.co/datasets/perchscan/benchmark-results/tree/main/predictions/current): public method probabilities from this run. Private predictions are not published.
184
- - [`tradeoff.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/tradeoff.py): rebuilds the public recall/false-alert curves and result tables from saved scores and labels.
185
  - [`benchmark.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/benchmark.py) and [`question-pack.json`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/question-pack.json): reproducible current-pack scorer and frozen questions.
186
  - [`span01.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/span01.py): calls Span-01 with all applicable behaviors in one request per method, saves resumable predictions, and scores the completed dataset.
187
- - [`liquid.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/liquid.py): calls Liquid d1 with the frozen Perch question pack, saves resumable predictions, and scores each track.
188
  - [`typellm.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/typellm.py): scores each method independently with applicable boolean questions and saves the returned probabilities.
189
  - [`gliner_decide.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/gliner_decide.py): runs GLiNER-2.5-Decide through its native classification endpoint, saves returned confidences and failed requests, and scores each completed track.
190
  - [`perch-sizing.mjs`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/perch-sizing.mjs): uses Perch's source chunking, context sizing, and question batching. Each reading records its source-byte coverage.
@@ -230,10 +230,11 @@ are recorded as failed requests, without a probability score. The six-set local
230
  run used 24 workers and a request limiter of 1.5 million estimated input tokens
231
  per minute. Recorded method elapsed times include client throttling and rate-limit backoff. The public manifest contains only the three public sets.
232
 
233
- To run Mercury Decide or Microsoft-Decision-1, download the three public files into the same directories listed above, install `httpx`, and set `OPENROUTER_API_KEY`:
234
 
235
  ```sh
236
  python3 -m pip install httpx
 
237
  python3 openrouter_decisions.py --model inception/mercury-decide --manifest openrouter-decisions-manifest.json --out mercury-results
238
  python3 openrouter_decisions.py --model microsoft/microsoft-decision-1 --manifest openrouter-decisions-manifest.json --out microsoft-results
239
  ```
 
20
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | [Beam endpoint](https://app.beam.cloud/v1/models/jev/semif/invoke) |
21
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | Runpod H100 80 GB pod (US-NE-1) |
22
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | [Respan scoring API](https://api.respan.ai/api/v1/scores) (`span-01-pro`) |
23
+ | [Liquid d1](https://openrouter.ai/liquid/d1) | [OpenRouter SystemOne API](https://openrouter.ai/api/v1/systemone) (`liquid/d1`) |
24
  | [TypeLLM](https://typellm.ai/docs) | [TypeLLM API](https://api.typellm.ai/v1/generate) (`typellm-latest`) |
25
  | [CodeQL](https://codeql.github.com/) | Local CPU run in Docker; CodeQL CLI 2.27.1 |
26
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | [OpenAI Decisions API](https://api.openai.com/v1/decisions) (`gpt-6-luna`) |
 
32
 
33
  ## Reading the results
34
 
35
+ 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.
36
 
37
+ 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.
38
 
39
  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.
40
 
 
42
 
43
  [Public pairs](https://huggingface.co/datasets/perchscan/bug-pairs-public)
44
 
45
+ ![Bugs: Youden’s J versus inference cost](assets/bug-tradeoff.svg)
46
 
47
  ### Public — 2,220 pairs
48
 
49
+ | Model | Recall | False-positive rate | Youden’s J | Failed requests | Inference cost |
50
  | --- | ---: | ---: | ---: | ---: | ---: |
51
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 48.7% | 38.7% | **10.0%** | **0** | $1.102 |
52
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.4% | 27.1% | 6.3% | **0** | $0.239 |
 
56
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 8.8% | 5.6% | 3.2% | 1 | $0.224 |
57
  | [TypeLLM](https://typellm.ai/docs) | 8.3% | 5.5% | 2.7% | **0** | $0.576 |
58
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 25.3% | 22.6% | 2.7% | **0** | $0.182 |
59
+ | [Liquid d1](https://openrouter.ai/liquid/d1) | 5.4% | 3.6% | 1.8% | 1 | $0.875 |
60
  | [CodeQL](https://codeql.github.com/)* | 5.3% | 4.2% | 1.1% | — | — |
61
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **81.9%** | 80.9% | 1.0% | **0** | ~$0.210 |
62
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 2.3% | **2.1%** | 0.2% | **0** | **$0.175** |
 
65
 
66
  ### Private — 498 pairs
67
 
68
+ | Model | Recall | False-positive rate | Youden’s J | Failed requests | Inference cost |
69
  | --- | ---: | ---: | ---: | ---: | ---: |
70
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 52.4% | 41.3% | **11.1%** | **0** | $0.247 |
71
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 35.8% | 27.3% | 8.6% | **0** | $0.054 |
 
75
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 9.4% | 5.1% | 4.4% | **0** | $0.050 |
76
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 28.5% | 24.3% | 4.2% | **0** | $0.040 |
77
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.3% | 41.8% | 2.6% | **0** | $0.054 |
78
+ | [Liquid d1](https://openrouter.ai/liquid/d1) | 6.6% | 4.2% | 2.4% | **0** | $0.197 |
79
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 1.7% | **2.1%** | -0.4% | **0** | **$0.039** |
80
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | **79.5%** | 80.1% | -0.6% | **0** | ~$0.047 |
81
 
 
83
 
84
  [Public pairs](https://huggingface.co/datasets/perchscan/security-pairs-public)
85
 
86
+ ![Security: Youden’s J versus inference cost](assets/security-tradeoff.svg)
87
 
88
  ### Public — 1,311 pairs
89
 
90
+ | Model | Recall | False-positive rate | Youden’s J | Failed requests | Inference cost |
91
  | --- | ---: | ---: | ---: | ---: | ---: |
92
+ | [Liquid d1](https://openrouter.ai/liquid/d1) | 52.3% | 40.7% | **11.5%** | **0** | $6.132 |
93
+ | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 34.6% | 23.6% | 11.0% | **0** | $0.507 |
94
  | [TypeLLM](https://typellm.ai/docs) | 27.8% | 17.4% | 10.5% | **0** | $0.566 |
95
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 54.1% | 44.5% | 9.7% | **0** | $1.469 |
96
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | 27.1% | 17.8% | 9.3% | **0** | **$0.131** |
 
97
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 33.1% | 25.8% | 7.3% | **0** | $0.208 |
98
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.9% | 38.2% | 5.6% | **0** | $0.455 |
99
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 21.0% | 17.2% | 3.9% | **0** | $0.251 |
 
106
 
107
  ### Private — 439 pairs
108
 
109
+ | Model | Recall | False-positive rate | Youden’s J | Failed requests | Inference cost |
110
  | --- | ---: | ---: | ---: | ---: | ---: |
111
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 40.5% | 31.5% | **9.0%** | **0** | $0.530 |
112
+ | [Liquid d1](https://openrouter.ai/liquid/d1) | 34.7% | 29.4% | 5.3% | **0** | $2.362 |
113
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 20.6% | 16.7% | 3.9% | **0** | $0.182 |
114
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 21.9% | 18.5% | 3.3% | **0** | $0.074 |
115
  | [TypeLLM](https://typellm.ai/docs) | 8.8% | 6.2% | 2.5% | **0** | $0.203 |
 
124
 
125
  [Public pairs](https://huggingface.co/datasets/perchscan/perch-lint-bench-public)
126
 
127
+ ![Perch Lint Bench: Youden’s J versus inference cost](assets/lint-tradeoff.svg)
128
 
129
  ### Public — 214 pairs
130
 
131
+ | Model | Recall | False-positive rate | Youden’s J | Failed requests | Inference cost |
132
  | --- | ---: | ---: | ---: | ---: | ---: |
133
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **81.8%** | 6.5% | **75.2%** | **0** | $0.020 |
134
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 76.6% | 4.7% | 72.0% | **0** | $0.093 |
135
  | [TypeLLM](https://typellm.ai/docs) | 61.7% | 2.8% | 58.9% | **0** | $0.050 |
136
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 50.0% | 0.5% | 49.5% | **0** | $0.048 |
 
137
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 52.8% | 5.1% | 47.7% | **0** | $0.018 |
138
+ | [Liquid d1](https://openrouter.ai/liquid/d1) | 40.7% | 0.5% | 40.2% | **0** | $0.039 |
139
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 50.0% | 11.2% | 38.8% | **0** | $0.014 |
140
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 38.3% | 1.9% | 36.4% | **0** | $0.041 |
141
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 38.8% | 37.4% | 1.4% | **0** | **~$0.010** |
 
144
 
145
  ### Private — 71 pairs
146
 
147
+ | Model | Recall | False-positive rate | Youden’s J | Failed requests | Inference cost |
148
  | --- | ---: | ---: | ---: | ---: | ---: |
149
  | [Mercury Decide](https://openrouter.ai/inception/mercury-decide) | **87.3%** | 8.5% | **78.9%** | **0** | $0.006 |
150
  | [GPT-6 Luna Decisions](https://developers.openai.com/api/docs/guides/decisions) | 84.5% | 7.0% | 77.5% | **0** | $0.030 |
151
  | [TypeLLM](https://typellm.ai/docs) | 59.2% | 5.6% | 53.5% | **0** | $0.016 |
152
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 53.5% | 1.4% | 52.1% | **0** | $0.016 |
 
153
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 53.5% | 8.5% | 45.1% | **0** | $0.006 |
154
  | [Microsoft-Decision-1](https://openrouter.ai/microsoft/microsoft-decision-1) | 43.7% | 1.4% | 42.3% | **0** | $0.013 |
155
+ | [Liquid d1](https://openrouter.ai/liquid/d1) | 40.8% | 1.4% | 39.4% | **0** | $0.012 |
156
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 45.1% | 8.5% | 36.6% | **0** | $0.005 |
157
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 50.7% | 49.3% | 1.4% | **0** | **~$0.003** |
158
  | [GLiNER-2.5-Decide](https://huggingface.co/fastino/GLiNER2.5-Decide) | 0.0% | **0.0%** | 0.0% | **0** | $0.004 |
 
168
 
169
  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.
170
 
171
+ Inference costs cover scoring the method sides in each table. Jev costs are estimated from API-reported input tokens at [TypeSafe's published rate](https://typesafe.ai/blog/introducing-system-one-models-and-jev); 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](https://www.respan.ai/docs/documentation/span-01/concept). 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](https://typellm.ai/pricing); no thinking tokens were used.
172
 
173
  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.
174
 
175
  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](https://developers.openai.com/api/docs/guides/decisions#pricing-and-availability); output and cache operations carry no extra charge.
176
 
177
+ 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`.
178
 
179
  ## Files and reproduction
180
 
181
  - [`results-current.jsonl`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/results-current.jsonl): current-pack aggregate results for public and private splits; no private pair data.
182
  - [`results.jsonl`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/results.jsonl): all recorded result versions, identified by run and protocol ID.
183
  - [`predictions/current/`](https://huggingface.co/datasets/perchscan/benchmark-results/tree/main/predictions/current): public method probabilities from this run. Private predictions are not published.
184
+ - [`tradeoff.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/tradeoff.py): rebuilds the public Youden’s J versus cost plots, Pareto frontiers and result tables from saved outcomes.
185
  - [`benchmark.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/benchmark.py) and [`question-pack.json`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/question-pack.json): reproducible current-pack scorer and frozen questions.
186
  - [`span01.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/span01.py): calls Span-01 with all applicable behaviors in one request per method, saves resumable predictions, and scores the completed dataset.
187
+ - [`liquid.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/liquid.py): original Liquid direct-API scorer with the frozen Perch question pack.
188
  - [`typellm.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/typellm.py): scores each method independently with applicable boolean questions and saves the returned probabilities.
189
  - [`gliner_decide.py`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/gliner_decide.py): runs GLiNER-2.5-Decide through its native classification endpoint, saves returned confidences and failed requests, and scores each completed track.
190
  - [`perch-sizing.mjs`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/perch-sizing.mjs): uses Perch's source chunking, context sizing, and question batching. Each reading records its source-byte coverage.
 
230
  run used 24 workers and a request limiter of 1.5 million estimated input tokens
231
  per minute. Recorded method elapsed times include client throttling and rate-limit backoff. The public manifest contains only the three public sets.
232
 
233
+ 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`:
234
 
235
  ```sh
236
  python3 -m pip install httpx
237
+ python3 openrouter_decisions.py --model liquid/d1 --manifest openrouter-decisions-manifest.json --out liquid-results
238
  python3 openrouter_decisions.py --model inception/mercury-decide --manifest openrouter-decisions-manifest.json --out mercury-results
239
  python3 openrouter_decisions.py --model microsoft/microsoft-decision-1 --manifest openrouter-decisions-manifest.json --out microsoft-results
240
  ```
assets/bug-tradeoff.svg CHANGED
assets/lint-tradeoff.svg CHANGED
assets/security-tradeoff.svg CHANGED
openrouter_decisions.py CHANGED
@@ -27,6 +27,8 @@ CATALOG = {
27
  'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, 0),
28
  'inception/mercury-decide': ('mercury-decide', 'inception/mercury-decide-20260930',
29
  'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, .02),
 
 
30
  'microsoft/microsoft-decision-1': ('microsoft-decision-1', 'microsoft/microsoft-decision-1-20261009',
31
  'microsoft-decision-1-perch-systemone-v1', 'microsoft-decision-1-20261012', 'Azure', 32768, .042),
32
  }
@@ -270,12 +272,13 @@ def main():
270
  iterator, attempted = iter(pending), 0
271
  reserved = 0.
272
  budget_paused = False
 
273
  with ThreadPoolExecutor(max_workers=args.workers) as pool:
274
  active = {}
275
 
276
  def submit():
277
  nonlocal reserved, budget_paused
278
- if (args.budget is not None and spent >= args.budget) or budget_paused:
279
  return
280
  job = next(iterator, None)
281
  if job:
@@ -299,10 +302,11 @@ def main():
299
  identity = pair['pair_id'], role
300
  try:
301
  row = future.result()
302
- except AccountError:
303
- for f in active:
304
- f.cancel()
305
- raise
 
306
  except Exception as exc:
307
  row = {'pair_id': pair['pair_id'], 'role': role, 'domain': group['domain'],
308
  'model_revision': REVISION, 'requested_model': args.model, 'protocol_id': PROTOCOL,
@@ -327,6 +331,8 @@ def main():
327
  submit()
328
  finally:
329
  save_reports()
 
 
330
  print('Budget guard paused pending methods.' if budget_paused else 'Finished scheduled methods.', flush=True)
331
 
332
 
 
27
  'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, 0),
28
  'inception/mercury-decide': ('mercury-decide', 'inception/mercury-decide-20260930',
29
  'mercury-decide-perch-systemone-v1', 'mercury-decide-20261009', 'Inception', 65536, .02),
30
+ 'liquid/d1': ('liquid-d1', 'liquid/d1-20260930',
31
+ 'liquid-d1-openrouter-perch-systemone-v1', 'liquid-d1-openrouter-20261012', 'Liquid', 65536, .04),
32
  'microsoft/microsoft-decision-1': ('microsoft-decision-1', 'microsoft/microsoft-decision-1-20261009',
33
  'microsoft-decision-1-perch-systemone-v1', 'microsoft-decision-1-20261012', 'Azure', 32768, .042),
34
  }
 
272
  iterator, attempted = iter(pending), 0
273
  reserved = 0.
274
  budget_paused = False
275
+ account_error = None
276
  with ThreadPoolExecutor(max_workers=args.workers) as pool:
277
  active = {}
278
 
279
  def submit():
280
  nonlocal reserved, budget_paused
281
+ if account_error or (args.budget is not None and spent >= args.budget) or budget_paused:
282
  return
283
  job = next(iterator, None)
284
  if job:
 
302
  identity = pair['pair_id'], role
303
  try:
304
  row = future.result()
305
+ except AccountError as exc:
306
+ # Stop new calls, but save successful calls already in flight.
307
+ # Quota-blocked methods remain pending for resumption.
308
+ account_error = account_error or exc
309
+ continue
310
  except Exception as exc:
311
  row = {'pair_id': pair['pair_id'], 'role': role, 'domain': group['domain'],
312
  'model_revision': REVISION, 'requested_model': args.model, 'protocol_id': PROTOCOL,
 
331
  submit()
332
  finally:
333
  save_reports()
334
+ if account_error:
335
+ raise account_error
336
  print('Budget guard paused pending methods.' if budget_paused else 'Finished scheduled methods.', flush=True)
337
 
338
 
predictions/current/bug/liquid-d1.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
predictions/current/lint/liquid-d1.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
predictions/current/security/liquid-d1.jsonl CHANGED
The diff for this file is too large to render. See raw diff
 
results-current.jsonl CHANGED
@@ -28,12 +28,6 @@
28
  {"alert_rule": "rule violation score > 0.7", "average_precision": 0.8296819071061596, "benchmark_methods": 142, "benchmark_pairs": 71, "confusion": {"fn": 33, "fp": 6, "tn": 65, "tp": 38}, "domain": "lint", "f1": 0.6608695652173913, "inference_cost_basis": "API reported", "inference_cost_usd": 0.005866, "inference_endpoint": "https://app.beam.cloud/v1/models/jev/diffusiongemma/invoke", "inference_host": "Beam", "model_id": "diffusiongemma", "model_revision": "diffusiongemma", "pair_order": 0.8591549295774648, "pair_order_correct": 61, "pair_order_eligible": 71, "precision": 0.8636363636363636, "protocol_id": "perch-semantic-ensure-v1", "question_pack_sha256": null, "recall": 0.5352112676056338, "run_id": "perch-scan-pack-configured-floors-20260928", "threshold": 0.7, "track": "private"}
29
  {"alert_rule": "rule violation score > 0.7", "average_precision": 0.5141925432023778, "benchmark_methods": 142, "benchmark_pairs": 71, "confusion": {"fn": 35, "fp": 35, "tn": 36, "tp": 36}, "domain": "lint", "f1": 0.5070422535211268, "inference_cost_basis": "allocated GPU runtime by embedding rows", "inference_cost_usd": 0.0033639277067493522, "inference_endpoint": null, "inference_host": "Runpod pod, H100 80 GB, US-NE-1", "model_id": "clm", "model_revision": "Contrastive-LM/CLM-v0.1-8B@head-b2b4a8c9c2d39263eff78a351eb909a342ce9b3bf21a3f07c1d1bf15f1c4eda5", "pair_order": 0.5633802816901409, "pair_order_correct": 40, "pair_order_eligible": 71, "precision": 0.5070422535211268, "protocol_id": "clm-choice-head-v1", "question_pack_sha256": null, "recall": 0.5070422535211268, "run_id": "perch-scan-pack-configured-floors-20260928", "threshold": 0.7, "track": "private"}
30
  {"alert_rule": "rule violation score > 0.7", "average_precision": 0.8320090658208488, "benchmark_methods": 142, "benchmark_pairs": 71, "confusion": {"fn": 39, "fp": 6, "tn": 65, "tp": 32}, "domain": "lint", "f1": 0.5871559633027523, "inference_cost_basis": "API-reported input tokens at published rate", "inference_cost_usd": 0.00456932, "inference_endpoint": "https://api.respan.ai/api/v1/scores", "inference_host": "Respan API", "model_id": "span01", "model_revision": "span-01-pro (API revision not published)", "pair_order": 0.9154929577464789, "pair_order_correct": 65, "pair_order_eligible": 71, "precision": 0.8421052631578947, "protocol_id": "respan-span01-pro-perch-pack-v1", "question_pack_sha256": null, "recall": 0.4507042253521127, "run_id": "perch-scan-pack-configured-floors-20260928", "threshold": 0.7, "track": "private"}
31
- {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.46569203965559486, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "confusion": {"fn": 1785, "fp": 65, "tn": 2514, "tp": 76}, "domain": "bug", "f1": 0.07592407592407592, "inference_cost_basis": "d1:free API tier; no published per-token rate", "inference_cost_usd": null, "inference_endpoint": "https://api.liquid.ai/decisions/v1/systemone", "inference_host": "Liquid AI API", "input_tokens": 44836228, "model_id": "liquid-d1", "model_revision": "d1:free (API revision not published)", "output_tokens": 0, "pair_order": 0.5011223344556678, "pair_order_correct": 893, "pair_order_eligible": 1782, "precision": 0.5390070921985816, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.04083825900053734, "run_id": "perch-bug-two-questions-20260929", "threshold": 0.5, "track": "public"}
32
- {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.48689814906750656, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "confusion": {"fn": 402, "fp": 17, "tn": 555, "tp": 22}, "domain": "bug", "f1": 0.09503239740820735, "inference_cost_basis": "d1:free API tier; no published per-token rate", "inference_cost_usd": null, "inference_endpoint": "https://api.liquid.ai/decisions/v1/systemone", "inference_host": "Liquid AI API", "input_tokens": 10077688, "model_id": "liquid-d1", "model_revision": "d1:free (API revision not published)", "output_tokens": 0, "pair_order": 0.49625935162094764, "pair_order_correct": 199, "pair_order_eligible": 401, "precision": 0.5641025641025641, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.05188679245283019, "run_id": "perch-bug-two-questions-20260929", "threshold": 0.5, "track": "private"}
33
- {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.49359009471673904, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "confusion": {"fn": 507, "fp": 693, "tn": 787, "tp": 635}, "domain": "security", "f1": 0.5141700404858299, "inference_cost_basis": "d1:free API tier; no published per-token rate", "inference_cost_usd": null, "inference_endpoint": "https://api.liquid.ai/decisions/v1/systemone", "inference_host": "Liquid AI API", "input_tokens": 161612859, "model_id": "liquid-d1", "model_revision": "d1:free (API revision not published)", "output_tokens": 0, "pair_order": 0.5222419928825622, "pair_order_correct": 587, "pair_order_eligible": 1124, "precision": 0.47816265060240964, "protocol_id": "liquid-d1-perch-scan-pack-v1", "question_pack_sha256": "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d", "recall": 0.5560420315236427, "run_id": "liquid-d1-perch-scan-20260929", "threshold": 0.5, "track": "public"}
34
- {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.4784904017284298, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "confusion": {"fn": 262, "fp": 139, "tn": 341, "tp": 136}, "domain": "security", "f1": 0.40416047548291234, "inference_cost_basis": "d1:free API tier; no published per-token rate", "inference_cost_usd": null, "inference_endpoint": "https://api.liquid.ai/decisions/v1/systemone", "inference_host": "Liquid AI API", "input_tokens": 62054285, "model_id": "liquid-d1", "model_revision": "d1:free (API revision not published)", "output_tokens": 0, "pair_order": 0.4547738693467337, "pair_order_correct": 181, "pair_order_eligible": 398, "precision": 0.49454545454545457, "protocol_id": "liquid-d1-perch-scan-pack-v1", "question_pack_sha256": "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d", "recall": 0.3417085427135678, "run_id": "liquid-d1-perch-scan-20260929", "threshold": 0.5, "track": "private"}
35
- {"alert_rule": "rule violation score > 0.7", "average_precision": 0.9251948043796072, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "confusion": {"fn": 109, "fp": 2, "tn": 212, "tp": 105}, "domain": "lint", "f1": 0.6542056074766355, "inference_cost_basis": "d1:free API tier; no published per-token rate", "inference_cost_usd": null, "inference_endpoint": "https://api.liquid.ai/decisions/v1/systemone", "inference_host": "Liquid AI API", "input_tokens": 985496, "model_id": "liquid-d1", "model_revision": "d1:free (API revision not published)", "output_tokens": 0, "pair_order": 0.9345794392523364, "pair_order_correct": 200, "pair_order_eligible": 214, "precision": 0.9813084112149533, "protocol_id": "liquid-d1-perch-semantic-ensure-v1", "question_pack_sha256": null, "recall": 0.49065420560747663, "run_id": "liquid-d1-perch-scan-20260929", "threshold": 0.7, "track": "public"}
36
- {"alert_rule": "rule violation score > 0.7", "average_precision": 0.9239761802875874, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "confusion": {"fn": 36, "fp": 1, "tn": 70, "tp": 35}, "domain": "lint", "f1": 0.6542056074766355, "inference_cost_basis": "d1:free API tier; no published per-token rate", "inference_cost_usd": null, "inference_endpoint": "https://api.liquid.ai/decisions/v1/systemone", "inference_host": "Liquid AI API", "input_tokens": 315606, "model_id": "liquid-d1", "model_revision": "d1:free (API revision not published)", "output_tokens": 0, "pair_order": 0.971830985915493, "pair_order_correct": 69, "pair_order_eligible": 71, "precision": 0.9722222222222222, "protocol_id": "liquid-d1-perch-semantic-ensure-v1", "question_pack_sha256": null, "recall": 0.49295774647887325, "run_id": "liquid-d1-perch-scan-20260929", "threshold": 0.7, "track": "private"}
37
  {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.4730101495499027, "benchmark_methods": 4440, "benchmark_pairs": 2220, "confusion": {"fn": 1707, "fp": 143, "tn": 2436, "tp": 154}, "domain": "bug", "f1": 0.14272474513438368, "inference_cost_basis": "API-reported input and thinking tokens at published TypeLLM rates", "inference_cost_usd": 0.57606375, "inference_endpoint": "https://api.typellm.ai/v1/generate", "inference_host": "TypeLLM", "model_id": "typellm", "model_revision": "typellm-latest", "pair_order": 0.5129068462401796, "pair_order_correct": 914, "pair_order_eligible": 1782, "precision": 0.5185185185185185, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.08275120902740463, "run_id": "typellm-20260930", "threshold": 0.5, "track": "public"}
38
  {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.5064587972284842, "benchmark_methods": 996, "benchmark_pairs": 498, "confusion": {"fn": 376, "fp": 33, "tn": 539, "tp": 48}, "domain": "bug", "f1": 0.1900990099009901, "inference_cost_basis": "API-reported input and thinking tokens at published TypeLLM rates", "inference_cost_usd": 0.12900565, "inference_endpoint": "https://api.typellm.ai/v1/generate", "inference_host": "TypeLLM", "model_id": "typellm", "model_revision": "typellm-latest", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.5925925925925926, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.11320754716981132, "run_id": "typellm-20260930", "threshold": 0.5, "track": "private"}
39
  {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.5078855584544545, "benchmark_methods": 2622, "benchmark_pairs": 1311, "confusion": {"fn": 824, "fp": 257, "tn": 1223, "tp": 318}, "domain": "security", "f1": 0.37041351193942923, "inference_cost_basis": "API-reported input and thinking tokens at published TypeLLM rates", "inference_cost_usd": 0.566494, "inference_endpoint": "https://api.typellm.ai/v1/generate", "inference_host": "TypeLLM", "model_id": "typellm", "model_revision": "typellm-latest", "pair_order": 0.5195729537366548, "pair_order_correct": 584, "pair_order_eligible": 1124, "precision": 0.5530434782608695, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.27845884413309985, "run_id": "typellm-20260930", "threshold": 0.5, "track": "public"}
@@ -64,3 +58,9 @@
64
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4664174064351087, "average_precision_answered_methods": 0.4664174064351087, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 316, "fp": 118, "tn": 454, "tp": 108}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.3323076923076923, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.2062937062937063, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.107653602, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 2563181, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.873144334065728, "latency_p95_seconds": 2.338826625025831, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.4778761061946903, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.25471698113207547, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 221, "eligible": 401, "ties": 0}}
65
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.4737128965738396, "average_precision_answered_methods": 0.4737128965738396, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 641, "fp": 566, "tn": 914, "tp": 501}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.45359891353553644, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3824324324324324, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.455216076, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 10838478, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.028734000050463, "latency_p95_seconds": 2.333685915917158, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5266903914590747, "pair_order_correct": 592, "pair_order_eligible": 1124, "precision": 0.46954076850984067, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.43870402802101577, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 592, "eligible": 1124, "ties": 0}}
66
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.46925395820871746, "average_precision_answered_methods": 0.46925395820871746, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 326, "fp": 80, "tn": 400, "tp": 72}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.26181818181818184, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.16666666666666666, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.162594978, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 3871309, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0353772909147665, "latency_p95_seconds": 2.391944915987551, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4824120603015075, "pair_order_correct": 192, "pair_order_eligible": 398, "precision": 0.47368421052631576, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.18090452261306533, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 192, "eligible": 398, "ties": 0}}
 
 
 
 
 
 
 
28
  {"alert_rule": "rule violation score > 0.7", "average_precision": 0.8296819071061596, "benchmark_methods": 142, "benchmark_pairs": 71, "confusion": {"fn": 33, "fp": 6, "tn": 65, "tp": 38}, "domain": "lint", "f1": 0.6608695652173913, "inference_cost_basis": "API reported", "inference_cost_usd": 0.005866, "inference_endpoint": "https://app.beam.cloud/v1/models/jev/diffusiongemma/invoke", "inference_host": "Beam", "model_id": "diffusiongemma", "model_revision": "diffusiongemma", "pair_order": 0.8591549295774648, "pair_order_correct": 61, "pair_order_eligible": 71, "precision": 0.8636363636363636, "protocol_id": "perch-semantic-ensure-v1", "question_pack_sha256": null, "recall": 0.5352112676056338, "run_id": "perch-scan-pack-configured-floors-20260928", "threshold": 0.7, "track": "private"}
29
  {"alert_rule": "rule violation score > 0.7", "average_precision": 0.5141925432023778, "benchmark_methods": 142, "benchmark_pairs": 71, "confusion": {"fn": 35, "fp": 35, "tn": 36, "tp": 36}, "domain": "lint", "f1": 0.5070422535211268, "inference_cost_basis": "allocated GPU runtime by embedding rows", "inference_cost_usd": 0.0033639277067493522, "inference_endpoint": null, "inference_host": "Runpod pod, H100 80 GB, US-NE-1", "model_id": "clm", "model_revision": "Contrastive-LM/CLM-v0.1-8B@head-b2b4a8c9c2d39263eff78a351eb909a342ce9b3bf21a3f07c1d1bf15f1c4eda5", "pair_order": 0.5633802816901409, "pair_order_correct": 40, "pair_order_eligible": 71, "precision": 0.5070422535211268, "protocol_id": "clm-choice-head-v1", "question_pack_sha256": null, "recall": 0.5070422535211268, "run_id": "perch-scan-pack-configured-floors-20260928", "threshold": 0.7, "track": "private"}
30
  {"alert_rule": "rule violation score > 0.7", "average_precision": 0.8320090658208488, "benchmark_methods": 142, "benchmark_pairs": 71, "confusion": {"fn": 39, "fp": 6, "tn": 65, "tp": 32}, "domain": "lint", "f1": 0.5871559633027523, "inference_cost_basis": "API-reported input tokens at published rate", "inference_cost_usd": 0.00456932, "inference_endpoint": "https://api.respan.ai/api/v1/scores", "inference_host": "Respan API", "model_id": "span01", "model_revision": "span-01-pro (API revision not published)", "pair_order": 0.9154929577464789, "pair_order_correct": 65, "pair_order_eligible": 71, "precision": 0.8421052631578947, "protocol_id": "respan-span01-pro-perch-pack-v1", "question_pack_sha256": null, "recall": 0.4507042253521127, "run_id": "perch-scan-pack-configured-floors-20260928", "threshold": 0.7, "track": "private"}
 
 
 
 
 
 
31
  {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.4730101495499027, "benchmark_methods": 4440, "benchmark_pairs": 2220, "confusion": {"fn": 1707, "fp": 143, "tn": 2436, "tp": 154}, "domain": "bug", "f1": 0.14272474513438368, "inference_cost_basis": "API-reported input and thinking tokens at published TypeLLM rates", "inference_cost_usd": 0.57606375, "inference_endpoint": "https://api.typellm.ai/v1/generate", "inference_host": "TypeLLM", "model_id": "typellm", "model_revision": "typellm-latest", "pair_order": 0.5129068462401796, "pair_order_correct": 914, "pair_order_eligible": 1782, "precision": 0.5185185185185185, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.08275120902740463, "run_id": "typellm-20260930", "threshold": 0.5, "track": "public"}
32
  {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.5064587972284842, "benchmark_methods": 996, "benchmark_pairs": 498, "confusion": {"fn": 376, "fp": 33, "tn": 539, "tp": 48}, "domain": "bug", "f1": 0.1900990099009901, "inference_cost_basis": "API-reported input and thinking tokens at published TypeLLM rates", "inference_cost_usd": 0.12900565, "inference_endpoint": "https://api.typellm.ai/v1/generate", "inference_host": "TypeLLM", "model_id": "typellm", "model_revision": "typellm-latest", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.5925925925925926, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.11320754716981132, "run_id": "typellm-20260930", "threshold": 0.5, "track": "private"}
33
  {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.5078855584544545, "benchmark_methods": 2622, "benchmark_pairs": 1311, "confusion": {"fn": 824, "fp": 257, "tn": 1223, "tp": 318}, "domain": "security", "f1": 0.37041351193942923, "inference_cost_basis": "API-reported input and thinking tokens at published TypeLLM rates", "inference_cost_usd": 0.566494, "inference_endpoint": "https://api.typellm.ai/v1/generate", "inference_host": "TypeLLM", "model_id": "typellm", "model_revision": "typellm-latest", "pair_order": 0.5195729537366548, "pair_order_correct": 584, "pair_order_eligible": 1124, "precision": 0.5530434782608695, "protocol_id": "perch-scan-afe116cc8461", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.27845884413309985, "run_id": "typellm-20260930", "threshold": 0.5, "track": "public"}
 
58
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4664174064351087, "average_precision_answered_methods": 0.4664174064351087, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 316, "fp": 118, "tn": 454, "tp": 108}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.3323076923076923, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.2062937062937063, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.107653602, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 2563181, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.873144334065728, "latency_p95_seconds": 2.338826625025831, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.4778761061946903, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.25471698113207547, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 221, "eligible": 401, "ties": 0}}
59
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.4737128965738396, "average_precision_answered_methods": 0.4737128965738396, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 641, "fp": 566, "tn": 914, "tp": 501}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.45359891353553644, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3824324324324324, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.455216076, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 10838478, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.028734000050463, "latency_p95_seconds": 2.333685915917158, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5266903914590747, "pair_order_correct": 592, "pair_order_eligible": 1124, "precision": 0.46954076850984067, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.43870402802101577, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 592, "eligible": 1124, "ties": 0}}
60
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.46925395820871746, "average_precision_answered_methods": 0.46925395820871746, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 326, "fp": 80, "tn": 400, "tp": 72}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.26181818181818184, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.16666666666666666, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.162594978, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 3871309, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0353772909147665, "latency_p95_seconds": 2.391944915987551, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4824120603015075, "pair_order_correct": 192, "pair_order_eligible": 398, "precision": 0.47368421052631576, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.18090452261306533, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 192, "eligible": 398, "ties": 0}}
61
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.9194982168505601, "average_precision_answered_methods": 0.9194982168505601, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 127, "fp": 1, "tn": 213, "tp": 87}, "context_limit_tokens": 65536, "domain": "lint", "f1": 0.5761589403973509, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.004672897196261682, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.03890624, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 972656, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7922159159788862, "latency_p95_seconds": 2.426701958058402, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.9158878504672897, "pair_order_correct": 196, "pair_order_eligible": 214, "precision": 0.9886363636363636, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.40654205607476634, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 196, "eligible": 214, "ties": 0}}
62
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9038197230691274, "average_precision_answered_methods": 0.9038197230691274, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 42, "fp": 1, "tn": 70, "tp": 29}, "context_limit_tokens": 65536, "domain": "lint", "f1": 0.5742574257425742, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.014084507042253521, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.01245384, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 311346, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8404922089539468, "latency_p95_seconds": 2.41227475006599, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.9154929577464789, "pair_order_correct": 65, "pair_order_eligible": 71, "precision": 0.9666666666666667, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.4084507042253521, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 65, "eligible": 71, "ties": 1}}
63
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4439, "average_precision": 0.45826337265301537, "average_precision_answered_methods": 0.45826337265301537, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1760, "fp": 93, "tn": 2486, "tp": 101}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.09829683698296837, "failed_methods": 1, "failure_counts": {"The read operation timed out": 1}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.03606048856145793, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.87490476, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 21872619, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.887577582965605, "latency_p95_seconds": 2.3768632920691743, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5016835016835017, "pair_order_correct": 894, "pair_order_eligible": 1782, "precision": 0.520618556701031, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.05427189682966147, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 894, "eligible": 1782, "ties": 14}}
64
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4758656734035225, "average_precision_answered_methods": 0.4758656734035225, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 396, "fp": 24, "tn": 548, "tp": 28}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.11764705882352941, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04195804195804196, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.19667368, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 4916842, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7929241659585387, "latency_p95_seconds": 2.340836458024569, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5062344139650873, "pair_order_correct": 203, "pair_order_eligible": 401, "precision": 0.5384615384615384, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.0660377358490566, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 203, "eligible": 401, "ties": 5}}
65
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.49708136950251325, "average_precision_answered_methods": 0.49708136950251325, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 545, "fp": 603, "tn": 877, "tp": 597}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.5098206660973527, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.40743243243243243, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 6.13173568, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 153293392, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0774508339818567, "latency_p95_seconds": 2.837762249982916, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5284697508896797, "pair_order_correct": 594, "pair_order_eligible": 1124, "precision": 0.4975, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5227670753064798, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 594, "eligible": 1124, "ties": 15}}
66
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4793341864639895, "average_precision_answered_methods": 0.4793341864639895, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 260, "fp": 141, "tn": 339, "tp": 138}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.4076809453471196, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.29375, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 2.36226772, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 59056693, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.1423684580950066, "latency_p95_seconds": 2.9545628749765456, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.4547738693467337, "pair_order_correct": 181, "pair_order_eligible": 398, "precision": 0.4946236559139785, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.34673366834170855, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 181, "eligible": 398, "ties": 4}}
results.jsonl CHANGED
@@ -110,3 +110,9 @@
110
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4664174064351087, "average_precision_answered_methods": 0.4664174064351087, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 316, "fp": 118, "tn": 454, "tp": 108}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.3323076923076923, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.2062937062937063, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.107653602, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 2563181, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.873144334065728, "latency_p95_seconds": 2.338826625025831, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.4778761061946903, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.25471698113207547, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 221, "eligible": 401, "ties": 0}}
111
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.4737128965738396, "average_precision_answered_methods": 0.4737128965738396, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 641, "fp": 566, "tn": 914, "tp": 501}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.45359891353553644, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3824324324324324, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.455216076, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 10838478, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.028734000050463, "latency_p95_seconds": 2.333685915917158, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5266903914590747, "pair_order_correct": 592, "pair_order_eligible": 1124, "precision": 0.46954076850984067, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.43870402802101577, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 592, "eligible": 1124, "ties": 0}}
112
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.46925395820871746, "average_precision_answered_methods": 0.46925395820871746, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 326, "fp": 80, "tn": 400, "tp": 72}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.26181818181818184, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.16666666666666666, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.162594978, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 3871309, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0353772909147665, "latency_p95_seconds": 2.391944915987551, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4824120603015075, "pair_order_correct": 192, "pair_order_eligible": 398, "precision": 0.47368421052631576, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.18090452261306533, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 192, "eligible": 398, "ties": 0}}
 
 
 
 
 
 
 
110
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4664174064351087, "average_precision_answered_methods": 0.4664174064351087, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 316, "fp": 118, "tn": 454, "tp": 108}, "context_limit_tokens": 32768, "domain": "bug", "f1": 0.3323076923076923, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.2062937062937063, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.107653602, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 2563181, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.873144334065728, "latency_p95_seconds": 2.338826625025831, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5511221945137157, "pair_order_correct": 221, "pair_order_eligible": 401, "precision": 0.4778761061946903, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.25471698113207547, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 221, "eligible": 401, "ties": 0}}
111
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.4737128965738396, "average_precision_answered_methods": 0.4737128965738396, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 641, "fp": 566, "tn": 914, "tp": 501}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.45359891353553644, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.3824324324324324, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.455216076, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 10838478, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.028734000050463, "latency_p95_seconds": 2.333685915917158, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.5266903914590747, "pair_order_correct": 592, "pair_order_eligible": 1124, "precision": 0.46954076850984067, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.43870402802101577, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 592, "eligible": 1124, "ties": 0}}
112
  {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.46925395820871746, "average_precision_answered_methods": 0.46925395820871746, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 326, "fp": 80, "tn": 400, "tp": 72}, "context_limit_tokens": 32768, "domain": "security", "f1": 0.26181818181818184, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.16666666666666666, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.162594978, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Azure", "input_tokens": 3871309, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0353772909147665, "latency_p95_seconds": 2.391944915987551, "model_id": "microsoft-decision-1", "model_revision": "microsoft/microsoft-decision-1-20261009", "pair_order": 0.4824120603015075, "pair_order_correct": 192, "pair_order_eligible": 398, "precision": 0.47368421052631576, "protocol_id": "microsoft-decision-1-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.18090452261306533, "refused_methods": 0, "requested_model": "microsoft/microsoft-decision-1", "run_id": "microsoft-decision-1-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 192, "eligible": 398, "ties": 0}}
113
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 428, "average_precision": 0.9194982168505601, "average_precision_answered_methods": 0.9194982168505601, "benchmark_methods": 428, "benchmark_pairs": 214, "benchmark_sha256": "534f6c2abddc507c40f4597607e97e07168c544011d617b83aa39e08abb35d75", "complete": true, "confusion": {"fn": 127, "fp": 1, "tn": 213, "tp": 87}, "context_limit_tokens": 65536, "domain": "lint", "f1": 0.5761589403973509, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.004672897196261682, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.03890624, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 972656, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7922159159788862, "latency_p95_seconds": 2.426701958058402, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.9158878504672897, "pair_order_correct": 196, "pair_order_eligible": 214, "precision": 0.9886363636363636, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.40654205607476634, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.7, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 196, "eligible": 214, "ties": 0}}
114
+ {"alert_rule": "rule violation probability > 0.7", "answered_methods": 142, "average_precision": 0.9038197230691274, "average_precision_answered_methods": 0.9038197230691274, "benchmark_methods": 142, "benchmark_pairs": 71, "benchmark_sha256": "a6e9f2e4ee8ae77bdaf23af46920d97d1ba47375dc9ce03b950cdbe95c2777f9", "complete": true, "confusion": {"fn": 42, "fp": 1, "tn": 70, "tp": 29}, "context_limit_tokens": 65536, "domain": "lint", "f1": 0.5742574257425742, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.014084507042253521, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.01245384, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 311346, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.8404922089539468, "latency_p95_seconds": 2.41227475006599, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.9154929577464789, "pair_order_correct": 65, "pair_order_eligible": 71, "precision": 0.9666666666666667, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": null, "recall": 0.4084507042253521, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.7, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 65, "eligible": 71, "ties": 1}}
115
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 4439, "average_precision": 0.45826337265301537, "average_precision_answered_methods": 0.45826337265301537, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "complete": true, "confusion": {"fn": 1760, "fp": 93, "tn": 2486, "tp": 101}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.09829683698296837, "failed_methods": 1, "failure_counts": {"The read operation timed out": 1}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.03606048856145793, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.87490476, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 21872619, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.887577582965605, "latency_p95_seconds": 2.3768632920691743, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5016835016835017, "pair_order_correct": 894, "pair_order_eligible": 1782, "precision": 0.520618556701031, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.05427189682966147, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 894, "eligible": 1782, "ties": 14}}
116
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 996, "average_precision": 0.4758656734035225, "average_precision_answered_methods": 0.4758656734035225, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "complete": true, "confusion": {"fn": 396, "fp": 24, "tn": 548, "tp": 28}, "context_limit_tokens": 65536, "domain": "bug", "f1": 0.11764705882352941, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.04195804195804196, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 0.19667368, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 4916842, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 1.7929241659585387, "latency_p95_seconds": 2.340836458024569, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5062344139650873, "pair_order_correct": 203, "pair_order_eligible": 401, "precision": 0.5384615384615384, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.0660377358490566, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 203, "eligible": 401, "ties": 5}}
117
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 2622, "average_precision": 0.49708136950251325, "average_precision_answered_methods": 0.49708136950251325, "benchmark_methods": 2622, "benchmark_pairs": 1311, "benchmark_sha256": "2407059caa3486371749884138b997d89043eec646e548ee8f44ba3ab08514b8", "complete": true, "confusion": {"fn": 545, "fp": 603, "tn": 877, "tp": 597}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.5098206660973527, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.40743243243243243, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 6.13173568, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 153293392, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.0774508339818567, "latency_p95_seconds": 2.837762249982916, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.5284697508896797, "pair_order_correct": 594, "pair_order_eligible": 1124, "precision": 0.4975, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.5227670753064798, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "public", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 594, "eligible": 1124, "ties": 15}}
118
+ {"alert_rule": "any issue score > max(0.5, question min)", "answered_methods": 878, "average_precision": 0.4793341864639895, "average_precision_answered_methods": 0.4793341864639895, "benchmark_methods": 878, "benchmark_pairs": 439, "benchmark_sha256": "a4b81728e9e520cf1c6f342974bec369d72f5b7d8aabc1c9cf2aceba966f8051", "complete": true, "confusion": {"fn": 260, "fp": 141, "tn": 339, "tp": 138}, "context_limit_tokens": 65536, "domain": "security", "f1": 0.4076809453471196, "failed_methods": 0, "failure_counts": {}, "failure_counts_per_question": {}, "failure_policy": "failed positive counts as FN; failed negative counts as FP; failed pair counts as incorrect ordering", "false_positive_rate": 0.29375, "inference_cost_basis": "OpenRouter API-reported usage.cost", "inference_cost_usd": 2.36226772, "inference_endpoint": "https://openrouter.ai/api/v1/systemone", "inference_host": "OpenRouter / Liquid", "input_tokens": 59056693, "latency_basis": "Per-method elapsed time, including client rate-limit waits and 429 backoff", "latency_median_seconds": 2.1423684580950066, "latency_p95_seconds": 2.9545628749765456, "model_id": "liquid-d1", "model_revision": "liquid/d1-20260930", "pair_order": 0.4547738693467337, "pair_order_correct": 181, "pair_order_eligible": 398, "precision": 0.4946236559139785, "protocol_id": "liquid-d1-openrouter-perch-systemone-v1", "question_pack_sha256": "afe116cc8461552aaca996f8f0b639cdf5e42e9d8291c59995482309b5c330dc", "recall": 0.34673366834170855, "refused_methods": 0, "requested_model": "liquid/d1", "run_id": "liquid-d1-openrouter-20261012", "threshold": 0.5, "track": "private", "vulnerable_or_buggy_before_above_fixed_after": {"correct": 181, "eligible": 398, "ties": 4}}
test_openrouter_decisions.py CHANGED
@@ -33,6 +33,21 @@ class OpenRouterTests(unittest.TestCase):
33
  finally:
34
  runner.select_model(runner.MODELS[0])
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  def test_native_schema_and_semantic_polarity(self):
37
  payload = runner.payload_for(self.pair, 'before', 'lint', self.pack, self.model)
38
  self.assertEqual(payload['state'], self.pair['before']['state'])
 
33
  finally:
34
  runner.select_model(runner.MODELS[0])
35
 
36
+ def test_liquid_paid_route_records_native_probability_and_cost(self):
37
+ model = 'liquid/d1'
38
+ runner.select_model(model)
39
+ try:
40
+ response = self.response({'semantic': {'type': 'noul', 'noul': .1}})
41
+ response['usage']['cost'] = .00004
42
+ row = runner.prediction(self.pair, 'before', 'lint', self.pack, response, .2, model)
43
+ self.assertEqual(row['model_id'], 'liquid-d1')
44
+ self.assertEqual(row['model_revision'], 'liquid/d1-20260930')
45
+ self.assertEqual(row['usage']['cost'], .00004)
46
+ self.assertAlmostEqual(row['score'], .9)
47
+ self.assertEqual(runner.CONTEXT_LIMIT, 65536)
48
+ finally:
49
+ runner.select_model(runner.MODELS[0])
50
+
51
  def test_native_schema_and_semantic_polarity(self):
52
  payload = runner.payload_for(self.pair, 'before', 'lint', self.pack, self.model)
53
  self.assertEqual(payload['state'], self.pair['before']['state'])
test_tradeoff.py CHANGED
@@ -7,34 +7,63 @@ import tradeoff
7
 
8
 
9
  class GraphTests(unittest.TestCase):
 
 
 
 
 
10
  def render(self, current):
11
  with tempfile.TemporaryDirectory() as temp:
12
  output = Path(temp) / 'graph.svg'
13
  tradeoff.svg('bug', current, output)
14
  return ET.fromstring(output.read_text())
15
 
16
- def test_points_use_recall_and_false_positive_rate_from_table(self):
17
- current = {model: {'confusion': {'tp': 7, 'fn': 3, 'fp': 2, 'tn': 18}}
18
- for model in tradeoff.ORDER}
19
- root = self.render(current)
20
- dots = [e for e in root.findall('{http://www.w3.org/2000/svg}circle') if 'data-model' in e.attrib]
21
- self.assertEqual(len(dots), len(tradeoff.ORDER))
22
- self.assertAlmostEqual((float(dots[0].attrib['cx']) - 90) / 990, .1)
23
- self.assertAlmostEqual((498 - float(dots[0].attrib['cy'])) / 350, .7)
24
- self.assertFalse(root.findall('{http://www.w3.org/2000/svg}polyline'))
25
- labels = [e.text for e in root.findall('{http://www.w3.org/2000/svg}text')]
26
- self.assertIn('False positive rate', labels)
27
- self.assertIn('Recall', labels)
28
-
29
- def test_false_positives_do_not_change_vertical_recall_coordinate(self):
30
- current = {model: {'confusion': {'tp': 7, 'fn': 3, 'fp': 2, 'tn': 18}}
31
- for model in tradeoff.ORDER}
32
- current['typellm'] = {'confusion': {'tp': 7, 'fn': 3, 'fp': 10, 'tn': 10}}
33
- root = self.render(current)
34
- dots = {e.attrib['data-model']: e for e in root.findall('{http://www.w3.org/2000/svg}circle')
35
  if 'data-model' in e.attrib}
36
- self.assertEqual(dots['jev'].attrib['cy'], dots['typellm'].attrib['cy'])
37
- self.assertLess(float(dots['jev'].attrib['cx']), float(dots['typellm'].attrib['cx']))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
 
39
 
40
  class AlertCurveTests(unittest.TestCase):
 
7
 
8
 
9
  class GraphTests(unittest.TestCase):
10
+ def rows(self):
11
+ return {model: {'confusion': {'tp': 7, 'fn': 3, 'fp': 2, 'tn': 18},
12
+ 'inference_cost_usd': .05, 'benchmark_methods': 30}
13
+ for model in tradeoff.ORDER}
14
+
15
  def render(self, current):
16
  with tempfile.TemporaryDirectory() as temp:
17
  output = Path(temp) / 'graph.svg'
18
  tradeoff.svg('bug', current, output)
19
  return ET.fromstring(output.read_text())
20
 
21
+ def dots(self, root):
22
+ return {e.attrib['data-model']: e for e in root.findall('{http://www.w3.org/2000/svg}circle')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  if 'data-model' in e.attrib}
24
+
25
+ def test_points_use_recorded_cost_and_youden_j(self):
26
+ import math
27
+ current = self.rows();root = self.render(current);dots = self.dots(root)
28
+ self.assertEqual(len(dots), len(current))
29
+ dot=dots['jev'];self.assertEqual(float(dot.attrib['data-cost']), .05)
30
+ self.assertAlmostEqual(float(dot.attrib['data-j']), .6)
31
+ low,high=float(root.attrib['data-cost-low']),float(root.attrib['data-cost-high'])
32
+ y_min,y_max=float(root.attrib['data-j-min']),float(root.attrib['data-j-max'])
33
+ self.assertAlmostEqual((float(dot.attrib['cx'])-100)/1130,
34
+ (math.log10(.05)-math.log10(low))/(math.log10(high)-math.log10(low)),places=4)
35
+ self.assertAlmostEqual((float(dot.attrib['cy'])-175)/400,(y_max-60)/(y_max-y_min),places=4)
36
+ labels=[e.text for e in root.findall('{http://www.w3.org/2000/svg}text')]
37
+ self.assertIn('Run cost (USD, log scale)', labels)
38
+ self.assertIn('Youden’s J (recall − false-positive rate)', labels)
39
+
40
+ def test_more_false_positives_reduce_j_at_same_cost(self):
41
+ current=self.rows();current['typellm']['confusion']={'tp':7,'fn':3,'fp':10,'tn':10}
42
+ dots=self.dots(self.render(current))
43
+ self.assertEqual(dots['jev'].attrib['cx'],dots['typellm'].attrib['cx'])
44
+ self.assertLess(float(dots['jev'].attrib['cy']),float(dots['typellm'].attrib['cy']))
45
+
46
+ def test_frontier_excludes_strictly_dominated_models_and_keeps_ties(self):
47
+ def row(cost,tp,fp):
48
+ return {'inference_cost_usd':cost,'confusion':{'tp':tp,'fn':10-tp,'fp':fp,'tn':10-fp}}
49
+ current={'mercury-decide':row(.02,8,1),'jev':row(.05,6,1),
50
+ 'openai-decisions':row(.09,9,1),'typellm':row(.02,8,1)}
51
+ self.assertEqual(tradeoff.pareto_models(current),{'mercury-decide','openai-decisions','typellm'})
52
+ current['codeql']=row(None,10,0)
53
+ self.assertNotIn('codeql',tradeoff.pareto_models(current))
54
+
55
+ def test_unknown_cost_is_not_plotted_as_zero(self):
56
+ current=self.rows();current['codeql']={'confusion':{'tp':10,'fn':0,'fp':0,'tn':20}}
57
+ dots=self.dots(self.render(current));self.assertNotIn('codeql',dots)
58
+ current['jev']['inference_cost_usd']=0
59
+ with self.assertRaises(ValueError):self.render(current)
60
+
61
+ def test_axis_shows_negative_scores_and_always_yes_scores_zero(self):
62
+ current=self.rows();current['jev']['confusion']={'tp':10,'fn':0,'fp':20,'tn':0}
63
+ current['typellm']['confusion']={'tp':1,'fn':9,'fp':10,'tn':10}
64
+ root=self.render(current);dots=self.dots(root)
65
+ self.assertEqual(float(dots['jev'].attrib['data-j']),0)
66
+ self.assertLess(float(root.attrib['data-j-min']),0)
67
 
68
 
69
  class AlertCurveTests(unittest.TestCase):
tradeoff.py CHANGED
@@ -1,5 +1,5 @@
1
  #!/usr/bin/env python3
2
- """Rebuild public recall/false-positive-rate charts and benchmark result tables.
3
 
4
  Recorded alert counts are validated against each run's question floors and failure policy.
5
  Private tables use only aggregates in results-current.jsonl.
@@ -11,7 +11,7 @@ import argparse
11
  from collections import defaultdict
12
  import html
13
  import json
14
- from math import isfinite
15
  from pathlib import Path
16
  from tempfile import TemporaryDirectory
17
  from urllib.request import urlopen
@@ -26,7 +26,7 @@ DATASET_URLS = {
26
  NAMES = {
27
  "jev": ("Jev", "https://typesafe.ai/blog/introducing-system-one-models-and-jev"),
28
  "typellm": ("TypeLLM", "https://typellm.ai/docs"),
29
- "liquid-d1": ("Liquid d1", "https://docs.liquid.ai/lfm/models/decision-models"),
30
  "diffusiongemma": ("DiffusionGemma Jev", "https://github.com/razorback16/openjev"),
31
  "span01": ("Span-01", "https://www.respan.ai/docs/documentation/span-01/concept"),
32
  "clm": ("CLM-v0.1-8B", "https://huggingface.co/Contrastive-LM/CLM-v0.1-8B"),
@@ -193,7 +193,7 @@ def results_table(rows: list[dict]) -> str:
193
  def mark(value: str, winner: bool) -> str:
194
  return f"**{value}**" if winner else value
195
 
196
- table = ["| Model | Recall | False-positive rate | Recall − false-positive rate | Failed requests | Inference cost |",
197
  "| --- | ---: | ---: | ---: | ---: | ---: |"]
198
  for row in ordered:
199
  recall, false_positive_rate, j = metrics[row["model_id"]]
@@ -213,51 +213,116 @@ def results_table(rows: list[dict]) -> str:
213
  return "\n".join(table)
214
 
215
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  def svg(domain: str, current: dict[str, dict], output: Path) -> None:
217
- width, height = 1120, 580
218
- left, right, top, bottom = 90, 40, 148, 82
219
  plot_w, plot_h = width - left - right, height - top - bottom
220
- models = [*ORDER, *(["codeql"] if "codeql" in current else [])]
221
- title = {"bug": "Bug detection", "security": "Security detection", "lint": "Perch Lint Bench"}[domain]
222
- out = [f'<svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="{height}" viewBox="0 0 {width} {height}" role="img" aria-labelledby="title desc">',
223
- f'<title id="title">{title}: recall versus false positive rate</title>',
224
- '<desc id="desc">Each point is a model at its recorded table cutoff. X is the percentage of clean methods falsely flagged. Y is the percentage of issue-bearing methods found. Higher and farther left is better. CodeQL, where present, uses the subset documented below the table.</desc>',
 
 
 
 
 
 
 
 
225
  f'<rect width="{width}" height="{height}" rx="16" fill="#101318"/>',
226
- f'<text x="{left}" y="43" fill="#f2f5fa" font-family="Arial,sans-serif" font-weight="700" font-size="28">{html.escape(title)}</text>',
227
- f'<text x="{left}" y="70" fill="#aeb9c7" font-family="Arial,sans-serif" font-size="16">Public methods · one point per model · upper left is better</text>']
 
 
228
  for i, model in enumerate(models):
229
  col, row = i % 4, i // 4
230
- lx, ly = left + col * 245, 91 + row * 22
231
- color = COLORS.get(model, "#cfd5df")
232
- name = "CodeQL*" if model == "codeql" else NAMES[model][0]
233
- out += [f'<circle cx="{lx + 12}" cy="{ly}" r="5" fill="{color}"/>',
234
- f'<text x="{lx + 32}" y="{ly + 5}" fill="#e1e7ef" font-family="Arial,sans-serif" font-size="15">{html.escape(name)}</text>']
235
- for value in range(0, 101, 20):
236
- px = left + value / 100 * plot_w
237
- py = top + (1 - value / 100) * plot_h
238
- out += [f'<line x1="{px:.1f}" y1="{top}" x2="{px:.1f}" y2="{top + plot_h}" stroke="#29303a"/>',
239
- f'<text x="{px:.1f}" y="{top + plot_h + 25}" text-anchor="middle" fill="#aeb9c7" font-family="Arial,sans-serif" font-size="14">{value}%</text>',
240
- f'<line x1="{left}" y1="{py:.1f}" x2="{left + plot_w}" y2="{py:.1f}" stroke="#29303a"/>',
241
- f'<text x="{left - 12}" y="{py + 5:.1f}" text-anchor="end" fill="#aeb9c7" font-family="Arial,sans-serif" font-size="14">{value}%</text>']
 
 
 
 
 
 
242
  for model in models:
243
- recall, fpr, _ = operating_metrics(current[model])
244
- px, py = left + fpr * plot_w, top + (1 - recall) * plot_h
245
- color = COLORS.get(model, "#cfd5df")
246
- name = "CodeQL*" if model == "codeql" else NAMES[model][0]
247
- tooltip = html.escape(f"{name}: recall {recall:.1%}; false positive rate {fpr:.1%}")
248
- out.append(f'<circle data-model="{model}" cx="{px:.2f}" cy="{py:.2f}" r="6" fill="{color}" stroke="#fff" stroke-width="1.5"><title>{tooltip}</title></circle>')
249
- out += [f'<text x="{left + plot_w / 2:.1f}" y="{height - 23}" text-anchor="middle" fill="#e1e7ef" font-family="Arial,sans-serif" font-size="17">False positive rate</text>',
250
- f'<text transform="translate(23 {top + plot_h / 2:.1f}) rotate(-90)" text-anchor="middle" fill="#e1e7ef" font-family="Arial,sans-serif" font-size="17">Recall</text>',
 
 
 
 
 
251
  '</svg>']
252
  output.parent.mkdir(parents=True, exist_ok=True)
253
- output.write_text("\n".join(out) + "\n")
254
 
255
 
256
  def render_sections(results: list[dict], output_dir: Path,
257
  codeql_results: dict) -> str:
258
  sections = ["## Reading the results", "",
259
- "Each point shows a model at the same cutoff used in its table. X is the false-positive rate: the percentage of clean methods wrongly flagged. Y is recall: the percentage of labelled issues found. Higher and farther left is better.", "",
260
- "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 recall minus that percentage. Bold marks the best full-set value in each column; cost compares priced runs captured here.", ""]
261
  if any(r.get("failed_methods") for r in results):
262
  sections += ["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.", ""]
263
  for domain in ("bug", "security", "lint"):
@@ -279,7 +344,7 @@ def render_sections(results: list[dict], output_dir: Path,
279
  image = output_dir / f"{domain}-tradeoff.svg"
280
  svg(domain, {r["model_id"]: r for r in public}, image)
281
  sections += [f"## {title}", "", f"[Public pairs](https://huggingface.co/datasets/perchscan/{link})", "",
282
- f"![{title}: recall versus false-positive rate at table cutoffs](assets/{domain}-tradeoff.svg)", "",
283
  f"### Public — {public[0]['benchmark_pairs']:,} pairs", "",
284
  results_table(public), ""]
285
  if domain in ("bug", "security"):
 
1
  #!/usr/bin/env python3
2
+ """Rebuild public Youden’s J versus cost charts and benchmark result tables.
3
 
4
  Recorded alert counts are validated against each run's question floors and failure policy.
5
  Private tables use only aggregates in results-current.jsonl.
 
11
  from collections import defaultdict
12
  import html
13
  import json
14
+ from math import ceil, floor, isfinite, log10
15
  from pathlib import Path
16
  from tempfile import TemporaryDirectory
17
  from urllib.request import urlopen
 
26
  NAMES = {
27
  "jev": ("Jev", "https://typesafe.ai/blog/introducing-system-one-models-and-jev"),
28
  "typellm": ("TypeLLM", "https://typellm.ai/docs"),
29
+ "liquid-d1": ("Liquid d1", "https://openrouter.ai/liquid/d1"),
30
  "diffusiongemma": ("DiffusionGemma Jev", "https://github.com/razorback16/openjev"),
31
  "span01": ("Span-01", "https://www.respan.ai/docs/documentation/span-01/concept"),
32
  "clm": ("CLM-v0.1-8B", "https://huggingface.co/Contrastive-LM/CLM-v0.1-8B"),
 
193
  def mark(value: str, winner: bool) -> str:
194
  return f"**{value}**" if winner else value
195
 
196
+ table = ["| Model | Recall | False-positive rate | Youden’s J | Failed requests | Inference cost |",
197
  "| --- | ---: | ---: | ---: | ---: | ---: |"]
198
  for row in ordered:
199
  recall, false_positive_rate, j = metrics[row["model_id"]]
 
213
  return "\n".join(table)
214
 
215
 
216
+ def plot_cost(row: dict) -> float | None:
217
+ cost = row.get('inference_cost_usd')
218
+ if cost is None:
219
+ return None
220
+ if isinstance(cost, bool) or not isinstance(cost, (int, float)) or not isfinite(cost) or cost <= 0:
221
+ raise ValueError('A cost plot requires a positive recorded inference cost')
222
+ return cost
223
+
224
+
225
+ def pareto_models(current: dict[str, dict]) -> set[str]:
226
+ values = {model: (plot_cost(row), operating_metrics(row)[2])
227
+ for model, row in current.items() if plot_cost(row) is not None}
228
+ return {model for model, (cost, score) in values.items()
229
+ if not any(other_cost <= cost and other_score >= score and
230
+ (other_cost < cost or other_score > score)
231
+ for other, (other_cost, other_score) in values.items() if other != model)}
232
+
233
+
234
+ def nice_step(value: float) -> float:
235
+ power = 10 ** floor(log10(max(value, 1e-9)))
236
+ return next(factor * power for factor in (1, 2, 2.5, 5, 10) if factor * power >= value)
237
+
238
+
239
+ def plot_axes(current: dict[str, dict]) -> tuple[float, float, list[float], float, float, float]:
240
+ costs = [plot_cost(row) for row in current.values() if plot_cost(row) is not None]
241
+ scores = [operating_metrics(row)[2] * 100 for row in current.values() if plot_cost(row) is not None]
242
+ if not costs:
243
+ raise ValueError('No recorded costs to plot')
244
+ ticks = sorted({factor * 10 ** exponent
245
+ for exponent in range(floor(log10(min(costs))) - 1, ceil(log10(max(costs))) + 2)
246
+ for factor in (1, 2, 5)})
247
+ low = max(tick for tick in ticks if tick <= min(costs))
248
+ high = min(tick for tick in ticks if tick >= max(costs))
249
+ if low == high:
250
+ low /= 2
251
+ high *= 2
252
+ ticks = sorted(set([*ticks, low, high]))
253
+ ticks = [tick for tick in ticks if low <= tick <= high]
254
+ step = nice_step(max(max(scores) - min(0, min(scores)), 1) / 5)
255
+ bottom = floor(min(0, min(scores)) / step) * step
256
+ top = max(step, ceil(max(0, max(scores)) * 1.06 / step) * step)
257
+ return low, high, ticks, bottom, top, step
258
+
259
+
260
  def svg(domain: str, current: dict[str, dict], output: Path) -> None:
261
+ width, height = 1280, 690
262
+ left, right, top, bottom = 100, 50, 175, 115
263
  plot_w, plot_h = width - left - right, height - top - bottom
264
+ models = [model for model in ORDER if model in current and plot_cost(current[model]) is not None]
265
+ plotted = {model: current[model] for model in models}
266
+ frontier = pareto_models(plotted)
267
+ low, high, cost_ticks, y_min, y_max, y_step = plot_axes(plotted)
268
+ def x(cost):
269
+ return left + (log10(cost) - log10(low)) / (log10(high) - log10(low)) * plot_w
270
+ def y(score):
271
+ return top + (y_max - score * 100) / (y_max - y_min) * plot_h
272
+ title = {'bug': 'Bug detection', 'security': 'Security detection', 'lint': 'Perch Lint Bench'}[domain]
273
+ methods = next(row['benchmark_methods'] for row in current.values() if 'benchmark_methods' in row)
274
+ out = [f'<svg xmlns="http://www.w3.org/2000/svg" width="{width}" height="{height}" viewBox="0 0 {width} {height}" role="img" aria-labelledby="title desc" data-cost-low="{low}" data-cost-high="{high}" data-j-min="{y_min}" data-j-max="{y_max}">',
275
+ f'<title id="title">{title}: Youden’s J versus inference cost</title>',
276
+ '<desc id="desc">Each point uses the table’s recorded alert settings and inference cost. Y is recall minus false-positive rate. X is US dollars on a logarithmic scale. The amber Pareto frontier marks models for which no other recorded run has both equal or lower cost and equal or higher score, with at least one strict improvement. Higher and farther left is better.</desc>',
277
  f'<rect width="{width}" height="{height}" rx="16" fill="#101318"/>',
278
+ f'<text x="{left}" y="43" fill="#f2f5fa" font-family="Arial,sans-serif" font-weight="700" font-size="30">{html.escape(title)}</text>',
279
+ f'<text x="{left}" y="72" fill="#aeb9c7" font-family="Arial,sans-serif" font-size="16">{methods:,} public method evaluations · upper left is better</text>',
280
+ '<line x1="994" y1="42" x2="1030" y2="42" stroke="#ffb454" stroke-width="2.5" stroke-dasharray="5 4"/>',
281
+ '<text x="1040" y="47" fill="#ffcc8c" font-family="Arial,sans-serif" font-size="16">Pareto frontier</text>']
282
  for i, model in enumerate(models):
283
  col, row = i % 4, i // 4
284
+ lx, ly = left + col * 280, 102 + row * 23
285
+ out += [f'<circle cx="{lx + 8}" cy="{ly}" r="5" fill="{COLORS[model]}"/>',
286
+ f'<text x="{lx + 24}" y="{ly + 5}" fill="#e1e7ef" font-family="Arial,sans-serif" font-size="15">{html.escape(NAMES[model][0])}</text>']
287
+ for value in cost_ticks:
288
+ px = x(value)
289
+ text = f'${value:.2f}' if value < 1 else f'${value:g}'
290
+ out += [f'<line x1="{px:.2f}" y1="{top}" x2="{px:.2f}" y2="{top+plot_h}" stroke="#29303a"/>',
291
+ f'<text x="{px:.2f}" y="{top+plot_h+27}" text-anchor="middle" fill="#aeb9c7" font-family="Arial,sans-serif" font-size="15">{text}</text>']
292
+ for index in range(round((y_max-y_min)/y_step)+1):
293
+ value = y_min + index*y_step
294
+ py = y(value / 100)
295
+ label = f'{value:g}%'
296
+ out += [f'<line x1="{left}" y1="{py:.2f}" x2="{left+plot_w}" y2="{py:.2f}" stroke="#39414f" stroke-width="{1.6 if abs(value)<1e-9 else 1}"/>',
297
+ f'<text x="{left-13}" y="{py+5:.2f}" text-anchor="end" fill="#aeb9c7" font-family="Arial,sans-serif" font-size="15">{label}</text>']
298
+ frontier_points = sorted({(plot_cost(current[m]), operating_metrics(current[m])[2]) for m in frontier})
299
+ if len(frontier_points) > 1:
300
+ points = ' '.join(f'{x(cost):.2f},{y(score):.2f}' for cost, score in frontier_points)
301
+ out.append(f'<polyline class="pareto-frontier" points="{points}" fill="none" stroke="#ffb454" stroke-width="2.5" stroke-dasharray="5 4" opacity=".85"/>')
302
  for model in models:
303
+ row = current[model]; cost = plot_cost(row)
304
+ recall, fpr, score = operating_metrics(row)
305
+ px, py = x(cost), y(score)
306
+ tooltip = html.escape(f'{NAMES[model][0]}: Youden’s J {score:.1%}; recall {recall:.1%}; false-positive rate {fpr:.1%}; run cost ${cost:.4f}' + (' (GPU estimate)' if model == 'clm' else ''))
307
+ if model in frontier:
308
+ out.append(f'<circle cx="{px:.2f}" cy="{py:.2f}" r="11" fill="#101318" stroke="#ffb454" stroke-width="2"/>')
309
+ out.append(f'<circle data-model="{model}" data-cost="{cost}" data-j="{score}" data-frontier="{str(model in frontier).lower()}" cx="{px:.2f}" cy="{py:.2f}" r="6" fill="{COLORS[model]}" stroke="#fff" stroke-width="1.5"><title>{tooltip}</title></circle>')
310
+ footer = 'CLM cost: GPU runtime estimate'
311
+ if 'codeql' in current:
312
+ footer += ' · CodeQL cost: unrecorded'
313
+ out += [f'<text x="{left+plot_w/2}" y="{height-59}" text-anchor="middle" fill="#e1e7ef" font-family="Arial,sans-serif" font-size="18">Run cost (USD, log scale)</text>',
314
+ f'<text transform="translate(27 {top+plot_h/2}) rotate(-90)" text-anchor="middle" fill="#e1e7ef" font-family="Arial,sans-serif" font-size="17">Youden’s J (recall − false-positive rate)</text>',
315
+ f'<text x="{left}" y="{height-23}" fill="#8d9aaf" font-family="Arial,sans-serif" font-size="14">{footer}</text>',
316
  '</svg>']
317
  output.parent.mkdir(parents=True, exist_ok=True)
318
+ output.write_text('\n'.join(out)+'\n')
319
 
320
 
321
  def render_sections(results: list[dict], output_dir: Path,
322
  codeql_results: dict) -> str:
323
  sections = ["## Reading the results", "",
324
+ "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.", "",
325
+ "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.", ""]
326
  if any(r.get("failed_methods") for r in results):
327
  sections += ["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.", ""]
328
  for domain in ("bug", "security", "lint"):
 
344
  image = output_dir / f"{domain}-tradeoff.svg"
345
  svg(domain, {r["model_id"]: r for r in public}, image)
346
  sections += [f"## {title}", "", f"[Public pairs](https://huggingface.co/datasets/perchscan/{link})", "",
347
+ f"![{title}: Youden’s J versus inference cost](assets/{domain}-tradeoff.svg)", "",
348
  f"### Public — {public[0]['benchmark_pairs']:,} pairs", "",
349
  results_table(public), ""]
350
  if domain in ("bug", "security"):