A standard physics-informed network imposes invariants like div u = 0 as soft penalties. That produces competing loss terms with hand-tuned weights and a poorly conditioned optimization.
Enforce it by construction instead
A "cage" wraps an underlying field and exposes a transformed view such that the invariant holds for every input, every parameter setting, to floating-point round-off. The 2-D streamfunction cage is the canonical example:
u = ∂_y ψ, v = -∂_x ψ ⇒ ∂_x u + ∂_y v ≡ 0
Incompressibility is now structural, not a penalty. The 3-D vector-potential cage does the same via u = curl(A), and the skew-symmetric advection form conserves kinetic energy exactly even when the predicted field is not perfectly divergence-free.
Why this composes with the fast path
Every higher-order derivative of the caged field reduces to mixed partials of the underlying potential, which the closed-form tower computes directly. So you get the invariant and the speed - the cage does not force you back onto nested autodiff.
Measured impact
On a 3-D Navier-Stokes PINN, the vector-potential cage cut training time by roughly 3x versus the soft-incompressibility baseline at the same forecast horizon, simply by removing one source of ill-conditioning from the objective.
Takeaway
If an invariant can be expressed as a differential identity, prefer a cage over a penalty. You remove a hyperparameter, you remove a failure mode, and you keep your derivatives closed form.