A Frobenius-Optimal Projection for Enforcing Linear Conservation in Learned Dynamical Models
John M. Mango, Ronald Katende
TL;DR
The paper addresses restoring linear conservation laws in data-driven linear dynamical models by presenting a closed-form Frobenius-norm projection onto the constraint subspace defined by $C^\top A = 0$. For a single invariant the optimal correction is the rank-1 update $A^\star = \widehat{A} - \frac{c\,c^\top \widehat{A}}{\|c\|_2^2}$, and for multiple invariants the generalized projector $P_C = I_n - C (C^\top C)^{-1} C^\top$ yields $A^\star = P_C \widehat{A}$, enforcing exact conservation with minimal perturbation. The key results are the uniqueness of the minimizer, the rank of the update (rank-$1$ for a single invariant and rank$(A^\star - \widehat{A}) = \operatorname{rank}(C^\top \widehat{A})$ for multiple), and the ability to apply the method in both continuous- and discrete-time settings. Numerical experiments on a Markov-type generator confirm exact invariance and near-original dynamics, validating the approach as a lightweight, general mechanism to embed exact invariants into learned linear models.
Abstract
We consider the problem of restoring linear conservation laws in data-driven linear dynamical models. Given a learned operator $\widehat{A}$ and a full-rank constraint matrix $C$ encoding one or more invariants, we show that the matrix closest to $\widehat{A}$ in the Frobenius norm and satisfying $C^\top A = 0$ is the orthogonal projection $A^\star = \widehat{A} - C(C^\top C)^{-1}C^\top \widehat{A}$. This correction is uniquely defined, low rank and fully determined by the violation $C^\top \widehat{A}$. In the single-invariant case it reduces to a rank-one update. We prove that $A^\star$ enforces exact conservation while minimally perturbing the dynamics, and we verify these properties numerically on a Markov-type example. The projection provides an elementary and general mechanism for embedding exact invariants into any learned linear model.
