Skip to content

Embedding Dual-Fixing into Probing - #3244

Merged
Opt-Mucca merged 65 commits into
latestfrom
probe-dual-fix
Oct 5, 2026
Merged

Opt-Mucca merged 65 commits into
latestfrom
probe-dual-fix

Conversation

@Opt-Mucca

@Opt-Mucca Opt-Mucca commented Aug 27, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This implement the technique from https://link.springer.com/article/10.1007/s12532-026-00336-z

Locally I've observed 1.5% time improvement and 8% node improvement across all-optimal. It affects roughly 50% of the instances that solve under both settings. That seems to be a bit better than the numbers that are reported in the paper, and I'd chalk it up to (1) I'm using a 30min time limit (2) I happen to have randomly dropped some unlucky MIPLIB instances (3) My implementation is more efficient (4) I fixed some errors in the reference implementation that were missing some fixings.

Edit: Forgot good old (5). I've written incorrect code.

It seems to affect sub-mips extremely heavily, so introduces a lot of noise on instances that are racing for a primal solution. I'd not trust my results without extra testing from @fwesselm (There's not that many instances where the size of the presolved problem changes, and even for those that do, it's usually only a minor reduction)

@fwesselm I tested this before the last commit, so there's a small chance I broke something (I will test it again over the weekend). I realised that copying the object each time a domain is copied doesn't make sense because it's only used in presolve, and now have tried to get a bit fancy with the copy constructors of HighsDomain. Hopefully this shaves off another small time improvement.

Checklist

  • I have read the contributing guidelines
  • This PR targets the latest branch
  • Tests are passing
  • Documentation was updated where relevant
  • This PR is not primarily AI-generated (per the AI contributions policy in CONTRIBUTING.md)

@Opt-Mucca

Copy link
Copy Markdown
Collaborator Author

@ZhaoWeiWang0319 Thank you so much for the review! Glad that you liked the the code-separation of the zero-cost fixings. Even if you're overlooking stuff this review was insanely helpful.

  1. Great spot. The row slack was definitely overly optimistic, and I'm hoping this wasn't 100% of the reason behind my good results..... I've followed your suggestion and invoked storeLiftingOpportunities directly before propagating any zero-cost fixings.

  2. I will look into this over the next few hours. I guess it wasn't just because I've removed the GDF reductions? I believe that there shouldn't really be any difference in the actual reductions otherwise, so this should point to an issue somewhere.

  3. I was too careful here and wasn't 100% sure that it's alright to store them. I think it needs a stronger result than just storing the direction across both probing values, i.e., needs to be consistent across all probed columns and all directions. zeroCostDirections_ is consistent across the entire process after double checking though, so I've now removed the whole dualSafe in the tentative implications. Another great spot!

@Opt-Mucca

Copy link
Copy Markdown
Collaborator Author

@ZhaoWeiWang0319 Found the reason for neos-787933!! In your original code you're copying the entire domchgstack and recording all binary implications within that stack. I was only storing the binary implications for comparison if some zero-cost fixing was applied to that branch. So the example:

  • Already know that x = 1 => y = 0 (stored in the clique table)
  • Conclude from a post zero-cost fixing propagation that x = 0 => y = 1.

I was not storing the first implication in dualFixProbingBinInds_ because it was (1) not necessarily from a branch with zero-cost fixing applied and (2) would have been removed from the simplified implication list as it's already stored in the clique table. I'll now run some tests with the new code to see if it makes any major performance difference. I'm a bit worried about the new overhead in always copying domchgstack.

Thank you for pointing out this instance! FYI: I'm 95% confident that all other solvers (including SCIP) solve this instance at the root node by replacing some of the knapsack rows by multiple setppc rows using information from the clique table. We've been unable to do this because of the presolve limitations on adding new rows, but this restriction has recently been lifted. It's cool that the instance is now "easily" solvable with a different technique (still takes a non-trivial amount of presolve time).

@ZhaoWeiWang0319

Copy link
Copy Markdown
Contributor

@ZhaoWeiWang0319 Found the reason for neos-787933!! In your original code you're copying the entire domchgstack and recording all binary implications within that stack. I was only storing the binary implications for comparison if some zero-cost fixing was applied to that branch. So the example:

* Already know that `x = 1 => y = 0` (stored in the clique table)

* Conclude from a post zero-cost fixing propagation that `x = 0 => y = 1`.

I was not storing the first implication in dualFixProbingBinInds_ because it was (1) not necessarily from a branch with zero-cost fixing applied and (2) would have been removed from the simplified implication list as it's already stored in the clique table. I'll now run some tests with the new code to see if it makes any major performance difference. I'm a bit worried about the new overhead in always copying domchgstack.

Thank you for pointing out this instance! FYI: I'm 95% confident that all other solvers (including SCIP) solve this instance at the root node by replacing some of the knapsack rows by multiple setppc rows using information from the clique table. We've been unable to do this because of the presolve limitations on adding new rows, but this restriction has recently been lifted. It's cool that the instance is now "easily" solvable with a different technique (still takes a non-trivial amount of presolve time).

@Opt-Mucca Glad that my observations are helpful !!

I also noticed some of the other updates - for example, no longer checking cliquetable.isFull() when fixing variables based on probing results involving zero-cost fixings. That change looks very reasonable to me.

The explanation for neos-787933 is particularly interesting. We hadn't realized how important copying the entire domchgstack was for this instance. You tiny example really helps clarify this. Huge thanks for working on this and everything else as well !

I think the code now is great, and I want to share more observations on neos-787933.

In fact, this instance was a bit of a surprise for us while preparing the paper. When we looked into it, we found many constraints of the form

\sum_{i=1}^n x_i <= n x_{n+1},

with all variables binary. In particular, fixing x_{n+1}=1 makes such a row redundant.

At the same time, this constraint can be disaggregated into n size-two clique constraints,

x_i + (1-x_{n+1}) <= 1,\qquad i=1,...,n,

so this seems closely related to the setppc/clique-table approach you mentioned. Being able to exploit this structure appears to be quite important for solving this instance effectively.

Another interesting observation on neos-787933 is that more than 80% of the total time - about 14s out of 18s in our run on my device - is spent in dual substitution (in HPresolve::dualFixing, one of the techniques in this PR: #2531; see also section 4.4 of Achterberg et al., Presolve Reductions in Mixed Integer Programming).

As discussed in Section 2.3 of our paper, once dual fixing is embedded into probing, dual substitution is theoretically dominated by our approach. In practice, the situation is slightly less clear because dual substitution scans all rows (meaning that currently HiGHS captures all possibilities for applying dual substitution), whereas probing generally does not probe every binary variable.

So - one possibility would be to disable dual substitution when this dual fixing is embedded into probing. Of course, whether that is beneficial overall would need to be evaluated on a larger test set.

@Opt-Mucca

Copy link
Copy Markdown
Collaborator Author

@fwesselm This should be ready for a review and for your larger testing framework. I'm getting a 1.5% improvement over three seeds.

@fwesselm fwesselm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Opt-Mucca, this looks great!

Comment thread highs/presolve/HPresolve.cpp Resolved
Comment thread highs/mip/HighsImplications.cpp Resolved
Comment thread highs/mip/HighsDomain.cpp Resolved
@Opt-Mucca

Copy link
Copy Markdown
Collaborator Author

Found to be performance neutral on the larger test set.... I still think this change has potential given the positive observations on my smaller test set. The current issue is that it destroys some structure in neos-3046615-murg, which if fixed would make this worth merging from my perspective.

@ZhaoWeiWang0319

Copy link
Copy Markdown
Contributor

Found to be performance neutral on the larger test set.... I still think this change has potential given the positive observations on my smaller test set. The current issue is that it destroys some structure in neos-3046615-murg, which if fixed would make this worth merging from my perspective.

Thank you for the insightful results, @Opt-Mucca @fwesselm ! This is an interesting issue, and I am looking on this!

Comment thread highs/presolve/HPresolve.cpp Resolved
@Opt-Mucca

Copy link
Copy Markdown
Collaborator Author

@ZhaoWeiWang0319 A final FYI: I found that we were missing two cases for additional reductions.

  1. If DualFixProbingPropagation::propagate() fixed some columns then we were skipping rows made redundant by those fixes because previousRedundantRowSize was being set after changing all the newly found column bounds.
  2. We weren't tracking rows made redundant outside of the main propagate call, i.e., bound changes added when combining results from the up and down probing direction. This meant that many possible fixes were being ignored. Example: Fixed y because it is fixed in both the up and down probe, and this fixing makes the final upper lock on x redundant from row r. That wasn't recorded, so it had to wait on another bound change that affected row r, which doesn't necessarily happen.

Those changes have resulted in even more performance. Will be merging it now.

@Opt-Mucca
Opt-Mucca merged commit 8a5f9c1 into latest Oct 5, 2026
557 of 558 checks passed
@jajhall
jajhall deleted the probe-dual-fix branch October 5, 2026 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants