Describe Perch method-pair benchmark and unify model tables
#5
by jfbrown95 - opened
README.md
CHANGED
|
@@ -5,11 +5,13 @@ pretty_name: Perch Benchmark Results
|
|
| 5 |
|
| 6 |
# Perch benchmark results
|
| 7 |
|
| 8 |
-
|
| 9 |
|
| 10 |
-
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
|
| 14 |
## Bugs
|
| 15 |
|
|
@@ -21,6 +23,7 @@ The public pairs and their per-method predictions are available here. Private pa
|
|
| 21 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 22 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 47.6% | 49.9% | 22.0% | 30.6% | 410 | 412 | 1451 | 42.5% |
|
| 23 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 44.1% | 47.5% | 7.6% | 13.1% | 141 | 156 | 1720 | 32.1% |
|
|
|
|
| 24 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 43.7% | 44.8% | 2.3% | 4.4% | 43 | 53 | 1818 | 22.4% |
|
| 25 |
|
| 26 |
### Private — 498 pairs
|
|
@@ -30,6 +33,7 @@ The public pairs and their per-method predictions are available here. Private pa
|
|
| 30 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 48.6% | 50.7% | 24.1% | 32.6% | 102 | 99 | 322 | 43.4% |
|
| 31 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 45.8% | 46.4% | 9.2% | 15.4% | 39 | 45 | 385 | 32.7% |
|
| 32 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 45.2% | 60.0% | 3.5% | 6.7% | 15 | 10 | 409 | 22.7% |
|
|
|
|
| 33 |
|
| 34 |
## Security
|
| 35 |
|
|
@@ -41,6 +45,8 @@ The public pairs and their per-method predictions are available here. Private pa
|
|
| 41 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 42 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 49.2% | 54.4% | 10.2% | 17.2% | 117 | 98 | 1025 | 40.5% |
|
| 43 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 44.8% | 46.4% | 12.4% | 19.6% | 142 | 164 | 1000 | 30.6% |
|
|
|
|
|
|
|
| 44 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 43.3% | 36.0% | 3.2% | 5.8% | 36 | 64 | 1106 | 22.9% |
|
| 45 |
|
| 46 |
### Private — 439 pairs
|
|
@@ -50,25 +56,16 @@ The public pairs and their per-method predictions are available here. Private pa
|
|
| 50 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 48.9% | 52.6% | 2.5% | 4.8% | 10 | 9 | 388 | 36.2% |
|
| 51 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 47.4% | 45.0% | 4.5% | 8.2% | 18 | 22 | 380 | 37.9% |
|
| 52 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 47.3% | 43.8% | 1.8% | 3.4% | 7 | 9 | 391 | 29.4% |
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
These models received their native decision inputs, so their scores are reported separately from the prompt-matched tables above.
|
| 57 |
-
|
| 58 |
-
| Domain | Track | Model | Protocol | AP | F1 at 0.5 | TP | FP | FN |
|
| 59 |
-
| --- | --- | --- | --- | ---: | ---: | ---: | ---: | ---: |
|
| 60 |
-
| Bug | Public | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | `clm-native-choice-6144-v1` | 44.0% | 21.2% | 258 | 317 | 1603 |
|
| 61 |
-
| Bug | Private | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | `clm-native-choice-6144-v1` | 45.2% | 25.1% | 74 | 92 | 350 |
|
| 62 |
-
| Security | Public | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | `clm-native-choice-6144-v1` | 44.0% | 52.1% | 741 | 959 | 401 |
|
| 63 |
-
| Security | Public | [SecureBERT2.0](https://huggingface.co/cisco-ai/SecureBERT2.0-code-vuln-detection) | `perch-security-state-4096-v1` | 43.6% | 60.6% | 1140 | 1479 | 2 |
|
| 64 |
-
| Security | Private | [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B) | `clm-native-choice-6144-v1` | 47.1% | 55.4% | 270 | 306 | 128 |
|
| 65 |
-
| Security | Private | [SecureBERT2.0](https://huggingface.co/cisco-ai/SecureBERT2.0-code-vuln-detection) | `perch-security-state-4096-v1` | 43.0% | 62.4% | 397 | 478 | 1 |
|
| 66 |
|
| 67 |
At 0.5, SecureBERT2.0 flags nearly every security method. Its high F1 therefore does not indicate useful alerting precision.
|
| 68 |
|
| 69 |
## Protocol and versions
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
| Model | Frozen checkpoint |
|
| 74 |
| --- | --- |
|
|
|
|
| 5 |
|
| 6 |
# Perch benchmark results
|
| 7 |
|
| 8 |
+
This benchmark tests whether a model can find bugs or security issues in individual code methods. Each record contains a method before and after an open-source change, plus the 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 patch or the other version. The labels also include benign reference methods, so a `before` method is not automatically positive.
|
| 9 |
|
| 10 |
+
The pairs come from open-source projects in Rust, JavaScript, TypeScript, Python, Go, Java, C, C++, C#, PHP, and other languages. Bug and security detection are scored separately. Each model is judged on whether it flags issue-bearing methods, avoids alerts on methods without the issue, and ranks an affected before method above its fixed after method.
|
| 11 |
|
| 12 |
+
## Reading the results
|
| 13 |
+
|
| 14 |
+
AP (average precision) measures ranking across score cutoffs. For the other metrics, a score of at least 0.5 counts as an alert. Precision is the share of alerts that are correct; recall is the share of issue-bearing methods found; F1 is their harmonic mean. TP is a correct alert, FP a false alert, and FN a missed issue. Pair order is the share of eligible before/after pairs where the before method scores higher than the fixed after method; ties do not count as correct.
|
| 15 |
|
| 16 |
## Bugs
|
| 17 |
|
|
|
|
| 23 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 24 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 47.6% | 49.9% | 22.0% | 30.6% | 410 | 412 | 1451 | 42.5% |
|
| 25 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 44.1% | 47.5% | 7.6% | 13.1% | 141 | 156 | 1720 | 32.1% |
|
| 26 |
+
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B)† | 44.0% | 44.9% | 13.9% | 21.2% | 258 | 317 | 1603 | 46.9% |
|
| 27 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 43.7% | 44.8% | 2.3% | 4.4% | 43 | 53 | 1818 | 22.4% |
|
| 28 |
|
| 29 |
### Private — 498 pairs
|
|
|
|
| 33 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 48.6% | 50.7% | 24.1% | 32.6% | 102 | 99 | 322 | 43.4% |
|
| 34 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 45.8% | 46.4% | 9.2% | 15.4% | 39 | 45 | 385 | 32.7% |
|
| 35 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 45.2% | 60.0% | 3.5% | 6.7% | 15 | 10 | 409 | 22.7% |
|
| 36 |
+
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B)† | 45.2% | 44.6% | 17.5% | 25.1% | 74 | 92 | 350 | 43.4% |
|
| 37 |
|
| 38 |
## Security
|
| 39 |
|
|
|
|
| 45 |
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
| 46 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 49.2% | 54.4% | 10.2% | 17.2% | 117 | 98 | 1025 | 40.5% |
|
| 47 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 44.8% | 46.4% | 12.4% | 19.6% | 142 | 164 | 1000 | 30.6% |
|
| 48 |
+
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B)† | 44.0% | 43.6% | 64.9% | 52.1% | 741 | 959 | 401 | 41.5% |
|
| 49 |
+
| [SecureBERT2.0](https://huggingface.co/cisco-ai/SecureBERT2.0-code-vuln-detection)† | 43.6% | 43.5% | 99.8% | 60.6% | 1140 | 1479 | 2 | 50.2% |
|
| 50 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 43.3% | 36.0% | 3.2% | 5.8% | 36 | 64 | 1106 | 22.9% |
|
| 51 |
|
| 52 |
### Private — 439 pairs
|
|
|
|
| 56 |
| [Jev](https://typesafe.ai/blog/introducing-system-one-models-and-jev) | 48.9% | 52.6% | 2.5% | 4.8% | 10 | 9 | 388 | 36.2% |
|
| 57 |
| [JevK5](https://huggingface.co/alibiserikbay/JevK5) | 47.4% | 45.0% | 4.5% | 8.2% | 18 | 22 | 380 | 37.9% |
|
| 58 |
| [jev-lite](https://huggingface.co/vagmi/jev-lite) | 47.3% | 43.8% | 1.8% | 3.4% | 7 | 9 | 391 | 29.4% |
|
| 59 |
+
| [CLM-v0.1-8B](https://huggingface.co/Contrastive-LM/CLM-v0.1-8B)† | 47.1% | 46.9% | 67.8% | 55.4% | 270 | 306 | 128 | 52.8% |
|
| 60 |
+
| [SecureBERT2.0](https://huggingface.co/cisco-ai/SecureBERT2.0-code-vuln-detection)† | 43.0% | 45.4% | 99.7% | 62.4% | 397 | 478 | 1 | 55.8% |
|
| 61 |
|
| 62 |
+
† CLM-v0.1-8B uses its choice head with a 6,144-token encoder; SecureBERT2.0 uses its detection head with a 4,096-token input cap. All models are scored on the same method sides and labels within each track.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
At 0.5, SecureBERT2.0 flags nearly every security method. Its high F1 therefore does not indicate useful alerting precision.
|
| 65 |
|
| 66 |
## Protocol and versions
|
| 67 |
|
| 68 |
+
Jev, JevK5, and jev-lite received one broad bug or security question per method. This is not the full multi-question Perch scan. No cutoff was selected on these benchmark labels.
|
| 69 |
|
| 70 |
| Model | Frozen checkpoint |
|
| 71 |
| --- | --- |
|