Fix QUBO local-minimum polish#32
Conversation
c650b7d to
8ba41c9
Compare
bernalde
left a comment
There was a problem hiding this comment.
I found two blocking issues: the new polish phase is not bounded by the public solve time limit, and the issue regression bypasses the public solve path it is meant to protect. I would not merge this until those are addressed.
| x = sample(dist) | ||
| optimal = obj(x) | ||
|
|
||
| if !isnothing(postprocess) |
There was a problem hiding this comment.
Blocking: time_limit is only checked inside the DMRG loop, then polish runs with its own default 1s budget even if the caller's solve budget is already exhausted. This also affects the JuMP path because MOI.TimeLimitSec() maps to time_limit in QUBODrivers.sample, but the default polish_time_limit still runs afterwards. Users relying on time limits can now exceed them by up to the polish budget on every <=36 variable QUBO. Please cap the polish budget by the remaining solve time for finite time_limit, or skip polish when no time remains, and add a small test covering that interaction.
There was a problem hiding this comment.
Addressed in b59237b. Polish now receives the remaining overall solve budget and is skipped when no time remains; polish_time_limit is only an additional cap. Added test/qubo.jl coverage in polish respects solve time limit.
| c = 641.2245 | ||
| x0 = zeros(Int, 36) | ||
|
|
||
| polished = TenSolver._branch_bound_qubo(Q, l, c, x0, dot(x0, Q, x0) + dot(l, x0) + c) |
There was a problem hiding this comment.
Blocking: This regression test calls the private helper directly, so it would still pass if minimize stopped wiring postprocess, if polish default changed, or if the returned Solution did not sample the polished bitstring. Issue #19 is about the public solve path getting stuck in local minima. Please add a public integration test that exercises TenSolver.minimize(Q, l, c; polish=true, ...) and asserts both the returned objective and the sampled solution objective. The helper-level test can stay as unit coverage.
| The variance test determines whether DMRG converged to an eigenstate (not necessarily the ground state), | ||
| but is expensive to calculate. | ||
| - `polish :: Bool` - Run bounded branch-and-bound postprocessing for QUBO matrix inputs. Defaults to `true`. | ||
| - `polish_max_variables :: Int` - Maximum number of variables eligible for exact polishing. Defaults to `36`. |
There was a problem hiding this comment.
Nonblocking: exact polishing is misleading while polish_time_limit can expire; _branch_bound_qubo returns the best improved incumbent found so far without indicating that optimality was proven. Please describe this as bounded or best-effort polishing unless the search completes, or expose proof status if the exactness guarantee matters.
There was a problem hiding this comment.
Addressed in b59237b. The docstring and regression test wording now describe this as bounded polishing, and the docs state that the step returns the best improved incumbent found within the budget.
|
Follow-up pushed: b59237b ( Main changes made:
Tests run and results:
Comments intentionally not addressed:
Remaining risks or follow-up items:
|
Summary
minimizekeywords and JuMP raw optimizer attributes:polish,polish_max_variables, andpolish_time_limit.11.7099.Tests run
julia +1.12 --project=. -e 'using Test, Random, LinearAlgebra, TenSolver; include("test/utils.jl"); include("test/qubo.jl")'QUBO Correctness | 78/78.julia +1.12 --project=. -e 'using Pkg; Pkg.test()'TenSolver tests passed.git diff --check HEADNotes
julia +1.10 --project=. -e 'using Pkg; Pkg.instantiate()'could not be run successfully with the checked-in manifest because the manifest was resolved with Julia 1.12.6 and Julia 1.10 reported missingOpenSSL_jll.Closes #19