Integrate lookups with simple benches#172
Open
amit0365 wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #107 — Phase 4 decomposed lookups + full protocol wiring.
Summary
Decomposed lookups (
piop/src/lookup/):logup.rs:build_reconstruction_group(single γ-batched degree-2 group for L reconstruction identities),extract_decomposedfor chunk extraction,finalize_verifierupdated with subtable-aware identity checks for decomposed groupsutils.rs: subtable generators (generate_bitpoly_subtable/generate_word_subtable), decomp bases (bitpoly_decomp_base/word_decomp_base),decompose_bitpoly_column/decompose_word_column- mostly copied from @albert-garreta agentic branch.structs.rs:DecompInfo(subtable + decomp_bases + chunks),LookupGroupPcsDatawith optionalChunkPcsData,LookupEvalsFlatProtocol wiring (
protocol/src/):lib.rs:Proofstruct extended withlookup_chunk_commitments,lookup_chunk_evals,lookup_chunk_lifted_evalsprover.rs:prepare_lookup_groupsbranches onchunk_width— non-decomposed commits m/u against full table, decomposed decomposes into L*K virtual columns, commits chunks + m/u against subtable, appends reconstruction group;pcs_open!macro for consolidated PCS openingsverifier.rs:finalize_lookup_groupsmethod handles both paths — inline reconstruction check for decomposed groups,md_group_idxadvances by 3 (2 LogUp + 1 reconstruction);pcs_verify!macro for PCS batch verificationTest UAIRs (
test-uair/src/lib.rs):DecomposedWordUair(Word(8), chunk_width=4, K=2),DecomposedBitPolyUair(BitPoly(8), chunk_width=4, K=2)Word8LookupUair,RangeCheck8Uair— comparison pair for lookup vs constraint benchmarkingimpl_int_copy_trace!,impl_bitpoly_int_trace!,impl_sum_pair_trace!macros for trace generation boilerplateBenchmarks (
protocol/benches/e2e.rs):SimpleLookupUairin main E2E group (nvars 8/10/12)lookup_vs_constraintcomparison group:Word8LookupUair(Word(8) lookup) vsRangeCheck8Uair(binary decomposition) side-by-sideBenchZincTypesextended withLookupZt/LookupLc,CombRwidened to 448 bits for LC bit budget withInt<4>lookup evalsOptimizations
Benchmark: 8-bit range check — Lookup vs Constraint
num_varsWhy lookups are slower here:
CombR— to fitInt<4>(256-bit) lookup evals in the PCS linear-combination bit budget,CombRwas widened from 6 limbs (384 bits) to 7 limbs (448 bits). This slows every PCS operation across the entire proof, not just the lookup portion.To improve lookup performance, we should consider using GKR verison of LogUp
Test plan