Conversation
isPANN
added this pull request to stack #1181
September 28, 2026 08:26
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## fix/remaining-ilp-overhead #1185 +/- ##
==============================================================
+ Coverage 96.79% 96.80% +0.01%
==============================================================
Files 1073 1073
Lines 141444 141877 +433
==============================================================
+ Hits 136905 137348 +443
+ Misses 4539 4529 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Motivation and changes
This PR completes the prediction contracts of 17 reduction rules and supplies another missing field on
MinimumVertexCover → LongestCommonSubsequence. It replaces unavailable declarations with exact formulas or conservative upper bounds derived from source parameters.An unavailable intermediate parameter can prevent a whole reduction path from predicting its final size. Several declarations required an exact count even though a simple upper bound was sufficient; others had become stale as source parameters were added. For example,
SubsetSum → CVPstill declared its dimensions unavailable even though SubsetSum already exposed the required input bit length. Repairing these local contracts restores size predictions through circuit and lattice paths to QUBO.Stacked on #1184 (
fix/remaining-ilp-overhead). Related to #1175.What changes for callers
Before values below are established from the comparison base's registered contracts; the new bounds are checked against constructed target instances.
num_edges ≤ rows * cols; a 2×2 diagonal Boolean matrix has 2 edges and a bound of 42n + handn + h - 1, using existing source magnitude bitshr, ambient dimensiond, and magnitude bitsh, at mostV = r * (r² + d + r*h + 3)variables andV²quadratic termsn + 12m + 3vertices and its square for edgesnum_items + capacity + 1variables and its square for quadratic termsAdditional formulas cover SAT/NAE literal counts, SAT and factoring circuit statistics, flow capacities, scheduling precedences, set normalization, bipartite graph counts, and prime-generated incongruence counts. The SAT → NAE literal formula also corrects an existing error: an empty clause produces two sentinel occurrences, so the previous claimed equality did not hold.
The only new source parameter is CVP's
max_numeric_magnitude_bits: the maximum binary digit count of the absolute basis and target entries, at least one. It uses the existing magnitude helper and is computed directly from the source instance. Numerical magnitudes are necessary because dimensions alone cannot bound the encoding width. The incoming SubsetSum rule explicitly supplies a bound of two for this parameter, since its constructed coordinates have magnitude at most two.Each rule declares its formulas locally, with only registered source parameters on the right-hand side. The paper includes derivations for the less immediate bounds.
Coverage and remaining work
Audit of all 333 registered edges:
These are direct-edge counts. Some composed paths still lose all predictions, including
Partition → Knapsack → QUBO.The remaining seven missing fields are:
cross_frequency_product.schedule_horizon.max_capacity.capacity.max_capacity.capacity.time_horizon.They need expressions with variable exponents, such as
2^hfor numeric magnitudes or2^mfor cross-frequency products. Extending exact expression evaluation and safe upper-bound composition requires a separate approved change to the formula contract. This PR leaves that work pending. Concrete prediction evaluation also retains its existing numeric range checks.Verification
cargo test --workspace --features example-db -- --include-ignoredpassed.SubsetSum → DecisionCVP → CVP → QUBOandFactoring → CircuitSAT → SAT → NAE-SAT → ILP<bool> → QUBO, comparing predicted sizes with actual targets and recovered results with brute force./simplify, all 20 parameter-contract tests passed again.