feat: add reshape step to jagged PCS#48
Merged
kunxian-xia merged 3 commits intofeat/jagged_pcsfrom Apr 30, 2026
Merged
Conversation
…over Reinterpret the giga polynomial q' as a multi-column matrix with fixed power-of-two height h = 2^reshape_log_height before passing to the inner PCS. This saves (num_giga_vars - log_h) FRI layers and reduces padding waste from ~50% to at most h-1 entries. Key changes: - jagged_commit accepts reshape_log_height, transposes to row-major when w>1 - jagged_batch_open splits ρ into (ρ_row, ρ_col), opens inner PCS at ρ_row - jagged_batch_verify reconstructs q'(ρ) from col_evals via eq(ρ_col, i) - Benchmark sweeps log_h values to show the tradeoff curve - When reshape_log_height = num_giga_vars (w=1), behavior is identical to before Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
q'as a multi-column matrix with fixed power-of-two heighth = 2^reshape_log_heightbefore passing to the inner PCShinstead of the full2^m, savingm - log_hFRI layersh - 1entriesBenchmark results (10 matrices × 8 cols, heights 2^14–2^18)
log_hw(cols)When
reshape_log_height = num_giga_vars, behavior is identical to before (single column, no reshape overhead).Test plan
reshape_log_height = num_giga_vars(backward compat)test_jagged_reshape_single_poly— 1 poly, log_h=6, w=16test_jagged_reshape_multiple_polys— 3 polys with different heights, log_h=8🤖 Generated with Claude Code