slsqp_jax.slsqp.preconditioner

L-BFGS inverse-Hessian and stochastic-diagonal preconditioner factories, including the Woodbury correction for the proximal-stabilised system.

slsqp_jax.slsqp.preconditioner

Preconditioner factories for the QP inner solver.

Two preconditioner types are offered, selected by PreconditionerConfig.type:

  • "lbfgs" — L-BFGS inverse Hessian via the two-loop recursion (Algorithm 7.4 of Nocedal & Wright).

  • "diagonal" — stochastic diagonal Hessian estimate (Bekas, Kokiopoulou & Saad, 2007), probed each step with diagonal_n_probes Rademacher vectors.

When equality constraints are present and sSQP proximal stabilisation is active (ProximalConfig.tau > 0), both options apply a Woodbury correction to deliver B̃⁻¹ for = B + (1/μ) Aᵀ A. The mu × mu inner block is factored once per call.

These functions are pure factories: they take the precomputed LBFGSHistory / Lagrangian HVP and return a closure v -> M v.

slsqp_jax.slsqp.preconditioner.build_diagonal_preconditioner(*, lagrangian_hvp_fn, n, step_count, n_probes, eq_jac, proximal_active, proximal_mu)[source]

Stochastic diagonal Hessian preconditioner (Bekas et al., 2007).

Estimates diag(H_L) via Rademacher probing of the exact Lagrangian HVP, with a deterministic key derived from the step count. Small / negative entries are clamped to a positive floor so the preconditioner stays SPD.

Return type:

Callable[[Float[Array, 'n']], Float[Array, 'n']]

Parameters:
  • lagrangian_hvp_fn (Callable[[Float[Array, 'n']], Float[Array, 'n']])

  • n (int)

  • step_count (Array)

  • n_probes (int)

  • eq_jac (Array | None)

  • proximal_active (bool)

  • proximal_mu (Float[Array, ''] | float)

slsqp_jax.slsqp.preconditioner.build_lbfgs_preconditioner(*, lbfgs_history, eq_jac, proximal_active, proximal_mu)[source]

L-BFGS inverse Hessian preconditioner.

With proximal stabilisation enabled and equality constraints present, applies the Woodbury identity to deliver (B + (1/μ) Aᵀ A)⁻¹. Otherwise returns a plain B⁻¹ apply.

Return type:

Callable[[Float[Array, 'n']], Float[Array, 'n']]

Parameters: