Anonymous commited on
Commit
77f4ff4
·
0 Parent(s):

Initial release v1.2.2

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +2 -0
  2. CHANGELOG.md +95 -0
  3. CONTRIBUTING.md +214 -0
  4. DATASHEET.md +323 -0
  5. LICENSE +13 -0
  6. MANIFEST.json +326 -0
  7. README.md +195 -0
  8. artifacts/zkgpt/zkGPT-001.json +55 -0
  9. artifacts/zkgpt/zkGPT-002.json +55 -0
  10. artifacts/zkgpt/zkGPT-003.json +55 -0
  11. artifacts/zkgpt/zkGPT-004.json +55 -0
  12. artifacts/zkgpt/zkGPT-005.json +55 -0
  13. artifacts/zkgpt/zkGPT-006.json +55 -0
  14. artifacts/zkgpt/zkGPT-007.json +55 -0
  15. artifacts/zkgpt/zkGPT-008.json +55 -0
  16. artifacts/zkgpt/zkGPT-010.json +50 -0
  17. artifacts/zkgpt/zkGPT-011.json +55 -0
  18. artifacts/zkgpt/zkGPT-012.json +55 -0
  19. artifacts/zkgpt/zkGPT-013.json +55 -0
  20. artifacts/zkgpt/zkGPT-014.json +55 -0
  21. artifacts/zkgpt/zkGPT-015.json +55 -0
  22. artifacts/zkllm/zkLLM-001.json +55 -0
  23. artifacts/zkllm/zkLLM-002.json +50 -0
  24. artifacts/zkllm/zkLLM-003.json +55 -0
  25. artifacts/zkllm/zkLLM-004.json +55 -0
  26. artifacts/zkllm/zkLLM-005.json +55 -0
  27. artifacts/zkllm/zkLLM-006.json +55 -0
  28. artifacts/zkllm/zkLLM-007.json +55 -0
  29. artifacts/zkllm/zkLLM-008.json +55 -0
  30. artifacts/zkllm/zkLLM-011.json +55 -0
  31. artifacts/zkllm/zkLLM-012.json +55 -0
  32. artifacts/zkllm/zkLLM-013.json +60 -0
  33. artifacts/zkllm/zkLLM-014.json +60 -0
  34. artifacts/zkllm/zkLLM-015.json +66 -0
  35. artifacts/zkml/zkML-001.json +52 -0
  36. artifacts/zkml/zkML-002.json +55 -0
  37. artifacts/zkml/zkML-003.json +60 -0
  38. artifacts/zkml/zkML-004.json +60 -0
  39. artifacts/zkml/zkML-005.json +60 -0
  40. artifacts/zkml/zkML-006.json +60 -0
  41. artifacts/zkml/zkML-007.json +52 -0
  42. artifacts/zkml/zkML-008.json +60 -0
  43. artifacts/zkml/zkML-010.json +55 -0
  44. artifacts/zkml/zkML-011.json +55 -0
  45. artifacts/zkml/zkML-012.json +55 -0
  46. artifacts/zkml/zkML-013.json +57 -0
  47. artifacts/zkml/zkML-014.json +57 -0
  48. artifacts/zkml/zkML-015.json +55 -0
  49. artifacts/zktorch/zkTorch-001.json +55 -0
  50. artifacts/zktorch/zkTorch-002.json +55 -0
.gitattributes ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ codebases/*.zip filter=lfs diff=lfs merge=lfs -text
2
+ papers/*.pdf filter=lfs diff=lfs merge=lfs -text
CHANGELOG.md ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ ## v1.2.2 (2026-05-01)
4
+
5
+ ### Artifact line-number and SHA-256 fixup (5 zkLLM artifacts)
6
+ - Fixed stale `anchor.start`/`anchor.end`, `expect_sha256`, `conflict_keys.regions`, and `finding.labels.relevant_code` in 5 zkLLM artifacts after the `zkllm.zip` codebase update in v1.2.1 shifted line numbers:
7
+ - **zkLLM-004**: tlookup.cu 384-385 → 401-402
8
+ - **zkLLM-006**: main.cu 252-261 → 302-311
9
+ - **zkLLM-007**: stage_proof.cuh 212-213 → 215-216
10
+ - **zkLLM-012**: tlookup.cu 19-22 → 36-39
11
+ - **zkLLM-013**: main.cu 138-158 → 138-204 (block expanded; SHA updated)
12
+ - **`data/baseline_findings.json`**: corrected two stale line references — `self-attn.cu:230-237` → `self-attn.cu:139-140` (file only has 226 lines) and `main.cu:174-189` → `main.cu:31-35` (pointed at wrong code after line shift).
13
+ - Rebuilt `MANIFEST.json`, `data/artifacts.parquet`. `verify_dataset.py` passes all checks.
14
+
15
+ ## v1.2.1 (2026-04-30)
16
+
17
+ ### Schema cleanup — `finding.labels` reduced to two fields
18
+ - Stripped the `severity` field from all 52 artifacts that still carried it. The v2 schema (`additionalProperties: false`) only permits `relevant_code` and `paper_reference` under `finding.labels`; `severity` was a stale leftover from the v1 → v2 migration that had been silently failing schema validation in `verify_dataset.py`.
19
+ - Removed `category` and `security_concern` from artifact JSONs in the same pass. These fields are no longer carried as per-artifact labels (the grader does not consume them).
20
+
21
+ ### Codebase runtime fixes (`zkllm.zip`)
22
+ - Updated `zkllm.zip` with three runtime fixes: transcript alignment, a most-vexing-parse correction, and tensor padding. SHA-256 in `MANIFEST.json` refreshed.
23
+
24
+ ### Tooling — `build_parquet.py` is now the single rebuild script
25
+ - `scripts/build_parquet.py` extended to also (a) refresh the `artifact_count` column in `data/pairs.parquet` from on-disk artifact files (preserving all static pair metadata) and (b) regenerate `MANIFEST.json` with fresh sha256 + size for every artifact, codebase, and paper. Running the script is now the one command required to rebuild every derived dataset file.
26
+
27
+ ### Artifact count correction
28
+ - `data/pairs.parquet` `artifact_count` corrected to match on-disk files: zkgpt=14, zkllm=13, zkml=14, zktorch=15 (previously incorrectly reported as 15/15/15/16). **Authoritative artifact total is 56**, not 61 as some earlier release notes implied — the v1.1.0 additions were partially superseded during the v2 schema cleanup.
29
+ - `MANIFEST.json` refreshed with new sha256 hashes for the 52 modified artifact JSONs. `verify_dataset.py` now passes all checks.
30
+
31
+ ## v1.2.0 (2026-04-28)
32
+
33
+ ### Clean codebase fixes (zktorch)
34
+ - **zktorch.zip**: Fixed epsilon hardcoded to `1.0` in BatchNorm — now properly scaled by SF_FLOAT (norm.rs:60-61)
35
+ - **zktorch.zip**: Fixed blanket `< 1e-10` near-zero guard — now checks after scaling instead of on raw float (onnx.rs:73-76)
36
+
37
+ ### Baseline findings
38
+ - Added `data/baseline_findings.json` — 10 known pre-existing gaps in clean codebases (2 zkgpt, 5 zkllm, 3 zktorch). These are inherent to the research prototypes and are not injected bugs. The grader's `--baseline` flag excludes matching agent findings from scoring.
39
+
40
+ ## v1.1.0 (2026-04-25)
41
+
42
+ ### Clean codebase fixes
43
+ - **zkgpt.zip**: Fixed `pow(1,-8)` → `pow(2,-8)` in softmax scale factor (neuralNetwork.cpp:354-356)
44
+ - **zkllm.zip**: Fixed FFN output to save rescaled `down_out_` instead of unrescaled `down_out` (ffn.cu:137, 152)
45
+
46
+ ### Artifact label corrections (4 relabeled)
47
+ - zkGPT-003, zkGPT-004, zkGPT-005: `Engineering/Prototype Gap` → `Specification Mismatch` (bias removal, identity LayerNorm, and zeroed weights are specification deviations)
48
+ - zkML-001: `Engineering/Prototype Gap` → `Protocol/Transcript Logic` (hardcoded Freivalds challenge is a protocol violation)
49
+
50
+ ### New artifacts (5 added, 56 → 61 total at the time)
51
+ - **zkGPT-014**: Softmax Scale Factor Evaluates to Unity (Numerical/Quantization Bug, Warning)
52
+ - **zkGPT-015**: Attention Dimension Scaling Factor Removed (Specification Mismatch, Critical)
53
+ - **zkLLM-015**: FFN Output Saved at Wrong Rescaling Level (Numerical/Quantization Bug, Warning)
54
+ - **zkML-015**: Selector Constraint Enforcement Disabled by Default (Engineering/Prototype Gap, Critical)
55
+ - **zkTorch-016**: BatchAdd Verification Assertion Removed (Under-constrained Circuit, Critical)
56
+
57
+ > **Note**: the artifact total temporarily reached 61 with this release. The v2-schema cleanup in v1.2.1 reconciled the on-disk count back to 56; see v1.2.1 above for the authoritative count.
58
+
59
+ ### Data updates
60
+ - MANIFEST.json updated (69 entries, new SHA-256 hashes for modified files)
61
+ - Parquet files rebuilt (artifacts: 61 rows, pairs: updated artifact_count)
62
+
63
+ ## v1.0.1 (post-v1.0.0 maintenance, pre-v1.1.0)
64
+
65
+ This was a series of in-place corrections committed against the v1.0.0 release before v1.1.0 was tagged. They are documented retroactively for completeness.
66
+
67
+ ### Schema migration — v1 → v2 (all 56 artifacts)
68
+ - Removed root-level v1 fields from every artifact: `name`, `category`, `severity`, `aliases`, `notes`.
69
+ - Normalized `source` from a nested object to a string enum (`real` | `synthetic`).
70
+ - Moved `finding.severity` → `finding.labels.severity` and `finding.location` → `finding.labels.relevant_code`.
71
+ - `verify_dataset.py` now performs full v2 JSON-schema validation (no more v1 skip).
72
+ - `build_dataset.py` updated to read v2 fields directly (the `extract_source` helper was removed).
73
+ - Cleaned v1 references from `README.md`, `CHANGELOG.md`, and the schema description.
74
+ - The migration helper script was deleted after the migration completed.
75
+
76
+ ### Anchor and probe corrections
77
+ - All 13 zkGPT artifacts: recomputed `expect_sha256` anchors against the current codebase zip.
78
+ - zkML-006: narrowed `not_contains` probe from `AddPairsChip` to `AddPairsChip::<F>::construct` (the broader form was too aggressive).
79
+ - zkML-007: removed a `not_contains` probe (line 272 legitimately contains the same text).
80
+ - zkTorch-002: narrowed `not_contains` probe from `1 << 15` to `y.clamp(-(1 << 15)`.
81
+ - zkGPT-010, zkLLM-002, zkML-001: removed `not_contains` probes that checked for text absence file-wide. The same text legitimately appears outside the edit range, so the probes were redundant (the corresponding `contains` probes already validated injection) and incorrect.
82
+ - `MANIFEST.json` updated with refreshed SHA-256 hashes for all modified files.
83
+
84
+ ### Documentation corrections
85
+ - Fixed paper year/venue, citation URL, the `load_dataset` example, artifact summary stats, and label-coverage notes in `README.md`.
86
+ - Merged the Hugging Face default `.gitattributes` and added a Git LFS rule for PDFs.
87
+
88
+ ## v1.0.0 (2026-04-22)
89
+
90
+ - Initial release
91
+ - 4 (paper, codebase) pairs: zkLLM, zkML, zkTorch, zkGPT
92
+ - 56 bug artifacts (14 + 14 + 15 + 13)
93
+ - Two Parquet configs: `pairs` (4 rows) and `artifacts` (56 rows)
94
+ - SHA256 manifest for all files
95
+ - Artifact format: v2 JSON schema (`artifact.v2.schema.json`)
CONTRIBUTING.md ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing to `zkml-audit-benchmark`
2
+
3
+ Thank you for your interest in extending this benchmark. This guide walks you through the workflow for adding a new **(paper, codebase) pair** and authoring **bug artifacts** that target it.
4
+
5
+ If you are filing a bug report, label correction, or documentation fix instead, please open an issue first; the workflow below is specifically for *content* contributions to the dataset.
6
+
7
+ ---
8
+
9
+ ## Quick Reference
10
+
11
+ | Task | Where |
12
+ |------|-------|
13
+ | Add a new (paper, codebase) pair | Sections [1](#1-add-the-codebase-snapshot) and [2](#2-register-the-pair-in-buildparquetpy) |
14
+ | Author bug artifacts | Section [3](#3-author-bug-artifact-jsons) |
15
+ | Regenerate derived files | Section [4](#4-regenerate-parquet-and-manifest) |
16
+ | Validate before submitting | Section [5](#5-validate) |
17
+ | PR checklist | Section [6](#6-pr-checklist) |
18
+
19
+ Authoritative schema: [`schema/artifact.v2.schema.json`](schema/artifact.v2.schema.json).
20
+ Recently changed/added items: [`CHANGELOG.md`](CHANGELOG.md).
21
+
22
+ ---
23
+
24
+ ## 1. Add the codebase snapshot
25
+
26
+ For a new pair `pair_id` (use a short, lowercase identifier — e.g., `zkfoo`):
27
+
28
+ 1. **Freeze the codebase**. If the upstream project uses Git, prefer pinning to a commit hash:
29
+ ```bash
30
+ git clone <upstream-url> /tmp/upstream
31
+ cd /tmp/upstream && git checkout <commit-sha>
32
+ git archive --format=zip --prefix=zkfoo/ HEAD -o /path/to/zkml-audit-benchmark/codebases/zkfoo.zip
33
+ ```
34
+ If the upstream project ships a non-Git release (e.g., a Zenodo tarball), record the source URL and the snapshot date in your `CHANGELOG.md` entry.
35
+ 2. **Verify the LICENSE file is included** inside the ZIP. Each codebase retains its upstream license; we redistribute for research-reproducibility purposes only.
36
+ 3. **Add the paper PDF** at `papers/{pair_id}.pdf`. Use the publisher's canonical PDF where possible; record the source URL in `CHANGELOG.md`.
37
+ 4. **Track the ZIP via Git LFS** (the repository is configured for `*.zip` LFS; new pair ZIPs are picked up automatically).
38
+
39
+ ---
40
+
41
+ ## 2. Register the pair in `build_parquet.py`
42
+
43
+ Open [`scripts/build_parquet.py`](scripts/build_parquet.py) and add your `pair_id` to the `PAIR_IDS` list at the top of the file:
44
+
45
+ ```python
46
+ PAIR_IDS = ["zkgpt", "zkllm", "zkml", "zktorch", "zkfoo"]
47
+ ```
48
+
49
+ The script auto-discovers artifacts under `artifacts/{pair_id}/*.json` and pulls codebase / paper hashes from `codebases/{pair_id}.zip` and `papers/{pair_id}.pdf`. Static pair metadata (paper title, venue, year, language, snapshot note) lives in `data/pairs.parquet`; if you are adding a brand-new pair, you will also need to add a row to that table — the simplest path is to load it via `pyarrow`, append a row, and write it back. See `scripts/build_parquet.py` for the exact schema.
50
+
51
+ ---
52
+
53
+ ## 3. Author bug artifact JSONs
54
+
55
+ Each artifact is a single JSON file at `artifacts/{pair_id}/{Pair}-NNN.json`. Use the camel-case pair prefix that matches the existing artifacts (`zkLLM`, `zkML`, `zkTorch`, `zkGPT`, or your new `zkFoo`) and a zero-padded three-digit sequence.
56
+
57
+ ### 3.1 Required fields (per `artifact.v2.schema.json`)
58
+
59
+ | Field | Purpose |
60
+ |-------|---------|
61
+ | `artifact_id` | Unique ID matching `^(zkML\|zkTorch\|zkLLM\|zkGPT\|<your prefix>)-\d{3}$` |
62
+ | `codebase` | Target codebase directory name (matches the directory inside the ZIP) |
63
+ | `source` | `"real"` (from a real audit report) or `"synthetic"` (authored for coverage) |
64
+ | `finding.name` | Human-readable short title, 3–7 words |
65
+ | `finding.explanation` | One paragraph: root cause and impact |
66
+ | `finding.labels.relevant_code` | Comma-separated `file:line[-line]` references (or empty string) |
67
+ | `finding.labels.paper_reference` | Section/theorem/protocol citation, optionally with a quoted claim (or `"-"`) |
68
+ | `edits` | Ordered list of code edits using ops: `replace_block`, `insert_after`, `insert_before`, `delete_block`, `replace_regex`, `create_file` |
69
+ | `conflict_keys.files` | All files touched by the edits |
70
+ | `conflict_keys.regions` | Expanded line-range regions for overlap detection |
71
+ | `conflict_keys.semantic_tags` | Semantic labels; two artifacts sharing a tag are treated as conflicting |
72
+ | `conflict_keys.requires` | (Optional) artifact IDs that must be applied first |
73
+ | `conflict_keys.incompatible` | (Optional) artifact IDs explicitly incompatible with this one |
74
+ | `presence_probes` | Post-injection assertions; the `dataset_generator` uses these to validate that the bug actually landed |
75
+
76
+ A minimal skeleton:
77
+
78
+ ```json
79
+ {
80
+ "artifact_id": "zkFoo-001",
81
+ "codebase": "zkfoo-fixed",
82
+ "source": "synthetic",
83
+ "finding": {
84
+ "name": "Missing range check on softmax witness",
85
+ "explanation": "The softmax output is loaded as a free advice cell without a polynomial constraint binding it to the input. A malicious prover can substitute any value and still satisfy the circuit.",
86
+ "labels": {
87
+ "relevant_code": "src/softmax.rs:42-58, src/circuit.rs:120",
88
+ "paper_reference": "Section 4.2: \"Each non-linear operator is enforced via a lookup argument against the precomputed table.\""
89
+ }
90
+ },
91
+ "edits": [
92
+ {
93
+ "file": "src/softmax.rs",
94
+ "op": "delete_block",
95
+ "anchor": { "kind": "line_range", "start": 42, "end": 58 }
96
+ }
97
+ ],
98
+ "conflict_keys": {
99
+ "files": ["src/softmax.rs"],
100
+ "regions": [{ "file": "src/softmax.rs", "start": 42, "end": 58 }],
101
+ "semantic_tags": ["softmax-range-check"]
102
+ },
103
+ "presence_probes": [
104
+ {
105
+ "kind": "line_equals",
106
+ "file": "src/softmax.rs",
107
+ "line": 42,
108
+ "expected": " fn forward(&self, ..."
109
+ }
110
+ ]
111
+ }
112
+ ```
113
+
114
+ ### 3.2 Authoring guidance
115
+
116
+ - **Make each artifact atomic**: one soundness gap per artifact. If a single conceptual bug requires two related edits in different files, keep them in *one* artifact and use multiple `edits` entries.
117
+ - **Tie every artifact back to a paper claim** in `paper_reference`. If no specific paper section maps cleanly, use `"-"` and explain the reasoning in `finding.explanation`. The grader's paper-reference scorer is part of the quality gate, so accurate citations materially improve scoring.
118
+ - **Use precise line ranges** in `relevant_code`. The grader scores code-location matches by line proximity (overlap, within 2 lines, within 30, within 100); imprecise references reduce match quality even when the agent finds the right bug.
119
+ - **Write `presence_probes` that fail loudly** if the edit silently no-ops. `line_equals` probes that pin the exact post-injection content of the modified line are the most reliable.
120
+ - **Set `semantic_tags` to enable safe composition**: two artifacts that share a tag are treated as conflicting by `RandomStrategy` in `dataset_generator`. Use tags for *what the bug is about* (e.g., `softmax-range-check`, `pedersen-commit-aux`), not for general areas of the code.
121
+ - **`source: "real"` vs. `"synthetic"`**: use `real` only when the artifact is grounded in an external audit report or in a documented soundness gap from the original paper's released code. Synthetic artifacts are authored for coverage and should clearly describe the construction.
122
+
123
+ ---
124
+
125
+ ## 4. Regenerate Parquet and `MANIFEST.json`
126
+
127
+ After adding/modifying artifacts, papers, or codebases:
128
+
129
+ ```bash
130
+ cd zkml-audit-benchmark/
131
+ python scripts/build_parquet.py
132
+ ```
133
+
134
+ This rebuilds:
135
+ - `data/artifacts.parquet` (one row per artifact, with flattened metadata)
136
+ - `data/pairs.parquet` (refreshes `artifact_count` for each pair)
137
+ - `MANIFEST.json` (SHA-256 hashes for every file in the dataset)
138
+
139
+ Commit the regenerated files alongside your content changes — they are part of the dataset and consumers rely on them.
140
+
141
+ ---
142
+
143
+ ## 5. Validate
144
+
145
+ ### 5.1 Byte-exact integrity
146
+
147
+ ```bash
148
+ python scripts/verify_dataset.py
149
+ ```
150
+
151
+ This re-hashes every file listed in `MANIFEST.json` and verifies the result matches. Any mismatch indicates a stale Parquet/MANIFEST regeneration.
152
+
153
+ ### 5.2 JSON-schema conformance
154
+
155
+ Each artifact must conform to `schema/artifact.v2.schema.json`. A minimal validation snippet:
156
+
157
+ ```python
158
+ import json
159
+ from pathlib import Path
160
+ from jsonschema import Draft202012Validator
161
+
162
+ schema = json.loads(Path("schema/artifact.v2.schema.json").read_text())
163
+ validator = Draft202012Validator(schema)
164
+ for af in Path("artifacts").rglob("*.json"):
165
+ instance = json.loads(af.read_text())
166
+ errors = list(validator.iter_errors(instance))
167
+ assert not errors, f"{af}: {errors}"
168
+ ```
169
+
170
+ ### 5.3 Presence-probe round-trip (recommended)
171
+
172
+ For real validation that an artifact lands cleanly on the clean codebase, generate a single-artifact case via the companion zkML-inspector-benchmark tooling:
173
+
174
+ ```bash
175
+ python -m dataset_generator test \
176
+ --output /tmp/probe_check \
177
+ --num-cases 1 \
178
+ --artifacts-per-case 1 \
179
+ --strategy fixed \
180
+ --artifact-ids zkFoo-001
181
+ ```
182
+
183
+ A successful build with no errors in `/tmp/probe_check/errors.json` confirms that the artifact's edits and probes are consistent.
184
+
185
+ ### 5.4 Croissant metadata
186
+
187
+ The NeurIPS Datasets & Benchmarks Track requires Hugging Face–hosted datasets to ship valid Croissant metadata. Hugging Face auto-generates the Croissant file from your dataset card and Parquet configs after every push. Validate it after pushing your changes via:
188
+
189
+ <https://huggingface.co/spaces/JoaquinVanschoren/croissant-checker>
190
+
191
+ If the checker reports errors, they typically trace back to YAML frontmatter in `README.md` or to a malformed Parquet schema; fix and re-push.
192
+
193
+ ---
194
+
195
+ ## 6. PR Checklist
196
+
197
+ Please confirm each of the following before opening a pull request:
198
+
199
+ - [ ] New pair (if any) registered in `scripts/build_parquet.py` (`PAIR_IDS`).
200
+ - [ ] Codebase ZIP and paper PDF placed under `codebases/` and `papers/` respectively, with upstream LICENSE preserved inside the ZIP.
201
+ - [ ] Each new artifact JSON conforms to `schema/artifact.v2.schema.json` (validated as in §5.2).
202
+ - [ ] `python scripts/build_parquet.py` re-run; resulting `data/*.parquet` and `MANIFEST.json` committed.
203
+ - [ ] `python scripts/verify_dataset.py` passes with no errors.
204
+ - [ ] `paper_reference` cites a specific section/theorem/protocol from the bundled PDF (or is `"-"` with rationale in `finding.explanation`).
205
+ - [ ] `CHANGELOG.md` updated with a new entry (artifact IDs added, label changes, codebase fixes, schema changes).
206
+ - [ ] If submitting during a NeurIPS review window: no personal identifiers in PR description, commit messages, or new files.
207
+
208
+ ---
209
+
210
+ ## Schema Evolution
211
+
212
+ Backward-incompatible changes to the artifact JSON format ship as a new schema file (`schema/artifact.vN.schema.json`) rather than mutating the existing one. Each artifact records its target schema version implicitly via its on-disk shape; existing artifacts are migrated in a single, separately-committed pass with a `CHANGELOG.md` entry.
213
+
214
+ If you have a proposal that requires a schema bump, please open an issue first to discuss the migration plan before submitting a PR.
DATASHEET.md ADDED
@@ -0,0 +1,323 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Datasheet for `zkml-audit-benchmark`
2
+
3
+ This datasheet follows the template of *Datasheets for Datasets* (Gebru et al., 2021, CACM, [arXiv:1803.09010](https://arxiv.org/abs/1803.09010)). It documents the `zkml-audit-benchmark` dataset: a benchmark for evaluating AI agents on **zkML soundness auditing**.
4
+
5
+ - **Dataset**: `zkml-audit-benchmark`
6
+ - **Version at time of writing**: v1.2.0 (2026-04-28)
7
+ - **Hosting**: <https://huggingface.co/datasets/anonymous-zkml-benchmark/zkml-audit-benchmark>
8
+ - **Code repository**: see the upstream GitHub repository linked from the Hugging Face dataset card
9
+ - **Author / maintainer**: anonymized for NeurIPS 2026 submission
10
+ - **License (curation layer)**: [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/). Each upstream codebase and paper retains its original license — see `Distribution` below.
11
+
12
+ ---
13
+
14
+ ## Motivation
15
+
16
+ > *The questions in this section are primarily intended to encourage dataset creators to clearly articulate their reasons for creating the dataset and to promote transparency about funding interests.*
17
+
18
+ **1. For what purpose was the dataset created? Was there a specific task in mind? Was there a specific gap that needed to be filled?**
19
+
20
+ The dataset was created to enable systematic evaluation of automated auditing tools for **zero-knowledge machine learning (zkML)** implementations. State-of-the-art zkML frameworks frequently exhibit **theory-to-implementation gaps**: the deployed code omits cryptographic operations (Pedersen commitments on auxiliary vectors, Lasso lookup arguments, Spice memory-checking, etc.) that the corresponding paper claims are part of the protocol. Manual audits of two flagship systems (zkLLM and zkGPT) revealed that closing these gaps inflates the reported prover cost by 12.35× in zkLLM and the proof size by 14.5× in zkGPT — evidence that the gap is real, severe, and worth measuring at scale. Manual audits at this level of rigor do not scale to the broader zkML literature, motivating an automated benchmark.
21
+
22
+ The specific task supported by the dataset is **soundness-gap detection**: given a (paper, codebase) pair plus optional injected vulnerabilities, an agent must produce a structured list of findings that match the ground-truth artifacts. Two complementary workflows are supported:
23
+ - *Pair extraction* — load a clean (paper, codebase) pair for zero-shot auditing.
24
+ - *Test-case generation* — sample artifacts from the pool and inject them into the clean codebase, producing a flawed codebase with known ground-truth findings for graded evaluation.
25
+
26
+ The dataset fills a gap not covered by existing security benchmarks (Juliet, OWASP Benchmark, NIST CAVP), none of which pair academic-paper claims with implementation artifacts; see the README's *Positioning vs. Existing Benchmarks* section for a comparison table.
27
+
28
+ **2. Who created this dataset (e.g. which team, research group) and on behalf of which entity (e.g. company, institution, organization)?**
29
+
30
+ Anonymized for NeurIPS 2026 submission. Full attribution will be added at camera-ready.
31
+
32
+ **3. What support was needed to make this dataset? (e.g. who funded the creation of the dataset?)**
33
+
34
+ Anonymized. Compute infrastructure for the high-fidelity replication audits that motivated the benchmark used a Lambda Cloud `gpu_1x_a100_sxm4` instance. No external grant identifiers are listed in this version.
35
+
36
+ **4. Any other comments?**
37
+
38
+ The benchmark is positioned as **community infrastructure**: it is designed to be extensible by ZKML researchers (see [CONTRIBUTING.md](CONTRIBUTING.md)) so future papers can be added as new (paper, codebase) pairs with their own artifact records.
39
+
40
+ ---
41
+
42
+ ## Composition
43
+
44
+ > *Most of these questions are intended to provide dataset consumers with the information they need to make informed decisions about using the dataset for specific tasks.*
45
+
46
+ **1. What do the instances that comprise the dataset represent (e.g. documents, photos, people, countries)? Are there multiple types of instances?**
47
+
48
+ There are **two types of instances**:
49
+
50
+ 1. **(Paper, codebase) pairs**: each instance represents one published zkML system, consisting of a research-paper PDF and a frozen snapshot of the corresponding open-source implementation.
51
+ 2. **Bug artifacts**: each instance is a JSON record describing a single soundness vulnerability — a declarative set of code edits that injects the bug, ground-truth labels for grading, and presence probes that verify the injection succeeded.
52
+
53
+ In addition, the dataset ships derived/aggregate files: two Parquet tables (`pairs` and `artifacts`), a `MANIFEST.json` checksum manifest, a `schema/` directory, a `data/baseline_findings.json` file documenting pre-existing soundness gaps in the unmodified codebases, and helper scripts (`build_parquet.py`, `verify_dataset.py`).
54
+
55
+ **2. How many instances are there in total (of each type, if appropriate)?**
56
+
57
+ - **4 (paper, codebase) pairs**: `zkllm`, `zkml`, `zktorch`, `zkgpt`.
58
+ - **56 bug artifacts**: 14 zkGPT + 13 zkLLM + 14 zkML + 15 zkTorch.
59
+ - **20 of the 56 artifacts** are derived from real expert audit reports (`source: "real"`); the remaining 36 are synthetic, authored for broader coverage.
60
+
61
+ **3. Does the dataset contain all possible instances or is it a sample (not necessarily random) of instances from a larger set?**
62
+
63
+ The dataset is a **deliberate sample**. The four included frameworks were selected from a broader pool of ten candidate ZKML papers based on the availability of paired open-source codebases, license compatibility for redistribution, and feasibility of authoring artifacts grounded in the paper's protocol claims. The sample is not random; it is biased toward (a) frameworks targeting **transformer / LLM inference**, and (b) papers with **publicly archived reference implementations**. Future releases may incorporate additional pairs.
64
+
65
+ **4. What data does each instance consist of?**
66
+
67
+ - *(Paper, codebase) pair*: paper PDF (`papers/{pair_id}.pdf`), frozen codebase ZIP (`codebases/{pair_id}.zip`, stored via Git LFS), plus a row in `data/pairs.parquet` with metadata fields (paper title/venue/year, language, frameworks, snapshot note, SHA-256 hashes).
68
+ - *Bug artifact*: a JSON file at `artifacts/{pair_id}/{Pair}-NNN.json` conforming to `schema/artifact.v2.schema.json`. Required keys: `artifact_id`, `codebase`, `source`, `finding` (with `name`, `explanation`, and grader-aligned `labels`), `edits` (declarative code edits using `replace_block`/`insert_after`/`insert_before`/`delete_block`/`replace_regex`/`create_file`), `conflict_keys` (files, regions, semantic tags, requires/incompatible artifact IDs), and `presence_probes` (post-injection verification assertions).
69
+
70
+ **5. Is there a label or target associated with each instance?**
71
+
72
+ Yes, for bug artifacts. Each `finding.labels` record carries two graded fields used by the zkML-inspector-benchmark grader: `relevant_code` (file:line references) and `paper_reference` (section/theorem citation). (Paper, codebase) pairs do not carry per-pair labels.
73
+
74
+ **6. Is any information missing from individual instances?**
75
+
76
+ - The `zktorch` codebase is a directory snapshot dated 2026-04-19; the corresponding upstream Git commit hash is not recorded. `zkllm` is pinned to commit `993311e…`, `zkml` is pinned to commit `4378958…` ([ddkang/zkml](https://github.com/ddkang/zkml), the latest commit as of the snapshot date), and `zkgpt` is pinned to Zenodo record [14727819 v1](https://zenodo.org/records/14727819).
77
+ - A small number of artifacts have an empty `relevant_code` string when the bug is purely a missing operation (no specific line to point at) and `paper_reference: "-"` when no paper section directly applies.
78
+
79
+
80
+ **7. Are relationships between individual instances made explicit (e.g. users' movie ratings, social network links)?**
81
+
82
+ Yes. Three relationship types are encoded:
83
+ - *Pair-to-artifact*: each artifact's `codebase` field points to one of the four pairs; this is the foreign key in `data/artifacts.parquet`.
84
+ - *Artifact-to-artifact (requires)*: an artifact may declare a list of artifacts that must be applied first.
85
+ - *Artifact-to-artifact (incompatible)*: an artifact may declare a list of artifacts it cannot be co-applied with. This information is what enables the controlled composition experiments described in the accompanying paper.
86
+
87
+ **8. Are there recommended data splits (e.g. training, development/validation, testing)?**
88
+
89
+ No standard train/dev/test split is shipped. The dataset is intended for **zero-shot evaluation** and for **controlled difficulty studies**, not supervised training. Users running grading experiments may freely partition pairs and artifacts to suit their evaluation.
90
+
91
+ **9. Are there any errors, sources of noise, or redundancies in the dataset?**
92
+
93
+ - v1.0.0 → v1.1.0 fixed two clean-codebase bugs (`pow(1,-8)` → `pow(2,-8)` in zkGPT softmax; FFN-output rescaling in zkLLM). v1.1.0 → v1.2.0 added two further clean-codebase fixes in zkTorch (epsilon in BatchNorm, near-zero guard in onnx.rs) and a `data/baseline_findings.json` file documenting 10 known pre-existing gaps in the clean codebases that should be excluded from grading via `--baseline`.
94
+
95
+ **10. Is the dataset self-contained, or does it link to or otherwise rely on external resources (e.g. websites, tweets, other datasets)?**
96
+
97
+ The dataset is **self-contained for evaluation purposes**: all paper PDFs, codebase ZIPs, artifact JSONs, and derived Parquet tables are bundled in the Hugging Face repository. Relevant external resources:
98
+ - The artifacts cite specific paper sections; the cited papers are bundled in `papers/`.
99
+ - The `zkllm` codebase declares CUDA / mcl-bn254 dependencies that consumers must install separately to actually compile or execute the code; this is not required for the auditing task itself.
100
+ - Grading is performed by the companion tool zkML-inspector-benchmark, which is a separate repository.
101
+
102
+ **11. Does the dataset contain data that might be considered confidential (e.g. data that is protected by legal privilege or by doctor-patient confidentiality, data that includes the content of individuals' non-public communications)?**
103
+
104
+ No. All papers are publicly published; all codebases are open-source releases by their original authors.
105
+
106
+ **12. Does the dataset contain data that, if viewed directly, might be offensive, insulting, threatening, or might otherwise cause anxiety?**
107
+
108
+ No.
109
+
110
+ **13. Does the dataset relate to people?**
111
+
112
+ No. The dataset comprises research papers, source code, and synthetic bug records. It does not contain personal data, user-generated content, or human subjects in any form. Questions 14–16 of the Gebru template are therefore not applicable.
113
+
114
+ **17. Any other comments?**
115
+
116
+ The composition is **soundness-focused**: the artifacts are uniformly cryptographic-correctness defects rather than performance bugs, style violations, or privacy leaks. This focus is intentional — soundness is the property a ZK proof system primarily exists to provide.
117
+
118
+ ---
119
+
120
+ ## Collection Process
121
+
122
+ > *In addition to the goals of the prior section, the answers to questions here may provide information that allow others to reconstruct the dataset without access to it.*
123
+
124
+ **1. How was the data associated with each instance acquired?**
125
+
126
+ - *Paper PDFs* were downloaded from the publishers' / arXiv canonical URLs.
127
+ - *Codebases* were obtained from the authors' public release artifacts (GitHub repositories, Zenodo records).
128
+ - *Real* artifacts (`source: "real"`) were derived from manual audit reports of the source frameworks: each report identifies a soundness gap, and the corresponding artifact encodes the minimal code edit that re-introduces the gap on a clean codebase, plus the labels and probes needed to grade detection of it.
129
+ - *Synthetic* artifacts were authored by the maintainers to broaden vulnerability coverage, following the same JSON schema and validated by the same `presence_probes` mechanism.
130
+
131
+ **2. What mechanisms or procedures were used to collect the data (e.g. hardware apparatus or sensor, manual human curation, software program, software API)?**
132
+
133
+ Manual human curation throughout. Codebase snapshots were created by `git archive` (where a Git history was available) or by zipping a working directory. Artifact authoring was performed by hand against `schema/artifact.v2.schema.json` and validated by:
134
+ - JSON-schema conformance,
135
+ - Presence-probe execution after applying the declared edits to the clean codebase,
136
+ - The `verify_dataset.py` script for byte-exact integrity against `MANIFEST.json`.
137
+
138
+ **3. If the dataset is a sample from a larger set, what was the sampling strategy?**
139
+
140
+ Deterministic, criterion-based selection (not probabilistic). Frameworks were included if they (a) had been published in a peer-reviewed venue or as an established preprint, (b) had a publicly accessible reference implementation under a redistribution-permissive license, and (c) admitted authoring of at least ten high-quality bug artifacts.
141
+
142
+ **4. Who was involved in the data collection process (e.g. students, crowdworkers, contractors) and how were they compensated?**
143
+
144
+ Maintainers only; no crowdworkers or external contractors. No payment beyond the maintainers' research support.
145
+
146
+ **5. Over what timeframe was the data collected?**
147
+
148
+ Codebase snapshots and artifact authoring were carried out between 2025 and 2026. The codebases themselves are upstream releases dated as follows:
149
+ - `zkllm`: commit `993311e…` (2024).
150
+ - `zkml`: commit `4378958…` from [ddkang/zkml](https://github.com/ddkang/zkml) (Aug 2023; the latest upstream commit as of the snapshot date).
151
+ - `zktorch`: directory snapshot taken on 2026-04-19 (no public Git repository found).
152
+ - `zkgpt`: Zenodo record [14727819 v1](https://zenodo.org/records/14727819) (Jan 2025).
153
+
154
+ The replication audits that motivated the benchmark were conducted in the same period and are documented in the accompanying paper.
155
+
156
+ **7. Were any ethical review processes conducted (e.g. by an institutional review board)?**
157
+
158
+ No formal ethical review was required: the dataset does not involve human subjects, does not collect personal data, and consists exclusively of publicly published research artifacts.
159
+
160
+ **8. Does the dataset relate to people?**
161
+
162
+ No. Questions 9–13 are therefore not applicable.
163
+
164
+ **14. Any other comments?**
165
+
166
+ Reconstructing the dataset from scratch is straightforward given the in-repository scripts: re-download upstream papers/codebases, place them under `papers/` and `codebases/`, populate `artifacts/` with the JSON files, and run `python scripts/build_parquet.py` to regenerate the derived Parquet tables and `MANIFEST.json`.
167
+
168
+ ---
169
+
170
+ ## Preprocessing / Cleaning / Labeling
171
+
172
+ > *The questions in this section are intended to provide dataset consumers with the information they need to determine whether the "raw" data has been processed in ways that are compatible with their chosen tasks.*
173
+
174
+ **1. Was any preprocessing/cleaning/labeling of the data done?**
175
+
176
+ Yes:
177
+ - *Codebase snapshotting*: working directories were captured at a fixed date, then ZIP-archived. For zkLLM, a Git commit hash was recorded; for the other three, only the snapshot date is recorded.
178
+ - *Codebase fixes*: a small number of pre-existing bugs in the clean codebases were corrected to ensure the unmodified pair represents a *clean baseline* (e.g., `pow(1,-8)` → `pow(2,-8)` in zkGPT softmax; FFN-output rescaling in zkLLM; epsilon in zkTorch BatchNorm). These corrections are listed in `CHANGELOG.md`.
179
+ - *Artifact authoring and labeling*: each artifact was assigned a comma-separated `relevant_code` string and a `paper_reference` citation under `finding.labels`.
180
+ - *Parquet flattening*: `scripts/build_parquet.py` flattens the nested artifact JSONs into row-oriented Parquet tables for fast filtering. The full JSONs remain the authoritative source.
181
+ - *Baseline-findings curation*: `data/baseline_findings.json` enumerates ten known pre-existing soundness gaps in the clean codebases that should be excluded from grading via the grader's `--baseline` flag.
182
+
183
+ **2. Was the "raw" data saved in addition to the preprocessed/cleaned/labeled data?**
184
+
185
+ Yes. The artifact JSONs are the raw, authoritative form; the Parquet tables are derived and can be regenerated at any time. Codebase ZIPs are byte-frozen snapshots; the corrections listed in CHANGELOG are applied inside those ZIPs and documented per release.
186
+
187
+ **3. Is the software used to preprocess/clean/label the instances available?**
188
+
189
+ Yes. `scripts/build_parquet.py` rebuilds `data/artifacts.parquet`, refreshes `artifact_count` in `data/pairs.parquet`, and regenerates `MANIFEST.json`. `scripts/verify_dataset.py` performs byte-exact integrity validation. Both scripts are bundled in the dataset repository under `scripts/`.
190
+
191
+ **4. Any other comments?**
192
+
193
+ No.
194
+
195
+ ---
196
+
197
+ ## Uses
198
+
199
+ > *These questions are intended to encourage dataset creators to reflect on the tasks for which the dataset should and should not be used.*
200
+
201
+ **1. Has the dataset been used for any tasks already?**
202
+
203
+ Yes. The dataset is used in the accompanying NeurIPS 2026 submission to evaluate `zkml-inspector`, a multi-agent AI auditing pipeline, across five controlled experiment families (isolated single-bug, combined realistic, k-curve, iterative, and clean-baseline).
204
+
205
+ **2. Is there a repository that links to any or all papers or systems that use the dataset?**
206
+
207
+ The Hugging Face dataset card links the accompanying paper (anonymized during the NeurIPS review window) and the zkML-inspector-benchmark grader repository. Citations and other systems will be added as they appear.
208
+
209
+ **3. What (other) tasks could the dataset be used for?**
210
+
211
+ - Zero-shot evaluation of new auditing agents (LLM-based or otherwise) on (paper, codebase) pairs.
212
+ - Controlled difficulty studies via the artifact-composition workflow (sampling k artifacts at a time and measuring how detection degrades with k).
213
+ - Reproducible regression testing for ZKML implementation maintainers prior to release.
214
+ - Education / training material for auditors learning to identify soundness gaps.
215
+ - Studying the alignment between cryptographic protocol specifications and their software implementations as a software-assurance research problem.
216
+
217
+ **4. Is there anything about the composition of the dataset or the way it was collected and preprocessed/cleaned/labeled that might impact future uses?**
218
+
219
+ - Pooled recall metrics on this benchmark can be misleading because per-issue difficulty is highly heterogeneous; we recommend reporting per-issue recall with bootstrap confidence intervals (see the accompanying paper, Appendix C).
220
+ - Coverage is concentrated on **inference-time soundness**; the dataset does not currently include artifacts for ZK proofs of *training*, FRI-based STARKs, or floating-point native ZK protocols. Generalization claims should be scoped accordingly.
221
+ - The dataset is focused on **soundness and integrity** vulnerabilities. Privacy, availability, and governance-related gaps are not currently represented.
222
+ - The `zktorch` codebase is a directory snapshot without an upstream commit hash, which limits exact bit-level provenance for that pair.
223
+
224
+ **5. Are there tasks for which the dataset should not be used?**
225
+
226
+ The dataset **should not** be used to:
227
+ - Train or evaluate models intended to **automatically generate exploits against deployed ZK production systems** that have not consented to such testing. The artifacts in this dataset are tied to frozen academic snapshots, not live deployments.
228
+ - Make blanket security claims about the upstream framework projects without consulting the original authors. The benchmark deliberately freezes a snapshot in time; upstream projects continue to evolve and may have addressed any given soundness gap in subsequent releases.
229
+
230
+ **6. Any other comments?**
231
+
232
+ We encourage dataset users to publish per-issue recall tables (Appendix C of the accompanying paper) alongside aggregate metrics so that downstream comparisons remain unsound-when-pooled but transparent.
233
+
234
+ ---
235
+
236
+ ## Distribution
237
+
238
+ > *Dataset creators should provide answers to these questions prior to distributing the dataset either internally within the entity on behalf of which the dataset was created or externally to third parties.*
239
+
240
+ **1. Will the dataset be distributed to third parties outside of the entity (e.g. company, institution, organization) on behalf of which the dataset was created?**
241
+
242
+ Yes. The dataset is publicly distributed under CC-BY-4.0 (curation layer) for use by the broader research community.
243
+
244
+ **2. How will the dataset be distributed (e.g. tarball on website, API, GitHub)? Does the dataset have a digital object identifier (DOI)?**
245
+
246
+ - Primary distribution: the Hugging Face Hub at <https://huggingface.co/datasets/anonymous-zkml-benchmark/zkml-audit-benchmark>, accessible via the `datasets` Python library and via direct file download.
247
+ - Derived Parquet tables are configured under the `pairs` and `artifacts` configs (see README YAML frontmatter).
248
+ - A Croissant machine-readable metadata file is auto-generated by Hugging Face for HF-hosted datasets and can be validated via [the Croissant checker](https://huggingface.co/spaces/JoaquinVanschoren/croissant-checker), in line with the NeurIPS 2025/2026 D&B Track requirements.
249
+ - No DOI is registered as of v1.2.0; one may be minted at camera-ready (e.g., via Zenodo).
250
+
251
+ **3. When will the dataset be distributed?**
252
+
253
+ The dataset is already publicly available (v1.0.0 released 2026-04-22; v1.2.0 released 2026-04-28).
254
+
255
+ **4. Will the dataset be distributed under a copyright or other intellectual property (IP) license, and/or under applicable terms of use (ToU)?**
256
+
257
+ | Component | License |
258
+ |-----------|---------|
259
+ | Curation layer (artifact JSONs, schema, scripts, documentation, Parquet tables) | [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/) |
260
+ | Codebase ZIPs | Each retains its **upstream license** (consult the LICENSE file inside each ZIP). The ZIPs are redistributed for research-reproducibility purposes. |
261
+ | Paper PDFs | Subject to **respective publisher terms** (ACM, USENIX, EuroSys, arXiv). PDFs are bundled for research-reproducibility purposes; consumers redistributing them at scale should consult the original publisher. |
262
+
263
+ **5. Have any third parties imposed IP-based or other restrictions on the data associated with the instances?**
264
+
265
+ The papers and codebases retain their original third-party licenses (the most restrictive of which limits redistribution to research use). The curation layer adds no new restrictions beyond CC-BY-4.0. Users redistributing modified codebases (e.g., test cases produced by `dataset_generator`) inherit the upstream license of the base codebase and must preserve the original `LICENSE` file.
266
+
267
+ **6. Do any export controls or other regulatory restrictions apply to the dataset or to individual instances?**
268
+
269
+ No export controls apply. The dataset contains research artifacts, not cryptographic key material or controlled software.
270
+
271
+ **7. Any other comments?**
272
+
273
+ Full author attribution will be added at camera-ready. Reviewers may access all data without personal request, in accordance with the NeurIPS D&B Track's accessibility requirements.
274
+
275
+ ---
276
+
277
+ ## Maintenance
278
+
279
+ > *These questions are intended to encourage dataset creators to plan for dataset maintenance and communicate this plan with dataset consumers.*
280
+
281
+ **1. Who is supporting/hosting/maintaining the dataset?**
282
+
283
+ The dataset is hosted on the Hugging Face Hub. Maintenance is performed by the original authors (anonymized for review).
284
+
285
+ **2. How can the owner/curator/manager of the dataset be contacted (e.g. email address)?**
286
+
287
+ During the NeurIPS 2026 review window, the recommended contact channel is the GitHub issue tracker on the dataset's source repository (linked from the Hugging Face dataset card). Direct email correspondence is intentionally withheld until camera-ready to preserve anonymous review.
288
+
289
+ **3. Is there an erratum?**
290
+
291
+ There is no separate erratum document. All corrections, schema changes, label re-classifications, and clean-codebase fixes are recorded in `CHANGELOG.md` at the repository root.
292
+
293
+ **4. Will the dataset be updated (e.g. to correct labeling errors, add new instances, delete instances)?**
294
+
295
+ Yes. Planned update categories:
296
+ - *Patch* updates (e.g., `v1.2.x`): label corrections, presence-probe fixes, documentation improvements.
297
+ - *Minor* updates (e.g., `v1.x.0`): new artifacts, new (paper, codebase) pairs, schema-compatible additions.
298
+ - *Major* updates (e.g., `v2.0.0`): schema bumps (a new `schema/artifact.vN.schema.json` is added side-by-side; old artifacts are migrated or kept under their original schema version).
299
+
300
+ Updates will be communicated via Git tags and the `CHANGELOG.md` file. Users pinning to a specific version should reference the corresponding Git tag or the `revision` argument in `datasets.load_dataset(...)` and `huggingface_hub` downloads.
301
+
302
+ **5. If the dataset relates to people, are there applicable limits on the retention of the data associated with the instances?**
303
+
304
+ Not applicable — the dataset does not relate to people.
305
+
306
+ **6. Will older versions of the dataset continue to be supported/hosted/maintained?**
307
+
308
+ Older versions remain accessible via Git history and Hugging Face revisions. They are not actively patched after a newer version supersedes them; consumers should treat older versions as immutable historical snapshots.
309
+
310
+ **7. If others want to extend/augment/build on/contribute to the dataset, is there a mechanism for them to do so?**
311
+
312
+ Yes. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full extension workflow:
313
+ 1. Add a frozen codebase snapshot under `codebases/` and the corresponding paper PDF under `papers/`.
314
+ 2. Author one or more JSON artifact records under `artifacts/{pair_id}/` conforming to `schema/artifact.v2.schema.json`, each with `presence_probes` validating injection success.
315
+ 3. Regenerate the Parquet tables and `MANIFEST.json` via `python scripts/build_parquet.py` and validate via `python scripts/verify_dataset.py`.
316
+ 4. Validate Croissant metadata via the linked HF checker.
317
+ 5. Submit a pull request including a `CHANGELOG.md` entry.
318
+
319
+ Contributions are validated by maintainer review against the JSON schema and by re-running `verify_dataset.py`. Accepted contributions are tagged in the next minor release and announced in `CHANGELOG.md`.
320
+
321
+ **8. Any other comments?**
322
+
323
+ This datasheet itself will be updated alongside major and minor dataset releases. Significant changes to the datasheet's content will be summarized in `CHANGELOG.md`.
LICENSE ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Creative Commons Attribution 4.0 International License
2
+
3
+ Copyright (c) 2026 Anonymous
4
+
5
+ This dataset curation layer (artifact definitions, schemas, scripts,
6
+ and documentation) is licensed under the Creative Commons Attribution
7
+ 4.0 International License.
8
+
9
+ You may obtain a copy of the License at:
10
+ https://creativecommons.org/licenses/by/4.0/
11
+
12
+ The included codebases retain their original upstream licenses.
13
+ The included papers are subject to their respective publisher terms.
MANIFEST.json ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "generated_by": "scripts/build_parquet.py",
3
+ "total_files": 64,
4
+ "files": [
5
+ {
6
+ "path": "artifacts/zkgpt/zkGPT-001.json",
7
+ "sha256": "d43bd9a9250be8713ca385ecc72700155c95614e6030b912a644b5e22f9a2de7",
8
+ "size": 2377
9
+ },
10
+ {
11
+ "path": "artifacts/zkgpt/zkGPT-002.json",
12
+ "sha256": "1a136b9d5789ca0ab40dc069097e0f0793218ce4e037671c21ff0aba8bda72ce",
13
+ "size": 1911
14
+ },
15
+ {
16
+ "path": "artifacts/zkgpt/zkGPT-003.json",
17
+ "sha256": "3c45e388532ef68247dd0f1bea4a6a0aea5e8cfd7fe623762e4be8cd315d7f1d",
18
+ "size": 1818
19
+ },
20
+ {
21
+ "path": "artifacts/zkgpt/zkGPT-004.json",
22
+ "sha256": "198a900ac85c1504d81b269c30fb8239dd558d5dd5fe90effeef39205607cf75",
23
+ "size": 2163
24
+ },
25
+ {
26
+ "path": "artifacts/zkgpt/zkGPT-005.json",
27
+ "sha256": "1eb1b9eae9b97b79c41868f14c2f14303b6309df739789d5a70e5871c25dba71",
28
+ "size": 1970
29
+ },
30
+ {
31
+ "path": "artifacts/zkgpt/zkGPT-006.json",
32
+ "sha256": "9788706cda9bb05a67a3d829710ebe82a986ed9e2d85fb45be2f3d40678fce10",
33
+ "size": 2081
34
+ },
35
+ {
36
+ "path": "artifacts/zkgpt/zkGPT-007.json",
37
+ "sha256": "328c755f95b141ffc80978fcddbbe668bd755c39ec5f1db57a63c9101da2cc80",
38
+ "size": 1846
39
+ },
40
+ {
41
+ "path": "artifacts/zkgpt/zkGPT-008.json",
42
+ "sha256": "3e070cd5f6a45242214ec30e313992a83374d0bd6a2557af5b6e72e11d8729e6",
43
+ "size": 2076
44
+ },
45
+ {
46
+ "path": "artifacts/zkgpt/zkGPT-010.json",
47
+ "sha256": "4ed78a23cbd8392dcaf0d842a66e75cbe5bdefe92dddff564e384fa49b37f27c",
48
+ "size": 1738
49
+ },
50
+ {
51
+ "path": "artifacts/zkgpt/zkGPT-011.json",
52
+ "sha256": "fbc5e1116831835278971655c69b0cff62d3e653a51ae653d0ecca3f0a6c779f",
53
+ "size": 2009
54
+ },
55
+ {
56
+ "path": "artifacts/zkgpt/zkGPT-012.json",
57
+ "sha256": "7e676d9d6f771df690928d3824a25d671f8222750131738a289d04c5b68ebf7d",
58
+ "size": 2114
59
+ },
60
+ {
61
+ "path": "artifacts/zkgpt/zkGPT-013.json",
62
+ "sha256": "05bb0e40590233526f7f38e7a0711f3737e8eafc72b49d5e6806678008c704a9",
63
+ "size": 2096
64
+ },
65
+ {
66
+ "path": "artifacts/zkgpt/zkGPT-014.json",
67
+ "sha256": "3497370374ba97f0293837b693d118e3749f32025819add21e95f27ddf8a6744",
68
+ "size": 2245
69
+ },
70
+ {
71
+ "path": "artifacts/zkgpt/zkGPT-015.json",
72
+ "sha256": "b3b68a31e52929e52b0f9871255020106690b831c153ff5c89cc8099e7fea24c",
73
+ "size": 1879
74
+ },
75
+ {
76
+ "path": "artifacts/zkllm/zkLLM-001.json",
77
+ "sha256": "ea0806298ee4a573af3797a64ff1605788f2ed1819582e9a10e6ebc60f9155ad",
78
+ "size": 1790
79
+ },
80
+ {
81
+ "path": "artifacts/zkllm/zkLLM-002.json",
82
+ "sha256": "aa2e9106118ed05dde58a5abac5eeed626df15e524262355a1ed705ff3961ad5",
83
+ "size": 1654
84
+ },
85
+ {
86
+ "path": "artifacts/zkllm/zkLLM-003.json",
87
+ "sha256": "1f0beba261f02ada858940062a06f5e54b893d396f87142bbc10876b0d93e423",
88
+ "size": 1672
89
+ },
90
+ {
91
+ "path": "artifacts/zkllm/zkLLM-004.json",
92
+ "sha256": "71fca19dcbf5cb6856cc31386b8313685370ca0c47408f3881e3cb0d499f7070",
93
+ "size": 1762
94
+ },
95
+ {
96
+ "path": "artifacts/zkllm/zkLLM-005.json",
97
+ "sha256": "9fde15e0db8729e5344003ce2e552c2be4fe12218d8257198b77159a0a9756d6",
98
+ "size": 1588
99
+ },
100
+ {
101
+ "path": "artifacts/zkllm/zkLLM-006.json",
102
+ "sha256": "42be157c3f583b49102caa171e269b756c03e381c793ee39f2b7ad0a1980dcc9",
103
+ "size": 1965
104
+ },
105
+ {
106
+ "path": "artifacts/zkllm/zkLLM-007.json",
107
+ "sha256": "7e52355dadf8b85dc3785337dc8d4dcbaabed55d2221fdcfd3a9d868f6b343ee",
108
+ "size": 1599
109
+ },
110
+ {
111
+ "path": "artifacts/zkllm/zkLLM-008.json",
112
+ "sha256": "d9a9b898b6d9c2e5548cd20a06078af97051d252d7a28f3c158c2ac73834301a",
113
+ "size": 1776
114
+ },
115
+ {
116
+ "path": "artifacts/zkllm/zkLLM-011.json",
117
+ "sha256": "516048347f6405bdce6746fe292cc2d7405519a22d7ed95e29bc928f8c8e00f6",
118
+ "size": 1725
119
+ },
120
+ {
121
+ "path": "artifacts/zkllm/zkLLM-012.json",
122
+ "sha256": "36d371ecad36d7bac9d052ca44fd6fd28fb54147ce9d874b67ccc61d25457e98",
123
+ "size": 1933
124
+ },
125
+ {
126
+ "path": "artifacts/zkllm/zkLLM-013.json",
127
+ "sha256": "6c11cbc54c4e8e3c96aa565cbf7e9a4a13b948ad581ecedc4fe3b8dde42b1f2c",
128
+ "size": 2188
129
+ },
130
+ {
131
+ "path": "artifacts/zkllm/zkLLM-014.json",
132
+ "sha256": "10a5ce2028f31a4a1d561e2a770b821f1e08f18b077c5655450196e683bd6049",
133
+ "size": 2681
134
+ },
135
+ {
136
+ "path": "artifacts/zkllm/zkLLM-015.json",
137
+ "sha256": "2e90448309148efe738604e499b90b233f18be656084a269be92abb233239827",
138
+ "size": 2352
139
+ },
140
+ {
141
+ "path": "artifacts/zkml/zkML-001.json",
142
+ "sha256": "092696152b9141136bda956e494e0136f58082edfef2c750ad98ee6f963af007",
143
+ "size": 1628
144
+ },
145
+ {
146
+ "path": "artifacts/zkml/zkML-002.json",
147
+ "sha256": "3c66b05c2efd13e7b1263c39856b4953be27e54a66c740de8bb7fab0a25a6715",
148
+ "size": 1572
149
+ },
150
+ {
151
+ "path": "artifacts/zkml/zkML-003.json",
152
+ "sha256": "a446b3a09d5aba59e154bbe8d05dd48ef9b66d8b22f2f1883cdbebff76dc3c93",
153
+ "size": 2104
154
+ },
155
+ {
156
+ "path": "artifacts/zkml/zkML-004.json",
157
+ "sha256": "414dc525609f057f990170c4e13b990ac53bda9fbb90586252ec3961dcdefb65",
158
+ "size": 2097
159
+ },
160
+ {
161
+ "path": "artifacts/zkml/zkML-005.json",
162
+ "sha256": "10eedf495816597cb95d74aed88959bf32db3e7017c705397102ee231753fd48",
163
+ "size": 1807
164
+ },
165
+ {
166
+ "path": "artifacts/zkml/zkML-006.json",
167
+ "sha256": "c15cc00e82bde002ae161475b2e6b2e8c41daeb1d3fae516fbf3261a4e6cf06e",
168
+ "size": 1674
169
+ },
170
+ {
171
+ "path": "artifacts/zkml/zkML-007.json",
172
+ "sha256": "456567d9293758a85e0bad8e9dc1f864571cc9cd93cebf2a9edb9e139b02549c",
173
+ "size": 1613
174
+ },
175
+ {
176
+ "path": "artifacts/zkml/zkML-008.json",
177
+ "sha256": "d8cc31785873bb331a81f85c8566de939897bed3be293dc08709f319145d627b",
178
+ "size": 1831
179
+ },
180
+ {
181
+ "path": "artifacts/zkml/zkML-010.json",
182
+ "sha256": "f315e546c92cde6f1ae9e15c523877463c30fb26909a403e88da21b1c9b7ce0f",
183
+ "size": 2365
184
+ },
185
+ {
186
+ "path": "artifacts/zkml/zkML-011.json",
187
+ "sha256": "daf38ec12f4cdd9d256515237ec5cc2ea3b66d4e699b8066ebb254b9aa839198",
188
+ "size": 2303
189
+ },
190
+ {
191
+ "path": "artifacts/zkml/zkML-012.json",
192
+ "sha256": "a5ed1c56830489a8a7b2d51bed3caea3ba383e6bb4ee19c8361947a115b3d86c",
193
+ "size": 2655
194
+ },
195
+ {
196
+ "path": "artifacts/zkml/zkML-013.json",
197
+ "sha256": "65c7394c84f4eeee4e16b068a8e8b21b3df498db29cae08c7ed5ffdd1e554f22",
198
+ "size": 2490
199
+ },
200
+ {
201
+ "path": "artifacts/zkml/zkML-014.json",
202
+ "sha256": "1d6bfa0bfe823303f640245e69b60963f7396bc1e63763bb9453264476ec269d",
203
+ "size": 2432
204
+ },
205
+ {
206
+ "path": "artifacts/zkml/zkML-015.json",
207
+ "sha256": "0385b612341be2b77ac09f7cb05f63776e196e946b9ad86714969dd2e5a44305",
208
+ "size": 1947
209
+ },
210
+ {
211
+ "path": "artifacts/zktorch/zkTorch-001.json",
212
+ "sha256": "047283727b278ab955bf03b4dd11fd1190c8f6d767aebeb0c196dcff0b8bfb7a",
213
+ "size": 1696
214
+ },
215
+ {
216
+ "path": "artifacts/zktorch/zkTorch-002.json",
217
+ "sha256": "31b7811258b0ee1ccaedfc247f7ce67ecd6b0dd16f2695c584649dc65773a4ac",
218
+ "size": 1570
219
+ },
220
+ {
221
+ "path": "artifacts/zktorch/zkTorch-003.json",
222
+ "sha256": "20a39d6cef8fecfa72f36387f423b3a9f2350225f13cb18067527b658bd0bfae",
223
+ "size": 1890
224
+ },
225
+ {
226
+ "path": "artifacts/zktorch/zkTorch-004.json",
227
+ "sha256": "9aa23dd10ca8b43a3c341898f9d54e77c2f06c25d4b98c56506f96540c8940e0",
228
+ "size": 1884
229
+ },
230
+ {
231
+ "path": "artifacts/zktorch/zkTorch-005.json",
232
+ "sha256": "9fd0252e691156f658f49ed82852cf0d3033db7e1ebd8ae25bb4b3743dff70aa",
233
+ "size": 2082
234
+ },
235
+ {
236
+ "path": "artifacts/zktorch/zkTorch-006.json",
237
+ "sha256": "8f456653304f8700617b4cacaa2f0f96f4be6c65effdced15225674e5059b354",
238
+ "size": 1930
239
+ },
240
+ {
241
+ "path": "artifacts/zktorch/zkTorch-007.json",
242
+ "sha256": "6175a26abf5c1dba3c8f1733f22aa10a0186826dbbeb0e13d5ecbb3223913fd4",
243
+ "size": 2049
244
+ },
245
+ {
246
+ "path": "artifacts/zktorch/zkTorch-008.json",
247
+ "sha256": "97cdc9ed8240e70fc60b2de6e016c461b26723d17a9ce427bba9ee1383a38e7f",
248
+ "size": 2292
249
+ },
250
+ {
251
+ "path": "artifacts/zktorch/zkTorch-010.json",
252
+ "sha256": "faaa03638ef31b975facbbaf733d7a1793a34792d423e441ac48bfb0b2e90aba",
253
+ "size": 2337
254
+ },
255
+ {
256
+ "path": "artifacts/zktorch/zkTorch-011.json",
257
+ "sha256": "4c25d72ba20401938861a45f56775f3678c1c6afcf166bbf97e910f1d7d01389",
258
+ "size": 2131
259
+ },
260
+ {
261
+ "path": "artifacts/zktorch/zkTorch-012.json",
262
+ "sha256": "4d28ea9be1c107ea6b7d0e2028ee3597863cc223f8909173a1654e3085d746f2",
263
+ "size": 2234
264
+ },
265
+ {
266
+ "path": "artifacts/zktorch/zkTorch-013.json",
267
+ "sha256": "69509c0caca77614284bc84d95c51bd23e393e4af075ce85679db4eb479b5bc8",
268
+ "size": 2384
269
+ },
270
+ {
271
+ "path": "artifacts/zktorch/zkTorch-014.json",
272
+ "sha256": "368f0c68c17d0854960864abb49067cfc6485d0f164f9ea20b95b49aa3782434",
273
+ "size": 2206
274
+ },
275
+ {
276
+ "path": "artifacts/zktorch/zkTorch-015.json",
277
+ "sha256": "0094c74ebac46b7bb5050c8a4bf2b1c358d87138c3ea5198340ac0c3e19845b0",
278
+ "size": 2504
279
+ },
280
+ {
281
+ "path": "artifacts/zktorch/zkTorch-016.json",
282
+ "sha256": "7570df6ad7517beff21003050f7c6f454dd7384c5e901a53dfd8b9d3146c0942",
283
+ "size": 1800
284
+ },
285
+ {
286
+ "path": "codebases/zkgpt.zip",
287
+ "sha256": "7d5c4fbd8a4825054bcc8be46590bcdc8a201406735a72004b944fadd933198e",
288
+ "size": 674679
289
+ },
290
+ {
291
+ "path": "codebases/zkllm.zip",
292
+ "sha256": "e8979bdf169bd6125257b721c968cc4fffc1feb521656880a85c09cbad9cce78",
293
+ "size": 262872
294
+ },
295
+ {
296
+ "path": "codebases/zkml.zip",
297
+ "sha256": "d872d402c164bba79e99fa47aadea827268a1f5754c1c550efcbe70ee9c48c51",
298
+ "size": 27915998
299
+ },
300
+ {
301
+ "path": "codebases/zktorch.zip",
302
+ "sha256": "a7e8036d7598d80bdfa34da00bac0ba01e1f6e5f7e9437b021fd13925d2a0e26",
303
+ "size": 259897
304
+ },
305
+ {
306
+ "path": "papers/zkgpt.pdf",
307
+ "sha256": "2acc64d6b27eaed48cd4895aaec1b5cca8acc7473e7ff8015c041c98b9b35ff2",
308
+ "size": 561267
309
+ },
310
+ {
311
+ "path": "papers/zkllm.pdf",
312
+ "sha256": "39f2a2f29457072573574c21ca9da7e0bbca756bf7031dd877f3c366f1e2ad7d",
313
+ "size": 1116955
314
+ },
315
+ {
316
+ "path": "papers/zkml.pdf",
317
+ "sha256": "ac7b5e3fb44bafc445e0506cda8d4696ed2d8733bebe6d599897274d57740295",
318
+ "size": 973543
319
+ },
320
+ {
321
+ "path": "papers/zktorch.pdf",
322
+ "sha256": "2fa9225c84c7905fe21d41a25971cc515aaf23c24623cf11fa179232303b35f7",
323
+ "size": 860413
324
+ }
325
+ ]
326
+ }
README.md ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - other
7
+ tags:
8
+ - zero-knowledge
9
+ - zkml
10
+ - benchmarking
11
+ - soundness
12
+ - cryptography
13
+ - auditing
14
+ - security
15
+ configs:
16
+ - config_name: pairs
17
+ data_files: data/pairs.parquet
18
+ - config_name: artifacts
19
+ data_files: data/artifacts.parquet
20
+ size_categories:
21
+ - n<1K
22
+ ---
23
+
24
+ # zkml-audit-benchmark
25
+
26
+ A benchmark dataset for evaluating AI agents on **zkML soundness auditing**: finding cryptographic vulnerabilities in zero-knowledge machine learning proof implementations.
27
+
28
+ ## Overview
29
+
30
+ This dataset pairs **4 published zkML research papers** with their corresponding **frozen codebase snapshots** and **56 bug artifacts (20 real-world from expert audits + 36 synthetic for broader coverage)**. Each artifact describes a single soundness vulnerability — the code edits to inject it, ground-truth labels for scoring, and presence probes for post-injection validation
31
+
32
+ The benchmark supports two complementary workflows:
33
+
34
+ 1. **Pair extraction** — load a (paper, codebase) pair for an agent to audit.
35
+ 2. **Test-case generation** — sample artifacts and apply their edit logic to the clean codebase, producing flawed codebases with known ground-truth findings.
36
+
37
+ ## Documentation
38
+
39
+ - [DATASHEET.md](DATASHEET.md) — datasheet for this dataset, following Gebru et al. 2021.
40
+ - [CONTRIBUTING.md](CONTRIBUTING.md) — how to add new (paper, codebase) pairs and bug artifacts.
41
+ - [CHANGELOG.md](CHANGELOG.md) — release history and label/codebase corrections.
42
+ - [schema/artifact.v2.schema.json](schema/artifact.v2.schema.json) — authoritative JSON schema for bug artifacts.
43
+
44
+ ## Positioning vs. Existing Security Benchmarks
45
+
46
+ Several mature benchmarks evaluate code-security tooling, but none target the **theory-to-implementation gap** that defines zkML soundness. The table below contrasts the design axes that matter for this setting: domain coverage, the granularity of the ground-truth labels, and whether artifacts are paired with the academic claims they implement.
47
+
48
+ | Benchmark | Domain | Artifact granularity | Theory-paired | ZKP-aware |
49
+ |-----------|--------|----------------------|:-------------:|:---------:|
50
+ | [Juliet test suite](https://samate.nist.gov/SARD/test-suites) | General C/C++/Java security | CWE-class injections | no | no |
51
+ | [OWASP Benchmark](https://owasp.org/www-project-benchmark/) | Web/Java security | OWASP-class injections | no | no |
52
+ | [NIST CAVP](https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program) | Standardized crypto implementations | Test-vector validation | no | partial |
53
+ | **`zkml-audit-benchmark` (this dataset)** | **zkML soundness** | **Per-claim soundness gap** | **yes** | **yes** |
54
+
55
+ Juliet ships tens of thousands of injected vulnerabilities for general-purpose code, but its labels are generic CWE classes rather than per-paper soundness claims. The OWASP Benchmark is web-application focused, and the NIST Cryptographic Algorithm Validation Program validates implementations of *standardized* primitives, not bespoke proof-system protocols. By contrast, this benchmark ships paper–codebase pairs together with declarative artifact specifications that re-introduce a precisely characterized soundness gap, making it directly suitable for studying theory-to-practice alignment in zkML.
56
+
57
+ ## Dataset Structure
58
+
59
+ ### Configs
60
+
61
+ | Config | Rows | Description |
62
+ |--------|------|-------------|
63
+ | `pairs` | 4 | One row per (paper, codebase) pair |
64
+ | `artifacts` | 56 | One row per bug artifact (flattened metadata) |
65
+
66
+ ### Loading
67
+
68
+ ```python
69
+ from datasets import load_dataset
70
+
71
+ pairs = load_dataset("anonymous-zkml-benchmark/zkml-audit-benchmark", "pairs")
72
+ artifacts = load_dataset("anonymous-zkml-benchmark/zkml-audit-benchmark", "artifacts")
73
+ ```
74
+
75
+ ### Raw Files
76
+
77
+ Beyond the Parquet tables, the repository includes:
78
+
79
+ - `papers/{pair_id}.pdf` — research paper PDFs
80
+ - `codebases/{pair_id}.zip` — frozen codebase snapshots (Git LFS)
81
+ - `artifacts/{pair_id}/*.json` — full artifact JSONs with edit instructions, conflict metadata, and presence probes
82
+ - `schema/artifact.v2.schema.json` — JSON Schema defining the artifact format
83
+
84
+ The Parquet tables contain flattened metadata for filtering and loading. The full artifact JSONs (with heterogeneous edit/probe structures) are the authoritative source for test-case generation.
85
+
86
+ ## Data Fields
87
+
88
+ ### `pairs` config
89
+
90
+ | Field | Type | Description |
91
+ |-------|------|-------------|
92
+ | `pair_id` | string | Primary key: `zkllm`, `zkml`, `zktorch`, `zkgpt` |
93
+ | `paper_title` | string | Full paper title |
94
+ | `paper_venue` | string | Publication venue |
95
+ | `paper_year` | int32 | Publication year |
96
+ | `paper_license` | string | Paper redistribution terms |
97
+ | `paper_url` | string | arXiv or publisher URL (empty if unavailable) |
98
+ | `paper_path` | string | Relative path to PDF: `papers/{pair_id}.pdf` |
99
+ | `paper_sha256` | string | SHA256 hash of the PDF |
100
+ | `codebase_path` | string | Relative path to zip: `codebases/{pair_id}.zip` |
101
+ | `codebase_dir` | string | Directory name after extraction |
102
+ | `codebase_sha256` | string | SHA256 hash of the zip |
103
+ | `codebase_language` | string | Primary implementation language |
104
+ | `codebase_frameworks` | list\<string\> | Key cryptographic frameworks used |
105
+ | `codebase_snapshot_note` | string | Commit hash or snapshot date |
106
+ | `artifact_count` | int32 | Number of artifacts targeting this pair |
107
+ | `notes` | string | Caveats or special build instructions |
108
+
109
+ ### `artifacts` config
110
+
111
+ | Field | Type | Description |
112
+ |-------|------|-------------|
113
+ | `artifact_id` | string | Primary key, e.g. `zkLLM-001` |
114
+ | `pair_id` | string | Foreign key → `pairs` |
115
+ | `source` | string | `real` (from audit) or `synthetic` (authored for coverage) |
116
+ | `finding_name` | string | Short vulnerability title (3–7 words) |
117
+ | `finding_explanation` | string | One paragraph: root cause and impact |
118
+ | `relevant_code` | string | Comma-separated `file:line[-line]` references |
119
+ | `paper_reference` | string | Section/theorem/protocol citation with optional quote |
120
+ | `edit_count` | int32 | Number of code edits to inject this bug |
121
+ | `files_touched` | list\<string\> | Files modified by this artifact's edits |
122
+ | `semantic_tags` | list\<string\> | Semantic labels for conflict detection |
123
+ | `requires` | list\<string\> | Artifact IDs this depends on |
124
+ | `incompatible` | list\<string\> | Artifact IDs incompatible with this one |
125
+ | `artifact_path` | string | Relative path to full artifact JSON |
126
+ | `artifact_sha256` | string | SHA256 hash of the artifact JSON |
127
+
128
+ ## Pair Inventory
129
+
130
+ | pair_id | Paper | Venue | Language | Artifacts | Snapshot |
131
+ |---------|-------|-------|----------|-----------|----------|
132
+ | `zkllm` | zkLLM: Zero Knowledge Proofs for Large Language Models | ACM CCS 2024 | CUDA/C++ | 13 | commit `993311e…` |
133
+ | `zkml` | ZKML: An Optimizing System for ML Inference in Zero-Knowledge Proofs | EuroSys 2024 | Rust | 14 | commit `4378958…` ([ddkang/zkml](https://github.com/ddkang/zkml)) |
134
+ | `zktorch` | ZKTorch: Compiling ML Inference to Zero-Knowledge Proofs via Parallel Proof Accumulation | arXiv | Rust | 15 | directory snapshot 2026-04-19 |
135
+ | `zkgpt` | zkGPT: An Efficient Non-interactive Zero-knowledge Proof Framework for LLM Inference | USENIX Security 2025 | C++ | 14 | Zenodo record [14727819 v1](https://zenodo.org/records/14727819) |
136
+
137
+ ## Artifact Summary
138
+
139
+ - **Total artifacts:** 56 (14 zkGPT + 13 zkLLM + 14 zkML + 15 zkTorch)
140
+ - **Source breakdown:** 20 real (derived from expert audit reports), 36 synthetic (authored for broader coverage)
141
+ - Each artifact includes declarative code edits, conflict metadata for safe composition, and presence probes for post-injection validation
142
+
143
+ ## Reproducibility
144
+
145
+ All files are checksummed in `MANIFEST.json`. To verify integrity:
146
+
147
+ ```bash
148
+ python scripts/verify_dataset.py
149
+ ```
150
+
151
+ To rebuild the Parquet tables from the in-repo artifact JSONs:
152
+
153
+ ```bash
154
+ python scripts/build_parquet.py
155
+ ```
156
+
157
+ ## Known Limitations & Assumptions
158
+
159
+ 1. **Paper ↔ codebase mapping** uses fixed pair IDs (`zkllm`, `zkml`, `zktorch`, `zkgpt`) defined in `scripts/build_parquet.py`.
160
+
161
+ 2. **Non-git snapshots:** The `zktorch` codebase is a directory snapshot dated 2026-04-19 and cannot be pinned to an upstream commit. `zkllm` and `zkml` are pinned to Git commits (`993311ea…` and `4378958…` respectively). `zkgpt` is pinned to Zenodo record [14727819 v1](https://zenodo.org/records/14727819).
162
+
163
+ 3. **Paper licensing:** PDFs are included for research reproducibility. The dataset-level CC-BY-4.0 license covers only the curation layer (artifact definitions, schema, scripts). Papers carry their respective publisher terms (ACM, arXiv). Users redistribute at their own responsibility.
164
+
165
+ 4. **Artifact format:** Artifacts follow `schema/artifact.v2.schema.json`. All graded labels live under `finding.labels`.
166
+
167
+ 5. **Scope:** This release covers 4 of the 10 available research papers — specifically those with paired frozen codebases and authored artifacts. Remaining papers may be added in future releases.
168
+
169
+ ## Schema Reference
170
+
171
+ The artifact JSON format is defined by `schema/artifact.v2.schema.json`. Key structures:
172
+
173
+ - `finding.labels` — the two graded fields (`relevant_code`, `paper_reference`)
174
+ - `edits` — ordered list of code edits to inject the bug
175
+ - `conflict_keys` — files, regions, and semantic tags for safe composition
176
+ - `presence_probes` — assertions to verify successful injection
177
+
178
+ ## Citation
179
+
180
+ If you use this dataset, please cite:
181
+
182
+ ```bibtex
183
+ @misc{zkml-audit-benchmark,
184
+ title={zkml-audit-benchmark: A Benchmark for AI Agents on zkML Soundness Auditing},
185
+ author={Anonymous},
186
+ year={2026},
187
+ url={https://huggingface.co/datasets/anonymous-zkml-benchmark/zkml-audit-benchmark},
188
+ }
189
+ ```
190
+
191
+ ## License
192
+
193
+ - **Dataset curation layer** (artifacts, schema, scripts, documentation): [CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)
194
+ - **Codebases:** retain their original upstream licenses (see each codebase's LICENSE file inside the zip)
195
+ - **Papers:** subject to respective publisher terms
artifacts/zkgpt/zkGPT-001.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-001",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Hyrax Commitment Before LogUp Witness Appended",
7
+ "explanation": "The fixed code appends the LogUp lookup witness to val[0] before invoking pr.commitInput, so the Hyrax commitment binds the full witness including lookup entries. After injection, commitInput runs before append_to_witness, so the commitment covers only the pre-LogUp witness. A malicious prover can then substitute arbitrary lookup entries without the verifier detecting the mismatch, because nothing was committed to them.",
8
+ "labels": {
9
+ "relevant_code": "src/neuralNetwork.cpp:375",
10
+ "paper_reference": "Protocol 1 Step (1): P commits to aux and L before V derives challenges. All witness material (including lookup auxiliary values) must be bound by the commitment before the verifier proceeds."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/neuralNetwork.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 375,
20
+ "end": 389,
21
+ "expect_sha256": "034f020e6babd04472b48c8b35b62db8261352d2a5872c31a5491e9338d0b187"
22
+ },
23
+ "new_content": "\n initLayer(pr.C.circuit[0], total_in_size, layerType::INPUT);\n assert(total_in_size == pr.val[0].size());\n\n timer T;\n int logn = pr.C.circuit[0].bit_length;\n u64 n_sqrt = 1ULL << (logn - (logn >> 1));\n pr.gens.resize(n_sqrt);\n G1 base=gen_gi(pr.gens.data(),n_sqrt);\n pr.gens.push_back(base);\n T.start();\n pr.commitInput(pr.gens,32);\n pr.lookup.append_to_witness(pr.val[0], total_in_size, table);"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/neuralNetwork.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/neuralNetwork.cpp",
33
+ "start": 373,
34
+ "end": 395
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "commit_logup_ordering"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/neuralNetwork.cpp",
47
+ "text": "pr.commitInput(pr.gens,32);\n pr.lookup.append_to_witness"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/neuralNetwork.cpp",
52
+ "text": "append_to_witness(pr.val[0], total_in_size, table);\n\n initLayer"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-002.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-002",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Lasso Sum Verification Assert Removed",
7
+ "explanation": "The Lasso/GKR sumcheck verification at verifier.cpp:826-827 checks that previousSum == g0 + g1 via a C++ assert() every round i != n. The injection deletes this if/assert pair entirely, so no per-round sumcheck check runs. Even when compiled with NDEBUG the original assert would be a no-op, but deleting the lines also removes any conditional side-effect and makes the intent clear: the Lasso lookup protocol's range-check sumcheck is no longer verified at all.",
8
+ "labels": {
9
+ "relevant_code": "src/verifier.cpp:826",
10
+ "paper_reference": "Section 2.3 (Lasso lookup protocol for range and exponentiation relations); Section 4.3 leveraging Lasso for non-arithmetic relations; Protocol 1 Step (3) Lasso invoked on range-check and exponentiation tables."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/verifier.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 826,
20
+ "end": 827,
21
+ "expect_sha256": "6bbe4e5161e3741fe00aae55136a7092cfc9fc05c4c94b195b7dfbdb224c1956"
22
+ },
23
+ "new_content": " // sumcheck assert removed"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/verifier.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/verifier.cpp",
33
+ "start": 823,
34
+ "end": 830
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "lasso_sum_verification"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/verifier.cpp",
47
+ "text": "sumcheck assert removed"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/verifier.cpp",
52
+ "text": "assert(previousSum==g0+g1)"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-003.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-003",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "FC Layer Bias Addition Removed",
7
+ "explanation": "The fully-connected layer initializes val[layer_id][g] with the bias val[0][first_bias_id + co] and registers a uni_gate enforcing that equality before the matmul inner loop. The injection replaces both lines with val[layer_id][g]=0 and removes the uni_gate emplace. The circuit then proves Wx (no bias) instead of Wx+b for every FC layer, producing incorrect outputs for any GPT-2 sublayer that uses biases (which every linear layer does).",
8
+ "labels": {
9
+ "relevant_code": "src/neuralNetwork.cpp:1428",
10
+ "paper_reference": "Section 4 (Gadget composition); F-7 of Batch-Reports/v0.10/zkgpt_report.md."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/neuralNetwork.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 1428,
20
+ "end": 1429,
21
+ "expect_sha256": "9facf640e452e13cad753856baf6b0a8757722b380709169a54eec9caa7d7d55"
22
+ },
23
+ "new_content": " val[layer_id][g]=0;"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/neuralNetwork.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/neuralNetwork.cpp",
33
+ "start": 1425,
34
+ "end": 1435
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "fc_bias_gate"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "src/neuralNetwork.cpp",
47
+ "text": "uni_gates.emplace_back(g, first_bias_id + co, 0, 1)"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/neuralNetwork.cpp",
52
+ "text": "val[layer_id][g]=val[0][first_bias_id + co]"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-004.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-004",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "LayerNorm Gamma and Beta Collapsed to Identity",
7
+ "explanation": "The fixed code seeds gamma with 1 + (i%3) and beta with (i%33)-16 so the committed LayerNorm parameters are non-trivial and bound by the subsequent addRangeBatch calls. The injection replaces both loops with gamma=1 and beta=0 across all channels, turning every LayerNorm into an identity transform. The values are still committed, but they no longer correspond to any trained model — the proof attests to a network whose normalization layers do nothing. Matches F-2 of zkgpt_report.md (LayerNorm parameters hardcoded, not loaded from model).",
8
+ "labels": {
9
+ "relevant_code": "src/neuralNetwork.cpp:452",
10
+ "paper_reference": "Section 4.1 (Normalization constraints): y_ij = gamma_j * (x_ij - mu_i)/sigma_i + beta_j; collapsing gamma to 1 and beta to 0 makes the normalization a pure pass-through after the mean/var subtraction."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/neuralNetwork.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 452,
20
+ "end": 455,
21
+ "expect_sha256": "a710b2a2c250716c0769d212b33c7ef8fef7c84302c080a2ea9b27534aab6118"
22
+ },
23
+ "new_content": " for(int i=0;i<channel_out;i++)\n val[0][i+layer_norm_w_q_start[ln_id]] = 1;\n for(int i=0;i<channel_out;i++)\n val[0][i+layer_norm_b_q_start[ln_id]] = 0;"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/neuralNetwork.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/neuralNetwork.cpp",
33
+ "start": 449,
34
+ "end": 465
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "layernorm_params"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/neuralNetwork.cpp",
47
+ "text": "val[0][i+layer_norm_b_q_start[ln_id]] = 0;"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/neuralNetwork.cpp",
52
+ "text": "= 1 + (i % 3)"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-005.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-005",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "FC Weight Matrix Zeroed Instead of Loaded",
7
+ "explanation": "The fixed readFconWeight seeds each in-range weight mat_values[id][co*channel_in+ci] with a deterministic (co*channel_in+ci)%1024 placeholder (already a mock — flagged by zkgpt_report.md F-4). The injection replaces that with a constant 0, so every committed weight is zero. val_0 (which is val[0][first_fc_id + ...]) is then also set to zero on line 1539. The circuit proves Wx = 0 for any x, turning every FC layer into a no-op. No real GPT-2 weights are ever bound to the commitment.",
8
+ "labels": {
9
+ "relevant_code": "src/neuralNetwork.cpp:1538",
10
+ "paper_reference": "F-4 of Batch-Reports/v0.10/zkgpt_report.md (Mock weight data); Section 4 (model-binding via commitment)."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/neuralNetwork.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 1538,
20
+ "end": 1538,
21
+ "expect_sha256": "b0b0fc18aa5ec430e0a1873f9fecdbeed29682bcd08a4cc8336d92767debb240"
22
+ },
23
+ "new_content": " mat_values[id][co*channel_in+ci]=0;"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/neuralNetwork.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/neuralNetwork.cpp",
33
+ "start": 1533,
34
+ "end": 1546
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "weight_initialization"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/neuralNetwork.cpp",
47
+ "text": "mat_values[id][co*channel_in+ci]=0;\n val_0[co*channel_in+ci]=mat_values[id][co*channel_in+ci];"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/neuralNetwork.cpp",
52
+ "text": "(co*channel_in+ci)%1024"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-006.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-006",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "LogUp Out-Of-Range Query Silently Clamped",
7
+ "explanation": "The fixed LogUp append loop checks each query index against the multiplicity table size; if the index is out of range it prints a warning and uses `continue` to skip incrementing, so out-of-range queries are intentionally left uncounted and verify() later rejects the mismatch. The injection replaces the entire if-block with a silent clamp: out-of-range indices are rewritten to 0 and still counted via ++m[idx]. This lets the prover smuggle values outside the range-check table into the witness — the verifier's grand-product check passes because the multiplicity vector is internally consistent, but the queried value never matched any valid table entry.",
8
+ "labels": {
9
+ "relevant_code": "src/logup.cpp:72",
10
+ "paper_reference": "Section 2.3 (LogUp grand-product requires exact multiplicity counts); any deviation breaks the sumcheck identity that ties query and table multisets."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/logup.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 72,
20
+ "end": 78,
21
+ "expect_sha256": "590cb123cd9d4e70a1ae44b1cbae8a2e60b47c729531597daed672b60aff6a75"
22
+ },
23
+ "new_content": " if (idx < 0 || (std::size_t)idx >= m.size()) {\n idx = 0;\n }"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/logup.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/logup.cpp",
33
+ "start": 69,
34
+ "end": 81
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "logup_counter_bounds"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/logup.cpp",
47
+ "text": "idx = 0;\n }"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/logup.cpp",
52
+ "text": "WARNING: query out of range"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-007.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-007",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Verifier Prove Function Short-Circuits To True",
7
+ "explanation": "verifier::prove is the top-level verification driver — it invokes verifyGKR, verifyLasso, and verifyLookups and ANDs the three results into a final accept/reject. The injection replaces the local `bool ok = true;` at line 192 with `return true;`, so the function returns success before any sub-verifier runs. All GKR, Lasso, and LogUp checks become dead code; every proof is accepted, regardless of validity.",
8
+ "labels": {
9
+ "relevant_code": "src/verifier.cpp:192",
10
+ "paper_reference": "Protocol 1 Step (3-5): the verifier must execute all sumcheck, GKR, and Lasso subprotocols before accepting. Skipping them is a stub.empty_verify per taxonomy."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/verifier.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 192,
20
+ "end": 192,
21
+ "expect_sha256": "500e48d45e38f8ee5c87b193fc7278bd0f259825d21cbfda8f2d6a2d7302ba9b"
22
+ },
23
+ "new_content": " return true; // verification short-circuited"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/verifier.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/verifier.cpp",
33
+ "start": 188,
34
+ "end": 200
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "verifier_prove_entry"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/verifier.cpp",
47
+ "text": "return true; // verification short-circuited"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/verifier.cpp",
52
+ "text": "bool ok = true;"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-008.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-008",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "LogUp Challenges Hardcoded To Fixed Values",
7
+ "explanation": "The LogUp grand-product argument draws two challenges per table: gamma (for the random-linear combination of tuple components) and alpha (for the rational-sum reduction). In the fixed code these are sampled via setByCSPRNG() — already a weakness (local PRNG, not transcript-bound), but at least unpredictable. The injection replaces both calls with Fr(42) and Fr(7), so the challenges are constants known in advance. A malicious prover can pre-compute a forgery that satisfies the LogUp identity for those specific challenge values without ever satisfying the underlying table membership.",
8
+ "labels": {
9
+ "relevant_code": "src/logup.cpp:167",
10
+ "paper_reference": "Section 3 (Technical Overview): Fiat-Shamir transformation requires challenges to be derived from a transcript that commits to all prior prover messages; hardcoded challenges allow adaptive forgery."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/logup.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 167,
20
+ "end": 168,
21
+ "expect_sha256": "1b4dd4f0696122ea6e2efc1d70df106e60f7ecdee463bb8938bbe41b8e0fd516"
22
+ },
23
+ "new_content": " gamma = Fr(42);\n alpha = Fr(7);"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/logup.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/logup.cpp",
33
+ "start": 164,
34
+ "end": 173
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "logup_challenge_derivation"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/logup.cpp",
47
+ "text": "gamma = Fr(42);\n alpha = Fr(7);"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/logup.cpp",
52
+ "text": "gamma.setByCSPRNG();\n alpha.setByCSPRNG();"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-010.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-010",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "GKR Layer Challenge Set To Constant",
7
+ "explanation": "Inside the GKR per-layer loop, the verifier samples a challenge vector r_u[i][j] via setByCSPRNG() for j in [0, m) and then copies r_v[i][j] = r_u[i][j]. The injection replaces the .setByCSPRNG() call on line 524 with an assignment to Fr(1), so every fresh GKR layer challenge is the constant 1 (and r_v copies it, so it is also 1). The Schwartz-Zippel binding between consecutive GKR layers now evaluates polynomials at a single known point rather than a random one, collapsing the per-layer soundness error.",
8
+ "labels": {
9
+ "paper_reference": "Section 4.2 (GKR per-layer sumcheck): the evaluation point for the next layer must be random to invoke Schwartz-Zippel.",
10
+ "relevant_code": "src/verifier.cpp:524"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/verifier.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 524,
20
+ "end": 524,
21
+ "expect_sha256": "34aeb35c2554b38d0c2d8d8d649ddf6b481c6fcecaf07a3103f0c369280d09e1"
22
+ },
23
+ "new_content": " r_u[i][j] = Fr(1);"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/verifier.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/verifier.cpp",
33
+ "start": 522,
34
+ "end": 526
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "gkr_layer_challenges"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/verifier.cpp",
47
+ "text": "r_u[i][j] = Fr(1);"
48
+ }
49
+ ]
50
+ }
artifacts/zkgpt/zkGPT-011.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-011",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Prover Vres Returns Zero Instead Of Output Evaluation",
7
+ "explanation": "Vres is the prover's evaluation of the final output polynomial at a verifier-sampled random point; its result seeds previousSum for the final GKR sumcheck. The injection replaces `F res = output[0];` with `F res = F_ZERO;`, so Vres always returns 0 regardless of the committed output. Combined with zkGPT's pre-existing design flaw (output is never pinned as a public instance value — F-3 of zkgpt_report.md), this lets a malicious prover declare any prediction while the verifier's sumcheck starts from a fabricated claim. The forgery is structurally unreachable by legitimate use: the verifier has no independent way to check what the model actually predicted.",
8
+ "labels": {
9
+ "relevant_code": "src/prover.cpp:562",
10
+ "paper_reference": "F-3 of Batch-Reports/v0.10/zkgpt_report.md (Output Not Exposed); Protocol 1 Step (5): verifier must independently provide or check y."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/prover.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 562,
20
+ "end": 562,
21
+ "expect_sha256": "b636ffd0311161e5ef0b85698e03e0dcf0ccf6fbe620e42b8981913c5d318595"
22
+ },
23
+ "new_content": " F res = F_ZERO;"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/prover.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/prover.cpp",
33
+ "start": 560,
34
+ "end": 566
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "vres_output_evaluation"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/prover.cpp",
47
+ "text": "F res = F_ZERO;"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/prover.cpp",
52
+ "text": "F res = output[0];"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-012.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-012",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Range Batch Registration Silently Dropped",
7
+ "explanation": "addRangeBatch is the entry point every layer uses to register range-check LookupQueries against the global LogUp queries_ vector (callers include LayerNorm gamma/beta, FC weights, attention scales, softmax normalization — 11 call sites across neuralNetwork.cpp). The injection replaces the reserve + push_back loop with a no-op, so addRangeBatch returns without recording any queries. The verifier's grand-product check then passes trivially (zero queries, zero multiplicities) while the prover freely uses values outside their declared bit-width — field-wraparound and accumulation-overflow forgeries become available across every gadget that relies on range_check.",
8
+ "labels": {
9
+ "relevant_code": "src/logup.cpp:42",
10
+ "paper_reference": "Section 2.3 (Lasso/LogUp range checks); any commit to a witness that claims bit-width B requires a range-check lookup against [0, 2^B)."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/logup.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 42,
20
+ "end": 45,
21
+ "expect_sha256": "6fb88935eba8248e397c06a6452966662464821caaedda82fc24a2f20039f97e"
22
+ },
23
+ "new_content": " (void)value_offset; (void)count; (void)t; // range-batch registration dropped"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/logup.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/logup.cpp",
33
+ "start": 40,
34
+ "end": 46
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "range_batch_registration"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/logup.cpp",
47
+ "text": "range-batch registration dropped"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/logup.cpp",
52
+ "text": "queries_.push_back(LookupQuery{ t, value_offset + i"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-013.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-013",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Softmax Exp Table Lookup Query Removed",
7
+ "explanation": "Softmax is implemented via an approximate exp lookup: the prover computes tj = round(c1 * 2^(e1+eprime+1) * (pmax-pj) / 2^(eprime+1)) and reads E_off = table[tj]. The addExpTableQuery call registers a LogUp query asserting that (tj, table[tj]) is a valid row of the committed exp table. The injection deletes this call, so E_off becomes a free witness: the prover can assign any value to val[0][E_off] without the LogUp argument noticing. Every softmax denominator sum and attention weight computed downstream is now prover-chosen.",
8
+ "labels": {
9
+ "relevant_code": "src/neuralNetwork.cpp:1229",
10
+ "paper_reference": "Section 4.2 (Softmax via exp approximation): the (input, output) pair must be validated against the committed table to bind the approximation; F-1 of Batch-Reports/v0.10/zkgpt_report.md flags the broader Lasso-incomplete pattern."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/neuralNetwork.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 1229,
20
+ "end": 1230,
21
+ "expect_sha256": "4166a0e768371706e28a253e682122537a5b69d8a1c7b9f56e8fba56c249cf6c"
22
+ },
23
+ "new_content": " // exp-table lookup query dropped"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/neuralNetwork.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/neuralNetwork.cpp",
33
+ "start": 1226,
34
+ "end": 1235
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "softmax_exp_lookup"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/neuralNetwork.cpp",
47
+ "text": "exp-table lookup query dropped"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/neuralNetwork.cpp",
52
+ "text": "lookup.addExpTableQuery(\n (std::size_t)t_off"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-014.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-014",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Softmax Scale Factor Evaluates to Unity",
7
+ "explanation": "The three softmax sub-layers pass pow(1,-8) as the exponential scale parameter. Because 1 raised to any power equals 1, the effective scale is 1.0 instead of the intended pow(2,-8) = 1/256. This inflates all softmax logits by a factor of 256 before the lookup table, pushing values entirely outside the table's representable range. The circuit silently accepts fabricated attention weights, allowing a malicious prover to commit to arbitrary softmax outputs that do not correspond to any correct computation.",
8
+ "labels": {
9
+ "paper_reference": "Section 4.1 (Softmax approximation): the exponential is evaluated via a lookup table indexed at scale 2^{-8}; substituting scale 1.0 renders the lookup domain incorrect.",
10
+ "relevant_code": "src/neuralNetwork.cpp:354-356"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/neuralNetwork.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 354,
20
+ "end": 356,
21
+ "expect_sha256": "ffdb5c87ca9ba4b41622f3cfbe13cc86979cf575bab9b97e05b671161effb7f3"
22
+ },
23
+ "new_content": " softmax_layer_1(pr.C.circuit[layer_id], layer_id,pow(2,e_C)*c_C,pow(2,e_C)*c_C,pow(2,e_C)*c_C,pow(1,-8));\n softmax_layer_2(pr.C.circuit[layer_id], layer_id,pow(2,e_C)*c_C,pow(2,e_C)*c_C,pow(2,e_C)*c_C,pow(1,-8));\n softmax_layer_3(pr.C.circuit[layer_id], layer_id,pow(2,e_C)*c_C,pow(2,e_C)*c_C,pow(2,e_C)*c_C,pow(1,-8));"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/neuralNetwork.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/neuralNetwork.cpp",
33
+ "start": 352,
34
+ "end": 358
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "softmax_scale_factor"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/neuralNetwork.cpp",
47
+ "text": "pow(1,-8)"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/neuralNetwork.cpp",
52
+ "text": "pow(2,-8)"
53
+ }
54
+ ]
55
+ }
artifacts/zkgpt/zkGPT-015.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkGPT-015",
3
+ "codebase": "zkTransformer-main-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Attention Dimension Scaling Factor Removed",
7
+ "explanation": "The scaled dot-product attention formula is A = softmax(QK^T / sqrt(d))V. The injection replaces the computed 1/sqrt(d) divisor with a constant 1.0, removing dimension-dependent scaling. Without the sqrt(d) normalization, attention logits grow with hidden dimension, pushing softmax toward degenerate one-hot distributions. The quantized circuit accepts these inflated logits because the lookup table range is not tied to the scaling factor.",
8
+ "labels": {
9
+ "relevant_code": "src/neuralNetwork.cpp:1182",
10
+ "paper_reference": "Section 4.1 (Attention mechanism): A = softmax(QK^T / sqrt(d_k))V; the 1/sqrt(d_k) factor is essential for numerical stability and correct attention distribution."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/neuralNetwork.cpp",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 1182,
20
+ "end": 1182,
21
+ "expect_sha256": "22a5acf14a47aec3462fd1b1a9dd6f749f102ac722ab7f83b7e1d4258dac3d96"
22
+ },
23
+ "new_content": " const double inv_sqrt_d = 1.0;"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/neuralNetwork.cpp"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/neuralNetwork.cpp",
33
+ "start": 1179,
34
+ "end": 1186
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "attention_scaling_factor"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/neuralNetwork.cpp",
47
+ "text": "const double inv_sqrt_d = 1.0;"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/neuralNetwork.cpp",
52
+ "text": "std::sqrt"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-001.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-001",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "ReLU Prove Body Throws Instead of Proving",
7
+ "explanation": "The zkReLU::prove() method throws std::runtime_error instead of executing the 5-step protocol (boolean sign check, Hadamard sumcheck, tLookup range proofs). Any pipeline that invokes ReLU produces no proof, leaving all ReLU outputs completely unconstrained.",
8
+ "labels": {
9
+ "relevant_code": "zkrelu.cu:58",
10
+ "paper_reference": "Example 4.2 (Section 4): ReLU with rescaling verified via two tlookup instances — \"By requiring the prover to demonstrate Z'+αA ⊂ TX+αTY... and R ⊂ TR, both using Protocol 1, in addition to proving the decomposition as Z = γZ'+R, we can sufficiently validate the correctness of inference through the ReLU function.\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "zkrelu.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 58,
20
+ "end": 82,
21
+ "expect_sha256": "59b80b037696973457a1ea5fcda09e683971aa59cba45a67febc774dfc32da03"
22
+ },
23
+ "new_content": "void zkReLU::prove(const FrTensor& Z, const FrTensor& A)\n{\n return;\n}"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "zkrelu.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "zkrelu.cu",
33
+ "start": 53,
34
+ "end": 87
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "relu_prove_body"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "zkrelu.cu",
47
+ "text": "return;"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "zkrelu.cu",
52
+ "text": "throw std::runtime_error"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-002.json ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-002",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Skip-Connection Linearity Check Removed",
7
+ "explanation": "The skip-connection prover's local linearity check (sum_xy == z_hat) is removed. The opening proofs at u are still computed and written to <output>.proof, but the commit-time self-check that would catch a com_z ≠ commit(x+y) mismatch is gutted, so a dishonest prover who opens a forged com_z passes this stage locally.",
8
+ "labels": {
9
+ "relevant_code": "skip-connection.cu:151",
10
+ "paper_reference": "Section 3.3 / Section 6.2: all arithmetic tensor operations (including addition) are verified via the sumcheck protocol; Section 6.2 describes proof assembly covering the full computational graph"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "skip-connection.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 151,
20
+ "end": 155,
21
+ "expect_sha256": "9b16892ccffeb8be6a8ad6f2db0ad7f0416b802a77d79a0b94c8db5405c62cf3"
22
+ },
23
+ "new_content": " // (linearity verified via MLE evaluation)"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "skip-connection.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "skip-connection.cu",
33
+ "start": 146,
34
+ "end": 160
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "skip_connection_linearity"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "skip-connection.cu",
47
+ "text": "linearity verified via MLE"
48
+ }
49
+ ]
50
+ }
artifacts/zkllm/zkLLM-003.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-003",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "RMSNorm Inverse Witness Not Absorbed into Transcript",
7
+ "explanation": "The RMSNorm inverse (1/sqrt(mean(x^2)+eps)) is computed in Python and loaded from rms_inv_temp.bin. The Fiat-Shamir absorb of the inverse witness is removed, so subsequent challenges are not bound to this witness. A malicious prover can substitute any normalization factor without affecting the transcript.",
8
+ "labels": {
9
+ "relevant_code": "rmsnorm.cu:48",
10
+ "paper_reference": "Section 6.1.3: \"The compound non-arithmetic operations of square-root and inverse are managed through two sequential tlookup steps.\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "rmsnorm.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 48,
20
+ "end": 55,
21
+ "expect_sha256": "fa27931d76d9cbdd26068205796b450e7a961faa2cb07a193aaf4842e05b4603"
22
+ },
23
+ "new_content": " // (witness absorbed during sumcheck phase)"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "rmsnorm.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "rmsnorm.cu",
33
+ "start": 43,
34
+ "end": 60
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "rmsnorm_witness_absorb"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "rmsnorm.cu",
47
+ "text": "witness absorbed during sumcheck"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "rmsnorm.cu",
52
+ "text": "rmsnorm/rms_inv_temp_witness"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-004.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-004",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "tLookup A/B Commitments Removed",
7
+ "explanation": "The tLookup protocol's intermediate values A (inverse of shifted S) and B (inverse of shifted table) are computed after beta is drawn but their commit_and_absorb calls are removed. Subsequent challenges for the grand-product check are not bound to A and B, allowing the prover to adaptively choose these inverses after seeing the challenge.",
8
+ "labels": {
9
+ "relevant_code": "tlookup.cu:401",
10
+ "paper_reference": "Protocol 1 (Lines 6–7): prover must commit ⟦S⟧ and ⟦m⟧ before verifier sends challenge β (Line 10); Protocol 2 (Line 22): all auxiliary commitments sent before interactive proof in zkAttn-Prove"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "tlookup.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 401,
20
+ "end": 402,
21
+ "expect_sha256": "f98a557736ae50a3debe7cfd89ccf0cc66d84e33e873d47569d4da0fb4c3d061"
22
+ },
23
+ "new_content": " // (A/B committed during grand-product phase)"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "tlookup.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "tlookup.cu",
33
+ "start": 396,
34
+ "end": 407
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "tlookup_AB_commitment"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "tlookup.cu",
47
+ "text": "committed during grand-product"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "tlookup.cu",
52
+ "text": "commit_and_absorb(\"tlookup/A\""
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-005.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-005",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Fiat-Shamir Transcript Replaced with Local PRNG",
7
+ "explanation": "The fs_challenge_vec() function is replaced with random_vec(), which uses a process-local std::mt19937 PRNG seeded from std::random_device. Challenges are no longer derived from the Fiat-Shamir transcript, making the proof interactive-only and allowing a malicious prover to predict or replay challenges.",
8
+ "labels": {
9
+ "relevant_code": "fr-tensor.cu:44",
10
+ "paper_reference": "-"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "fr-tensor.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 44,
20
+ "end": 46,
21
+ "expect_sha256": "e8bdb60a0019d86cac80ffa9826692c0bbb4952862ee440411305fca6410ab39"
22
+ },
23
+ "new_content": "vector<Fr_t> fs_challenge_vec(const char* label, uint len) {\n return random_vec(len);\n}"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "fr-tensor.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "fr-tensor.cu",
33
+ "start": 39,
34
+ "end": 51
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "fiat_shamir_challenge_dispatch"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "fr-tensor.cu",
47
+ "text": "return random_vec(len)"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "fr-tensor.cu",
52
+ "text": "fs_transcript().challenge_vec"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-006.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-006",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Cross-Stage Commitment Chain Verification Removed",
7
+ "explanation": "The verify-pipeline chain check `if (!bytes_equal(prev.output_com, curr.input_com)) { ... ++chain_bad; continue; }` at main.cu:302-311 is removed. This is the only check that detects cross-stage commitment substitution: without it, every pair of adjacent stages is counted as chain_ok regardless of whether stage N's output commitment bytes actually match stage N+1's absorbed input commitment. An adversary can freely rewrite intermediate .bin files between stage executions and still pass verify-pipeline.",
8
+ "labels": {
9
+ "relevant_code": "main.cu:302",
10
+ "paper_reference": "Section 6.2: \"proofs are assembled in reverse logical order of the arithmetic circuits, methodically reducing the claimed multilinear extension values of the output y to those associated with the prompt X and the model parameters W.\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "main.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 302,
20
+ "end": 311,
21
+ "expect_sha256": "05118c182ffc4f0e811378ee774f835c4a839e76aa0538d0c98ff8b3e91acd7f"
22
+ },
23
+ "new_content": " // (chain check removed)"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "main.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "main.cu",
33
+ "start": 297,
34
+ "end": 316
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "pipeline_commitment_chain"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "main.cu",
47
+ "text": "// (chain check removed)"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "main.cu",
52
+ "text": "if (!bytes_equal(prev.output_com, curr.input_com))"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-007.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-007",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Stage Proof Transcript Digest Omitted",
7
+ "explanation": "The write_stage_proof function's final transcript digest write is removed. The .proof file no longer contains the 32-byte sealed digest that binds all absorbs and challenges. A verifier cannot confirm that the proof was generated from a consistent transcript, breaking the pipeline's integrity guarantee.",
8
+ "labels": {
9
+ "relevant_code": "stage_proof.cuh:215",
10
+ "paper_reference": "Section 6.2: proof assembly covering the full computational graph"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "stage_proof.cuh",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 215,
20
+ "end": 216,
21
+ "expect_sha256": "5484e9c249ec9889280928dadffc0f4e38452060450d5a36b04ef16ea828fd99"
22
+ },
23
+ "new_content": " // (finalized in pipeline verifier)"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "stage_proof.cuh"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "stage_proof.cuh",
33
+ "start": 210,
34
+ "end": 221
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "stage_proof_digest"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "stage_proof.cuh",
47
+ "text": "finalized in pipeline"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "stage_proof.cuh",
52
+ "text": "fs_transcript().digest()"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-008.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-008",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Softmax Segment Count Reduced (K=3 to K=2)",
7
+ "explanation": "The zkSoftmax constructor call in self-attn.cu changes the segment base vector from {1<<8, 1<<20, 1<<20} (K=3) to {1<<8, 1<<20} (K=2), removing one piecewise segment. This invalidates the paper's Theorem 7.1 error-bound analysis and changes the approximation domain, producing a weaker softmax approximation with unbounded error in the removed range.",
8
+ "labels": {
9
+ "relevant_code": "self-attn.cu:146",
10
+ "paper_reference": "Section 8: \"we deployed K = 5 tlookups, each of size 2^16. This setup includes L = 3 least significant segments\"; Theorem 7.1 and Eq. (33): error bound depends on K−M−L"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "self-attn.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 146,
20
+ "end": 146,
21
+ "expect_sha256": "61b7bba68af506014f957fb1a67176cb5ecce5502d89fecfed6365054cd9048e"
22
+ },
23
+ "new_content": " zkSoftmax softmax({1<<8, 1<<20}, 1, 0, 1UL<<32, {1<<18}, seq_len, seq_len, d, 1);"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "self-attn.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "self-attn.cu",
33
+ "start": 141,
34
+ "end": 151
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "softmax_segmentation"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "self-attn.cu",
47
+ "text": "{1<<8, 1<<20}"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "self-attn.cu",
52
+ "text": "{1<<8, 1<<20, 1<<20}"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-011.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-011",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Softmax Row-Sum Normalization Check Removed",
7
+ "explanation": "The softmax proof omits the row-sum normalization check that ensures each row of Y sums to approximately theta within tolerance E. Without this check the prover can output arbitrary softmax values whose rows do not sum to 1, proving a weaker relation than Theorem 7.1 requires.",
8
+ "labels": {
9
+ "relevant_code": "zksoftmax.cu:206",
10
+ "paper_reference": "Section 5.1 Step (4): \"an additional check is introduced to ensure the rowwise sums of Y equal 1\"; Protocol 2 (Lines 34–35): tlookup-Prove on ŷ against TR; Theorem 7.1 (3): \"εattn defines the tolerable error... the sum of each row must lie within [(1−εattn)θ, (1+εattn)θ]\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "zksoftmax.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 206,
20
+ "end": 253,
21
+ "expect_sha256": "0a8b8b331e04604baf7982d96f46f52bbf4287f892ea2cd6d255a98a13a1f5c6"
22
+ },
23
+ "new_content": ""
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "zksoftmax.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "zksoftmax.cu",
33
+ "start": 201,
34
+ "end": 258
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "softmax_row_sum_check"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "zksoftmax.cu",
47
+ "text": "row_sums"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "zksoftmax.cu",
52
+ "text": "zksoftmax/row_sums"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-012.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-012",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Lookup Table Values Not Committed",
7
+ "explanation": "The lookup table T is initialized deterministically but tLookupRange::commit_table is emptied, so the table is never Hyrax-committed and its commitment is never absorbed into the Fiat-Shamir transcript. tLookupRange is the base for tLookupRangeMapping (SwiGLU table in ffn.cu), the rescaling remainder table (rescaling.cu), and every zkSoftmax segment table (zksoftmax.cu), so the subsequent challenge β (Protocol 1 Line 10) is no longer bound to any of these tables — a malicious prover can choose tables adaptively after seeing β and construct a forged proof.",
8
+ "labels": {
9
+ "relevant_code": "tlookup.cu:36",
10
+ "paper_reference": "Protocol 1 Line 2: \"⟦T⟧ ← Commit(T; 0)\" — the paper requires the lookup table T to be committed via tlookup-Setup before use"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "tlookup.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 36,
20
+ "end": 39,
21
+ "expect_sha256": "e5c2390990df7e02e7f0e2fe7df0a3da91bfb205889008c663ebc0c61e7c914e"
22
+ },
23
+ "new_content": "void tLookupRange::commit_table(const Commitment& gen)\n{\n}"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "tlookup.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "tlookup.cu",
33
+ "start": 31,
34
+ "end": 44
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "tlookup_table_commitment"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "tlookup.cu",
47
+ "text": "commit_and_absorb(\"tlookup/table\""
48
+ },
49
+ {
50
+ "kind": "contains",
51
+ "file": "tlookup.cu",
52
+ "text": "void tLookupRange::commit_table"
53
+ }
54
+ ]
55
+ }
artifacts/zkllm/zkLLM-013.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-013",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Skip-Connection Verifier Body Replaced with return true",
7
+ "explanation": "verify_skip in main.cu is the entry point for the 'main verify-skip' command. Lines 138-204 contain the Pedersen commitment recomputation, opening checks (for com_x, com_y, com_z), and the MLE-linearity check z_hat == x_hat + y_hat. Replacing that entire block with 'return true;' turns the command into a trivial accept: any well-formed SkipProof file is declared valid regardless of what com_x, com_y, com_z commit to, whether the openings are correct, or whether the skip-connection linearity relation z = x + y holds. A malicious prover can commit an arbitrary z, supply any opening scalars, and the verifier will accept.",
8
+ "labels": {
9
+ "relevant_code": "main.cu:138",
10
+ "paper_reference": "Section 4 (skip-connection / residual protocol): verifier checks three Pedersen openings at a Fiat-Shamir point u and then the MLE linearity z_hat = x_hat + y_hat; the combination reduces the vector equation z = x + y to a single-scalar Schwartz-Zippel argument."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "main.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 138,
20
+ "end": 204,
21
+ "expect_sha256": "df16615fe6c98744604a4fbcd1821506c049e979f72c1d8bccffb32ff37181b0"
22
+ },
23
+ "new_content": " return true;"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "main.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "main.cu",
33
+ "start": 133,
34
+ "end": 209
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "skip_verifier_body_stub"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "main.cu",
47
+ "text": "static bool verify_skip"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "main.cu",
52
+ "text": "verifier: com_x opening FAILED"
53
+ },
54
+ {
55
+ "kind": "not_contains",
56
+ "file": "main.cu",
57
+ "text": "if (sum != p.z_hat) {"
58
+ }
59
+ ]
60
+ }
artifacts/zkllm/zkLLM-014.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-014",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Rescaling Fiat-Shamir Challenges Replaced with Constant One-Vectors",
7
+ "explanation": "Rescaling::prove draws three Fiat-Shamir challenge vectors that drive the tLookup range proof on the remainder tensor: 'rescaling/u' and 'rescaling/v' (the sumcheck evaluation points) and 'rescaling/rand_temp' (the two tLookup blinding scalars). Replacing the three fs_challenge_vec(...) calls with constant {1,0,0,0,0,0,0,0} vectors hardcodes every challenge used inside the rescaling proof. Because the challenge point is known in advance, a malicious prover can commit an arbitrary remainder tensor that agrees with the committed (X, X_) only at the hardcoded point u and whose tLookup polynomials collide at the predictable rand_temp scalars -- the usual Schwartz-Zippel / tLookup soundness argument no longer applies because the verifier's challenge is not random.",
8
+ "labels": {
9
+ "relevant_code": "rescaling.cu:52",
10
+ "paper_reference": "Section 4.2 (Rescaling / range-check via tLookup) and Protocol 1 (tLookup): the tLookup range proof is sound only when the challenge beta and the sumcheck evaluation point u are drawn from the Fiat-Shamir transcript after the prover commits to the counter polynomial m and the remainder S."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "rescaling.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 52,
20
+ "end": 55,
21
+ "expect_sha256": "7c6a3aac5aeb8921025e73d13373632d2b6340bca3527f24894875265511f562"
22
+ },
23
+ "new_content": " auto u = vector<Fr_t>(ceilLog2(X.size), Fr_t({1, 0, 0, 0, 0, 0, 0, 0}));\n auto v = vector<Fr_t>(ceilLog2(X.size), Fr_t({1, 0, 0, 0, 0, 0, 0, 0}));\n\n auto rand_temp = vector<Fr_t>(2, Fr_t({1, 0, 0, 0, 0, 0, 0, 0}));"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "rescaling.cu"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "rescaling.cu",
33
+ "start": 47,
34
+ "end": 60
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "rescaling_fs_challenge_hardcoded"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "rescaling.cu",
47
+ "text": "vector<Fr_t>(ceilLog2(X.size), Fr_t({1, 0, 0, 0, 0, 0, 0, 0}))"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "rescaling.cu",
52
+ "text": "fs_challenge_vec(\"rescaling/u\""
53
+ },
54
+ {
55
+ "kind": "not_contains",
56
+ "file": "rescaling.cu",
57
+ "text": "fs_challenge_vec(\"rescaling/rand_temp\""
58
+ }
59
+ ]
60
+ }
artifacts/zkllm/zkLLM-015.json ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkLLM-015",
3
+ "codebase": "zkllm-ccs2024-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "FFN Output Saved at Wrong Rescaling Level",
7
+ "explanation": "The FFN down-projection produces down_out at scale gamma-squared. The rescaling step computes down_out_ at scale gamma. The injection reverts the save and commit calls to use the unrescaled down_out instead of down_out_, creating a scale mismatch: the committed FFN output is at gamma^2 while the downstream skip-connection and RMSNorm stages expect gamma. This breaks the commitment contract — the verifier binds to a value at the wrong quantization scale, and a malicious prover can exploit the scale confusion to prove incorrect fixed-point arithmetic across layer boundaries.",
8
+ "labels": {
9
+ "paper_reference": "Section 3.5 (Rescaling): each matrix multiplication doubles the quantization exponent; the rescaling operator must be applied before the result is committed to restore the canonical scale gamma.",
10
+ "relevant_code": "ffn.cu:137, ffn.cu:152"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "ffn.cu",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 137,
20
+ "end": 137,
21
+ "expect_sha256": "c7dc80d5d9cc77a6aaeac63196d964ed5448f8cdd117f00800b5c16a34101259"
22
+ },
23
+ "new_content": " down_out.save_int(output_file_name);"
24
+ },
25
+ {
26
+ "file": "ffn.cu",
27
+ "op": "replace_block",
28
+ "anchor": {
29
+ "kind": "line_range",
30
+ "start": 152,
31
+ "end": 152,
32
+ "expect_sha256": "5a37412a20c722c013da064a717ef95796a1275428034297d38b3e111974abb6"
33
+ },
34
+ "new_content": " down_proj.generator, down_out, output_file_name);"
35
+ }
36
+ ],
37
+ "conflict_keys": {
38
+ "files": [
39
+ "ffn.cu"
40
+ ],
41
+ "regions": [
42
+ {
43
+ "file": "ffn.cu",
44
+ "start": 135,
45
+ "end": 155
46
+ }
47
+ ],
48
+ "semantic_tags": [
49
+ "ffn_output_rescale_commit"
50
+ ],
51
+ "requires": [],
52
+ "incompatible": []
53
+ },
54
+ "presence_probes": [
55
+ {
56
+ "kind": "contains",
57
+ "file": "ffn.cu",
58
+ "text": "down_out.save_int(output_file_name);"
59
+ },
60
+ {
61
+ "kind": "not_contains",
62
+ "file": "ffn.cu",
63
+ "text": "down_out_.save_int(output_file_name);"
64
+ }
65
+ ]
66
+ }
artifacts/zkml/zkML-001.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-001",
3
+ "codebase": "zkml-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Hardcoded Freivalds Challenge Vector",
7
+ "explanation": "The Freivalds random-check vector r is replaced with a hardcoded constant instead of being derived from the Halo2 challenge API. A malicious prover can precompute a MatMul forgery that satisfies the deterministic check with 100% probability, breaking the Schwartz-Zippel soundness guarantee.",
8
+ "labels": {
9
+ "relevant_code": "src/model.rs:210",
10
+ "paper_reference": "Section 6.1 (Linear layers): \"Freivalds' algorithm... we can take a random vector r and verify that Br = WAr... The random vector r must be generated after the matrix and results are committed.\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/model.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 210,
20
+ "end": 210,
21
+ "expect_sha256": "228b048716793290da7c9dc9305b97fdc00c9c59cdde10f906be73a91a854255"
22
+ },
23
+ "new_content": " let chal_value: Value<F> = Value::known(F::from(0x123456789abcdefu64));"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/model.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/model.rs",
33
+ "start": 205,
34
+ "end": 215
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "freivalds_challenge_source"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": [
42
+ "zkML-007"
43
+ ]
44
+ },
45
+ "presence_probes": [
46
+ {
47
+ "kind": "contains",
48
+ "file": "src/model.rs",
49
+ "text": "0x123456789abcdef"
50
+ }
51
+ ]
52
+ }
artifacts/zkml/zkML-002.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-002",
3
+ "codebase": "zkml-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Weight Commitment Silently Disabled",
7
+ "explanation": "The commit_before list that controls which tensors are committed before proving is replaced with an empty vec, silently disabling all weight commitments. A malicious prover can substitute arbitrary model weights without detection.",
8
+ "labels": {
9
+ "relevant_code": "src/model.rs:501",
10
+ "paper_reference": "Section 4.3 (Security): \"the knowledge soundness property intuitively means that the prover must know the input and the weights\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/model.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 501,
20
+ "end": 501,
21
+ "expect_sha256": "2b704f04dfddd96537ba5e777eb0bf6546d184d5a4908070ec1ad07238f69144"
22
+ },
23
+ "new_content": " commit_before: vec![],"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/model.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/model.rs",
33
+ "start": 496,
34
+ "end": 506
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "weight_commitment_config"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/model.rs",
47
+ "text": "commit_before: vec![]"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/model.rs",
52
+ "text": "config.commit_before.clone().unwrap_or(vec![])"
53
+ }
54
+ ]
55
+ }
artifacts/zkml/zkML-003.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-003",
3
+ "codebase": "zkml-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Unconstrained AvgPool Divisor",
7
+ "explanation": "The AvgPool2D divisor is placed in an advice cell without a copy-constraint to the fixed column. The prover can set the divisor to 1, outputting the numerator unchanged and producing arbitrary average-pool results.",
8
+ "labels": {
9
+ "relevant_code": "src/layers/avg_pool_2d.rs:62",
10
+ "paper_reference": "Section 5.1 (Specialized operations, Variable division): \"b = c · a + r for r ∈ [0, ..., a). Thus, we can use the polynomial constraint b − c · a − r = 0 and constrain that a − r ∈ [0, ..., N)\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/layers/avg_pool_2d.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 44,
20
+ "end": 64,
21
+ "expect_sha256": "dc70037d425ad61685308972f1f142ddf1c506f3f595e173e691785f0b9a1930"
22
+ },
23
+ "new_content": " let div = layouter\n .assign_region(\n || \"avg pool 2d div\",\n |mut region| {\n let div = region.assign_advice(\n || \"avg pool 2d div\",\n gadget_config.columns[0],\n 0,\n || Value::known(div_val),\n )?;\n Ok(div)\n },\n )\n .unwrap();"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/layers/avg_pool_2d.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/layers/avg_pool_2d.rs",
33
+ "start": 39,
34
+ "end": 68
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "avgpool_divisor_constraint"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "src/layers/avg_pool_2d.rs",
47
+ "text": "constrain_equal"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/layers/avg_pool_2d.rs",
52
+ "text": "assign_fixed"
53
+ },
54
+ {
55
+ "kind": "contains",
56
+ "file": "src/layers/avg_pool_2d.rs",
57
+ "text": "assign_advice"
58
+ }
59
+ ]
60
+ }
artifacts/zkml/zkML-004.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-004",
3
+ "codebase": "zkml-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Unconstrained DivFixed Divisor",
7
+ "explanation": "The DivFixed layer's divisor is placed in an advice cell without a copy-constraint to the fixed column. The prover can set the divisor to any value, bypassing the compile-time scaling factor and producing arbitrary rescaled outputs.",
8
+ "labels": {
9
+ "relevant_code": "src/layers/div_fixed.rs:50",
10
+ "paper_reference": "Section 5.1 (Specialized operations, Variable division): \"b = c · a + r for r ∈ [0, ..., a). Thus, we can use the polynomial constraint b − c · a − r = 0 and constrain that a − r ∈ [0, ..., N)\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/layers/div_fixed.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 34,
20
+ "end": 54,
21
+ "expect_sha256": "2e03b3af171d4172229b490662512c3f326c17a1f185e4cee384d5bc1a3e8c90"
22
+ },
23
+ "new_content": " let div = layouter\n .assign_region(\n || \"division\",\n |mut region| {\n let div = region.assign_advice(\n || \"div fixed\",\n gadget_config.columns[0],\n 0,\n || Value::known(div_val),\n )?;\n Ok(div)\n },\n )\n .unwrap();"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/layers/div_fixed.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/layers/div_fixed.rs",
33
+ "start": 29,
34
+ "end": 58
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "divfixed_divisor_constraint"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "src/layers/div_fixed.rs",
47
+ "text": "constrain_equal"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/layers/div_fixed.rs",
52
+ "text": "assign_fixed"
53
+ },
54
+ {
55
+ "kind": "contains",
56
+ "file": "src/layers/div_fixed.rs",
57
+ "text": "assign_advice"
58
+ }
59
+ ]
60
+ }
artifacts/zkml/zkML-005.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-005",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Dot-Product Partial Sums Left Unaggregated",
7
+ "explanation": "The dot-product gadget's final AdderChip aggregation step is removed; partial row sums are returned directly without being summed into a single constrained output. The prover can supply arbitrary partial results that do not sum to the correct dot product.",
8
+ "labels": {
9
+ "relevant_code": "src/gadgets/dot_prod.rs:198",
10
+ "paper_reference": "Section 6.1 (Linear layers / dot product): matmul is computed as row-wise dot products; the gadget aggregates partial-row sums via an AdderChip so the single-cell output is bound to the full sum."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/gadgets/dot_prod.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 198,
20
+ "end": 208,
21
+ "expect_sha256": "bc3ac0e85cdec061044688b2c842318fcdd499290c70fe3df96e42d7462ced73"
22
+ },
23
+ "new_content": " Ok(outputs)"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/gadgets/dot_prod.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/gadgets/dot_prod.rs",
33
+ "start": 193,
34
+ "end": 213
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "dotprod_aggregation"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "src/gadgets/dot_prod.rs",
47
+ "text": "AdderChip::<F>::construct"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/gadgets/dot_prod.rs",
52
+ "text": "adder_chip"
53
+ },
54
+ {
55
+ "kind": "contains",
56
+ "file": "src/gadgets/dot_prod.rs",
57
+ "text": "Ok(outputs)"
58
+ }
59
+ ]
60
+ }
artifacts/zkml/zkML-006.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-006",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "FC Layer Bias Addition Removed",
7
+ "explanation": "The fully-connected layer's bias addition branch is removed. Even when a bias tensor is present (tensors.len() == 3), it is silently ignored. The circuit proves a different linear operation (Wx instead of Wx+b) than the model specifies.",
8
+ "labels": {
9
+ "relevant_code": "src/layers/fc/fc_dpb_vdiv_lookup.rs:89",
10
+ "paper_reference": "-"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/layers/fc/fc_dpb_vdiv_lookup.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 89,
20
+ "end": 105,
21
+ "expect_sha256": "88198c923a6317b7058319bb13e597053ee55d17d0562f29f42811a69393ce2e"
22
+ },
23
+ "new_content": " let mm_div = mm_div;"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/layers/fc/fc_dpb_vdiv_lookup.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/layers/fc/fc_dpb_vdiv_lookup.rs",
33
+ "start": 84,
34
+ "end": 110
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "fc_bias_addition"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "src/layers/fc/fc_dpb_vdiv_lookup.rs",
47
+ "text": "AddPairsChip::<F>::construct"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/layers/fc/fc_dpb_vdiv_lookup.rs",
52
+ "text": "mm_bias"
53
+ },
54
+ {
55
+ "kind": "not_contains",
56
+ "file": "src/layers/fc/fc_dpb_vdiv_lookup.rs",
57
+ "text": "tensors[2]"
58
+ }
59
+ ]
60
+ }
artifacts/zkml/zkML-007.json ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-007",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "RLC Challenge Replaced with Small Constant",
7
+ "explanation": "The RLC/Freivalds challenge is replaced with the literal constant 42 instead of being drawn from the Halo2 Phase-2 challenge API. Since the challenge is predictable and tiny, the prover can craft witnesses that satisfy the random linear combination check without performing the correct matmul computation. This is a small-constant variant of zkML-001.",
8
+ "labels": {
9
+ "relevant_code": "src/model.rs:210",
10
+ "paper_reference": "Section 6.1 (Linear layers): \"The random vector r must be generated after the matrix and results are committed.\""
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/model.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 210,
20
+ "end": 210,
21
+ "expect_sha256": "228b048716793290da7c9dc9305b97fdc00c9c59cdde10f906be73a91a854255"
22
+ },
23
+ "new_content": " let chal_value: Value<F> = Value::known(F::from(42u64));"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/model.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/model.rs",
33
+ "start": 205,
34
+ "end": 215
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "freivalds_challenge_source"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": [
42
+ "zkML-001"
43
+ ]
44
+ },
45
+ "presence_probes": [
46
+ {
47
+ "kind": "contains",
48
+ "file": "src/model.rs",
49
+ "text": "Value::known(F::from(42u64))"
50
+ }
51
+ ]
52
+ }
artifacts/zkml/zkML-008.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-008",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Softmax Division Remainder Unchecked",
7
+ "explanation": "The VarDivRound gadget's lookup-based range checks on the remainder r and the (2b - r) term are removed from the rounded-division gate. Without these range checks the prover can supply an arbitrary remainder that wraps around the field, producing any desired softmax or rescale output. The b range-check on line 82 is left intact so the divisor remains bounded.",
8
+ "labels": {
9
+ "relevant_code": "src/gadgets/var_div.rs:62",
10
+ "paper_reference": "Section 5.1 (Variable division): \"b = c · a + r for r ∈ [0, ..., a)\" — remainder r must be range-checked via lookup"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/gadgets/var_div.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 62,
20
+ "end": 80,
21
+ "expect_sha256": "19aa647965eae0271735002db8f83011e15954c01fb6cbbdcf57120539b7445c"
22
+ },
23
+ "new_content": ""
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/gadgets/var_div.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/gadgets/var_div.rs",
33
+ "start": 60,
34
+ "end": 82
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "var_div_range_checks"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "not_contains",
46
+ "file": "src/gadgets/var_div.rs",
47
+ "text": "var div range checks r"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/gadgets/var_div.rs",
52
+ "text": "var div range checks 2b-r"
53
+ },
54
+ {
55
+ "kind": "contains",
56
+ "file": "src/gadgets/var_div.rs",
57
+ "text": "var div range checks b"
58
+ }
59
+ ]
60
+ }
artifacts/zkml/zkML-010.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-010",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Non-Linear Lookup Input Expression Zeroed",
7
+ "explanation": "The non-linearity gadget enforces (inp, outp) ∈ T via a two-column lookup where T maps every in-range input to its activation output. The input-side lookup expression is rewritten from `(s * (inp + shift_val_pos), inp_lookup)` to `(s * 0, inp_lookup)`, which always matches entry 0 of the InputLookup range table and unconditionally succeeds. The output-side lookup still binds outp to the activation image, but the pairing (inp, outp) is no longer enforced — the prover can pick any inp value and any outp in the image of the activation, decoupling the function from its argument. Every non-linearity in the model (ReLU, Sigmoid, Tanh, Exp, Sqrt, GELU) is impacted simultaneously.",
8
+ "labels": {
9
+ "relevant_code": "src/gadgets/nonlinear/non_linearity.rs:50",
10
+ "paper_reference": "Section 5.1 (Non-linear operations / lookup-based activations): each activation is proved by a two-column lookup (inp, outp) ∈ T where T is the enumerated (input, f(input)) table; both tuples must be queried for the lookup to bind inp to outp."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 50,
20
+ "end": 50,
21
+ "expect_sha256": "f7259168afec495a28270924f2d8e7539ef58fc0216a5c31f608a77450cadcea"
22
+ },
23
+ "new_content": " (s.clone() * Expression::Constant(F::ZERO), inp_lookup),"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/gadgets/nonlinear/non_linearity.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
33
+ "start": 42,
34
+ "end": 54
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "non_linearity_lookup_input"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
47
+ "text": "Expression::Constant(F::ZERO), inp_lookup"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
52
+ "text": "(s.clone() * (inp + shift_val_pos), inp_lookup)"
53
+ }
54
+ ]
55
+ }
artifacts/zkml/zkML-011.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-011",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Inference Output Not Bound to Public Instance",
7
+ "explanation": "After running the DAG, ModelCircuit::synthesize exposes two sets of cells as public instance values: (a) the pre-DAG commitments (one cell per tensor index in commit_before/commit_after) and (b) every cell of the inference result tensors. The second loop — the one that calls `constrain_instance` over `result` — is removed. The commitments to weights and activations are still bound to the public column, but the actual inference output is no longer exposed on the instance column. A verifier who reads the claimed output from `PUBLIC_VALS` has no cryptographic binding between that value and the committed circuit state; a malicious prover can produce a valid proof for some output tensor and then return any value it wants in the out-of-band `PUBLIC_VALS` mutex.",
8
+ "labels": {
9
+ "relevant_code": "src/model.rs:898",
10
+ "paper_reference": "Section 6.2 (End-to-end soundness): the circuit's claimed output must be exposed as public instance values so the verifier can compare the proven output to the public statement. Without this binding, the ZK proof is a proof of some unspecified output, not the public one."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/model.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 898,
20
+ "end": 907,
21
+ "expect_sha256": "8071a4cc2c32e3147882dbb136926bf8214ff8e703883db6e9d14ffd5fd852be"
22
+ },
23
+ "new_content": " // result output binding to public instance removed"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/model.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/model.rs",
33
+ "start": 888,
34
+ "end": 910
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "result_public_instance_binding"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/model.rs",
47
+ "text": "result output binding to public instance removed"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/model.rs",
52
+ "text": "for tensor in result {"
53
+ }
54
+ ]
55
+ }
artifacts/zkml/zkML-012.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-012",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Residual Add Constraint Replaced with Pass-Through",
7
+ "explanation": "AddChip::gadget_forward normally constructs an AddPairsChip and invokes `add_pairs_chip.forward(...)` to enforce `z = x + y` as an in-circuit gate constraint for every element. The injection replaces the chip call with a pass-through that returns the first input tensor's cells unchanged. Because AddPairsChip is what introduces the sum-gate selector and custom-gate constraint tying each output cell to the sum of its two input cells, removing the chip call leaves the ONNX Add result completely unconstrained in the circuit: at proof time, the downstream DAG consumes cells that equal input[0] without any arithmetic relationship to input[1]. The honest prover executes the same pass-through and produces values that happen to equal input[0], and the verifier has no constraint forcing the output to equal x+y. Impacts every residual / skip connection (ResNets, Transformers, MLP-Mixer residuals, etc.), and any ONNX graph that uses Add to combine two tensors.",
8
+ "labels": {
9
+ "relevant_code": "src/layers/arithmetic/add.rs:46",
10
+ "paper_reference": "Section 4 (Gadget composition): every ONNX operator must lower to a gate that constrains its output to its inputs. An operator that returns input[0] unchanged but is reported as an Add in the DAG breaks this invariant."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/layers/arithmetic/add.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 46,
20
+ "end": 47,
21
+ "expect_sha256": "492ad9957cd35320d9724b7c332e18dd1ca795b2c5717fcc11b7ce4a398e8ebe"
22
+ },
23
+ "new_content": " let _ = (layouter, constants, gadget_config);\n let out = vec_inputs[0].iter().map(|c| (*c).clone()).collect::<Vec<_>>();"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/layers/arithmetic/add.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/layers/arithmetic/add.rs",
33
+ "start": 38,
34
+ "end": 50
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "add_chip_gadget_forward"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/layers/arithmetic/add.rs",
47
+ "text": "vec_inputs[0].iter().map(|c| (*c).clone()).collect::<Vec<_>>()"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/layers/arithmetic/add.rs",
52
+ "text": "add_pairs_chip.forward(layouter.namespace(|| \"add chip\")"
53
+ }
54
+ ]
55
+ }
artifacts/zkml/zkML-013.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-013",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Non-Linear Activation Lookup Replaced with No-Op",
7
+ "explanation": "The non-linearity gadget (ReLU, Sigmoid, Tanh, Exp, Sqrt, GELU, Logistic) normally enforces a two-column Halo2 `meta.lookup(\"non-linear lookup\", ...)` that pins `(inp + shift, outp) ∈ T` where T is the enumerated activation table. The injection removes the entire `meta.lookup` call inside the per-op-column for-loop, leaving no constraint at all on the input↔output relation of the activation. The proving-key-committed activation table is still loaded by `load_lookups`, but no gate consumes it — the table is dead weight. A malicious prover can assign any `outp` value for any `inp`; the selector fires but no lookup is asserted. Every non-linear layer in the model (including the final softmax, all attention softmaxes, and every activation in the MLP blocks) becomes unconstrained.",
8
+ "labels": {
9
+ "relevant_code": "src/gadgets/nonlinear/non_linearity.rs:42",
10
+ "paper_reference": "Section 5.1 (Lookup-based non-linearities): ReLU/Sigmoid/Tanh/etc. are proved by enumerating f: [min_val, max_val] → F in a lookup table and asserting (inp, outp) ∈ T. Without the meta.lookup call the table exists but is never consulted."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 42,
20
+ "end": 53,
21
+ "expect_sha256": "880b92382980449c411d825f94d7ac0547d31383c5e26a531260899fca2522b6"
22
+ },
23
+ "new_content": " let _ = (offset, inp_lookup, outp_lookup); // non-linear lookup stubbed out"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/gadgets/nonlinear/non_linearity.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
33
+ "start": 40,
34
+ "end": 55
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "non_linearity_meta_lookup"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": [
42
+ "zkML-010"
43
+ ]
44
+ },
45
+ "presence_probes": [
46
+ {
47
+ "kind": "contains",
48
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
49
+ "text": "non-linear lookup stubbed out"
50
+ },
51
+ {
52
+ "kind": "not_contains",
53
+ "file": "src/gadgets/nonlinear/non_linearity.rs",
54
+ "text": "meta.lookup(\"non-linear lookup\""
55
+ }
56
+ ]
57
+ }
artifacts/zkml/zkML-014.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-014",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Var-Div Divisor Range Check Removed (Overflow Vector)",
7
+ "explanation": "VarDivRoundChip exposes three range-check lookups covering (a) the remainder r ∈ [0, 2^N), (b) 2b−r ∈ [0, 2^N), and (c) the divisor b ∈ [0, 2^N). All three use the same InputLookup table which enumerates 0..num_rows. The injection deletes only the third lookup — the one that bounds the divisor b itself. The arithmetic gate `(2a + b) = 2bc + r` still holds numerically in F_p, but without b's range bound the prover is free to choose a value of b that wraps the field modulus. Given any target quotient c̃ and numerator a, set `b := 0` to avoid the divide-by-zero panic and pick r arbitrarily; or set `b := p - 1` so that `2bc̃ + r` wraps to any target. The remainder range check on r and 2b−r still passes because those are separately enforced, but they no longer constrain the quotient because b itself is unbounded. Impacts softmax normalization, mean pooling, rescaling, and every other VarDivRound consumer.",
8
+ "labels": {
9
+ "relevant_code": "src/gadgets/var_div.rs:81",
10
+ "paper_reference": "Section 5.1 (Variable division): all three of r, 2b−r, and b must be range-checked against [0, 2^N) for the rounded-division identity to prove the intended quotient. Removing the b-range bound is sufficient to forge."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/gadgets/var_div.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 81,
20
+ "end": 87,
21
+ "expect_sha256": "c2aa94e001ed7415daa0100bbecdcd6004417840ecdd62c58b961d37b7466736"
22
+ },
23
+ "new_content": " // b range check removed"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/gadgets/var_div.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/gadgets/var_div.rs",
33
+ "start": 80,
34
+ "end": 89
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "var_div_b_range_check"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": [
42
+ "zkML-008"
43
+ ]
44
+ },
45
+ "presence_probes": [
46
+ {
47
+ "kind": "contains",
48
+ "file": "src/gadgets/var_div.rs",
49
+ "text": "b range check removed"
50
+ },
51
+ {
52
+ "kind": "not_contains",
53
+ "file": "src/gadgets/var_div.rs",
54
+ "text": "var div range checks b"
55
+ }
56
+ ]
57
+ }
artifacts/zkml/zkML-015.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkML-015",
3
+ "codebase": "zkml-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "Selector Constraint Enforcement Disabled by Default",
7
+ "explanation": "The circuit configuration flag use_selectors controls whether Halo2 selector columns are enabled during synthesis. Selectors mask which rows participate in each constraint gate; without them, constraints apply to all rows including padding rows that contain unconstrained witness values. The injection flips the default from true to false, causing the packing gadget and other selector-gated constraints to skip enablement. A malicious prover can place arbitrary values in the unused rows and satisfy the weakened constraint system.",
8
+ "labels": {
9
+ "relevant_code": "src/model.rs:503",
10
+ "paper_reference": "Section 5 (Circuit implementation): the Halo2 backend uses selector columns to restrict polynomial constraints to active rows; disabling selectors violates the row-isolation invariant."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/model.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 503,
20
+ "end": 503,
21
+ "expect_sha256": "b8b65562764493334a09acc2d5a179a60821bb0af38507dddb7de60aceadacad"
22
+ },
23
+ "new_content": " use_selectors: config.use_selectors.unwrap_or(false),"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/model.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/model.rs",
33
+ "start": 500,
34
+ "end": 506
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "selector_constraint_default"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/model.rs",
47
+ "text": "unwrap_or(false)"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/model.rs",
52
+ "text": "unwrap_or(true)"
53
+ }
54
+ ]
55
+ }
artifacts/zktorch/zkTorch-001.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkTorch-001",
3
+ "codebase": "zk-torch-fixed",
4
+ "source": "real",
5
+ "finding": {
6
+ "name": "Fold Gamma Hardcoded to One",
7
+ "explanation": "The Fiat-Shamir fold verification gamma is replaced with Fr::one(). When gamma=1, the Schwartz-Zippel batching check degenerates into a trivial sum, allowing a malicious prover to forge pairing checks across accumulated instances.",
8
+ "labels": {
9
+ "relevant_code": "src/util/verifier.rs:44",
10
+ "paper_reference": "Section 4.2 (Parallel Accumulation): the γ challenge batching multiple proved relations via Schwartz-Zippel must be Fiat-Shamir-derived, not a constant (step 4 of the Accumulation Prover: γ ← ρacc(acc.x, acc'.x, [Ej]))."
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/util/verifier.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 44,
20
+ "end": 63,
21
+ "expect_sha256": "236c75c61170889eec0500bae4b6497396771a8cb4269b9555b6bce1edbc8ef6"
22
+ },
23
+ "new_content": " let gamma = Fr::one();"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/util/verifier.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/util/verifier.rs",
33
+ "start": 39,
34
+ "end": 68
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "fold_gamma_challenge"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/util/verifier.rs",
47
+ "text": "let gamma = Fr::one();"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/util/verifier.rs",
52
+ "text": "hasher.update(b\"zktorch/fold/gamma/v1\")"
53
+ }
54
+ ]
55
+ }
artifacts/zktorch/zkTorch-002.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_id": "zkTorch-002",
3
+ "codebase": "zk-torch-fixed",
4
+ "source": "synthetic",
5
+ "finding": {
6
+ "name": "ONNX Silent Constant Clamping to 2^8",
7
+ "explanation": "ONNX F32 constants are silently clamped to the range [-2^8, 2^8] (±256) during model loading. Any weight whose scaled magnitude exceeds 256 is truncated without any error or warning, so the circuit proves an inference over a silently corrupted model. With the default scale factor the truncation begins at a raw weight of ±32, which affects essentially every real model.",
8
+ "labels": {
9
+ "relevant_code": "src/onnx.rs:79",
10
+ "paper_reference": "-"
11
+ }
12
+ },
13
+ "edits": [
14
+ {
15
+ "file": "src/onnx.rs",
16
+ "op": "replace_block",
17
+ "anchor": {
18
+ "kind": "line_range",
19
+ "start": 79,
20
+ "end": 79,
21
+ "expect_sha256": "6677ea550048ecbf5e0bc7621408547cda627aeb70199291cd85ee9b0c32ec61"
22
+ },
23
+ "new_content": " y = y.clamp(-(1 << 8) as f32, (1 << 8) as f32);"
24
+ }
25
+ ],
26
+ "conflict_keys": {
27
+ "files": [
28
+ "src/onnx.rs"
29
+ ],
30
+ "regions": [
31
+ {
32
+ "file": "src/onnx.rs",
33
+ "start": 74,
34
+ "end": 84
35
+ }
36
+ ],
37
+ "semantic_tags": [
38
+ "onnx_constant_range"
39
+ ],
40
+ "requires": [],
41
+ "incompatible": []
42
+ },
43
+ "presence_probes": [
44
+ {
45
+ "kind": "contains",
46
+ "file": "src/onnx.rs",
47
+ "text": "1 << 8"
48
+ },
49
+ {
50
+ "kind": "not_contains",
51
+ "file": "src/onnx.rs",
52
+ "text": "y.clamp(-(1 << 15)"
53
+ }
54
+ ]
55
+ }