Skip to content

feat(security): certify selective L2 fold sizing - #369

Open
quangvdao wants to merge 20 commits into
mainfrom
feat/selective-l2-fold-sizing
Open

feat(security): certify selective L2 fold sizing#369
quangvdao wants to merge 20 commits into
mainfrom
feat/selective-l2-fold-sizing

Conversation

@quangvdao

@quangvdao quangvdao commented Aug 6, 2026

Copy link
Copy Markdown

Summary

This PR adds a sound, selective L2 security route for measured later folds. L infinity remains the ordinary route at every fold. A fold uses L2 only when its schedule contains an exact public cap, the proof certifies the complete physical response norm, and the resulting full suffix is smaller.

The final implementation is deliberately narrow:

  • one existing Stage 1 range prover with an optional norm term;
  • one existing Stage 2 paired-equality relation path;
  • one ordinary L infinity planner candidate plus at most one exact L2 alternative at a capped state;
  • no L2 work on an L infinity-selected fold.

It also removes a separate Hachi embedding factor from current physical A-role sizing. Both the challenge and response are already physical ring coefficient vectors at this boundary, so applying that conversion again double counts it.

Normative design: specs/selective-l2-fold-security-sizing.md.

Diff metadata

  • Base: 4068d713849215d2035bd0599b72a7c06cf5bec4 (main)
  • Head: e2adafbab6d3d3c10fce3feda04f99023bab31aa
  • Commits: 20
  • Files changed: 142
  • Diff: 8,678 insertions, 3,222 deletions

The preceding version had 34,100 insertions. The final cleanup removes the separate dense proof paths, the planner split frontier added only for L2, and a checked-in 25,201-line audit CSV.

Motivation

The coefficient L infinity bound is sound but can overprice a later folded response. An exact Euclidean cap can lower the A rank when the folded witness has small complete L2 norm. For the fp128 D64 one-hot nv32 profile, the selected L5 cap lowers A rank from 5 to 4 and reduces the complete proof.

The route must remain selective. Without a norm proof, the planner has only the existing L infinity certificate and must size A from that bound. This PR does not infer an L2 norm from the digit envelope and does not apply an L2 model throughout recursion.

Before and after

Area Earlier implementation Final implementation
Stage 1 prover Separate L2 entry point, dense equality/range tables, point evaluation, and generic interpolation DigitRangeProver::prove remains the sole entry point; the optional norm relation reuses the compact range prefix and expands coefficients directly
Stage 2 New virtual-table subsystem and verifier scan over per-coordinate sparse weights Existing EqPairTensorFamily and AdditionalRelationTerms machinery
Planner Retained unrelated predecessor block splits so a later cap stayed reachable Keeps the established best L infinity candidate; an exact cap derives one split and may add one smaller-rank L2 candidate
Policy Artificial contiguous L3 through L6 cap window Caps remain forbidden before L3 and at terminal, but eligible later caps may start later and contain gaps
Generated evidence Runtime rows, digest, and a 2.4 MB checked-in audit CSV Runtime rows and digest are checked in; the deterministic generator emits the ignored local CSV on demand
L infinity folds Passed through L2-shaped helper APIs No norm accumulation, no norm sum-check, and no Stage 2 norm relation

Security contract

For the existing L infinity route, the physical collision bound is

C_inf = 8 * kappa_1 * Z_inf.

For a selected L2 route with certified complete physical squared norm S, it is

C_2_sq = 64 * kappa_1^2 * S.

The production Euclidean estimator uses the 128-bit quantum ADPS16 model with

n = rank * D
m = width * D
length bound = sqrt(C_2_sq).

There is no second width multiplier and no Hachi embedding factor in either formula. The inputs have already been mapped to physical ring coefficients. An L2-selected fold still carries the existing digit range certificate; L2 is an alternative A-role security theorem, not a replacement for range membership.

The schedule fixes the cap. The prover may grind the existing fold nonce, but the verifier checks the sum-check claim and rejects a claimed norm above the scheduled cap. Small fields use bounded limb Gram subclaims so integer reconstruction cannot wrap the base field.

This PR does not use a Gaussian tail model, a claimed operator norm such as 17, or the older BDGL16 Euclidean path.

Canonical protocol path

Stage 1

The optional physical norm term is fused into the existing digit range leaf. It shares the product prefix and final range state, then adds the norm polynomial in coefficient form. This removes dense equality tables and UniPoly::from_evals interpolation from the prover.

The two relations have different factors, so an L2-selected round still transmits the one additional coefficient required by the protocol. No such coefficient exists on an L infinity fold.

Stage 2

PhysicalResponsePlan is the checked owner of the physical-to-digit geometry. It exposes paired-equality tensor families. The prover feeds them through the existing additional-relation terms, and the verifier contracts the same families directly. It does not materialize and scan a 65,536-entry sparse replay table.

Planner

The ordinary L infinity candidate search is unchanged. At an exact (fold level, input witness length) cap match, the cap's physical response length determines one block split. The planner constructs that one L2 alternative, keeps it only if it lowers A rank for the split, and lets the existing suffix dynamic program compare the two complete suffixes.

There is no future-cap state expansion and no L2-specific frontier oracle.

Proof size and runtime

Paired local profiles ran the final head and exact base binary interleaved, with one warmup followed by three measured samples.

Profile Main proof Head proof Proof change Prover change Verifier change
fp128 D64 one-hot nv32 84,952 B 83,510 B -1.70% -5.83% -2.59%
fp64 D128 one-hot nv28 83,606 B 81,645 B -2.35% -1.18% +0.62% (+0.11 ms)
fp32 D128 one-hot nv28 77,819 B 77,068 B -0.97% -3.46% -0.50%

fp32 and fp64 select L infinity at every fold. Their proof reduction comes from removing the redundant physical Hachi factor, and their timings show that an available L2 policy adds no meaningful work to an unselected path.

fp128 selects L2 only at L5:

L0 Linf: A rank 5, log basis 3, next witness 29,535,808
L1 Linf: A rank 5, log basis 3, next witness 2,959,040
L2 Linf: A rank 5, log basis 3, next witness 948,672
L3 Linf: A rank 5, log basis 4, next witness 419,328
L4 Linf: A rank 5, log basis 6, next witness 223,040
L5 L2:   A rank 4, log basis 6, next witness 146,240
L6 Linf: A rank 4, log basis 6, next witness 105,984
L7 terminal

The L5 public squared norm cap is 4,294,967,296; the measured proof used nonce 0 and had no rejected draw.

Against the earlier PR binary, the final fp128 implementation has the same proof size and is 13.92% faster to prove and 14.91% faster to verify. The removed cost was implementation overhead, not a required cost of the L2 certificate.

Generated estimator evidence

The checked-in Rust lookup rows and table digest remain the runtime source of truth. The generator emits all 25,200 accepted-boundary and rejected-successor audit rows, hashes that CSV into the table digest, and leaves the reproducible CSV as an ignored local artifact:

cargo run -p akita-sis-estimator --release --example euclidean_width_table -- --format rust-split

Breaking changes

This is an intentional protocol cutover. It changes transcript binding, proof serialization, schedule identity, generated tables, and selected A matrices. The repository provides no backward-compatibility guarantee, so no dual wire format or compatibility wrapper is retained.

Validation at e2adafbab

The following passed locally on the exact head:

  • CI Nextest graph: 1,279 tests across 50 binaries;
  • all three release Clippy feature graphs with warnings denied;
  • deterministic schedule generation twice;
  • quantum ADPS16 Euclidean table regeneration, including 25,200 audit rows;
  • dependency checks for verifier, prover, config, planner, and setup;
  • cargo machete --with-metadata;
  • Rust line caps, 37 Python script tests, documentation guardrails, formatting, diff checks, and changed-file typo/TOML checks;
  • paired fp128, fp64, and fp32 release profiles against main, plus fp128 against the earlier PR binary.

Repository-wide Taplo and typos still report only pre-existing findings in third_party/lattice-estimator; every changed file passes the scoped checks.

The new remote CI and benchmark runs are in progress on this exact head. No remote failure was present when this description was published.

Specification status and follow-ups

This PR completes the sound selective certificate, estimator, planner, and verifier cutover. Two possible tighter models remain separate work because each needs its own security and completeness argument:

  1. level-specific statistical caps for sufficiently randomized later folds;
  2. a verifier-enforced challenge convolution operator-norm cap.

Reviewer map

Suggested order:

  1. specs/selective-l2-fold-security-sizing.md and book/src/how/security.md;
  2. crates/akita-types/src/sis/physical_l2.rs, l2_table.rs, and relation_range_image.rs;
  3. crates/akita-prover/src/protocol/sumcheck/digit_range/ and physical_l2_norm.rs;
  4. crates/akita-verifier/src/stages/physical_l2_norm.rs, stage1.rs, and stage2.rs;
  5. crates/akita-planner/src/schedule_params/candidate/recursive.rs and suffix_dp.rs;
  6. small-field PCS integration tests and the profile report pipeline.

Delete the stale global L2 cutover design and replace it with a candidate-local late-fold route. Document physical-coordinate A-role sizing, the redundant Hachi factor, and complete-vector Euclidean table semantics.
@cursor

cursor Bot commented Aug 6, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes security-critical A-role sizing, Fiat–Shamir transcript binding, proof wire format, and generated schedule identity; mistakes could weaken binding or break verification.

Overview
Adds an optional L2 security route for later nonterminal folds when a preset supplies measured physical squared-norm caps, while L∞ stays the default everywhere. Schedule identity, catalog audit, and runtime validation now bind cap policy, route, norm proof shape, and a separate Euclidean SIS table digest; generated rows can record response_l2_sq_cap.

Physical A-role sizing no longer applies the removed ring_subfield_embedding_norm_bound Hachi factor on top of already-physical coefficients. Inner commit matrices use InnerCommitSecurityRoute (Linf vs L2 with cap and shape); SIS width audit calls min_secure_l2_rank on the L2 path.

The planner keeps ordinary L∞ search and, at an exact cap state, adds one L2 candidate only if it lowers A rank; suffix DP still picks the cheaper full proof. fp128 D64 one-hot (and fp32/fp64 caps) wire preset caps into CommitmentConfig.

Proving/verification: Stage 1 can fuse a complete physical response norm into the final range leaf (physical_l2_norm, optional norm_proof); Stage 2 batches Z virtualization when a norm was proved; fold grinding rejects draws over the scheduled L2 cap on the full physical response. DigitRangeProver::prove takes an optional physical plan; profiling and PCS tests cover L2 roundtrips and transcript mutations.

Book and security docs describe selective caps, dual tables, and sumcheck stages; planner policy validation moves toward akita-schedules.

Reviewed by Cursor Bugbot for commit e2adafb. Bugbot is set up for automated code reviews on this repo. Configure here.

Remove the redundant Hachi embedding factor from physical A-role sizing and bind terminal admission to its selected SIS bucket.

Add the complete-vector L2 collision formula, quantum ADPS16 Euclidean estimator path, separate generated L2 table and digest, golden replay metadata, and regenerated schedules.
Comment thread crates/akita-types/src/sis/ajtai_key.rs Fixed
@github-actions github-actions Bot added spec PR contains a spec implementation PR contains implementation of a spec labels Aug 6, 2026
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Documentation blast radius (advisory)

These regions may need doc/spec/book updates based on changed paths.
This is not a merge gate. See docs/documentation.md.

Changed files in this PR: 142

workspace-crates

Workspace membership and public crate surface

Code paths touched:

  • crates/akita-sis-estimator/Cargo.toml
  • crates/akita-verifier/Cargo.toml

Consider updating:

  • README.md
  • docs/crate-graph.md
  • book/src/how/architecture.md

planner-schedule

Schedule tables, DP fallback, proof-size planning

Code paths touched:

  • crates/akita-config/src/lib.rs
  • crates/akita-config/src/precommitted_commitment.rs
  • crates/akita-config/src/proof_optimized.rs
  • crates/akita-config/src/proof_optimized/fp128.rs
  • crates/akita-config/src/proof_optimized/fp32.rs
  • crates/akita-config/src/proof_optimized/fp64.rs
  • crates/akita-config/src/recursive_commitment.rs
  • crates/akita-config/tests/runtime_fallback.rs
  • crates/akita-planner/src/emit/mod.rs
  • crates/akita-planner/src/planner.rs
  • crates/akita-planner/src/schedule_params.rs
  • crates/akita-planner/src/schedule_params/candidate.rs
  • crates/akita-planner/src/schedule_params/candidate/recursive.rs
  • crates/akita-planner/src/schedule_params/candidate/setup_prefix.rs
  • crates/akita-planner/src/schedule_params/mixed_search.rs
  • crates/akita-planner/src/schedule_params/suffix_dp.rs
  • crates/akita-planner/src/test/schedule_params.rs
  • crates/akita-planner/src/test/schedule_params_candidate.rs
  • crates/akita-planner/src/test/unpruned_search.rs
  • crates/akita-schedules/src/audit.rs
  • crates/akita-schedules/src/candidate.rs
  • crates/akita-schedules/src/catalog_identity.rs
  • crates/akita-schedules/src/generated/expand.rs
  • crates/akita-schedules/src/generated/fp128_d128_dense.rs
  • crates/akita-schedules/src/generated/fp128_d128_onehot.rs
  • crates/akita-schedules/src/generated/fp128_d256_onehot.rs
  • crates/akita-schedules/src/generated/fp128_d64_dense.rs
  • crates/akita-schedules/src/generated/fp128_d64_dense_multi_chunk.rs
  • crates/akita-schedules/src/generated/fp128_d64_onehot.rs
  • crates/akita-schedules/src/generated/fp128_d64_onehot_multi_chunk.rs
  • crates/akita-schedules/src/generated/fp128_d64_onehot_multi_chunk_w2r2.rs
  • crates/akita-schedules/src/generated/fp128_d64_onehot_multi_chunk_w4r2.rs
  • crates/akita-schedules/src/generated/fp128_d64_onehot_recursive.rs
  • crates/akita-schedules/src/generated/fp128_d64_onehot_recursive_multi_chunk_w8r2.rs
  • crates/akita-schedules/src/generated/fp128_mixed_dim_onehot.rs
  • crates/akita-schedules/src/generated/fp32_d128_onehot.rs
  • crates/akita-schedules/src/generated/fp32_d128_onehot_precommitted.rs
  • crates/akita-schedules/src/generated/fp32_d256_onehot.rs
  • crates/akita-schedules/src/generated/fp32_d256_onehot_precommitted.rs
  • crates/akita-schedules/src/generated/fp64_d128_dense.rs
  • crates/akita-schedules/src/generated/fp64_d128_dense_precommitted.rs
  • crates/akita-schedules/src/generated/fp64_d128_onehot.rs
  • crates/akita-schedules/src/generated/fp64_d128_onehot_precommitted.rs
  • crates/akita-schedules/src/generated/fp64_d256_onehot.rs
  • crates/akita-schedules/src/generated/fp64_d256_onehot_precommitted.rs
  • crates/akita-schedules/src/generated/mod.rs
  • crates/akita-schedules/src/generated/walk.rs
  • crates/akita-schedules/src/group_batch.rs
  • crates/akita-schedules/src/lib.rs
  • crates/akita-schedules/src/runtime.rs
  • crates/akita-types/src/proof_size.rs
  • crates/akita-types/src/schedule.rs
  • crates/akita-types/src/schedule_tests.rs

Consider updating:

  • book/src/how/configuration.md
  • book/src/usage/profiling.md
  • specs/planner-*.md
  • specs/PRUNING.md

sis-security

SIS floors, norm bounds, challenge sampling

Code paths touched:

  • crates/akita-types/src/sis/ajtai_key.rs
  • crates/akita-types/src/sis/ajtai_key_tests.rs
  • crates/akita-types/src/sis/generated_l2_sis_table/mod.rs
  • crates/akita-types/src/sis/generated_l2_sis_table/q128.rs
  • crates/akita-types/src/sis/generated_l2_sis_table/q32.rs
  • crates/akita-types/src/sis/generated_l2_sis_table/q64.rs
  • crates/akita-types/src/sis/l2_table.rs
  • crates/akita-types/src/sis/mod.rs
  • crates/akita-types/src/sis/norm_bound.rs
  • crates/akita-types/src/sis/physical_l2.rs

Consider updating:

  • book/src/how/security.md
  • book/src/foundations/lattices-sis.md
  • specs/akita-sis-*.md
  • specs/sis-euclidean-estimator.md
  • specs/fold-linf-rejection.md
  • docs/security-posture.md

prover-protocol

Prove pipeline, folds, sumcheck stages

Code paths touched:

  • crates/akita-prover/src/protocol/core/fold/mod.rs
  • crates/akita-prover/src/protocol/core/root_group.rs
  • crates/akita-prover/src/protocol/fold_grind.rs
  • crates/akita-prover/src/protocol/sumcheck/digit_range/class_indexed_range_leaf.rs
  • crates/akita-prover/src/protocol/sumcheck/digit_range/compact_digit_source.rs
  • crates/akita-prover/src/protocol/sumcheck/digit_range/exact_prefix.rs
  • crates/akita-prover/src/protocol/sumcheck/digit_range/mod.rs
  • crates/akita-prover/src/protocol/sumcheck/mod.rs
  • crates/akita-prover/src/protocol/sumcheck/physical_l2_norm.rs

Consider updating:

  • book/src/how/proving/**
  • book/src/how/recursion.md
  • specs/packed-sumcheck.md
  • specs/setup-product-sumcheck.md
  • specs/terminal-fold-cutover.md
  • specs/protocol-field-geometry-cutover.md

verifier

Verifier replay and no-panic boundary

Code paths touched:

  • crates/akita-verifier/Cargo.toml
  • crates/akita-verifier/src/protocol/core.rs
  • crates/akita-verifier/src/protocol/core/fold/mod.rs
  • crates/akita-verifier/src/stages/mod.rs
  • crates/akita-verifier/src/stages/physical_l2_norm.rs
  • crates/akita-verifier/src/stages/stage1.rs
  • crates/akita-verifier/src/stages/stage2.rs

Consider updating:

  • book/src/how/verification.md
  • book/src/how/proving/fold-path.md
  • docs/verifier-contract.md
  • docs/verifier-panic-audit.md
  • specs/security-hardening.md
  • specs/protocol-field-geometry-cutover.md

transcript

Fiat-Shamir transcript and instance binding

Code paths touched:

  • crates/akita-transcript/src/labels.rs

Consider updating:

  • book/src/how/transcript.md
  • book/src/usage/commitment-api.md
  • specs/transcript-*.md

pcs-umbrella

Public PCS API, examples, integration tests

Code paths touched:

  • crates/akita-pcs/benches/digit_range.rs
  • crates/akita-pcs/benches/setup_index_weight.rs
  • crates/akita-pcs/examples/profile/report.rs
  • crates/akita-pcs/src/scheme/tests/fp32_ext4.rs
  • crates/akita-pcs/src/scheme/tests/mod.rs
  • crates/akita-pcs/src/scheme/tests/onehot.rs
  • crates/akita-pcs/tests/stage1_roundtrip.rs
  • crates/akita-pcs/tests/support/mod.rs

Consider updating:

  • book/src/usage/**
  • README.md

ci-tooling

CI workflows and repo scripts

Code paths touched:

  • scripts/gen_sis_table.py
  • scripts/lattice_estimator_pin.py
  • scripts/profile_bench_report.py
  • scripts/sis_golden/README.md
  • scripts/sis_golden/golden.csv
  • scripts/sis_golden/metadata.json
  • scripts/sis_golden/refresh_golden.py
  • scripts/tests/test_profile_bench_report.py

Consider updating:

  • docs/ci-test-timing.md
  • docs/documentation.md
  • specs/ci-test-timing.md

book-tooling

Book structure and guardrails

Code paths touched:

  • book/src/how/configuration.md
  • book/src/how/proving/sumcheck-stages.md
  • book/src/how/security.md

Consider updating:

  • book/README.md
  • docs/documentation.md
  • specs/PRUNING.md

Per-PR checklist: spec Status / acceptance criteria; book owning page; AGENTS.md if contracts changed; archive spec after fold.

Comment thread crates/akita-types/src/sis/ajtai_key.rs Fixed
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

CI test timing

  • Report generated: 2026-08-07T15:27:17Z.
  • Source: f3bb5fc on feat/selective-l2-fold-sizing.
  • Workflow run: 31191402974.
  • Main baseline: 4068d71.
  • Previous run: ac0f3c0.

Run summary

Wall s Main wall s Main Δ Ratio Tests Skipped Failed Status
302.0 317.0 -4.7% 0.95x 1284 0 0 ok

Wall time spans 2 parallel nextest slice shards.

Slowest tests

Rank Duration s Test
1 11.7 akita-planner::schedule_params::tests::pruned_mixed_search_matches_unpruned_traversal_and_is_canonical
2 9.4 akita-pcs::akita_e2e::dense_d64_snap_regen_prove_verify_nv24
3 8.4 akita-pcs::scheme::tests::onehot::selective_l2_proof_rejects_transcript_mutations
4 7.3 akita-planner::schedule_params::tests::mixed_nv36_benchmark_policy_selects_minimum_setup_schedule
5 6.5 akita-planner::schedule_params::tests::uniform_suffix_dp_matches_unpruned_exact_cutover_search
6 5.9 akita-sis-estimator::search_mode_parity::parallel_exhaustive_matches_serial_exhaustive_smoke
7 5.9 akita-pcs::batched_aggregated_e2e::aggregated_mixed_dense_and_onehot_under_dense_cfg
8 5.7 akita-pcs::batched_aggregated_e2e::non_zk_aggregated_cases::aggregated_dense_nv17_batch4
9 5.4 akita-prover::kernels::linear::tests::chunking::q128_many_blocks_digits_chunk_instead_of_unsafe_block_parallel
10 4.9 akita-sis-estimator::search_mode_parity::exhaustive_search_is_at_least_as_good_as_local_minimum_smoke
11 4.9 akita-pcs::single_poly_e2e::single_dense_nv18
12 4.9 akita-pcs::setup::d128_dense::same_size_passes
13 4.6 akita-prover::protocol::sumcheck::relation_range_image::evaluation_trace::tests::prepared_opening_support_matches_semantic_trace_across_bases_and_extension
14 4.4 akita-pcs::setup::d128_dense::large_setup_batch_passes
15 3.8 akita-pcs::setup::d64_dense::large_setup_nv_passes
16 3.7 akita-planner::schedule_params::tests::recursive_exact_cutover_proof_size_is_documented
17 3.6 akita-pcs::setup::d64_dense::same_size_passes
18 3.4 akita-pcs::scheme::tests::onehot::multi_group_root_allows_precommitted_arity_above_final_group
19 3.4 akita-pcs::single_poly_e2e::single_dense_nv15
20 3.4 akita-pcs::akita_e2e::dense_d64_prove_verify

Regressions vs main

No per-test regressions above the threshold.

New slow tests

No new tests ≥30s vs main baseline.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Benchmark Report

  • Latest run: e2adafb
  • Message: refactor(l2): reuse canonical fold machinery
  • Ref: feat/selective-l2-fold-sizing
  • Workflow run: run 31191402387 attempt 1
  • Report generated: 2026-08-07T15:27:30Z.
  • Main baseline: 4068d71 from the merge-base benchmarked on this runner.
  • Previous run: b7232a0 from the previous PR update with a benchmark artifact.
  • Binary: target/release/examples/profile.
  • Memory: maximum resident set size from /usr/bin/time on the benchmark process.
Status Workload Setup contribution Setup and preparation Setup vector size Prepared NTT cache size Verifier NTT cache size Commit Prove Verify Peak process RSS Proof size
ok Fp32 - nv28Onehot256 - D=128 direct 0.039 s
-5.99% vs main
32.0 MiB
-11.11% vs main
128.0 MiB
-11.11% vs main
1.2 MiB
+0.00% vs main
0.092 s
-7.17% vs main
1.495 s
-3.93% vs main
32.4 ms
-3.14% vs main
438.6 MiB
-5.88% vs main
77,068 bytes
-0.97% vs main
ok Fp64 - nv28Onehot256 - D=128 direct 0.029 s
-17.55% vs main
32.0 MiB
-20.00% vs main
96.0 MiB
-20.00% vs main
0.9 MiB
+0.00% vs main
0.066 s
-20.54% vs main
1.082 s
-0.87% vs main
32.3 ms
+3.53% vs main
521.5 MiB
-6.13% vs main
81,645 bytes
-2.35% vs main
ok Fp128 - nv24Dense - D=64 direct 0.143 s
-0.57% vs main
215.0 MiB
+0.00% vs main
537.5 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
1.732 s
+4.01% vs main
1.196 s
+0.01% vs main
16.6 ms
+1.83% vs main
1564.4 MiB
+0.64% vs main
83,562 bytes
+0.00% vs main
ok Fp128 - nv32Onehot256 - D=64 direct 0.208 s
-0.41% vs main
320.0 MiB
+0.00% vs main
800.0 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
1.253 s
+0.57% vs main
1.212 s
+1.27% vs main
24.5 ms
-1.25% vs main
1698.3 MiB
-0.01% vs main
83,510 bytes
-1.70% vs main
ok Fp128 - nv32Onehot256 - D_a=256D_b=128D_d=128 - MixedD256ToD64 direct 0.137 s
-0.82% vs main
128.0 MiB
+0.00% vs main
608.5 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
0.984 s
-0.68% vs main
1.290 s
-1.15% vs main
19.9 ms
-2.53% vs main
1409.7 MiB
-0.40% vs main
85,081 bytes
+0.00% vs main
ok Fp128 - nv30Onehot256 - Batched4 - D=64 direct 0.208 s
-0.23% vs main
320.0 MiB
+0.00% vs main
800.0 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
1.178 s
+1.70% vs main
1.208 s
+1.28% vs main
23.9 ms
+0.18% vs main
1695.3 MiB
+0.00% vs main
83,524 bytes
-1.69% vs main
ok Fp128 - nv32Onehot256 - Batched4 - D=64 - MultiGroup direct 0.428 s
-1.17% vs main
1032.0 MiB
+0.00% vs main
1075.0 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
3.178 s
+1.74% vs main
1.648 s
-0.04% vs main
29.0 ms
+0.29% vs main
3026.4 MiB
+0.24% vs main
83,618 bytes
-1.70% vs main
ok Fp128 - nv32Onehot256 - Batched4 - D=64 - MultiGroup recursive 3.895 s
-3.44% vs main
1032.0 MiB
+0.00% vs main
1075.0 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
3.141 s
-1.83% vs main
3.397 s
-0.83% vs main
26.1 ms
+0.21% vs main
3790.5 MiB
+0.15% vs main
89,878 bytes
+0.00% vs main
ok Fp128 - nv32Onehot256 - Batched4 - D=64 - MultiGroupW8R2 recursive 1.739 s
-3.07% vs main
430.0 MiB
+0.00% vs main
1075.0 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
3.126 s
-1.87% vs main
10.000 s
-1.41% vs main
35.0 ms
-0.47% vs main
3581.4 MiB
+0.19% vs main
95,875 bytes
+0.00% vs main
ok Fp128 - nv32Onehot256 - D=64 - MultiChunkW2R2 direct 0.222 s
+6.03% vs main
344.0 MiB
+7.50% vs main
860.0 MiB
+7.50% vs main
1.4 MiB
+0.00% vs main
0.428 s
-65.04% vs main
1.482 s
-3.64% vs main
26.7 ms
+7.65% vs main
1868.2 MiB
+2.15% vs main
83,823 bytes
-1.74% vs main
ok Fp128 - nv32Onehot256 - D=64 - MultiChunkW4R2 direct 0.223 s
-0.96% vs main
344.0 MiB
+0.00% vs main
860.0 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
0.429 s
+0.69% vs main
1.845 s
+1.06% vs main
27.5 ms
-1.55% vs main
1962.8 MiB
-0.35% vs main
84,540 bytes
-1.65% vs main
ok Fp128 - nv32Onehot256 - D=64 - MultiChunkW8R2 direct 0.223 s
-0.79% vs main
344.0 MiB
+0.00% vs main
860.0 MiB
+0.00% vs main
1.4 MiB
+0.00% vs main
0.423 s
-0.96% vs main
2.485 s
-1.91% vs main
30.4 ms
+0.68% vs main
2263.3 MiB
+0.35% vs main
86,247 bytes
+0.00% vs main

Negative deltas are improvements for time, memory, and proof size.

Terminal response component breakdown

Workload Folded response (z) Opening values (e) Inner-commitment values (t) Total terminal response
Fp32 - nv28Onehot256 - D=128 21,392 bytes 3,072 bytes 24,576 bytes 49,040 bytes
Fp64 - nv28Onehot256 - D=128 21,301 bytes 7,168 bytes 28,672 bytes 57,141 bytes
Fp128 - nv24Dense - D=64 21,854 bytes 7,168 bytes 28,672 bytes 57,694 bytes
Fp128 - nv32Onehot256 - D=64 21,862 bytes 7,168 bytes 28,672 bytes 57,702 bytes
Fp128 - nv32Onehot256 - D_a=256D_b=128D_d=128 - MixedD256ToD64 21,849 bytes 7,168 bytes 28,672 bytes 57,689 bytes
Fp128 - nv30Onehot256 - Batched4 - D=64 21,876 bytes 7,168 bytes 28,672 bytes 57,716 bytes
Fp128 - nv32Onehot256 - Batched4 - D=64 - MultiGroup 21,858 bytes 7,168 bytes 28,672 bytes 57,698 bytes
Fp128 - nv32Onehot256 - Batched4 - D=64 - MultiGroup 21,830 bytes 7,168 bytes 28,672 bytes 57,670 bytes
Fp128 - nv32Onehot256 - Batched4 - D=64 - MultiGroupW8R2 21,839 bytes 7,168 bytes 28,672 bytes 57,679 bytes
Fp128 - nv32Onehot256 - D=64 - MultiChunkW2R2 21,839 bytes 7,168 bytes 28,672 bytes 57,679 bytes
Fp128 - nv32Onehot256 - D=64 - MultiChunkW4R2 21,852 bytes 7,168 bytes 28,672 bytes 57,692 bytes
Fp128 - nv32Onehot256 - D=64 - MultiChunkW8R2 21,863 bytes 7,168 bytes 28,672 bytes 57,703 bytes

The z column includes its per-segment length prefixes and Golomb payload; e and t are raw field bytes. These three columns sum exactly to the serialized terminal response.

Detailed schedule and proof-size breakdowns by fold level are available in the uploaded report.md benchmark artifact.

Comment thread crates/akita-types/src/sis/ajtai_key.rs Fixed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit c064889. Configure here.

Comment thread crates/akita-schedules/src/candidate.rs
@quangvdao
quangvdao marked this pull request as ready for review August 7, 2026 12:43
Fuse the optional norm relation into the existing compact Stage 1 range path and reuse paired-equality relation terms in Stage 2. Remove dense replay tables and test-only wrappers.

Restore the ordinary single-candidate Linf planner search, admit only one exact L2 alternative at a measured state, and drop the artificial contiguous cap window. Keep generated SIS evidence reproducible without checking in the 2.4 MB audit CSV.
@quangvdao quangvdao changed the title feat(security): add selective L2 fold sizing feat(security): certify selective L2 fold sizing Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

implementation PR contains implementation of a spec spec PR contains a spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants