GENERIC-FNO: Embedding Energy Conservation and Entropy Production into Fourier Neural Operators
We propose GENERIC-FNO, a neural operator that embeds the metriplectic (GENERIC) degeneracy structure of nonequilibrium thermodynamics in function space, coupling reversible, energy-conserving dynamics to irreversible, entropy-producing dynamics via the degeneracy conditions. Prior structure-preserving neural operators enforce at most one conservation law or a Hamiltonian form, and thermodynamically consistent learning has been confined to finite-dimensional, graph, or particle systems. GENERIC-FNO learns the energy and entropy functionals as neural operators and builds the reversible and irreversible operators as diagonal Fourier multipliers flanked by rank-one projections that enforce both degeneracy conditions exactly, by construction, with no penalty, update projection, or residual; the Jacobi identity is not enforced. The identities hold to machine precision (~10^-13) for any initialization, dimension, or resolution, so the continuous-time dynamics conserve the learned energy and produce the learned entropy exactly, with explicit time stepping adding only an O(dt^2) drift. These are guarantees about the learned functionals within GENERIC's scope of closed conservative-dissipative dynamics, not a certificate of physical accuracy, and the (E,S,L,M) decomposition is not unique; we make this gauge freedom explicit and propose a gauge-invariant dissipation diagnostic independent of the learned functionals. Across three backbones (1D/2D FNO, DeepONet) and four canonical scalar PDEs, the guarantees transfer zero-shot over a 4x super-resolution range and hold in 3D; the diagnostic identifies the reversible and the most dissipative system in every backbone; and over 200-step rollouts, where every unconstrained model we test diverges or collapses, GENERIC-FNO stays bounded, at half the parameters but 4-10x the compute, while losing accuracy on pure transport and on the smallest 1D backbone.