betaFeedback

WorksEngineering

Structure-Preserving Learning for Nonlinear Nonholonomic Dynamics

Abstract

Learning the dynamics of mechanical systems subject to nonlinear nonholonomic constraints is challenging, as data-driven models may violate the underlying physical constraints, leading to inconsistent predictions. To address this problem, we develop a constraint-preserving learning framework based on the Lagrange-d'Alembert-Chetaev equations and tangency to the constraint submanifold, which together define an affine space of admissible accelerations. Using the kinetic-energy metric and the Moore-Penrose pseudoinverse, we construct a metric projector and the corresponding Chetaev correction. Embedding this geometric structure directly into a Gaussian process prior ensures that both prior and posterior dynamics satisfy the acceleration constraints exactly. We characterize the resulting reproducing kernel Hilbert space (RKHS), derive an adapted-coordinate representation, and establish nonexpansiveness and consistency transfer. Numerical experiments on a three-dimensional directional flocking system with up to 50 agents demonstrate exact constraint preservation and robustness to constraint-incompatible observations.

Introduction

Learning dynamical models from data has become increasingly important in robotics and control, particularly when accurate first-principles models are unavailable or affected by uncertainty [6]. In this context, Gaussian processes (GPs) have shown promising results in learning dynamical models from data, offering a flexible probabilistic framework that combines nonparametric regression with uncertainty quantification [20]. However, unconstrained learning methods generally do not preserve the underlying geometric structure of mechanical systems, potentially limiting their generalization capabilities and reliability. This has motivated structure-preserving approaches, e.g., based on Hamiltonian and Lagrangian models [16] (Crammer et al. 2020) and physics-informed GPs for mechanical and port-Hamiltonian systems [15, 2].

An especially interesting class of physical systems is that of nonholonomic mechanics, in which geometric constraints restrict the admissible motions and fundamentally shape the system dynamics. Representative examples include wheeled mobile robots, car-like vehicles, rolling disks, and robotic systems subject to non-slip contact conditions [4]. Learning such systems without accounting for this structure may produce physically inconsistent predictions. Recent approaches to overcome this issue include constraint discovery [24] and Lagrangian networks [12]. In particular, [3] embed a linear nonholonomic distribution directly into a matrix-valued GP kernel. More generally, constraint-preserving GP kernels for known linear operator constraints were developed in [18].

© 2027 T. Beckers, A. Bloch & L. Colombo.

However, nonlinear nonholonomic constraints are geometrically different: they define a constraint submanifold of the tangent bundle together with a velocity-dependent space of admissible directions ([11, 22]). Typical examples include constant-kinetic-energy constraints (thermostats) and nonlinear constraints imposing parallelism between velocities ([5]). Unfortunately, the projection construction used for linear nonholonomic constraints in [3] does not apply directly. The nonlinear case is not simply obtained by replacing the linear projector by a state-dependent one, as second-order tangency yields an affine constraint Aa+b=0Aa+b=0 for admissible accelerations aa. Moreover, natural representations of nonlinear nonholonomic constraints may involve constraint functions that are not independent, leading to singular multiplier equations, e.g., by cross-product descriptions of parallel-velocity constraints in flocking systems.

Main contributions. We develop a structure-preserving GP framework for learning nonlinear nonholonomic dynamics whose constraint functions need not be independent. The Chetaev equations and Moore-Penrose pseudoinverse yield an affine decomposition of admissible accelerations that is independent of the chosen constraint representation and can be embedded directly into a matrix-valued GP prior. We prove positive semidefiniteness, exact constraint preservation by prior and posterior predictions, characterize the associated RKHS and adapted-coordinate representation, and establish nonexpansiveness and consistency transfer in the kinetic-energy metric. We also distinguish constrained-prior conditioning from posterior projection, showing that the former exactly excludes constraint-incompatible observation components that may persist in the latter. We extend the framework to 3D directional flocking with nonlinear cross-product constraints and establish a common metric projector for connected velocity-alignment graphs. Experiments with up to 50 agents show that the proposed nonholonomic GP outperforms standard and projected GPs.

The remainder of the paper is organized as follows. Section 2 reviews nonlinear nonholonomic mechanics. Section 3 develops the structure-preserving kernel and its theoretical properties. Section 4 presents the three-dimensional flocking application, followed by concluding remarks.

Nonlinear Nonholonomic Mechanics

Let QQ be an nn-dimensional configuration manifold endowed with a Riemannian metric GG, and consider the mechanical Lagrangian L(vq)=12Gq(vq,vq)−V(q)L(v_q)=\frac{1}{2}G_q(v_q,v_q)-V(q), vq∈TqQv_q\in T_qQ. In local coordinates, GG is represented by a symmetric positive-definite matrix M(q)M(q), and we write x=(q,v)∈TQx=(q,v)\in TQ. Throughout, DqD_q and DvD_v denote partial derivatives with respect to the generalized position qq and velocity vv, respectively. The system is subject to mm nonlinear velocity constraints Φ(q,v)=0\Phi(q,v)=0, with Φ:TQ→Rm\Phi:TQ\to\mathbb{R}^m. We restrict our attention to a smooth submanifold C⊂Φ−1(0)\mathcal{C}\subset\Phi^{-1}(0) satisfying TxC=ker⁡DΦ(x)T_x\mathcal{C}=\ker D\Phi(x) for every x∈Cx\in\mathcal{C}, see de León et al. [11]; Cendra et al. [7], while the defining constraint functions need not be independent. We assume that A(q,v):=DvΦ(q,v)A(q,v):=D_v\Phi(q,v) has constant rank r≤mr\le m on C\mathcal{C} and that DqΦ(q,v)v∈Im⁡A(q,v)D_q\Phi(q,v)v\in\operatorname{Im}A(q,v).

Unlike the linear nonholonomic case, the admissible velocities at fixed position qq generally do not form a vector space. Instead, each x=(q,v)∈Cx=(q,v)\in\mathcal{C} determines the velocity-dependent subspace Sx:=ker⁡A(q,v)⊂TqQS_x:=\ker A(q,v)\subset T_qQ, of dimension n−rn-r, which is the fiberwise linearization of the nonlinear constraints, see Stratoglou et al. [22].

Then, the dynamics is described by the Lagrange-d’Alembert-Chetaev equations

ddt∂L∂v−∂L∂q=A(q,v)⊤λ,Φ(q,v)=0,(1)\frac{d}{dt}\frac{\partial L}{\partial v}-\frac{\partial L}{\partial q}=A(q,v)^{\top}\lambda,\qquad\Phi(q,v)=0, \tag*{(1)}

where λ∈Rm\lambda\in\mathbb{R}^{m} are the Lagrange multipliers [7, 10]. Via the kinetic-energy metric, the Chetaev reaction covector A⊤λA^{\top}\lambda corresponds locally to the acceleration M−1A⊤λ∈Sx⊥MM^{-1}A^{\top}\lambda\in S_{x}^{\perp_{M}}, where ⟨z,w⟩M:=z⊤M(q)w\langle z,w\rangle_{M} := z^{\top}M(q)w, Sx⊥M:={z∈TqQ:⟨z,w⟩M=0 ∀w∈Sx}S_{x}^{\perp_{M}} := \{z \in T_{q}Q : \langle z,w\rangle_{M} = 0 \ \forall w \in S_{x}\}. Let g(q,v)g(q,v) denote the unconstrained acceleration, so that v˙=g+M−1A⊤λ\dot{v} = g + M^{-1}A^{\top}\lambda. Tangency to CC requires DqΦ v+DvΦ v˙=0D_{q}\Phi\,v + D_{v}\Phi\,\dot{v} = 0. Setting b:=DqΦ vb := D_{q}\Phi\,v and W:=AM−1A⊤W := AM^{-1}A^{\top} gives Wλ=−(Ag+b)W\lambda= -(Ag+b). Since M−1M^{-1} is positive definite, ker⁡W=ker⁡A⊤\ker W = \ker A^{\top} and hence Im⁡W=Im⁡A\operatorname{Im} W = \operatorname{Im} A; therefore the condition b∈Im⁡Ab \in\operatorname{Im} A guarantees solvability. Every solution is of the form λ=−W†(Ag+b)+ζ\lambda= -W^{\dagger}(Ag+b)+\zeta, with ζ∈ker⁡W=ker⁡A⊤\zeta\in\ker W = \ker A^{\top}, so A⊤λA^{\top}\lambda is independent of ζ\zeta. Substitution yields

aΦ(x)=cΦ(x)+ΠΦ(x)g(x),ΠΦ=I−M−1A⊤W†A,cΦ=−M−1A⊤W†b,(2)a_{\Phi}(x) = c_{\Phi}(x) + \Pi_{\Phi}(x)g(x), \qquad\Pi_{\Phi} = I - M^{-1}A^{\top}W^{\dagger}A, \qquad c_{\Phi} = -M^{-1}A^{\top}W^{\dagger}b, \tag*{(2)}

where aΦ(x)a_{\Phi}(x) denotes the acceleration process. By the constant-rank assumption, W†W^{\dagger}, and hence ΠΦ\Pi_{\Phi} and cΦc_{\Phi}, vary smoothly on CC. Here ΠΦ\Pi_{\Phi} is the M(q)M(q)-orthogonal projector onto ker⁡A(x)\ker A(x), while AcΦ=−bAc_{\Phi}=-b and cΦ∈Im⁡(M−1A⊤)=(ker⁡A)⊥Mc_{\Phi} \in\operatorname{Im}(M^{-1}A^{\top}) = (\ker A)^{\perp_{M}}. Hence cΦc_{\Phi} is the minimum-M(q)M(q)-norm solution of Aa+b=0Aa+b=0, and the admissible accelerations form Ax=cΦ(x)+ker⁡A(x)\mathcal{A}_{x}=c_{\Phi}(x)+\ker A(x). If Φ\Phi depends only on vv, then DqΦ=0D_{q}\Phi=0 and therefore cΦ=0c_{\Phi}=0. The admissible acceleration space reduces to ker⁡DvΦ(v)\ker D_{v}\Phi(v), although ΠΦ(v)\Pi_{\Phi}(v) remains velocity dependent when Φ\Phi is nonlinear. This is the setting considered in the flocking application of § 4.

Structure-Preserving Learning of Nonlinear Nonholonomic Dynamics

Next, we propose our learning approach for Lagrange-d’Alembert-Chetaev systems (1). The general idea is to use the decomposition (2) to equip an ambient GP with a prior whose mean, covariance, and associated RKHS respect the nonlinear nonholonomic structure by construction. For that, let g:C→Rng : C \to\mathbb{R}^{n} on a fixed coordinate domain CC and consider g∼GP(m0,K0)g \sim\mathcal{GP}(m_{0},K_{0}), where m0:C→Rnm_{0}:C \to\mathbb{R}^{n} is the mean function and K0:C×C→Rn×nK_{0}:C \times C \to\mathbb{R}^{n \times n} is a matrix-valued covariance kernel. A simple choice used throughout the paper is K0(x,x′)=k(x,x′)InK_{0}(x,x^{\prime})=k(x,x^{\prime})I_{n}, where kk is a scalar positive-definite kernel. Associated with K0K_{0} is a vector-valued RKHS HK0\mathcal{H}_{K_{0}} [20].

Nonlinear Nonholonomic Kernel

Let g∼GP(m0,K0)g \sim\mathcal{GP}(m_{0},K_{0}) be an ambient GP as introduced before. We define the acceleration process by

aΦ(x):=cΦ(x)+ΠΦ(x)g(x).(3)a_{\Phi}(x) := c_{\Phi}(x) + \Pi_{\Phi}(x)g(x). \tag*{(3)}

Proposition 1 The process aΦa_{\Phi} is a GP, aΦ∼GP(mΦ,KΦ)a_{\Phi} \sim\mathcal{GP}(m_{\Phi},K_{\Phi}), with mΦ(x)=cΦ(x)+ΠΦ(x)m0(x)m_{\Phi}(x)=c_{\Phi}(x)+\Pi_{\Phi}(x)m_{0}(x) and KΦ(x,x′)=ΠΦ(x)K0(x,x′)ΠΦ(x′)⊤K_{\Phi}(x,x^{\prime})=\Pi_{\Phi}(x)K_{0}(x,x^{\prime})\Pi_{\Phi}(x^{\prime})^{\top}, where KΦK_{\Phi} is a positive-semidefinite matrix-valued kernel.

Proof. For X=(x1,…,xN)⊂CX=(x_{1},\ldots,x_{N}) \subset C, let GX:=col⁡ig(xi)G_{X}:=\operatorname{col}_{i}g(x_{i}), CX:=col⁡icΦ(xi)C_{X}:=\operatorname{col}_{i}c_{\Phi}(x_{i}), and PX:=diag⁡iΠΦ(xi)P_{X}:=\operatorname{diag}_{i}\Pi_{\Phi}(x_{i}). By (3), col⁡iaΦ(xi)=CX+PXGX\operatorname{col}_{i}a_{\Phi}(x_{i})=C_{X}+P_{X}G_{X}. Since GXG_{X} is jointly Gaussian, this vector is Gaussian with mean CX+PXm0(X)C_{X}+P_{X}m_{0}(X) and covariance PXK0(X,X)PX⊤P_{X}K_{0}(X,X)P_{X}^{\top}, whose (i,j)(i,j) block is KΦ(xi,xj)K_{\Phi}(x_{i},x_{j}) and which is positive semidefinite because K0(X,X)⪰0K_{0}(X,X)\succeq0. ■

For the ambient kernel K0(x,x′)=k(x,x′)InK_{0}(x,x^{\prime})=k(x,x^{\prime})I_{n}, the structured kernel then becomes KΦ(x,x′)=ΠΦ(x)k(x,x′)ΠΦ(x′)⊤K_{\Phi}(x,x^{\prime})=\Pi_{\Phi}(x)k(x,x^{\prime})\Pi_{\Phi}(x^{\prime})^{\top}. Since ΠΦ\Pi_{\Phi} is the unique M(q)M(q)-orthogonal projector onto ker⁡A\ker A and cΦc_{\Phi} is the unique minimum-M(q)M(q)-norm element of Ax\mathcal{A}_{x}, the construction is invariant under different defining maps of the same admissible acceleration space. Consequently, mΦm_{\Phi} and KΦK_{\Phi} depend only on Ax\mathcal{A}_{x}, and not on the particular choice of constraint equations. Next, we show that this prior almost surely guarantees constraint satisfaction.

Theorem 2 For every x,x′∈Cx,x' \in\mathcal{C}, A(x)mΦ(x)+b(x)=0A(x)m_{\Phi}(x)+b(x)=0 and A(x)KΦ(x,x′)=0A(x)K_{\Phi}(x,x')=0. Hence the prior satisfies A(x)aΦ(x)+b(x)=0A(x)a_{\Phi}(x)+b(x)=0 almost surely. Moreover, for observations yi=aΦ(xi)+ϵiy_i=a_{\Phi}(x_i)+\epsilon_i with independent ϵ∼N(0,Σ)\epsilon\sim\mathcal{N}(0,\Sigma), Σ≻0\Sigma\succ0, the posterior mean a^Φ\hat{a}_{\Phi} and covariance KΦ,NK_{\Phi,N} satisfy A(x)a^Φ(x)+b(x)=0A(x)\hat{a}_{\Phi}(x)+b(x)=0 and A(x)KΦ,N(x,x′)=0A(x)K_{\Phi,N}(x,x')=0. Hence posterior realizations also satisfy A(x)aΦ(x)+b(x)=0A(x)a_{\Phi}(x)+b(x)=0 almost surely.

Proof Since AΠΦ=0A\Pi_{\Phi}=0 and AcΦ=−bAc_{\Phi}=-b, the prior identities follow immediately from mΦ=cΦ+ΠΦm0m_{\Phi}=c_{\Phi}+\Pi_{\Phi}m_0, KΦ(x,x′)=ΠΦ(x)K0(x,x′)ΠΦ(x′)TK_{\Phi}(x,x')=\Pi_{\Phi}(x)K_0(x,x')\Pi_{\Phi}(x')^{\mathsf{T}}, and aΦ=cΦ+ΠΦga_{\Phi}=c_{\Phi}+\Pi_{\Phi}g. Let QX:=KΦ(X,X)+ΣQ_X:=K_{\Phi}(X,X)+\Sigma. The posterior mean and covariance are a^Φ(x)=mΦ(x)+KΦ(x,X)QX−1(Y−mΦ(X))\hat{a}_{\Phi}(x)=m_{\Phi}(x)+K_{\Phi}(x,X)Q_X^{-1}(Y-m_{\Phi}(X)) and KΦ,N(x,x′)=KΦ(x,x′)−KΦ(x,X)QX−1KΦ(X,x′)K_{\Phi,N}(x,x')=K_{\Phi}(x,x')-K_{\Phi}(x,X)Q_X^{-1}K_{\Phi}(X,x'). Since A(x)KΦ(x,X)=0A(x)K_{\Phi}(x,X)=0, left multiplication by A(x)A(x) gives the posterior identities.

The theorem also has a direct dynamical interpretation. Defining the second-order vector field FΦ(q,v):=(v,a^Φ(q,v))F_{\Phi}(q,v):=(v,\hat{a}_{\Phi}(q,v)), one obtains DΦ(x)FΦ(x)=DqΦ(q,v)v+DvΦ(q,v)a^Φ(q,v)=b(x)+A(x)a^Φ(x)=0D\Phi(x)F_{\Phi}(x)=D_q\Phi(q,v)v+D_v\Phi(q,v)\hat{a}_{\Phi}(q,v)=b(x)+A(x)\hat{a}_{\Phi}(x)=0. Therefore FΦ(x)∈TxCF_{\Phi}(x)\in T_x\mathcal{C} for every x∈Cx\in\mathcal{C}.

Conditioning versus post-projection. The construction above is generally different from conditioning an ambient GP and projecting its posterior afterwards as explained, e.g., in Geist and Trimpe [14]. To make this distinction explicit, consider the centered case m0≡0m_0\equiv0 and cΦ≡0c_{\Phi}\equiv0 and let PX:=diag⁡(ΠΦ(x1),…,ΠΦ(xN))P_X:=\operatorname{diag}(\Pi_{\Phi}(x_1),\ldots,\Pi_{\Phi}(x_N)). Then the posterior mean induced by the constrained prior is a^Φ,N(x)=ΠΦ(x)K0(x,X)PXT(PXK0(X,X)PXT+Σ)−1Y\hat{a}_{\Phi,N}(x)=\Pi_{\Phi}(x)K_0(x,X)P_X^{\mathsf{T}}\left(P_XK_0(X,X)P_X^{\mathsf{T}}+\Sigma\right)^{-1}Y. By contrast, conditioning the ambient GP first gives g^N(x)=K0(x,X)(K0(X,X)+Σ)−1Y\hat{g}_N(x)=K_0(x,X)\left(K_0(X,X)+\Sigma\right)^{-1}Y, and a^PP,N(x):=ΠΦ(x)g^N(x)\hat{a}_{\mathrm{PP},N}(x):=\Pi_{\Phi}(x)\hat{g}_N(x). Similarly, one may project the posterior covariance according to KPP,N(x,x′)=ΠΦ(x)K0,N(x,x′)ΠΦ(x′)TK_{\mathrm{PP},N}(x,x')=\Pi_{\Phi}(x)K_{0,N}(x,x')\Pi_{\Phi}(x')^{\mathsf{T}}. Thus the post-projected posterior also satisfies the homogeneous constraint pointwise, but it does not in general coincide with the posterior obtained by conditioning the constrained prior as we proposed. The two procedures differ because the constraint geometry enters before conditioning in the present construction and after conditioning in the post-projected model.

Rejection of constraint-incompatible observation components. The distinction above is particularly relevant in the presence of measurement noise. For fixed kernel and noise hyperparameters, assume for simplicity that Σ=σ2I\Sigma=\sigma^2 I and consider a perturbation η\eta of the stacked observations satisfying PXTη=0P_X^{\mathsf{T}}\eta=0. Then the posterior mean obtained from the constrained prior is unchanged: a^Φ,N[Y+η](x)=a^Φ,N[Y](x)\hat{a}_{\Phi,N}[Y+\eta](x)=\hat{a}_{\Phi,N}[Y](x). Indeed, KΦ(X,X)η=0K_{\Phi}(X,X)\eta=0 and hence (KΦ(X,X)+σ2I)−1η=σ−2η\left(K_{\Phi}(X,X)+\sigma^2I\right)^{-1}\eta=\sigma^{-2}\eta, while KΦ(x,X)η=0K_{\Phi}(x,X)\eta=0. By contrast, the associated change in the post-projected estimator is

a^PP,N[Y+η](x)−a^PP,N[Y](x)=ΠΦ(x)K0(x,X)(K0(X,X)+σ2I)−1η,(4)\hat{a}_{\mathrm{PP},N}[Y+\eta](x)-\hat{a}_{\mathrm{PP},N}[Y](x)=\Pi_{\Phi}(x)K_0(x,X)\left(K_0(X,X)+\sigma^2I\right)^{-1}\eta, \tag*{(4)}

which need not vanish. Thus the constrained prior removes observation components incompatible with admissible directions at training states before they can be propagated by the regression model. When ΠΦ\Pi_{\Phi} is Euclidean orthogonal, in particular for M=IM=I, the condition ΠΦ(xi)Tηi=0\Pi_{\Phi}(x_i)^{\mathsf{T}}\eta_i=0 means that ηi\eta_i is normal to the admissible acceleration directions at xix_i; the analogous interpretation holds in kinetic-energy coordinates for a general mass metric.

RKHS Characterization and Adapted Coordinates

In the following, we analyze the reproducing kernel Hilbert space (RKHS) associated with the nonlinear nonholonomic kernel introduced in Proposition 1. Let HK0\mathcal{H}_{K_0} and HKΦ\mathcal{H}_{K_{\Phi}} denote the RKHS associated with K0K_0 and KΦK_{\Phi}, respectively, and define the linear operator (Tg)(x):=ΠΦ(x)g(x)(\mathcal{T}g)(x):=\Pi_{\Phi}(x)g(x).

Theorem 3. The RKHS associated with KΦK_{\Phi} is HΦ={Tg:g∈HK0}={ΠΦ(⋅)g(⋅):g∈HK0}\mathcal{H}_{\Phi}=\{Tg:g\in\mathcal{H}_{K_0}\}=\{\Pi_{\Phi}(\cdot)g(\cdot):g\in\mathcal{H}_{K_0}\}, equipped with the quotient norm ∥h∥HΦ=inf⁡{∥g∥HK0:Tg=h}\lVert h\rVert_{\mathcal{H}_{\Phi}}=\inf\{\lVert g\rVert_{\mathcal{H}_{K_0}}:Tg=h\}. In particular, A(x)h(x)=0A(x)h(x)=0 for every h∈HΦh\in\mathcal{H}_{\Phi} and x∈Cx\in\mathcal{C}.

Proof. Let N:=ker⁡T={g∈HK0:ΠΦ(x)g(x)=0, ∀x∈C}\mathcal{N}:=\ker T=\{g\in\mathcal{H}_{K_0}:\Pi_{\Phi}(x)g(x)=0,\ \forall x\in\mathcal{C}\}. Since point evaluation is continuous in an RKHS, each map g↦ΠΦ(x)g(x)g\mapsto\Pi_{\Phi}(x)g(x) is continuous, and therefore N\mathcal{N} is closed. Hence HK0=N⊕N⊥\mathcal{H}_{K_0}=\mathcal{N}\oplus\mathcal{N}^{\perp}. Equipping T(HK0)T(\mathcal{H}_{K_0}) with the quotient norm identifies it isometrically with N⊥\mathcal{N}^{\perp} through T∣N⊥T|_{\mathcal{N}^{\perp}}; in particular, T(HK0)T(\mathcal{H}_{K_0}) is complete.

For x∈Cx\in\mathcal{C} and c∈Rnc\in\mathbb{R}^{n}, define hx,c:=K0(⋅,x)ΠΦ(x)Tc∈HK0h_{x,c}:=K_0(\cdot,x)\Pi_{\Phi}(x)^{\mathsf{T}}c\in\mathcal{H}_{K_0}. For any n∈Nn\in\mathcal{N}, the reproducing property gives ⟨n,hx,c⟩HK0=cTΠΦ(x)n(x)=0\langle n,h_{x,c}\rangle_{\mathcal{H}_{K_0}}=c^{\mathsf{T}}\Pi_{\Phi}(x)n(x)=0, so hx,c∈N⊥h_{x,c}\in\mathcal{N}^{\perp}.

Moreover, (Thx,c)(x′)=ΠΦ(x′)K0(x′,x)ΠΦ(x)Tc=KΦ(x′,x)c(Th_{x,c})(x')=\Pi_{\Phi}(x')K_0(x',x)\Pi_{\Phi}(x)^{\mathsf{T}}c=K_{\Phi}(x',x)c. Thus the kernel sections of KΦK_{\Phi} are precisely the images under TT of the functions hx,ch_{x,c}.

We show that the span of the hx,ch_{x,c} is dense in N⊥\mathcal{N}^{\perp}. Suppose g∈N⊥g\in\mathcal{N}^{\perp} is orthogonal to all hx,ch_{x,c}. For every xx and cc, 0=⟨g,hx,c⟩HK0=cTΠΦ(x)g(x)0=\langle g,h_{x,c}\rangle_{\mathcal{H}_{K_0}}=c^{\mathsf{T}}\Pi_{\Phi}(x)g(x). Since this holds for all c∈Rnc\in\mathbb{R}^{n}, ΠΦ(x)g(x)=0\Pi_{\Phi}(x)g(x)=0 for all xx, so g∈Ng\in\mathcal{N}. Because also g∈N⊥g\in\mathcal{N}^{\perp}, we conclude g=0g=0. Hence the span is dense in N⊥\mathcal{N}^{\perp}.

Hence, the span of the kernel sections KΦ(⋅,x)c=Thx,cK_{\Phi}(\cdot,x)c=Th_{x,c} is dense in T(HK0)T(\mathcal{H}_{K_0}) with the quotient norm. So, T(HK0)T(\mathcal{H}_{K_0}) is precisely the RKHS associated with KΦK_{\Phi}. Equivalently, two elements g1,g2∈HK0g_1,g_2\in\mathcal{H}_{K_0} represent the same element of HΦ\mathcal{H}_{\Phi} if and only if g1−g2∈Ng_1-g_2\in\mathcal{N}, which gives exactly the norm ∥h∥HΦ\lVert h\rVert_{\mathcal{H}_{\Phi}}. Finally, A(x)h(x)=A(x)ΠΦ(x)g(x)=0A(x)h(x)=A(x)\Pi_{\Phi}(x)g(x)=0 follows from A(x)ΠΦ(x)=0A(x)\Pi_{\Phi}(x)=0.

Theorem 3 characterizes the centered, constraint-compatible component of the model: when m0≡0m_0\equiv0, posterior means belong to the affine space cΦ+HΦc_{\Phi}+\mathcal{H}_{\Phi}, while HΦ\mathcal{H}_{\Phi} itself depends only on ker⁡A\ker A and is therefore independent of the chosen constraint representation. To obtain a local reduced-coordinate description, let U⊂CU\subset\mathcal{C} be an open set on which ker⁡A(x)\ker A(x) admits a smooth frame B(x)∈Rn×(n−r)B(x)\in\mathbb{R}^{n\times(n-r)}, with full column rank and Im⁡B(x)=ker⁡A(x)\operatorname{Im}B(x)=\ker A(x). Next, we establish a unique reduced-dimensional representation of the constrained acceleration process and a corresponding factorization of its kernel. This factorization provides the basis for characterizing the RKHS associated with the nonlinear nonholonomic kernel in terms of the RKHS of the reduced GP.

Corollary 4. On UU, let LB(x):=(B(x)TM(q)B(x))−1B(x)TM(q)L_B(x):=(B(x)^{\mathsf{T}}M(q)B(x))^{-1}B(x)^{\mathsf{T}}M(q). Then ΠΦ(x)=B(x)LB(x)\Pi_{\Phi}(x)=B(x)L_B(x), and every realization of the constrained acceleration process admits the unique representation

aΦ(x)=cΦ(x)+B(x)ν(x),ν(x)=LB(x)g(x).(5)a_{\Phi}(x)=c_{\Phi}(x)+B(x)\nu(x),\qquad\nu(x)=L_B(x)g(x). \tag*{(5)}

Moreover, ν\nu is an (n−r)(n-r)-dimensional GP with mν(x)=LB(x)m0(x)m_{\nu}(x)=L_B(x)m_0(x) and kernel matrix Kν(x,x′)=LB(x)K0(x,x′)LB(x′)TK_{\nu}(x,x')=L_B(x)K_0(x,x')L_B(x')^{\mathsf{T}}. The constrained kernel factorizes as KΦ(x,x′)=B(x)Kν(x,x′)B(x′)TK_{\Phi}(x,x')=B(x)K_{\nu}(x,x')B(x')^{\mathsf{T}}.

Proof. Since B(x)B(x) has full column rank and M(q)M(q) is positive definite, B(x)TM(q)B(x)B(x)^{\mathsf{T}}M(q)B(x) is positive definite. Hence LB(x)L_B(x) is well defined and LB(x)B(x)=IL_B(x)B(x)=I. The map B(x)LB(x)B(x)L_B(x) is the M(q)M(q)-orthogonal projector onto Im⁡B(x)=ker⁡A(x)\operatorname{Im}B(x)=\ker A(x), and therefore equals ΠΦ(x)\Pi_{\Phi}(x). Thus aΦ=cΦ+ΠΦg=cΦ=BLBga_{\Phi}=c_{\Phi}+\Pi_{\Phi}g=c_{\Phi}=BL_Bg, which gives (5); uniqueness follows from the injectivity of B(x)B(x). Since ν=LBg\nu=L_Bg is a linear transformation of the ambient GP, its mean and covariance are mνm_{\nu} and KνK_{\nu} above. The factorization of KΦK_{\Phi} follows from ΠΦ=BLB\Pi_{\Phi}=BL_B.

Although the reduced coordinates depend on the chosen local frame, the resulting constrained process does not. Indeed, if B~=BR\widetilde{B}=BR, with R(x)R(x) invertible, then ν~=R−1ν\widetilde{\nu}=R^{-1}\nu, while aΦa_{\Phi} and KΦK_{\Phi} remain unchanged. For M=IM=I, choosing an orthonormal frame B(x)=U(x)B(x)=U(x) gives ΠΦ(x)=U(x)U(x)T\Pi_{\Phi}(x)=U(x)U(x)^{\mathsf{T}} and, for K0(x,x′)=k(x,x′)InK_0(x,x')=k(x,x')I_n, it leads to Kv(x,x′)=k(x,x′)U(x)⊤U(x′)K_v(x,x')=k(x,x')U(x)^\top U(x'). This is the form used in the flocking application of § 4.

Nonexpansiveness and Consistency Transfer

We next show that the Chetaev projection does not amplify learning errors when measured in the kinetic-energy metric. Define ∥z∥M(q)2:=z⊤M(q)z\|z\|_{M(q)}^2 := z^\top M(q)z.

Proposition 5 For every x=(q,v)∈Cx=(q,v)\in\mathcal{C} and z∈TqQz\in T_qQ,

∥ΠΦ(x)z∥M(q)≤∥z∥M(q).(6)\|\Pi_{\Phi}(x)z\|_{M(q)}\leq\|z\|_{M(q)}. \tag*{(6)}

Consequently, if a⋆=cΦ+ΠΦg⋆a^\star=c_{\Phi}+\Pi_{\Phi}g^\star and a^N=cΦ+ΠΦg^N\hat{a}_N=c_{\Phi}+\Pi_{\Phi}\hat{g}_N, then

∥a^N(x)−a⋆(x)∥M(q)≤∥g^N(x)−g⋆(x)∥M(q).(7)\|\hat{a}_N(x)-a^\star(x)\|_{M(q)}\leq\|\hat{g}_N(x)-g^\star(x)\|_{M(q)}. \tag*{(7)}

Proof. Since ΠΦ\Pi_{\Phi} is an M(q)M(q)-orthogonal projector, ΠΦ2=ΠΦ\Pi_{\Phi}^2=\Pi_{\Phi} and ΠΦ⊤M=MΠΦ\Pi_{\Phi}^{\top}M=M\Pi_{\Phi}. Decompose z=ΠΦz+(I−ΠΦ)zz=\Pi_{\Phi}z+(I-\Pi_{\Phi})z. The two terms are M(q)M(q)-orthogonal, since (ΠΦz)⊤M(q)(I−ΠΦ)z=z⊤ΠΦ⊤M(q)(I−ΠΦ)z=z⊤M(q)ΠΦ(I−ΠΦ)z=0(\Pi_{\Phi}z)^\top M(q)(I-\Pi_{\Phi})z=z^\top\Pi_{\Phi}^{\top}M(q)(I-\Pi_{\Phi})z=z^\top M(q)\Pi_{\Phi}(I-\Pi_{\Phi})z=0. Therefore, by the Pythagorean identity,

∥z∥M(q)2=∥ΠΦz∥M(q)2+∥(I−ΠΦ)z∥M(q)2,\|z\|_{M(q)}^2=\|\Pi_{\Phi}z\|_{M(q)}^2+\|(I-\Pi_{\Phi})z\|_{M(q)}^2,

which proves (6). For the estimator, a^N−a⋆=ΠΦ(g^N−g⋆)\hat{a}_N-a^\star=\Pi_{\Phi}(\hat{g}_N-g^\star), since the same affine correction cΦc_{\Phi} appears in both fields. Applying (6) gives (7). ■

For the posterior mean in Theorem 2, let PX:=diag⁡iΠΦ(xi)P_X:=\operatorname{diag}_i\Pi_{\Phi}(x_i) and CX:=col⁡icΦ(xi)C_X:=\operatorname{col}_i c_{\Phi}(x_i), and define

g~N(x):=m0(x)+K0(x,X)PX⊤(PXK0(X,X)PX⊤+ΣY)−1(Y−CX−PXm0(X)).(8)\widetilde{g}_N(x):=m_0(x)+K_0(x,X)P_X^\top\left(P_XK_0(X,X)P_X^\top+\Sigma_Y\right)^{-1}\left(Y-C_X-P_Xm_0(X)\right). \tag*{(8)}

Then a^Φ,N=cΦ+ΠΦg~N\hat{a}_{\Phi,N}=c_{\Phi}+\Pi_{\Phi}\widetilde{g}_N, so Proposition 5 applies directly to the posterior mean of the structure-preserving GP. Finally we show that the nonholonomic projection preserves the consistency of the ambient GP estimator.

Theorem 6 Assume that X⊂C\mathcal{X}\subset C is compact and that the induced ambient estimator g~N\widetilde{g}_N is uniformly consistent in probability for g⋆g^\star in the kinetic-energy norm, i.e., for every ϵ>0\epsilon>0,

P(sup⁡x=(q,v)∈X∥g~N(x)−g⋆(x)∥M(q)>ϵ)→0.(9)\mathbb{P}\left(\sup_{x=(q,v)\in\mathcal{X}}\|\widetilde{g}_N(x)-g^\star(x)\|_{M(q)}>\epsilon\right)\to0. \tag*{(9)}

Then the posterior mean a^Φ,N\hat{a}_{\Phi,N} is uniformly consistent in probability for a⋆=cΦ+ΠΦg⋆a^\star=c_{\Phi}+\Pi_{\Phi}g^\star.

Proof. By Proposition 5 and the representation above, the following holds sup⁡x∈X∥a^Φ,N(x)−a⋆(x)∥M(q)≤sup⁡x∈X∥g~N(x)−g⋆(x)∥M(q)\sup_{x\in\mathcal{X}}\|\hat{a}_{\Phi,N}(x)-a^\star(x)\|_{M(q)}\leq\sup_{x\in\mathcal{X}}\|\widetilde{g}_N(x)-g^\star(x)\|_{M(q)}. Hence, for every ϵ>0\epsilon>0,

P(sup⁡x∈X∥a^Φ,N(x)−a⋆(x)∥M(q)>ϵ)≤P(sup⁡x∈X∥g~N(x)−g⋆(x)∥M(q)>ϵ),(10)\mathbb{P}\left(\sup_{x\in\mathcal{X}}\|\hat{a}_{\Phi,N}(x)-a^\star(x)\|_{M(q)}>\epsilon\right)\leq\mathbb{P}\left(\sup_{x\in\mathcal{X}}\|\widetilde{g}_N(x)-g^\star(x)\|_{M(q)}>\epsilon\right), \tag*{(10)}

and the right-hand side converges to zero by assumption. ■

Since X\mathcal{X} is compact and M(q)M(q) is continuous and positive definite, there exist constants 0<m≤m‾<∞0<m\leq\overline{m}<\infty such that mI⪯M(q)⪯m‾ImI\preceq M(q)\preceq\overline{m}I on X\mathcal{X}. Therefore,

sup⁡x∈X∥a^Φ,N(x)−a⋆(x)∥2≤m‾msup⁡x∈X∥g~N(x)−g⋆(x)∥2.(11)\sup_{x\in\mathcal{X}}\|\hat{a}_{\Phi,N}(x)-a^\star(x)\|_2\leq\sqrt{\frac{\overline{m}}{m}}\sup_{x\in\mathcal{X}}\|\widetilde{g}_N(x)-g^\star(x)\|_2. \tag*{(11)}

Thus uniform consistency in the Euclidean norm also transfers from the induced ambient estimator to the structure-preserving estimator. Since ΠΦ\Pi_{\Phi} and cΦc_{\Phi} are invariant under different defining maps of the same admissible acceleration space, the error bounds and consistency results above are representation independent.

Three-Dimensional Flocking with Nonlinear Velocity Constraints

Velocity alignment is a central mechanism in collective-motion models, from Reynolds’ [21] behavioral rules and the polar model of Vicsek et al. [23] to distributed flocking and velocity-consensus models ([19, 9]). Learning-based approaches have more recently recovered collective behavior from data using reinforcement learning ([13]), neural ODEs ([17]), and Gaussian processes ([1]). Our objective is different: rather than learning a feedback law that drives arbitrary velocities toward alignment, we treat directional alignment itself as a nonlinear geometric constraint and embed it directly into the learned dynamics. Cohesion, separation, and other interaction mechanisms may remain part of the ambient dynamics, while the alignment geometry is satisfied exactly.

Flocking Geometry and Structure-Preserving GP on the Alignment Manifold

Consider NN agents with qi,vi∈R3q_i, v_i \in\mathbb{R}^{3} and Q=(R3)NQ = (\mathbb{R}^{3})^{N}, endowed with the kinetic-energy metric M=diag⁡i(miI3)M = \operatorname{diag}_{i}(m_i I_3), mi>0m_i > 0. Let G=(V,E)\mathcal{G} = (\mathcal{V}, \mathcal{E}) be a connected undirected interaction graph. Directional alignment between neighboring agents is described by Φij(v):=vi×vj=0\Phi_{ij}(v) := v_i \times v_j = 0, (i,j)∈E(i,j) \in\mathcal{E}, and we collect these equations into ΦG(v):=col⁡(i,j)∈EΦij(v)∈R3∣E∣\Phi_{\mathcal{G}}(v) := \operatorname{col}_{(i,j)\in\mathcal{E}} \Phi_{ij}(v) \in\mathbb{R}^{3|\mathcal{E}|}. Unlike velocity consensus, this constraint requires only parallel velocities and therefore allows the agents to have different speeds.

The set ΦG−1(0)\Phi_{\mathcal{G}}^{-1}(0) also contains zero and antiparallel velocities. We consider the coherently aligned manifold Val+:={v:vi=αid,d∈S2,αi>0,i=1,…,N}\mathcal{V}_{\mathrm{al}}^{+} := \{v : v_i = \alpha_i d, d \in S^{2}, \alpha_i > 0, i = 1,\ldots,N\} and set Cal:=Q×Val+⊂TQ\mathcal{C}_{\mathrm{al}} := Q \times\mathcal{V}_{\mathrm{al}}^{+} \subset TQ. For a connected graph, Val+\mathcal{V}_{\mathrm{al}}^{+} is the subset of the constraint set where all velocities are nonzero and share the same orientation. It has dimension N+2N+2: the NN scalars αi\alpha_i determine the individual speeds, while the two degrees of freedom of d∈S2d \in S^{2} determine the common heading.

Let AG(v):=DvΦG(v)\mathcal{A}_{\mathcal{G}}(v) := D_v\Phi_{\mathcal{G}}(v). For an edge (i,j)∈E(i,j) \in\mathcal{E}, DΦij(v)[δv]=δvi×vj+vi×δvjD\Phi_{ij}(v)[\delta v] = \delta v_i \times v_j + v_i \times\delta v_j. With w^z:=w×z\widehat{w}z := w \times z, the corresponding nonzero blocks of the Jacobian are −v^j-\widehat{v}_j and v^i\widehat{v}_i.

Proposition 7 Let G\mathcal{G} be connected and v∈Val+v \in\mathcal{V}_{\mathrm{al}}^{+}, with vi=αidv_i = \alpha_i d. Then rank⁡AG(v)=2(N−1)\operatorname{rank} A_{\mathcal{G}}(v) = 2(N-1) and TvVal+=ker⁡AG(v)={δv:δvi=βid+αiξ, βi∈R, ξ∈d⊥}T_v\mathcal{V}_{\mathrm{al}}^{+} = \ker A_{\mathcal{G}}(v) = \{\delta v : \delta v_i = \beta_i d + \alpha_i \xi, \ \beta_i \in\mathbb{R}, \ \xi\in d^{\perp}\}. Consequently, the MM-orthogonal projector onto ker⁡AG(v)\ker A_{\mathcal{G}}(v) is the same for every connected interaction graph on the same set of agents.

Proof. At vi=αidv_i = \alpha_i d, DΦij(v)[δv]=d×(αiδvj−αjδvi)D\Phi_{ij}(v)[\delta v] = d \times(\alpha_i\delta v_j - \alpha_j\delta v_i). Hence DΦij(v)[δv]=0D\Phi_{ij}(v)[\delta v] = 0 if and only if Pd⊥δvj/αj=Pd⊥δvi/αiP_d^{\perp}\delta v_j/\alpha_j = P_d^{\perp}\delta v_i/\alpha_i, where Pd⊥:=I3−ddTP_d^{\perp} := I_3 - dd^{\mathsf{T}}. Since G\mathcal{G} is connected, these relations propagate along the graph and there exists a common ξ∈d⊥\xi\in d^{\perp} such that Pd⊥δvi=αiξP_d^{\perp}\delta v_i = \alpha_i\xi for every agent. The longitudinal components remain arbitrary, so δvi=βid+αiξ\delta v_i = \beta_i d + \alpha_i\xi. Differentiating vi=αidv_i = \alpha_i d, with d˙∈d⊥\dot{d} \in d^{\perp}, gives the same characterization of TvVal+T_v\mathcal{V}_{\mathrm{al}}^{+}. Thus dim⁡ker⁡AG=N+2\dim\ker A_{\mathcal{G}} = N+2 and rank⁡AG=3N−(N+2)=2(N−1)\operatorname{rank} A_{\mathcal{G}} = 3N-(N+2)=2(N-1). Since this kernel depends only on the aligned state and not on the particular connected graph, uniqueness of the MM-orthogonal projector gives the final statement. ■

Proposition 7 also shows why the pseudoinverse formulation of § 2 is needed here. The map ΦG\Phi_{\mathcal{G}} contains 3∣E∣3|\mathcal{E}| scalar constraint functions, while its Jacobian has rank only 2(N−1)2(N-1) on Val+\mathcal{V}_{\mathrm{al}}^{+}. Thus even a spanning-tree representation contains dependent scalar equations because each three-dimensional cross-product equation imposes only two independent conditions at an aligned nonzero state. The Moore-Penrose formulation allows the natural cross-product constraints to be retained without selecting local components or pruning the interaction graph.

An additional consequence is that, on Val+\mathcal{V}_{\mathrm{al}}^{+}, adding or removing interaction edges does not alter the admissible infinitesimal motion provided the graph remains connected. The graph determines how alignment is represented through pairwise equations, whereas the resulting tangent geometry depends only on the common aligned-velocity manifold.

Since ΦG\Phi_G depends only on velocity vv, b=0b=0 and cΦG=0c_{\Phi_G}=0. The dynamics and associated matrix-valued kernel therefore reduce to aG(q,v)=ΠG(v)g(q,v)a_G(q,v)=\Pi_G(v)g(q,v), ΠG=I−M−1AGT(AGM−1AGT)†AG\Pi_G=I-M^{-1}A_G^{\mathsf{T}}(A_GM^{-1}A_G^{\mathsf{T}})^{\dagger}A_G, KG(x,x′)=ΠG(v)K0(x,x′)ΠG(v′)TK_G(x,x')=\Pi_G(v)K_0(x,x')\Pi_G(v')^{\mathsf{T}}.

By Proposition 7, both ΠG\Pi_G and KGK_G are independent of the particular connected graph when evaluated on Val+\mathcal{V}_{\mathrm{al}}^{+}. Hence different connected pairwise descriptions of the same aligned configuration generate the same structured GP prior.

The tangent-space characterization also gives a direct mechanical interpretation of the admissible accelerations. If vi=αidv_i=\alpha_i d, then any admissible acceleration has the form ai=βid+αiξa_i=\beta_i d+\alpha_i\xi, with ξ⊥d\xi\perp d. The longitudinal component βid\beta_i d changes the speed of agent ii independently, whereas the same transverse vector ξ\xi appears for every agent and therefore produces a coordinated change of heading. Along an aligned trajectory these variables are precisely βi=α˙i\beta_i=\dot{\alpha}_i and ξ=d˙\xi=\dot{d}.

For the diagonal metric above, this structure can be seen explicitly. For z∈R3Nz\in\mathbb{R}^{3N}, (ΠG(v)z)i=(dTzi)d+αiξz(\Pi_G(v)z)_i=(d^{\mathsf{T}}z_i)d+\alpha_i\xi_z with ξz=∑j=1NmjαjPd⊥zj∑j=1Nmjαj2\xi_z=\frac{\sum_{j=1}^{N}m_j\alpha_jP_d^{\perp}z_j}{\sum_{j=1}^{N}m_j\alpha_j^2}. Thus the projection preserves each longitudinal acceleration while replacing the transverse components by their unique mass-weighted coordinated turning motion. In particular, the projection does not impose equal speeds: it preserves exactly the degrees of freedom intrinsic to directional flocking.

By Theorem 2, the constrained prior and posterior predictions satisfy AG(v)aG(q,v)=0A_G(v)a_G(q,v)=0 on Cal\mathcal{C}_{\mathrm{al}}. In particular, the posterior-mean second-order vector field is tangent to Cal\mathcal{C}_{\mathrm{al}}, so the continuous-time learned dynamics preserve velocity alignment exactly. The simulations below compare this structural preservation with standard and projected GP baselines trained from the same data.

Mechanical Benchmark and Robustness to Incompatible Observations

We evaluate the proposed GP on a mechanical realization of the alignment geometry above. Rather than prescribing the reference dynamics directly in adapted coordinates, we consider potential-driven particles subject to the nonlinear parallel-velocity constraint, in the spirit of the nonlinear nonholonomic particle models of Bloch and Rojo [5]. For equal masses, M=IM=I, we take L(q,v)=12∑i=1N∥vi∥2−V(q)L(q,v)=\frac{1}{2}\sum_{i=1}^{N}\lVert v_i\rVert^2-V(q), with V(q)=∑i<jU(rij)V(q)=\sum_{i<j}U(r_{ij}), rij=∥qi−qj∥r_{ij}=\lVert q_i-q_j\rVert, and Morse interaction U(r)=Cre−r/ℓr−Cae−r/ℓaU(r)=C_re^{-r/\ell_r}-C_ae^{-r/\ell_a}, where Cr=2C_r=2, Ca=1C_a=1, ℓr=0.45\ell_r=0.45, and ℓa=1.20\ell_a=1.20. Thus g⋆(q)=−∇V(q)g^\star(q)=-\nabla V(q) provides short-range separation and long-range cohesion, while alignment is not generated by an additional steering term but by the nonlinear constraint Φij(v)=vi×vj=0\Phi_{ij}(v)=v_i\times v_j=0.

The reference dynamics are therefore the Chetaev dynamics a⋆(q,v)=ΠG(v)g⋆(q)a^\star(q,v)=\Pi_G(v)g^\star(q). For the sampled states, AG(v)g⋆(q)≠0A_G(v)g^\star(q)\ne0 generically, so the reaction is active and the benchmark is not obtained by choosing an already admissible ambient field. For N=4N=4, we additionally compute a⋆a^\star from the redundant Lagrange-d’Alembert-Chetaev equations and verify agreement with the projector and null-space formulations to numerical precision.

The distinction between known geometry and unknown dynamics is important here: CalC_{\mathrm{al}}, ΦG\Phi_{\mathcal{G}}, and hence ΠG\Pi_{\mathcal{G}} are assumed known, whereas the learner is not given VV or g⋆g^\star. We use the translation-invariant input z=(qˉ,α,d)z=(\bar{q},\alpha,d), with qˉi=qi−N−1∑jqj\bar{q}_i=q_i-N^{-1}\sum_j q_j and vi=αidv_i=\alpha_i d, and the grouped squared-exponential kernel k(z,z′)=σf2exp⁡[−12(∥qˉ−qˉ′∥2/(Nℓq2)+∥α−α′∥2/(Nℓα2)+∥d−d′∥2/ℓd2)]k(z,z')=\sigma_f^2\exp\left[-\frac{1}{2}\left(\|\bar{q}-\bar{q}'\|^2/(N\ell_q^2)+\|\alpha-\alpha'\|^2/(N\ell_\alpha^2)+\|d-d'\|^2/\ell_d^2\right)\right]. We compare the unconstrained standard GP, the projected GP obtained by conditioning the standard GP and projecting its posterior afterwards, and the NH GP (GP with the proposed nonholonomic kernel of Proposition 1), which incorporates the projector before conditioning. For the latter, we use Corollary 4, reducing the latent output dimension from 3N3N to N+2N+2.

To isolate the statistical effect of incorporating the geometry into the prior, we perturb the same noisy acceleration observations by components normal to the admissible space, yi(ρ)=a⋆(xi)+ϵi+ρ⊥3N armsηiy_i^{(\rho)}=a^\star(x_i)+\epsilon_i+\rho_\perp\sqrt{3N}\,a_{\mathrm{rms}}\eta_i, U(xi)⊤ηi=0U(x_i)^\top\eta_i=0, ∥ηi∥=1\|\eta_i\|=1, where U(xi)U(x_i) is an orthonormal frame of ker⁡AG(vi)\ker A_{\mathcal{G}}(v_i) and armsa_{\mathrm{rms}} is the componentwise RMS training acceleration. The isotropic term ϵi\epsilon_i models ordinary measurement noise, while the additional normal component is a controlled stress test that isolates sensitivity to constraint-incompatible information. Kernel and noise hyperparameters are calibrated once from an independent uncontaminated data set and kept fixed throughout the ρ⊥\rho_\perp sweep, exactly matching the fixed-hyperparameter setting of the normal-noise rejection result of § 3.1.

For stacked test-set accelerations A⋆A^\star and predictions A^ρ\hat{A}_\rho, we use Erel:=∥A^ρ−A⋆∥F/∥A⋆∥FE_{\mathrm{rel}}:=\|\hat{A}_\rho-A^\star\|_F/\|A^\star\|_F and Δρ:=∥A^ρ−A^0∥F/∥A⋆∥F\Delta_\rho:=\|\hat{A}_\rho-\hat{A}_0\|_F/\|A^\star\|_F; 95% confidence intervals are zˉ±1.96 sz/5\bar{z}\pm1.96\,s_z/\sqrt{5} over five independent evaluation sets. Figure 1 and Figure 2 summarize the numerical results. In Figure 1, Panel (a) shows a representative NH posterior, together with its 95% posterior band. Panel (b) illustrates the effect of constraint-incompatible observations for the intermediate case N=8N=8: normal contamination progressively degrades the standard and projected GPs, while the NH prediction remains unchanged. At ρ⊥=0.8\rho_\perp=0.8, the relative field errors are 0.839, 0.382, and 0.204 for standard, projected, and NH, respectively, while the relative change of the NH posterior is only 1.8×10−131.8\times10^{-13}. Thus, post-projection guarantees admissibility of the final prediction but cannot remove incompatible observation components that have already propagated through conditioning.

Nonlinear nonholonomic flocking benchmark: NH posterior uncertainty and error versus contamination

Figure 1. Nonlinear nonholonomic flocking benchmark. The proposed kernel (NH, red) outperforms the standard and projected GP. (a) NH posterior mean with 95% posterior band. (b) Relative field error versus normal contamination.

Relative field error and posterior-mean sensitivity across numbers of agents

Figure 2. The proposed kernel (NH, red) demonstrates superior performance across varying numbers of agents. (c) Relative field error across N=4,8,20,50N = 4, 8, 20, 50 for ρ⊥=0\rho_{\perp} = 0 and 0.80.8. (d) Relative posterior-mean change at ρ⊥=0.8\rho_{\perp} = 0.8. Shaded bands are 95% confidence intervals over five runs.

In Figure 2, Panels (c)-(d) show that this mechanism persists as both the number of agents and the redundancy of the constraint representation increase. For the complete graph KNK_N, the natural cross-product description contains 3N(N−1)/23N(N-1)/2 scalar constraint equations, whereas on CalC_{\mathrm{al}} its rank is only 2(N−1)2(N-1) and the admissible dimension is N+2N+2. Hence, for N=4,8,20,50N=4,8,20,50, the four

representations contain respectively 18, 84, 570, and 3675 scalar equations, with ranks 6, 14, 38, and 98. Table 1 reports the corresponding prediction errors. Despite the increasing dimension and redundancy, the NH posterior changes by only 10−1310^{-13} to 10−1510^{-15} under strong normal contamination, while both baselines are affected. The larger-NN cases are structural scalability tests rather than sample-complexity comparisons, since the number of training states is reduced as NN increases.

NNNtrN_{\mathrm{tr}}Erel(0)E_{\mathrm{rel}}(0)Erel(0.8)E_{\mathrm{rel}}(0.8)ΔNH(0.8)\Delta_{\mathrm{NH}}(0.8)
4160.412/.375/.2571.045/.515/.2574.4×10−134.4 \times10^{-13}
8120.335/.280/.204.839/.382/.2041.8×10−131.8 \times10^{-13}
2080.316/.287/.240.753/.369/.2401.5×10−141.5 \times10^{-14}
5060.265/.253/.227.568/.299/.2278.3×10−158.3 \times10^{-15}

Table 1. Prediction error and sensitivity to constraint-incompatible training-data contamination. Entries in the two ErelE_{\mathrm{rel}} columns are ordered as Standard/Projected/NH; values are means over five independent evaluation sets.

Conclusions and Future Work

We introduced a structure-preserving GP framework for nonlinear nonholonomic dynamics whose constraint functions need not be independent. The Chetaev equations and Moore-Penrose pseudoinverse determine an affine space of admissible accelerations, together with its kinetic-energy metric projector and Chetaev correction, independently of the chosen constraint representation. Embedding this geometry into the prior yields exact constraint preservation before and after conditioning, an explicit RKHS and adapted-coordinate characterization, and nonexpansive error transfer in the kinetic-energy metric. Unlike post-projection, the constrained prior rejects observation components normal to the admissible directions before they propagate through conditioning. For three-dimensional directional flocking, the cross-product constraints induce the same tangent space and metric projector for every connected interaction graph, and experiments up to N=50N = 50 demonstrate exact constraint preservation and robustness to constraint-incompatible observations. Future work will address learning away from the constraint manifold, time-varying interaction topologies, and broader classes of nonlinear nonholonomic systems.

Acknowledgments

L. Colombo acknowledges financial support from Grant PID2022-137909NB-C21 funded by MCIN/AEI/ 10.13039/501100011033 and by iRoboCity2030-CM, Robótica Inteligente para Ciudades Sostenibles (TEC-2024/TEC-62), funded by the Programas de Actividades I+D en Tecnologías en la Comunidad de Madrid. A. Bloch was partially supported by NSF grants DMS-2103026 and DMS-2605296, and AFOSR grants FA 9550-22-1-0215 and FA 9550-23-1-0400.

References

  1. [1]Thomas Beckers, George J. Pappas, and Leonardo J. Colombo. Learning rigidity-based flocking control using Gaussian processes with probabilistic stability guarantees. In 2022 IEEE 61st Con- ference on Decision and Control (CDC), pages 7254–7259, 2022a.DOI
  2. [2]Thomas Beckers, Jacob Seidman, Paris Perdikari­s, and George J. Pappas. Gaussian process port- Hamiltonian systems: Bayesian learning with physics prior. In 2022 IEEE 61st Conference on Decision and Control (CDC), pages 1447–1453, 2022b.DOI
  3. [3]Thomas Beckers, Anthony M. Bloch, and Leonardo J. Colombo. Structure-preserving learning of nonholonomic dynamics. arXiv preprint arXiv:2603.27580, 2026.arxiv.org/abs/2603.27580
  4. [4]Anthony M Bloch and B Brogliato. Nonholonomic mechanics and control. Appl. Mech. Rev., 57 (1):B3–B3, 2004.
  5. [5]Anthony M. Bloch and Alberto G. Rojo. Optical mechanical analogy and nonlinear nonholonomic constraints. Physical Review E, 93(2):023005, 2016. doi: 10.1103/PhysRevE.93.023005.DOI
  6. [6]Steven L. Brunton and J. Nathan Kutz. Data-Driven Science and Engineering: Machine Learning, Dynamical Systems, and Control. Cambridge University Press, 2019.DOI
  7. [7]Hernán Cendra, Alberto Ibort, Manuel de León, and David Martín de Diego. A generalization of Chetaev’s principle for a class of higher order nonholonomic constraints. Journal of Mathemati- cal Physics, 45(7):2785–2801, 2004. doi: 10.1063/1.1763245.DOI
  8. [9]Felipe Cucker and Steve Smale. Emergent behavior in flocks. IEEE Transactions on Automatic Control, 52(5):852–862, 2007. doi: 10.1109/TAC.2007.895842.
  9. [10]Manuel de León. A historical review on nonholonomic mechanics. Revista de la Real Academia de Ciencias Exactas, Físicas y Naturales. Serie A. Matemáticas, 106(1):191–224, 2012. doi: 10.1007/s13398-011-0046-2.DOI
  10. [11]Manuel de León, Juan C. Marrero, and David Martín de Diego. Mechanical systems with nonlinear constraints. International Journal of Theoretical Physics, 36:979–995, 1997.DOI
  11. [12]V. A. Díaz, L. M. Salomone, and M. Zuccalli. Lagrangian neural networks for nonholonomic mechanics. Chaos, Solitons & Fractals, 199:116867, 2025.
  12. [13]Mihir Durve, Fernando Peruani, and Antonio Celani. Learning to flock through reinforcement. Physical Review E, 102:012601, 2020. doi: 10.1103/PhysRevE.102.012601.DOI
  13. [14]A René Geist and Sebastian Trimpe. Structured learning of rigid-body dynamics: A survey and unified view from a robotics perspective. GAMM-Mitteilungen, 44(2):e202100009, 2021.arxiv.org/abs/2012.06250
  14. [15]Andreas Geist and Sebastian Trimpe. Learning constrained dynamics with Gauss’ principle adhering Gaussian processes. In Proceedings of the 2nd Conference on Learning for Dynamics and Control, volume 120 of Proceedings of Machine Learning Research, pages 225–234. PMLR, 2020.arxiv.org/abs/2004.11238
  15. [16]Samuel Greydanus, Misko Dzamba, and Jason Yosinski. Hamiltonian neural networks. In Advances in Neural Information Processing Systems, volume 32, 2019.arxiv.org/abs/1906.01563
  16. [17]Tom Z. J iahao, Lishuo Pan, and M. Ani Hsieh. Learning to swarm with knowledge-based neural ordinary differential equations. In 2022 International Conference on Robotics and Automation (ICRA), pages 6912–6918, 2022. doi: 10.1109/ICRA46639.2022.9811997.
  17. [18]Carl Jidling, Niklas Wahlström, Adrian Wills, and Thomas B. Schön. Linearly constrained Gaussian processes. In Advances in Neural Information Processing Systems, volume 30, pages 1215–1224, 2017.
  18. [19]Reza Olfati-Saber. Flocking for multi-agent dynamic systems: Algorithms and theory. IEEE Transactions on Automatic Control, 51(3):401–420, 2006. doi: 10.1109/TAC.2005.864190.
  19. [20]Carl Edward Rasmussen and Christopher K. I. Williams. Gaussian Processes for Machine Learning. MIT Press, 2006.DOI
  20. [21]Craig W. Reynolds. Flocks, herds and schools: A distributed behavioral model. In Proceedings of the 14th Annual Conference on Computer Graphics and Interactive Techniques, pages 25–34, 1987. doi: 10.1145/37401.37406.DOI
  21. [22]Efstratios Stratoglou, Alexandre Anahory Simoes, Anthony M. Bloch, and Leonardo J. Colombo. On the geometry of virtual nonlinear nonholonomic constraints. IEEE Transactions on Automatic Control, 70(5):3362–3369, 2025. doi: 10.1109/TAC.2024.3508543.DOI
  22. [23]Tamás Vicsek, András Czirók, Eshel Ben-Jacob, Inon Cohen, and Ofer Schochet. Novel type of phase transition in a system of self-driven particles. Physical Review Letters, 75(6):1226–1229, 1995. doi: 10.1103/PhysRevLett.75.1226.DOI
  23. [24]Baiyue Wang and Anthony Bloch. Learning nonholonomic dynamics with constraint discovery. In Proceedings of the 8th Annual Learning for Dynamics and Control Conference, volume 331 of Proceedings of Machine Learning Research, pages 2123–2137. PMLR, 2026.

Paper details

vlnc:W_pyaws8tf
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 5

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Engineering

Not recorded for this paper

View statement
Looking for related papers…
Contents