Skip to content

Weight caps: re-solve HiGHS infeasibility verdicts without presolve - #76

Open
Autoplectic wants to merge 2 commits into
mainfrom
weight-cap-presolve
Open

Autoplectic wants to merge 2 commits into
mainfrom
weight-cap-presolve

Conversation

@Autoplectic

@Autoplectic Autoplectic commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

Summary

  • _HeaviestStatesRelaxation.bound (behind generator_weight_cap, generator_coverage_bound and generator_heaviest_term_bound) dropped every box whose LP HiGHS called infeasible. HiGHS's presolve gets this wrong on these LPs: on ((1,0),(2,2),(1,0)) it made 3,101 false infeasibility calls at 1,000 and 2,000 boxes. One of them dropped the box holding a 3-state generator's heaviest state at depth 81, so the generator coverage bound came out at C_mu = 1.0459, above that generator's entropy, 1.0420.
  • An infeasible verdict is now solved again without presolve. A box is dropped only when that solve also says infeasible and an exact Farkas certificate (certified_bound) verifies; otherwise it keeps the trivial bound 1.
  • certified_lp_minimum retries without presolve when its Farkas test fails, so certified_generator_weight_cap no longer fails on such boxes.
  • Docs: a paragraph in docs/generators/generative_models.rst on when a box is dropped. With float data a nonempty box is always feasible (the explicit states can have weight 0), so the certificate only matters for rationalized data.

With the fix the generator coverage bound on that process is 1.0419595092. It meets the generator's entropy, 1.0419595095, to 3e-10. In short probes on three other processes, no box stayed infeasible without presolve, so the exact certificate never ran.

Recomputed bounds

Every lower bound in the research dataset that uses these caps was recomputed on this branch: 118 generator coverage bounds and 55 generator heaviest-term bounds.

  • HiGHS with presolve called 3,143 of about 8.7 million box LPs infeasible, on four processes, 3,101 of them on the process above. Solved again without presolve, all 3,143 were feasible. 44 stopped on numerical trouble and kept the trivial bound. So the exact certificate never ran.
  • 55 of the 55 heaviest-term bounds and 116 of the 118 coverage bounds are reproduced to 2.7e-9. One coverage bound moved: the one above, to 1.0419595092. Another, computed with the code of 2026-11-14, is not reproduced. Every LP there was feasible, so the difference comes from a code change, not from presolve.
  • On one process (a 3 × 6 joint) the coverage bound does not finish in three hours when run to all 1,000 and 2,000 boxes. Its recorded value came from generative_model, which runs the bound with deadline=share(0.3). Under the same 1,200 s deadline this branch gives that value exactly, with all 4,608 LPs feasible, so the fix adds no work there.

Test plan

  • tests/test_generator_caps.py: the depth-81 box itself (on main, bound returns None for it); a mocked presolve verdict is solved again without presolve; a box is dropped only with a Farkas certificate.
  • tests/test_certificates.py: a false infeasible verdict in certified_lp_minimum is solved again without presolve and certified.
  • Every test module that reaches the changed code: 38 + 105 passed locally.
  • ruff check and ruff format --check on the changed files.
  • CI.

Ryan James added 2 commits November 24, 2026 22:16
HiGHS's presolve calls feasible box LPs of the weight-cap relaxation infeasible, and
the branch and bound dropped every such box. On ((1,0),(2,2),(1,0)) it dropped the
box holding a 3-state generator's heaviest state at depth 81 (3,101 false verdicts at
1,000 and 2,000 boxes), so the "certified" generator coverage bound came out at
C_mu = 1.0459, above that generator's entropy 1.0420.

An infeasible verdict is now solved again without presolve, and a box is dropped
only when that also says infeasible and an exact Farkas certificate verifies.
certified_lp_minimum retries without presolve when its Farkas test fails, so
certified_generator_weight_cap no longer fails on such boxes. With the fix the bound
on that process meets the generator's entropy to 3e-10.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant