Skip to content

Conversation

@dpanici
Copy link
Collaborator

@dpanici dpanici commented Dec 22, 2025

Deflation method motivation: find multiple solutions to non-convex optimization problems (which can include certain equilibirum solves)

This PR adds a couple ways to apply deflation methods in stellarator optimization and equilibrium solving

  • adds a new equilibrium objective ForceBalanceDeflated which is the usual force balance, but multiplied by the deflation operator M(x;y) = 1/(x-y)^p + sigma
  • adds a new generic objective DeflationOperator whose cost is simply M(x;y) = 1/(x-y)^p + sigma (to add as constraints to an optimization like in Tarek 2022 work)

References:

  • Riley 2024 - for the "exp" deflation type
  • Farrell 2015 - for the addition of the shift parameter and the general form of deflation used

TODO

  • add tests
  • update changelog
  • update ForceBalanceDeflated to use pytree inputs for params_to_deflate_with
  • add option for using single shift, like discussed in Riley 2024

Future work for another PR:

  • Implement algorithms from Riley 2024
    • Implement deflated line-search Gauss-Newton algorithm like they use
    • Adapt their algorithm for our usual trust-region approach
  • Add a wrapper objective so that one can multiply the deflation operator with any arbitrary objective, instead of only able to add it as an extra cost when doing stage one/two optimization.

@dpanici dpanici requested review from a team, YigitElma, ddudt, f0uriest, rahulgaur104 and unalmis and removed request for a team December 22, 2025 19:00
@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

Memory benchmark result

|               Test Name                |      %Δ      |    Master (MB)     |      PR (MB)       |    Δ (MB)    |    Time PR (s)     |  Time Master (s)   |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
  test_objective_jac_w7x                 |    2.68 %    |     3.934e+03      |     4.039e+03      |    105.25    |       41.60        |       38.47        |
  test_proximal_jac_w7x_with_eq_update   |    1.07 %    |     6.547e+03      |     6.617e+03      |    70.20     |       179.88       |       179.09       |
  test_proximal_freeb_jac                |    0.11 %    |     1.322e+04      |     1.324e+04      |    14.39     |       93.87        |       92.87        |
  test_proximal_freeb_jac_blocked        |    0.00 %    |     7.543e+03      |     7.543e+03      |     0.29     |       82.94        |       82.23        |
  test_proximal_freeb_jac_batched        |   -0.17 %    |     7.529e+03      |     7.516e+03      |    -12.84    |       82.05        |       81.95        |
  test_proximal_jac_ripple               |    0.25 %    |     3.524e+03      |     3.533e+03      |     8.84     |       66.32        |       65.82        |
  test_proximal_jac_ripple_bounce1d      |   -0.58 %    |     3.715e+03      |     3.693e+03      |    -21.52    |       77.48        |       76.95        |
  test_eq_solve                          |   -0.04 %    |     1.991e+03      |     1.990e+03      |    -0.82     |       91.90        |       91.09        |

For the memory plots, go to the summary of Memory Benchmarks workflow and download the artifact.

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.

2 participants