Mathematical Optimization

MadNCL: GPU-Friendly NCL for Degenerate Nonlinear Programs

A critical note on MadNCL, which combines Algorithm NCL, MadNLP, and GPU-friendly KKT reformulations to improve robustness on large-scale degenerate nonlinear programs.

Problem: GPU speed is not enough when the NLP is degenerate

The paper studies large-scale nonlinear programs of the form

minx∈Rn φ(x) subject to c(x)=0, ℓ≤x≤u.

The central difficulty is not only scale. It is constraint degeneracy: cases where standard constraint qualifications such as LICQ or MFCQ fail. In these instances, an interior-point method or SQP method can run into singular KKT systems, restoration failure, or excessive regularization. The paper is motivated by large OPF instances, COPS benchmarks, and SCOPF-MPCC problems where complementarity constraints make degeneracy structural rather than accidental.

This matters because GPU acceleration does not automatically solve the numerical problem. GPUs are excellent for massive parallel linear algebra, but sparse indefinite factorization often depends on dynamic numerical pivoting, and dynamic pivoting does not fit GPU execution cleanly. Many GPU-oriented IPM formulations therefore change the KKT system into lifted or condensed forms. That can improve throughput, but it can also worsen conditioning. The question MadNCL asks is narrower and more practical: can an older augmented-Lagrangian idea be reformulated so that it is both robust to degeneracy and compatible with GPU sparse direct solvers?

MadNCL tries to retain GPU-level speed while recovering robustness in degenerate NLPs where conventional IPM formulations can fail.

From ALM to NCL

The method sits in the augmented Lagrangian family. A classical bound-constrained augmented Lagrangian subproblem can be written as

minℓ≤x≤u φ(x) - ykT c(x) + ρk2 ‖c(x)‖2 .

Algorithm NCL rewrites this subproblem by adding a free variable r:

minx,r φ(x) + ykTr + ρk2 ‖r‖2 subject to c(x)+r=0, ℓ≤x≤u.

Mathematically, the two subproblems are equivalent after substituting r=-c(x). Numerically, they are very different. The NCL constraint Jacobian is

[J(x)I].

Even if J(x) is rank deficient, this augmented Jacobian has full row rank. If λT[JI]=0, then the identity block implies λ=0. This is the cleanest reason NCL can handle LICQ failure more gracefully than a direct IPM formulation.

The variable r is not a free permission to violate constraints. It temporarily absorbs infeasibility, but the term ykTr+ρk‖r‖2/2 penalizes it. As the penalty is increased, the method pushes r back toward zero. In this sense, NCL separates two tasks that are entangled in a direct KKT system: keep the subproblem regular enough to solve, and then use the augmented-Lagrangian mechanism to recover feasibility.

Solver architecture

MadNCL is best understood as a solver architecture rather than a new optimization principle:

NLP model
  -> ExaModels derivative evaluation on GPU
  -> MadNCL augmented-Lagrangian outer layer
  -> MadNLP interior-point subproblem solve
  -> K2r or K1s KKT reformulation
  -> NVIDIA cuDSS sparse factorization

The key implementation point is that MadNCL does not treat MadNLP as a black-box inner solver. It uses the KKT structure induced by the NCL subproblem and exposes formulations that are more suitable for GPU sparse factorization. That is where most of the paper’s engineering value lies.

The outer-loop update can be read in the classical augmented-Lagrangian form:

yk+1 = yk - ρk c(xk+1) .

In NCL variables, because rk+1=-c(xk+1), the same update becomes yk+1=yk+ρkrk+1. If infeasibility is sufficiently reduced, the multiplier is updated. Otherwise, the penalty is increased and the next subproblem presses harder on feasibility.

KKT reformulations: K2, K2r, and K1s

The original NCL Newton system contains the primal variables, the free variables r, and the constraint multipliers. In simplified block form, the augmented KKT matrix is

K2 = H^+δkI0J 0ρ^kII JTI0 .

The regularization parameter δk is used to obtain the correct inertia for an IPM descent direction. The paper then derives two GPU-oriented reductions.

First, eliminating the r direction gives the stabilized KKT system

K2r = H^+δkIJ JT-θkI , θk = ρ^k-1 .

The important feature is the negative definite lower-right block. It leaves a stabilizing trace of the eliminated r variable and produces a structure that is friendlier to static LDL factorization.

Second, further condensation leads to K1s, whose core has the flavor

H^ + δkI + ρ^ JTJ .

K1s is smaller and can be attractive for Cholesky-like GPU solvers. But the same condensation that makes it compact can also amplify ill-conditioning. The empirical story in the paper is therefore not that K1s is uniformly superior. K2r is the more robust default; K1s is a problem-dependent fast option.

One theoretical contribution is the inertia equivalence:

In(K2) =(n+m,m,0) ⇔ In(K2r) =(n,m,0) ⇔ In(K1s) =(n,0,0).

This matters because the GPU-friendly systems are not arbitrary numerical hacks. Under the stated conditions, they preserve the descent-direction validity of the original NCL/IPM system.

What is actually guaranteed?

The strongest guarantee is structural: the NCL formulation repairs constraint-Jacobian rank deficiency by replacing J with [JI]. This does not prove global convergence to a global optimum, and it is not a guarantee for every degeneracy mechanism. It specifically addresses a first-order constraint degeneracy mechanism.

The paper also connects the KKT reductions to inertia conditions, so solving K2r or K1s can be justified in relation to the original augmented system. That is stronger than saying “condensation seems to work.” It explains why the reformulated linear systems can still produce valid IPM directions when the assumptions are met.

The extrapolation step is a local acceleration device. Once the inner and outer iterations are close enough, a Newton-style extrapolation step can allow the method to skip an inner solve and still move toward the next outer iterate. The relevant point is local superlinear behavior near the solution, not a claim that every instance becomes fast from the start.

Experimental reading

The experiments should be read by regime.

On CUTEst CPU benchmarks, MadNCL is not always faster than Ipopt or MadNLP. Its value is that it solves some instances where IPM methods fail because of insufficient degrees of freedom, restoration failure, or excessive primal-dual regularization. This supports the robustness story rather than a speed-dominance story.

On GPU OPF and COPS benchmarks, the picture is mixed but informative. In a large OPF case with hundreds of thousands of variables and over a million constraints, MadNCL-K2r with cuDSS reports a large speed-up over a CPU MA27-based MadNCL variant. At the same time, K1s can fail on that OPF instance because condensation worsens conditioning. In COPS-type problems, K1s can be stable and fast. The practical conclusion is that KKT form selection is problem dependent.

The SCOPF-MPCC results are the closest match to the paper’s main argument. MPCC formulations violate MFCQ at every feasible point, so degeneracy is unavoidable. The paper reports that Ipopt and MadNLP can end in restoration failure or infeasible solutions, while MadNCL-K2r solves the tested instances to the reported tolerance on both CPU and GPU. This is the clearest evidence that NCL regularization plus a stabilized KKT system can matter in genuinely degenerate large-scale models.

Limitations

First, MadNCL is not a universal speed improvement over GPU-IPM. On regular OPF instances, other GPU IPM formulations can be faster. The distinctive strength is robustness under degeneracy while retaining useful GPU throughput.

Second, NCL does not solve every degeneracy. The mechanism is strongest for constraint-Jacobian degeneracy and LICQ failure. If the reduced Hessian is nearly singular or the problem has deeper second-order degeneracy, the augmented-Lagrangian story may not provide the same protection.

Finally, some of the most degenerate MPCC experiments use a looser tolerance than the standard NLP benchmarks. That may be practically reasonable, but it means the evidence is about robust progress to a useful tolerance, not necessarily high-precision resolution of every degenerate case.

Assessment

This paper is best understood as an implementation-theory hybrid. It does not discover a new optimization principle from scratch. Instead, it shows that the old robustness advantages of ALM/NCL become newly relevant when second-order NLP solvers are moved onto GPUs.

The core chain is:

degenerate NLP
  -> NCL regularization
  -> better structured KKT systems
  -> GPU-compatible sparse factorization
  -> robust large-scale solver behavior

A formulation-level regularization can be carried all the way down to GPU-friendly KKT linear algebra, and this combination is useful on large-scale degenerate NLPs such as SCOPF-MPCC.

References

Montoison, A., Pacaud, F., Saunders, M., Shin, S., & Orban, D. (2025). MADNCL: a GPU implementation of algorithm NCL for large-scale, degenerate nonlinear programs. arXiv preprint arXiv:2510.05885.