omidiu commited on
Commit
3ecf9d6
·
0 Parent(s):

Publish SCRBench benchmark

Browse files
.gitattributes ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.avro filter=lfs diff=lfs merge=lfs -text
4
+ *.bin filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
7
+ *.ftz filter=lfs diff=lfs merge=lfs -text
8
+ *.gz filter=lfs diff=lfs merge=lfs -text
9
+ *.h5 filter=lfs diff=lfs merge=lfs -text
10
+ *.joblib filter=lfs diff=lfs merge=lfs -text
11
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
13
+ *.mds filter=lfs diff=lfs merge=lfs -text
14
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
+ *.model filter=lfs diff=lfs merge=lfs -text
16
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
17
+ *.npy filter=lfs diff=lfs merge=lfs -text
18
+ *.npz filter=lfs diff=lfs merge=lfs -text
19
+ *.onnx filter=lfs diff=lfs merge=lfs -text
20
+ *.ot filter=lfs diff=lfs merge=lfs -text
21
+ *.parquet filter=lfs diff=lfs merge=lfs -text
22
+ *.pb filter=lfs diff=lfs merge=lfs -text
23
+ *.pickle filter=lfs diff=lfs merge=lfs -text
24
+ *.pkl filter=lfs diff=lfs merge=lfs -text
25
+ *.pt filter=lfs diff=lfs merge=lfs -text
26
+ *.pth filter=lfs diff=lfs merge=lfs -text
27
+ *.rar filter=lfs diff=lfs merge=lfs -text
28
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
29
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
31
+ *.tar filter=lfs diff=lfs merge=lfs -text
32
+ *.tflite filter=lfs diff=lfs merge=lfs -text
33
+ *.tgz filter=lfs diff=lfs merge=lfs -text
34
+ *.wasm filter=lfs diff=lfs merge=lfs -text
35
+ *.xz filter=lfs diff=lfs merge=lfs -text
36
+ *.zip filter=lfs diff=lfs merge=lfs -text
37
+ *.zst filter=lfs diff=lfs merge=lfs -text
38
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
39
+ # Audio files - uncompressed
40
+ *.pcm filter=lfs diff=lfs merge=lfs -text
41
+ *.sam filter=lfs diff=lfs merge=lfs -text
42
+ *.raw filter=lfs diff=lfs merge=lfs -text
43
+ # Audio files - compressed
44
+ *.aac filter=lfs diff=lfs merge=lfs -text
45
+ *.flac filter=lfs diff=lfs merge=lfs -text
46
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
47
+ *.ogg filter=lfs diff=lfs merge=lfs -text
48
+ *.wav filter=lfs diff=lfs merge=lfs -text
49
+ # Image files - uncompressed
50
+ *.bmp filter=lfs diff=lfs merge=lfs -text
51
+ *.gif filter=lfs diff=lfs merge=lfs -text
52
+ *.png filter=lfs diff=lfs merge=lfs -text
53
+ *.tiff filter=lfs diff=lfs merge=lfs -text
54
+ # Image files - compressed
55
+ *.jpg filter=lfs diff=lfs merge=lfs -text
56
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
57
+ *.webp filter=lfs diff=lfs merge=lfs -text
58
+ # Video files - compressed
59
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
60
+ *.webm filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ SCRBench dataset license
2
+
3
+ The SCRBench dataset, including its evaluation subsets and transformation-sequence
4
+ annotations, is released under the Creative Commons Attribution 4.0 International
5
+ license (CC BY 4.0).
6
+
7
+ License: https://creativecommons.org/licenses/by/4.0/
8
+ Legal code: https://creativecommons.org/licenses/by/4.0/legalcode
9
+
10
+ Source attribution:
11
+ The original Python programs are derived from Google Research's Mostly Basic
12
+ Python Problems (MBPP), whose dataset card identifies CC BY 4.0 as its license.
13
+ https://huggingface.co/datasets/google-research-datasets/mbpp
14
+
15
+ Upstream work:
16
+ Jacob Austin et al. (2021), Program Synthesis with Large Language Models.
17
+ https://arxiv.org/abs/2108.07732
18
+
19
+ SCRBench changes:
20
+ Program canonicalization, modified programs generated with code transformations,
21
+ equivalence labels, transformation-sequence annotations, and evaluation sampling.
22
+ Additional edge-case assertions were used during generation.
23
+
24
+ SCRBench: Beyond Equivalence Checking for Semantic Change Reasoning in Code
25
+ https://github.com/omidiu/SCRBench
26
+ https://huggingface.co/datasets/omidiu/SCRBench
27
+
28
+ This notice applies to dataset files and annotations. It does not license the
29
+ separate source-code repository.
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: SCRBench
3
+ license: cc-by-4.0
4
+ language:
5
+ - en
6
+ tags:
7
+ - code
8
+ - semantic-equivalence
9
+ configs:
10
+ - config_name: full
11
+ default: true
12
+ data_files:
13
+ - split: corpus
14
+ path: data/corpus.parquet
15
+ - config_name: t1_t3
16
+ data_files:
17
+ - split: test
18
+ path: data/t1_t3_test.parquet
19
+ - config_name: t2
20
+ data_files:
21
+ - split: test
22
+ path: data/t2_test.parquet
23
+ ---
24
+
25
+ # SCRBench
26
+
27
+ **SCRBench: Beyond Equivalence Checking for Semantic Change Reasoning in Code**
28
+
29
+ 67,658 pairs of Python programs derived from 418 preprocessed MBPP programs,
30
+ with test-based equivalence labels and recorded transformation sequences.
31
+ The benchmark supports detecting equivalence (T1), identifying an altering
32
+ transformation (T2), and reconstructing transformation sequences (T3).
33
+
34
+ [Paper](https://arxiv.org/abs/2610.41562) · [Code and reproduction](https://github.com/omidiu/SCRBench) · [Saved model responses](https://huggingface.co/datasets/omidiu/SCRBench-results)
35
+
36
+ ## Data
37
+
38
+ | Configuration / split | Rows | Use |
39
+ | --- | ---: | --- |
40
+ | `full` / `corpus` | 67,658 | Full corpus |
41
+ | `t1_t3` / `test` | 4,500 | Shared T1/T3 evaluation subset |
42
+ | `t2` / `test` | 2,250 | Non-equivalent rows of T1/T3 |
43
+
44
+ The evaluation subsets are included in the full corpus; they are not held-out
45
+ splits. See the [dataset details](docs/benchmark_details.md)
46
+ for schema, transformations, and limitations.
47
+
48
+ ## Load the data
49
+
50
+ The examples load the current `main` version. Add `revision="<commit SHA>"`
51
+ to each call when you need to reproduce a specific release or paper result.
52
+
53
+ ```python
54
+ from datasets import load_dataset
55
+
56
+ corpus = load_dataset("omidiu/SCRBench", name="full", split="corpus")
57
+ t1_t3 = load_dataset("omidiu/SCRBench", name="t1_t3", split="test")
58
+ t2 = load_dataset("omidiu/SCRBench", name="t2", split="test")
59
+ ```
60
+
61
+ ## Citation and license
62
+
63
+ Cite [the SCRBench paper](https://arxiv.org/abs/2610.41562). The programs derive from [MBPP](https://huggingface.co/datasets/google-research-datasets/mbpp);
64
+ also credit [Austin et al. (2021)](https://arxiv.org/abs/2108.07732).
65
+ The data use [CC BY 4.0](LICENSE); the [source code](https://github.com/omidiu/SCRBench) uses MIT.
data/corpus.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6340469832385f9579e138ad56603d464d9c29e167fb5efda4f9e0b8ff22374
3
+ size 5112590
data/t1_t3_test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0a71a92be931f13dc3d0bc75c486ba27be6fecf1ba6af49a92363887ce41442
3
+ size 728605
data/t2_test.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95d3e14d657a9fa374554ee14119d0739c8a02d84ec2c0435ce084b848ab1e18
3
+ size 366638
docs/benchmark_details.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Benchmark details
2
+
3
+ [Back to SCRBench](../README.md) · [Paper](https://arxiv.org/abs/2610.41562) · [Generation and evaluation code](https://github.com/omidiu/SCRBench)
4
+
5
+ ## Tasks and subsets
6
+
7
+ | Task | Input | Correct answer |
8
+ | --- | --- | --- |
9
+ | T1 · Detect equivalence | 4,500 pairs in `t1_t3` | Test-based equivalence label |
10
+ | T2 · Diagnose change | 2,250 non-equivalent pairs in `t2` | Altering transformation ID |
11
+ | T3 · Reconstruct a sequence | 4,500 pairs in `t1_t3` | Any ordered sequence recorded in `paths` |
12
+
13
+ The `t2` rows are exactly the non-equivalent `t1_t3` rows, in the same order.
14
+ Both evaluation subsets are contained in the 67,658-pair `full` corpus. They
15
+ are **not held-out splits**; training on `full` and testing on either subset
16
+ would leak evaluation pairs. Pairs may also share the same original program.
17
+
18
+ ## Files and schema
19
+
20
+ | File | Configuration / split | Rows |
21
+ | --- | --- | ---: |
22
+ | `data/corpus.parquet` | `full` / `corpus` | 67,658 |
23
+ | `data/t1_t3_test.parquet` | `t1_t3` / `test` | 4,500 |
24
+ | `data/t2_test.parquet` | `t2` / `test` | 2,250 |
25
+
26
+ All three files have the same columns:
27
+
28
+ | Column | Meaning |
29
+ | --- | --- |
30
+ | `id` | Pair ID |
31
+ | `source`, `destination` | Original and modified Python programs |
32
+ | `paths` | Recorded valid ordered transformation sequences, as nested integer lists |
33
+ | `is_semantically_equivalent` | Equivalence label based on the recorded tests |
34
+ | `k` | Length of each recorded sequence, from 1 to 5 |
35
+
36
+ ## Transformation IDs
37
+
38
+ | ID | Transformation | Effect |
39
+ | --- | --- | --- |
40
+ | 1 | Arithmetic Operators Misuse | Altering |
41
+ | 2 | Boolean Literals Misuse | Altering |
42
+ | 3 | Logical Operators Misuse | Altering |
43
+ | 4 | Comparison Operators Misuse | Altering |
44
+ | 5 | Rename Variables | Preserving |
45
+ | 6 | Dead Code Insertion V1 | Preserving |
46
+ | 7 | Dead Code Insertion V2 | Preserving |
47
+ | 8 | Operand Swap | Preserving |
48
+ | 9 | Loop Transformation | Preserving |
49
+
50
+ Each recorded sequence uses distinct IDs. Equivalent pairs have no altering ID;
51
+ non-equivalent pairs have exactly one, shared by all recorded paths for that pair.
52
+
53
+ ## Limitations
54
+
55
+ Passing recorded tests does not prove equivalence on every input. The programs
56
+ are short Python examples with nine transformation operators. The balanced
57
+ evaluation subset does not reflect the full corpus's label distribution.
58
+
59
+ ## Attribution
60
+
61
+ The source programs derive from [MBPP](https://huggingface.co/datasets/google-research-datasets/mbpp)
62
+ ([Austin et al., 2021](https://arxiv.org/abs/2108.07732)). Cite the
63
+ [SCRBench paper](https://arxiv.org/abs/2610.41562) when using these pairs.
64
+ The dataset uses [CC BY 4.0](../LICENSE).