Add Liquid d1 benchmark results

#24
README.md CHANGED
@@ -19,6 +19,7 @@ Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go
19
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | [Beam endpoint](https://app.beam.cloud/v1/models/jev/semif/invoke) |
20
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | Runpod H100 80 GB pod (US-NE-1) |
21
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | [Respan scoring API](https://api.respan.ai/api/v1/scores) (`span-01-pro`) |
 
22
 
23
 
24
  ## Reading the results
@@ -33,12 +34,15 @@ Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go
33
 
34
  [Public pairs](https://huggingface.co/datasets/perchscan/bug-pairs-public)
35
 
 
 
36
  ### Public — 2,220 pairs
37
 
38
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
39
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
40
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **46.8%** | 47.1% | 33.4% | 39.1% | 621 | 698 | 1,240 | **52.4%** | $0.239 |
41
- | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 46.2% | **55.6%** | 5.9% | 10.6% | 109 | **87** | 1,752 | 42.1% | $0.620 |
 
42
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.6% | 43.9% | 43.0% | 43.4% | 800 | 1,023 | 1,061 | 44.9% | $0.239 |
43
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 43.8% | 44.7% | 25.3% | 32.3% | 471 | 583 | 1,390 | 45.0% | $0.182 |
44
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 42.1% | 42.2% | **81.9%** | **55.7%** | **1,525** | 2,087 | **336** | 45.3% | ~$0.210 |
@@ -50,7 +54,8 @@ _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN
50
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
51
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
52
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **47.9%** | 49.4% | 35.8% | 41.5% | 152 | 156 | 272 | **53.1%** | $0.054 |
53
- | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 47.0% | **51.9%** | 6.6% | 11.7% | 28 | **26** | 396 | 48.1% | $0.138 |
 
54
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 45.5% | 46.5% | 28.5% | 35.4% | 121 | 139 | 303 | 44.6% | $0.040 |
55
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.5% | 44.0% | 44.3% | 44.2% | 188 | 239 | 236 | 42.4% | $0.054 |
56
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 42.7% | 42.4% | **79.5%** | **55.3%** | **337** | 458 | **87** | 47.9% | ~$0.047 |
@@ -68,10 +73,11 @@ _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN
68
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
69
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
70
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **51.5%** | **53.1%** | 34.6% | 41.9% | 395 | 349 | 747 | 52.6% | $0.507 |
 
71
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 48.2% | 49.7% | 33.1% | 39.7% | 378 | 382 | 764 | **53.7%** | $0.208 |
72
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 47.6% | 48.6% | 21.0% | 29.3% | 240 | **254** | 902 | 43.7% | $0.251 |
73
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 43.9% | 43.6% | **100.0%** | **60.7%** | **1,142** | 1,479 | **0** | 46.2% | $0.208 |
74
- | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 42.9% | 43.6% | **100.0%** | 60.7% | **1,142** | 1,480 | **0** | 45.9% | ~$1.432 |
75
 
76
  _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN are better._
77
 
@@ -81,6 +87,7 @@ _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN
81
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
82
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **49.2%** | 49.4% | 21.9% | 30.3% | 87 | 89 | 311 | **51.5%** | $0.074 |
83
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 48.9% | **50.6%** | 20.6% | 29.3% | 82 | 80 | 316 | 40.2% | $0.182 |
 
84
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 47.8% | 45.1% | 8.0% | 13.6% | 32 | **39** | 366 | 50.5% | $0.091 |
85
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 46.9% | 45.3% | **100.0%** | **62.4%** | **398** | 480 | **0** | 51.3% | ~$0.528 |
86
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 46.8% | 45.3% | **100.0%** | **62.4%** | **398** | 480 | **0** | 50.0% | $0.074 |
@@ -89,6 +96,8 @@ _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN
89
 
90
  ## Perch Lint Bench
91
 
 
 
92
  [Public pairs](https://huggingface.co/datasets/perchscan/perch-lint-bench-public)
93
 
94
  ### Public — 214 pairs
@@ -96,6 +105,7 @@ _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN
96
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
97
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
98
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **95.0%** | **99.1%** | 50.0% | 66.5% | 107 | **1** | 107 | **96.3%** | $0.048 |
 
99
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 87.0% | 91.1% | **52.8%** | **66.9%** | **113** | 11 | **101** | 86.4% | $0.018 |
100
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 79.6% | 81.7% | 50.0% | 62.0% | 107 | 24 | 107 | 88.3% | $0.014 |
101
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 50.5% | 50.9% | 38.8% | 44.0% | 83 | 80 | 131 | 51.4% | ~$0.010 |
@@ -107,7 +117,8 @@ _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN
107
 
108
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
109
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
110
- | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **94.3%** | **97.4%** | **53.5%** | **69.1%** | **38** | **1** | **33** | **94.4%** | $0.016 |
 
111
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 83.2% | 84.2% | 45.1% | 58.7% | 32 | 6 | 39 | 91.5% | $0.005 |
112
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 83.0% | 86.4% | **53.5%** | 66.1% | **38** | 6 | **33** | 85.9% | $0.006 |
113
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 51.4% | 50.7% | 50.7% | 50.7% | 36 | 35 | 35 | 56.3% | ~$0.003 |
@@ -120,7 +131,9 @@ The bug and security tables use Perch's configured question floors. Semantic lin
120
 
121
  Span-01 uses its [behavior-scoring API](https://www.respan.ai/docs/documentation/span-01/quickstart): the target method is the output, its saved Perch context is the input, and all applicable checks are scored as behaviors in one call. Issue scores use `p_present`; semantic lint uses `p_absent` for the rule being satisfied. `p_not_observable` is saved separately. This is a different model interface from Jev's questions.
122
 
123
- 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.
 
 
124
 
125
  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.
126
 
@@ -131,6 +144,7 @@ JevLike (192-byte input), Laya (512-token input), and Kev (packed-branch limit)
131
  - [`predictions/current/`](https://huggingface.co/datasets/perchscan/benchmark-results/tree/main/predictions/current): public method probabilities from this run. Private predictions are not published.
132
  - [`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.
133
  - [`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.
 
134
  - [`perch-lint-bench-public`](https://huggingface.co/datasets/perchscan/perch-lint-bench-public): paired rules and its runnable scorer.
135
 
136
  To run Jev with the current pack, set `TYPESAFE_API_KEY` or `PERCH_API_KEY` in your environment:
 
19
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | [Beam endpoint](https://app.beam.cloud/v1/models/jev/semif/invoke) |
20
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | Runpod H100 80 GB pod (US-NE-1) |
21
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | [Respan scoring API](https://api.respan.ai/api/v1/scores) (`span-01-pro`) |
22
+ | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | [Liquid decision API](https://api.liquid.ai/decisions/v1/systemone) (`d1:free`) |
23
 
24
 
25
  ## Reading the results
 
34
 
35
  [Public pairs](https://huggingface.co/datasets/perchscan/bug-pairs-public)
36
 
37
+ **Liquid d1 at the configured bug floors:** 26 of 4,440 public methods raised alerts, finding 13 of 1,861 labelled bugs.
38
+
39
  ### Public — 2,220 pairs
40
 
41
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
42
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
43
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **46.8%** | 47.1% | 33.4% | 39.1% | 621 | 698 | 1,240 | **52.4%** | $0.239 |
44
+ | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | **46.8%** | 50.0% | 0.7% | 1.4% | 13 | **13** | 1,848 | 49.2% | Free tier |
45
+ | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 46.2% | **55.6%** | 5.9% | 10.6% | 109 | 87 | 1,752 | 42.1% | $0.620 |
46
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.6% | 43.9% | 43.0% | 43.4% | 800 | 1,023 | 1,061 | 44.9% | $0.239 |
47
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 43.8% | 44.7% | 25.3% | 32.3% | 471 | 583 | 1,390 | 45.0% | $0.182 |
48
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 42.1% | 42.2% | **81.9%** | **55.7%** | **1,525** | 2,087 | **336** | 45.3% | ~$0.210 |
 
54
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
55
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
56
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **47.9%** | 49.4% | 35.8% | 41.5% | 152 | 156 | 272 | **53.1%** | $0.054 |
57
+ | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 47.2% | **75.0%** | 1.4% | 2.8% | 6 | **2** | 418 | 48.1% | Free tier |
58
+ | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 47.0% | 51.9% | 6.6% | 11.7% | 28 | 26 | 396 | 48.1% | $0.138 |
59
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 45.5% | 46.5% | 28.5% | 35.4% | 121 | 139 | 303 | 44.6% | $0.040 |
60
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.5% | 44.0% | 44.3% | 44.2% | 188 | 239 | 236 | 42.4% | $0.054 |
61
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 42.7% | 42.4% | **79.5%** | **55.3%** | **337** | 458 | **87** | 47.9% | ~$0.047 |
 
73
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
74
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
75
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **51.5%** | **53.1%** | 34.6% | 41.9% | 395 | 349 | 747 | 52.6% | $0.507 |
76
+ | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 49.4% | 47.8% | 55.6% | 51.4% | 635 | 693 | 507 | 52.2% | Free tier |
77
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 48.2% | 49.7% | 33.1% | 39.7% | 378 | 382 | 764 | **53.7%** | $0.208 |
78
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 47.6% | 48.6% | 21.0% | 29.3% | 240 | **254** | 902 | 43.7% | $0.251 |
79
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 43.9% | 43.6% | **100.0%** | **60.7%** | **1,142** | 1,479 | **0** | 46.2% | $0.208 |
80
+ | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 42.9% | 43.6% | **100.0%** | **60.7%** | **1,142** | 1,480 | **0** | 45.9% | ~$1.432 |
81
 
82
  _Sorted by AP. Bold marks the best value in each quality column; lower FP and FN are better._
83
 
 
87
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
88
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **49.2%** | 49.4% | 21.9% | 30.3% | 87 | 89 | 311 | **51.5%** | $0.074 |
89
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 48.9% | **50.6%** | 20.6% | 29.3% | 82 | 80 | 316 | 40.2% | $0.182 |
90
+ | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 47.8% | 49.5% | 34.2% | 40.4% | 136 | 139 | 262 | 45.5% | Free tier |
91
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 47.8% | 45.1% | 8.0% | 13.6% | 32 | **39** | 366 | 50.5% | $0.091 |
92
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 46.9% | 45.3% | **100.0%** | **62.4%** | **398** | 480 | **0** | 51.3% | ~$0.528 |
93
  | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 46.8% | 45.3% | **100.0%** | **62.4%** | **398** | 480 | **0** | 50.0% | $0.074 |
 
96
 
97
  ## Perch Lint Bench
98
 
99
+ ![Public Perch Lint Bench average precision, with Jev and Liquid d1 in their brand colors](assets/perch-lint-bench-public.png)
100
+
101
  [Public pairs](https://huggingface.co/datasets/perchscan/perch-lint-bench-public)
102
 
103
  ### Public — 214 pairs
 
105
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
106
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
107
  | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **95.0%** | **99.1%** | 50.0% | 66.5% | 107 | **1** | 107 | **96.3%** | $0.048 |
108
+ | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 92.5% | 98.1% | 49.1% | 65.4% | 105 | 2 | 109 | 93.5% | Free tier |
109
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 87.0% | 91.1% | **52.8%** | **66.9%** | **113** | 11 | **101** | 86.4% | $0.018 |
110
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 79.6% | 81.7% | 50.0% | 62.0% | 107 | 24 | 107 | 88.3% | $0.014 |
111
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 50.5% | 50.9% | 38.8% | 44.0% | 83 | 80 | 131 | 51.4% | ~$0.010 |
 
117
 
118
  | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost |
119
  | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
120
+ | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **94.3%** | **97.4%** | **53.5%** | **69.1%** | **38** | **1** | **33** | 94.4% | $0.016 |
121
+ | [Liquid d1](https://docs.liquid.ai/lfm/models/decision-models) | 92.4% | 97.2% | 49.3% | 65.4% | 35 | **1** | 36 | **97.2%** | Free tier |
122
  | [Span-01](https://www.respan.ai/docs/documentation/span-01/concept) | 83.2% | 84.2% | 45.1% | 58.7% | 32 | 6 | 39 | 91.5% | $0.005 |
123
  | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 83.0% | 86.4% | **53.5%** | 66.1% | **38** | 6 | **33** | 85.9% | $0.006 |
124
  | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | 51.4% | 50.7% | 50.7% | 50.7% | 36 | 35 | 35 | 56.3% | ~$0.003 |
 
131
 
132
  Span-01 uses its [behavior-scoring API](https://www.respan.ai/docs/documentation/span-01/quickstart): the target method is the output, its saved Perch context is the input, and all applicable checks are scored as behaviors in one call. Issue scores use `p_present`; semantic lint uses `p_absent` for the rule being satisfied. `p_not_observable` is saved separately. This is a different model interface from Jev's questions.
133
 
134
+ Liquid d1 received the same Perch method state and all applicable questions in one API call per method. Semantic lint used the same compiled `ensure` rule as Jev.
135
+
136
+ 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.
137
 
138
  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.
139
 
 
144
  - [`predictions/current/`](https://huggingface.co/datasets/perchscan/benchmark-results/tree/main/predictions/current): public method probabilities from this run. Private predictions are not published.
145
  - [`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.
146
  - [`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.
147
+ - [`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.
148
  - [`perch-lint-bench-public`](https://huggingface.co/datasets/perchscan/perch-lint-bench-public): paired rules and its runnable scorer.
149
 
150
  To run Jev with the current pack, set `TYPESAFE_API_KEY` or `PERCH_API_KEY` in your environment:
assets/perch-lint-bench-public.png ADDED

Git LFS Details

  • SHA256: fdc3945686b3fa79f997b9d9ce80af5b51f6996d8c0ad60b3f6b3b23f9bc1a71
  • Pointer size: 131 Bytes
  • Size of remote file: 121 kB
liquid.py ADDED
@@ -0,0 +1,198 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Run Liquid d1 on Perch bug, security, and semantic lint method pairs."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import argparse
7
+ import hashlib
8
+ import importlib.util
9
+ import json
10
+ import math
11
+ import sys
12
+ import time
13
+ from pathlib import Path
14
+ from urllib.error import HTTPError, URLError
15
+ from urllib.request import Request, urlopen
16
+
17
+
18
+ BASE = Path(__file__).resolve().parent
19
+ API = 'https://api.liquid.ai/decisions/v1/systemone'
20
+ MODEL = 'd1:free'
21
+ PROTOCOL = 'liquid-d1-perch-scan-pack-v1'
22
+ LINT_PROTOCOL = 'liquid-d1-perch-semantic-ensure-v1'
23
+ LINT_URL = 'https://huggingface.co/datasets/perchscan/perch-lint-bench-public/resolve/main/benchmark.jsonl'
24
+
25
+
26
+ def module(path: Path, name: str):
27
+ spec = importlib.util.spec_from_file_location(name, path)
28
+ result = importlib.util.module_from_spec(spec)
29
+ spec.loader.exec_module(result)
30
+ return result
31
+
32
+
33
+ core = module(BASE / 'benchmark.py', 'perch_benchmark')
34
+
35
+
36
+ def semantic_question(ensure: str) -> dict:
37
+ text = ' '.join(ensure.split())
38
+ return {'type': 'noul', 'instructions': 'Is `rule` true of the code below?',
39
+ 'criteria': {'true': text, 'false': f'Not so: {text}'}}
40
+
41
+
42
+ def load_data(domain: str, dataset: Path | None):
43
+ if domain != 'lint':
44
+ return core.load_pairs(domain, dataset)
45
+ raw = dataset.read_bytes() if dataset else urlopen(LINT_URL, timeout=120).read()
46
+ pairs = [json.loads(line) for line in raw.splitlines() if line]
47
+ if not pairs or len({pair['pair_id'] for pair in pairs}) != len(pairs):
48
+ raise ValueError('Empty or duplicate lint pairs')
49
+ return pairs, hashlib.sha256(raw).hexdigest()
50
+
51
+
52
+ def ask(key: str, state: dict, questions: dict, pair_id: str, role: str):
53
+ payload = json.dumps({'model': MODEL, 'state': state, 'questions': questions}, ensure_ascii=False).encode()
54
+ for attempt in range(8):
55
+ request = Request(API, data=payload, method='POST',
56
+ headers={'Authorization': 'Bearer ' + key,
57
+ 'Content-Type': 'application/json'})
58
+ try:
59
+ with urlopen(request, timeout=120) as response:
60
+ result = json.load(response)
61
+ break
62
+ except HTTPError as exc:
63
+ if exc.code not in (429, 500, 502, 503, 504) or attempt == 7:
64
+ detail = exc.read(400).decode(errors='replace')
65
+ raise RuntimeError(f'Liquid HTTP {exc.code} for {pair_id}:{role}: {detail}') from None
66
+ delay = exc.headers.get('Retry-After')
67
+ try:
68
+ seconds = float(delay)
69
+ except (TypeError, ValueError):
70
+ seconds = min(60, 2 ** attempt)
71
+ time.sleep(min(120, max(1, seconds)))
72
+ except URLError:
73
+ if attempt == 7:
74
+ raise RuntimeError(f'Liquid network failure for {pair_id}:{role}') from None
75
+ time.sleep(min(60, 2 ** attempt))
76
+ if result.get('model') != MODEL or set(result.get('answers', {})) != set(questions):
77
+ raise ValueError(f'Liquid returned another model or incomplete answers for {pair_id}:{role}')
78
+ return result['answers'], result.get('usage') or {}
79
+
80
+
81
+ def predict(pair: dict, role: str, domain: str, pack: dict, key: str):
82
+ if domain == 'lint':
83
+ questions = {'semantic': semantic_question(pair['rule']['ensure'])}
84
+ selected = None
85
+ else:
86
+ selected = core.scan_questions(pack, domain, pair['language'])
87
+ questions = {q['name']: q['question'] for q in selected}
88
+ answers, usage = ask(key, pair[role]['state'], questions, pair['pair_id'], role)
89
+ if domain == 'lint':
90
+ true_probability = core.probability(answers['semantic']['noul'])
91
+ score = 1 - true_probability
92
+ row = {'score': score, 'rule_true_probability': true_probability}
93
+ protocol = LINT_PROTOCOL
94
+ else:
95
+ relevant = core.detection_questions(selected, domain)
96
+ question_scores = {q['name']: core.raised_score(q, answers[q['name']]['noul'])
97
+ for q in relevant}
98
+ score, alert = core.scan_result(question_scores, selected, domain, .5)
99
+ row = {'score': score, 'alert': alert, 'question_scores': question_scores,
100
+ 'pack_sha256': pack['pack_sha256']}
101
+ protocol = PROTOCOL
102
+ row.update({'domain': domain, 'pair_id': pair['pair_id'], 'role': role,
103
+ 'model_revision': MODEL, 'protocol_id': protocol, 'usage': usage})
104
+ return row
105
+
106
+
107
+ def score_lint(pairs: list[dict], predictions: dict, digest: str):
108
+ items = [(pair[role]['labels'][pair['domain']], predictions[pair['pair_id'], role]['score'])
109
+ for pair in pairs for role in ('before', 'after')]
110
+ tp = sum(y == 1 and s > .7 for y, s in items)
111
+ fp = sum(y == 0 and s > .7 for y, s in items)
112
+ fn = sum(y == 1 and s <= .7 for y, s in items)
113
+ tn = sum(y == 0 and s <= .7 for y, s in items)
114
+ eligible = [(predictions[p['pair_id'], 'before']['score'],
115
+ predictions[p['pair_id'], 'after']['score']) for p in pairs
116
+ if p['before']['labels'][p['domain']] == 1 and
117
+ p['after']['labels'][p['domain']] == 0]
118
+ return {'domain': 'lint', 'model_revision': MODEL, 'protocol_id': LINT_PROTOCOL,
119
+ 'threshold': .7, 'alert_rule': 'rule violation score > 0.7',
120
+ 'benchmark_sha256': digest, 'benchmark_pairs': len(pairs),
121
+ 'benchmark_methods': len(items), 'average_precision': core.average_precision(items),
122
+ 'precision': tp / (tp + fp) if tp + fp else 0,
123
+ 'recall': tp / (tp + fn) if tp + fn else 0,
124
+ 'f1': 2 * tp / (2 * tp + fp + fn) if 2 * tp + fp + fn else 0,
125
+ 'confusion': {'tp': tp, 'fp': fp, 'tn': tn, 'fn': fn},
126
+ 'vulnerable_or_buggy_before_above_fixed_after':
127
+ {'correct': sum(a > b for a, b in eligible),
128
+ 'ties': sum(a == b for a, b in eligible), 'eligible': len(eligible)}}
129
+
130
+
131
+ def main():
132
+ parser = argparse.ArgumentParser(description=__doc__)
133
+ parser.add_argument('--domain', choices=('bug', 'security', 'lint'), required=True)
134
+ parser.add_argument('--dataset', type=Path)
135
+ parser.add_argument('--question-pack', type=Path, default=BASE / 'question-pack.json')
136
+ parser.add_argument('--predictions', type=Path, required=True)
137
+ parser.add_argument('--report', type=Path, required=True)
138
+ parser.add_argument('--limit', type=int, default=0)
139
+ parser.add_argument('--score-saved', action='store_true')
140
+ parser.add_argument('--key-stdin', action='store_true')
141
+ args = parser.parse_args()
142
+ if args.limit < 0:
143
+ parser.error('--limit must be nonnegative')
144
+ pack = core.load_pack(args.question_pack)
145
+ pairs, digest = load_data(args.domain, args.dataset)
146
+ expected = {(p['pair_id'], role) for p in pairs for role in ('before', 'after')}
147
+ predictions = {}
148
+ if args.predictions.exists():
149
+ for line in args.predictions.read_text().splitlines():
150
+ if not line:
151
+ continue
152
+ row = json.loads(line)
153
+ identity = row['pair_id'], row['role']
154
+ if identity not in expected or identity in predictions or row['domain'] != args.domain or row['model_revision'] != MODEL:
155
+ raise ValueError(f'Unknown, duplicate, or wrong-model prediction: {identity}')
156
+ predictions[identity] = row
157
+ pending = [(p, role) for p in pairs for role in ('before', 'after')
158
+ if (p['pair_id'], role) not in predictions]
159
+ if args.score_saved and pending:
160
+ raise ValueError(f'Incomplete: {len(pending)} method sides missing')
161
+ if args.limit:
162
+ pending = pending[:args.limit]
163
+ if pending and not args.score_saved:
164
+ if not args.key_stdin:
165
+ raise ValueError('Use --key-stdin to provide the Liquid API key through standard input')
166
+ key = sys.stdin.readline().strip()
167
+ if not key:
168
+ raise ValueError('Missing Liquid API key on standard input')
169
+ args.predictions.parent.mkdir(parents=True, exist_ok=True)
170
+ with args.predictions.open('a') as output:
171
+ for index, (pair, role) in enumerate(pending, 1):
172
+ row = predict(pair, role, args.domain, pack, key)
173
+ predictions[pair['pair_id'], role] = row
174
+ output.write(json.dumps(row, sort_keys=True) + '\n')
175
+ output.flush()
176
+ if index % 50 == 0 or index == len(pending):
177
+ print(f'{args.domain}: {len(predictions)}/{len(expected)} method sides', file=sys.stderr, flush=True)
178
+ if predictions.keys() != expected:
179
+ print(f'{args.domain}: incomplete {len(predictions)}/{len(expected)}; rerun to resume', file=sys.stderr)
180
+ return
181
+ if args.domain == 'lint':
182
+ report = score_lint(pairs, predictions, digest)
183
+ else:
184
+ report = core.report(pairs, predictions, args.domain, digest, MODEL,
185
+ pack['protocol_id'], .5, pack)
186
+ report['protocol_id'] = PROTOCOL
187
+ report['input_tokens'] = sum((row.get('usage') or {}).get('input_tokens', 0)
188
+ for row in predictions.values())
189
+ report['output_tokens'] = sum((row.get('usage') or {}).get('output_tokens', 0)
190
+ for row in predictions.values())
191
+ report['api_calls'] = len(predictions)
192
+ args.report.parent.mkdir(parents=True, exist_ok=True)
193
+ args.report.write_text(json.dumps(report, indent=2, sort_keys=True) + '\n')
194
+ print(json.dumps(report, sort_keys=True))
195
+
196
+
197
+ if __name__ == '__main__':
198
+ main()
predictions/current/bug/liquid-d1.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
predictions/current/lint/liquid-d1.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
predictions/current/security/liquid-d1.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
results-current.jsonl CHANGED
@@ -28,3 +28,9 @@
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"}
 
 
 
 
 
 
 
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.4678101708921267, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "confusion": {"fn": 1848, "fp": 13, "tn": 2566, "tp": 13}, "domain": "bug", "f1": 0.01377848436671966, "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.49214365881032546, "pair_order_correct": 877, "pair_order_eligible": 1782, "precision": 0.5, "protocol_id": "liquid-d1-perch-scan-pack-v1", "question_pack_sha256": "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d", "recall": 0.006985491671144546, "run_id": "liquid-d1-perch-scan-20260929", "threshold": 0.5, "track": "public"}
32
+ {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.47176164026610573, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "confusion": {"fn": 418, "fp": 2, "tn": 570, "tp": 6}, "domain": "bug", "f1": 0.027777777777777776, "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.48129675810473815, "pair_order_correct": 193, "pair_order_eligible": 401, "precision": 0.75, "protocol_id": "liquid-d1-perch-scan-pack-v1", "question_pack_sha256": "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d", "recall": 0.014150943396226415, "run_id": "liquid-d1-perch-scan-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"}
results.jsonl CHANGED
@@ -70,3 +70,9 @@
70
  {"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"}
71
  {"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"}
72
  {"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"}
 
 
 
 
 
 
 
70
  {"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"}
71
  {"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"}
72
  {"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"}
73
+ {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.4678101708921267, "benchmark_methods": 4440, "benchmark_pairs": 2220, "benchmark_sha256": "32bc68bc85d5535ad28e103adbfa0c09c73e09d0f53a53f7ca35ec219a96e6e2", "confusion": {"fn": 1848, "fp": 13, "tn": 2566, "tp": 13}, "domain": "bug", "f1": 0.01377848436671966, "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.49214365881032546, "pair_order_correct": 877, "pair_order_eligible": 1782, "precision": 0.5, "protocol_id": "liquid-d1-perch-scan-pack-v1", "question_pack_sha256": "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d", "recall": 0.006985491671144546, "run_id": "liquid-d1-perch-scan-20260929", "threshold": 0.5, "track": "public"}
74
+ {"alert_rule": "any issue score > max(run threshold, question min)", "average_precision": 0.47176164026610573, "benchmark_methods": 996, "benchmark_pairs": 498, "benchmark_sha256": "3df4ade65fedd1128d30bc17c9c9869c8ab9bd526e666156d0e16685e78f8a73", "confusion": {"fn": 418, "fp": 2, "tn": 570, "tp": 6}, "domain": "bug", "f1": 0.027777777777777776, "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.48129675810473815, "pair_order_correct": 193, "pair_order_eligible": 401, "precision": 0.75, "protocol_id": "liquid-d1-perch-scan-pack-v1", "question_pack_sha256": "bb53c8a6ca30920140e2bf33b2905d159e7b1709b29d1ea896637905dbf9047d", "recall": 0.014150943396226415, "run_id": "liquid-d1-perch-scan-20260929", "threshold": 0.5, "track": "private"}
75
+ {"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"}
76
+ {"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"}
77
+ {"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"}
78
+ {"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"}