arXiv:2609.04530cs.LGSep 2026

Manuscript Offprint

arXiv:2609.04530

An Energy-Based Conservative-Dissipative Latent Neural Evolution Operator for Magnetization Dynamics

Sebastian Schaffer, Lukas Exl

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Sebastian Schaffer *a,b and Lukas Exl †a,b

aMath. AI/ML, Wolfgang Pauli Institute, Vienna, Austria

bDepartment of Mathematics, University of Vienna, Vienna, Austria

Abstract. We develop an energy-based reduced-order model for micromagnetic magnetization dynamics that couples a convolutional autoencoder to a structured latent neural ordinary differential equation. Motivated by the precessional-dissipative structure of the Landau–Lifshitz–Gilbert equation, the latent vector field is generated from the gradient of a learned scalar potential through an antisymmetric operator and a symmetric positive-semidefinite dissipative operator. This potential is learned in nonunique latent coordinates and is not identified with the Gibbs free energy, but decreases monotonically along autonomous continuous-time solutions, while the antisymmetric component permits motion along its level sets. The encoder, decoder, latent energy, and operators are trained jointly on short trajectory windows using latent and decoded-rollout losses alone, without time-derivative supervision, physical-energy labels, or dissipation penalties. At inference, an initial state is encoded once, evolved in latent space, and decoded only at the requested output times, enabling substantially cheaper trajectory prediction than the micromagnetic solver used to generate the training data. We compare quadratic, deep, and additive deep-quadratic latent energies on two datasets parameterized by field amplitude and generated for the two applied-field directions of the NIST μ\muMAG Standard Problem 4. Dissipative-only and antisymmetric-dissipative models achieve comparable accuracy on short training-style windows but differ substantially on uninterrupted rollouts, for which the antisymmetric-dissipative models provide markedly more accurate trajectory predictions. The deep-quadratic energy gives the best overall accuracy for both field directions and exhibits slower error growth when rollouts are extended to twice the training horizon.

Keywords. micromagnetics, energy-based model, reduced-order model, neural ordinary differential equation, latent dynamic

1 Introduction

Computational micromagnetics is widely used for the analysis and design of magnetic devices, including permanent magnets and integrated magnetic sensors [2, 24, 1, 7, 15]. Their magnetization dynamics are commonly described by variants of the nonlinear Landau–Lifshitz–Gilbert (LLG) equation [9] or the Landau–Lifshitz equation

∂tm=−cγ[m×Heff+αm×(m×Heff)],(1)\partial_t \boldsymbol{m} = -c_\gamma [\boldsymbol{m} \times \boldsymbol{H}_{\mathrm{eff}} + \alpha \boldsymbol{m} \times (\boldsymbol{m} \times \boldsymbol{H}_{\mathrm{eff}})], \tag{1}

*sebastian.schaffer@univie.ac.at

†lukas.exl@univie.ac.at where m\boldsymbol{m} is the solution trajectory, cγ>0c_\gamma > 0, α≥0\alpha \geq 0, and Heff\boldsymbol{H}_{\mathrm{eff}} is the effective field. The equation combines precession and damping while evolving a spatial vector field subject to a pointwise length constraint.

Due to the stiffness of the problem, the repeated numerical solution can become a major computational bottleneck in parameter studies, optimization, and inverse design. This is particularly relevant when device geometries, material parameters, or excitation fields must be varied over large design spaces. Fast nonlinear machine-learning surrogate models, therefore, offer a promising alternative to conventional time integration by approximating the solution operator and potentially enabling substantially cheaper repeated evaluations during inverse design and optimization.

Dynamical systems often evolve in spaces whose dimension is much larger than the number of coordinates that are required to describe a restricted family of solution trajectories. This is especially true for traditional numerical solvers. A spatial discretization of a field can require numerous degrees of freedom for an accurate numerical representation, even if the solution lies near a low-dimensional nonlinear manifold. Linear trial spaces are very efficient if the states are well represented but can become inefficient for strongly nonlinear solution sets. Nonlinear manifold models based on autoencoders provide a more flexible alternative [17, 3]. An encoder assigns reduced coordinates, and a decoder reconstructs the observation. The remaining question is how those coordinates should evolve.

Earlier work has demonstrated that machine-learning can be applied to establish surrogate models for the prediction of micromagnetic trajectories [6, 23, 16]. In this work we will present another promising reduced-order model, which is motivated by energy-based models (EBMs) [5]. The effective field Heff\boldsymbol{H}_{\mathrm{eff}} is given by the variational derivative of the Gibbs free energy GG,

Heff[m](x)=−1μ0MsδGδm[m](x),(2)\boldsymbol{H}_{\mathrm{e f f}}[\boldsymbol{m}](\boldsymbol{x})=-\frac{1}{\mu_{0}M_{s}}\frac{\delta G}{\delta\boldsymbol{m}}[\boldsymbol{m}](\boldsymbol{x}), \tag{2}

where MsM_{s} is the saturation magnetization and μ0\mu_{0} the vacuum permeability. Hence, the dynamics of (1) is driven by the scalar functional GG. This poses the question whether this property can be useful for machine learning purposes.

Likelihood-based generative EBMs assign low energy to observed configurations and estimate likelihood gradients by contrasting data (positive-phase) expectations with model (negative-phase) expectations. The negative phase is often approximated with Markov-chain Monte Carlo (MCMC), including contrastive divergence [13], persistent chains [25], or chains initialized from a replay buffer [5]. This is not a clustering objective, nor does every EBM use this likelihood-based setup. In contrast, the present method performs no density estimation, partition-function evaluation, negative-sample generation, or MCMC.

A first idea was to implicitly learn a neural network model N(m,p)≈G\mathcal{N}(\boldsymbol{m}, \boldsymbol{p}) \approx G, where p\boldsymbol{p} denotes conditional parameters, from snapshots of the solution trajectories by automatic differentiation (AD) and explicit time integration. While this is probably possible, it comes with some issues. First, the feature space remains high-dimensional, and the scalar gradient must be evaluated at every solver stage. Second, outer differentiation of a trajectory loss still requires mixed second derivatives. Third, and most important, such an approach would just inherit the stiffness of the original problem, leading to a high computational demand.

Another, much more promising approach is the combination of nonlinear manifold models with a neural ordinary differential equation (neural ODE). A neural ODE parameterizes a continuous-time vector field and can learn it from trajectories [4, 21]. Their continuous formulation permits evaluation at requested times. However, an unrestricted vector-valued network does not distinguish circulation from dissipation and does not supply a scalar that is constrained to decrease. This distinction can matter for uninterrupted rollouts: agreement on short windows does not by itself prevent accumulated error from carrying a trajectory into poorly represented regions.

We generate the latent vector field from the gradient of a learned scalar. An antisymmetric channel operator produces a component tangent to scalar level sets, while a symmetric positive-semidefinite channel operator produces a decreasing component. This construction is related algebraically to Hamiltonian neural networks, gradient systems, and metriplectic formulations [10, 19, 12]. It is deliberately less restricted than a thermodynamic model: its scalar is learned in nonunique latent coordinates and is not inferred from physical-energy labels. Even though this learned scalar energy is not the Gibbs energy, it can still be very useful by imposing a strong inductive bias, guaranteeing latent energy dissipation, and shaping the latent space. Further, such a scheme separates high-dimensional reconstruction from temporal integration.

The contributions are: (i) a spatial latent-tensor encoder–decoder coupled to sitewise conservative–dissipative dynamics; (ii) an autonomous continuous-time dissipation identity for the learned scalar; (iii) a joint snapshot-window objective containing latent and decoded-rollout losses only; and (iv) a joint-training comparison of dissipative-only and antisymmetric–dissipative fields with quadratic, deep, and deep-quadratic latent energy models.