--- language: [] pretty_name: Perch Benchmark Results viewer: false --- # Perch benchmark results This benchmark compares [TypeSafe's Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev), a [System One classifier](https://typesafe.ai/), with open models on finding bugs and security issues in individual code methods. Each record contains a method before and after a transaction change, plus input adapted from a [Perch scan](https://github.com/lakeday-org/perch): method source, imports, callers, callees, and static call-graph edges where available. Models score each version independently, without seeing the repair. Benign reference methods are included, so a `before` method is not automatically positive. Pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go, Java, C, C++, C#, PHP, and other languages. Bug, security, and user-written semantic lint rules are separate tracks. Public and private splits are disjoint by source repository. ## Reading the results - **AP** measures how well scores rank actual issues across cutoffs. - **Alert floors:** Bug and security checks use their configured Perch floors: 60% for `has_bug`, 70% for `does_what_it_claims`, and 60% or 70% for individual CWEs. A method alerts when any applicable issue score is strictly above its floor. Semantic lint uses a 70% run-wide floor. All models use the same floors within each track. - **Precision** is the share of alerts that are correct; **recall** is the share of actual issues found; **F1** combines both. - **TP**, **FP**, and **FN** are correct alerts, false alerts, and missed issues. - **Pair order** is the share of eligible repairs where the issue-bearing before method scores above the fixed after method. Ties do not count. ## Bugs [Public pairs](https://huggingface.co/datasets/perchscan/bug-pairs-public) ### Public — 2,220 pairs | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | [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 | | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.6% | 43.9% | 43.0% | 43.4% | 800 | 1,023 | 1,061 | 44.9% | $0.239 | | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **46.8%** | 47.1% | 33.4% | 39.1% | 621 | 698 | 1,240 | **52.4%** | $0.239 | | [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 | _Sorted by F1. Bold marks the best value in each quality column; lower FP and FN are better._ ### Private — 498 pairs | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | [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 | | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 44.5% | 44.0% | 44.3% | 44.2% | 188 | 239 | 236 | 42.4% | $0.054 | | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **47.9%** | 49.4% | 35.8% | 41.5% | 152 | 156 | 272 | **53.1%** | $0.054 | | [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 | _Sorted by F1. Bold marks the best value in each quality column; lower FP and FN are better._ ## Security [Public pairs](https://huggingface.co/datasets/perchscan/security-pairs-public) ### Public — 1,311 pairs | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 43.9% | 43.6% | **100.0%** | **60.7%** | **1,142** | 1,479 | **0** | 46.2% | $0.208 | | [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 | | [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 | | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 48.2% | 49.7% | 33.1% | 39.7% | 378 | 382 | 764 | **53.7%** | $0.208 | _Sorted by F1. Bold marks the best value in each quality column; lower FP and FN are better._ ### Private — 439 pairs | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 46.8% | 45.3% | **100.0%** | **62.4%** | **398** | 480 | **0** | 50.0% | $0.074 | | [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 | | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | **49.2%** | 49.4% | 21.9% | 30.3% | 87 | 89 | 311 | **51.5%** | $0.074 | | [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 | _Sorted by F1. Bold marks the best value in each quality column; lower FP and FN are better._ ## Perch Lint Bench [Public pairs](https://huggingface.co/datasets/perchscan/perch-lint-bench-public) ### Public — 214 pairs | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 87.0% | 91.1% | **52.8%** | **66.9%** | **113** | 11 | **101** | 86.4% | $0.018 | | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **95.0%** | **99.1%** | 50.0% | 66.5% | 107 | **1** | 107 | **96.3%** | — | | [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 | | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 50.0% | 50.7% | 32.2% | 39.4% | 69 | 67 | 145 | 56.5% | $0.018 | _Sorted by F1. Bold marks the best value in each quality column; lower FP and FN are better._ ### Private — 71 pairs | Model | AP | Precision | Recall | F1 | TP | FP | FN | Pair order | Inference cost | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | **94.3%** | **97.4%** | **53.5%** | **69.1%** | **38** | **1** | **33** | **94.4%** | — | | [DiffusionGemma Jev](https://github.com/razorback16/openjev) | 83.0% | 86.4% | **53.5%** | 66.1% | **38** | 6 | **33** | 85.9% | $0.006 | | [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 | | [SemiF](https://github.com/TheoLeeCJ/SemIf) | 48.9% | 48.4% | 42.3% | 45.1% | 30 | 32 | 41 | 50.7% | $0.006 | _Sorted by F1. Bold marks the best value in each quality column; lower FP and FN are better._ The bug and security tables use Perch's configured question floors. Semantic lint rules have no configured floor, so this benchmark uses a 70% run-wide floor to limit noisy alerts. CLM-v0.1-8B still alerts on **every security method** at these floors; SemiF alerts on all but one public negative method and every private method. Their security F1 is therefore effectively the always-alert baseline, as the FP columns show. 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). 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. Jev's semantic-lint token cost was not recorded. Costs are not ranked. 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. ## Files and reproduction - [`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. - [`results.jsonl`](https://huggingface.co/datasets/perchscan/benchmark-results/blob/main/results.jsonl): all recorded result versions, identified by run and protocol ID. - [`predictions/current/`](https://huggingface.co/datasets/perchscan/benchmark-results/tree/main/predictions/current): public method probabilities from this run. Private predictions are not published. - [`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. - [`perch-lint-bench-public`](https://huggingface.co/datasets/perchscan/perch-lint-bench-public): paired rules and its runnable scorer. To run Jev with the current pack, set `TYPESAFE_API_KEY` or `PERCH_API_KEY` in your environment: ```sh python3 benchmark.py run --domain bug --scorer jev --predictions bug-jev.jsonl --report bug-jev.json python3 benchmark.py run --domain security --scorer jev --predictions security-jev.jsonl --report security-jev.json ``` For another model, use `--scorer command --command 'python3 your_adapter.py' --model-revision YOUR_MODEL`. The adapter receives the method state and each applicable detection question and returns its true-answer probability. The runner saves predictions for resumption and reports scores only when every method side is complete. [Perch website](https://perchscan.com)