Manuscript Offprint
arXiv:2610.13292Recovering Irreducible Three-Body Interactions with Lagrangian Neural Networks
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Sena Kalabalik, Şükrü Çağlar, Abdullah Umut Hamzaogulları, and Arkadaş Özakin
Department of Physics, Boğaziçi University, Istanbul, Türkiye
Department of Computer Engineering, Boğaziçi University, Istanbul, Türkiye (Dated: October 12, 2026)
Lagrangian Neural Networks (LNNs) learn mechanical systems from trajectory data by parameterizing a scalar Lagrangian and deriving the dynamics through the Euler-Lagrange equations, biasing the model toward motion that respects the variational structure of mechanics. The interactions studied so far have been pairwise-additive, leaving open whether LNNs can recover an irreducible many-body interaction from motion alone. We address this using the Axilrod-Teller triple-dipole interaction, the leading three-body dispersion term, whose dependence on the collective geometry of three particles cannot be represented by any sum of pairwise terms. We prescribe the kinetic energy exactly and learn only the potential, as a function of interparticle distances and angles. Combined with a signal-aware sampling strategy that concentrates training data where the three-body signal is strongest while preserving broad coverage of configuration space, this recovers the interaction from accelerations alone. The learned potential reproduces the radial scaling, angular dependence, and characteristic sign reversal of the Axilrod-Teller interaction, and generates stable trajectories. Embedding it within a pairwise Lennard-Jones potential lets us examine its observability: the three-body term is recovered once its dynamical signature exceeds the residual modeling error, which it does cleanly at amplified coupling but not at the coupling of a real noble gas, bracketing the transition between the two. Finally, symbolic regression on the trained potential, with no assumed functional form, returns the Axilrod-Teller expression with angular numerator, radial law, and coupling constant intact. An LNN with domain-specific structure can thus recover an irreducible three-body interaction from trajectories as a closed-form law, pointing toward learning interaction laws whose structure is not known a priori.
I. INTRODUCTION
Lagrangian Neural Networks (LNNs) are physics-informed architectures that incorporate the principle of stationary action into the model structure. In a standard LNN [1], a single neural network parameterizes the scalar Lagrangian , while the system dynamics are obtained by differentiating this function through the Euler–Lagrange equations. This construction provides an inductive bias toward dynamics that are consistent with a variational formulation of mechanics, instead of enforcing such structure through external loss terms or constraints.
The systems on which these architectures have been developed and tested do include cases that are chaotic, highly nonlinear, and well described by Lagrangian mechanics, such as pendula, oscillators, gravitational pairs . However, to our knowledge, non-additive many-body interactions, potentials that cannot be written as a sum over pairs at all, have not been the object of such a study. A non-additive three-body potential changes the learning problem qualitatively, because the network must represent irreducible correlations among all interparticle coordinates simultaneously, and no composition of pairwise fits can reproduce it.
We therefore focus on an irreducible three-body interaction: the Axilrod–Teller (AT) triple-dipole term, derived independently by Axilrod and Teller [5] and by Muto [6] as the direct quantum-mechanical result, at third order in perturbation theory, for three neutral atoms. In practical atomistic models, it is commonly incorporated as the leading three-body correction to pairwise interaction potentials such as the Lennard–Jones (LJ) potential [7, 8]. The interaction has certain analytic virtues: its radial and angular structure are known in closed form, and its geometric content, which is an angular factor that changes sign with the shape of the particle triangle, is a good study case for the kind of many-body structure that a pairwise model is provably unable to represent. We analyze the nature of the interaction in detail and use its functional form as a solid target for training and testing LNNs in the context of these three-body interactions.
Our strategy is to incorporate into the LNN framework the physics that is known a priori, leaving the network to learn only what cannot be specified in advance. As in the general LNN settings, learner sees only trajectories, and the potential is not supervised directly, it is inferred implicitly through acceleration matching. Our experiments evaluate this program in the context of learnability at three levels: field-level accuracy, functional geometric structure, and trajectory rollouts for the isolated AT system, and for additional systems including a purely pairwise Lennard-Jones control, and AT embedded in a Lennard-Jones background, where we investigate the coupling strength at which the three-body correction becomes identifiable at all.
Finally, we ask an additional question. If the network succeeds in learning the interaction from trajectories alone, can the learned function be turned back into an explicit analytic expression? We therefore also
subject the trained model to symbolic regression using the learned potential, turning the neural representation into a candidate functional form. This is relevant for the broader goal of using learned dynamical models as tools for scientific discovery: numerical agreement with trajectories establishes that a model works, and recovering a compact analytic expression can reveal what interaction the model has actually learned. In our study, the symbolic model recovers the characteristic structure of the interaction, including its geometric dependence, providing a clear example of how physics-informed neural learning can be paired with symbolic methods to move from dynamical data toward interpretable analytic forms.
The remainder of this paper is organized as follows. Section II introduces the Lagrangian neural network framework and the physical systems considered, and reviews Lagrangian–Hamiltonian learning architectures, machine-learned interatomic potentials, and the Axilrod–Teller interaction. Section III specifies the physical system and its interaction model. Section IV presents our fixed-kinetic architecture, augmented input representation, and training methodology. Sections VA–VB evaluate the learned models across the isolated AT, pairwise LJ, and combined LJ–AT systems, including the symbolic-regression analysis of the learned interaction. We conclude in Sec. VII.
A. Lagrangian neural networks
Consider a mechanical system with generalized coordinates , velocities , and Lagrangian . The Euler–Lagrange equations yield the accelerations
where M is the generalized mass matrix. A Lagrangian neural network (LNN) represents L by a neural network and evaluates Eq. (1) by automatic differentiation [1]. Training uses trajectory or state data and differentiates the learned Lagrangian to obtain accelerations through the Euler–Lagrange equations, and compares them against reference accelerations.
B. Learning Lagrangian and Hamiltonian dynamics
Hamiltonian neural networks [9] and Lagrangian neural networks [1] parameterize a scalar generating function and obtain dynamics by differentiation, thereby biasing the learned dynamics toward conservation laws through their structure, instead of supervised learning of the dynamics. The standard LNN leaves the entire free, maximally flexible, with the cost of the learned kinetic structure being a fitting burden of its own. Deep Lagrangian Networks (DeLaN) [2] impose a different structure than LNN, parameterizing a positive-definite mass matrix and a potential separately. Finzi et al. [3] showed that embedding classical mechanical systems in Cartesian coordinates with explicit constraints reduces the mass matrix to a constant, few-parameter form, specified directly, hence often simplifying the learned Lagrangian and reducing the learning task to the potential energy. More recently, Hamzaogullar & Özakin [4] retained a fully learned Lagrangian while introducing Hessian regularization to improve optimization stability. Finally, graph-network formulations extend Hamiltonian and Lagrangian learning to many-body and articulated systems, generalizing across system size by construction [10–13], and more recent work couples such architectures with symbolic regression to recover pairwise interaction laws directly from trajectories, including for complex potentials such as binary Lennard-Jones [14]. However, these formulations parameterize interactions through edge-based or pairwise decomposition rather than explicit higher-order terms, leaving irreducible three-body contributions such as those arising from the Axilrod-Teller potential unaddressed.
C. The Axilrod–Teller interaction
At third order in perturbation theory, the dipole-dipole interaction among three polarizable atoms produces an energy contribution that involves all three simultaneously. Applying the London approximation to the sums over intermediate states and retaining only the dipole–dipole contribution reduces the third-order perturbation expression to the Axilrod–Teller–Muto triple-dipole potential: [5, 15]
where are the side lengths of the triangle formed by the atoms, its interior angles, and a coupling constant built from atomic polarizabilities and excitation energies.
Two structural features of Eq. (2) organize everything that follows. First, under a uniform rescaling of the triangle, , the angles are unchanged and : every fixed shape obeys the same power law. Second, the angular factor changes sign at and is bounded, , with the maximum at the equilateral configuration and the minimum in the collinear limit. For , the interaction is therefore repulsive for compact, near-equilateral geometries and attractive for elongated, near-collinear ones. This sign change is a distinctive three-body feature and provides a qualitative signature that a learned potential should reproduce to capture physics beyond a pairwise fit.
Fig. 1 shows these two features directly, as forces on concrete configurations, before any learning en-

FIG. 1: The AT interaction at a glance: analytic forces on all three particles for representative triangle shapes (rows) at increasing size (columns), with arrow color encoding force magnitude. Compact, near-equilateral shapes ( ) are pushed apart; elongated, near-collinear shapes ( ) are pulled together; the overall strength falls dramatically as in force.
ters the discussion. We note also that the natural variables of Eq. (2) are exactly the six scalars : this observation is relevant to our network's input representation in Sec. IV B.
D. Machine-learned interatomic potentials
A substantial literature learns interatomic potentials from quantum-mechanical reference data, from the symmetry-function networks of Behler and Parrinello [16, 17], which represent local atomic environments through functions of interatomic distances and angles, to neural network potentials trained at scale [18] and equivariant message-passing architectures [19]; see Ref. [20] for a concise overview, and Ref. [21] for examples incorporating explicit many-body energy terms. These models are typically trained against energies, often together with forces, computed from electronic-structure calculations. As such, the supervision reflects the combined effect of all interactions present in the underlying Hamiltonian simultaneously, not intending to identify or recover any single physical contribution in isolation. Kernel-based approaches have targeted non-additive three-body structure, from many-body distribution functionals -including AT- [22] to three-body force fields for molecular liquids [23], but again through regression on the quantum-mechanical energetics, not on the dynamical trajectories.
Our setting differs in two respects. First, we consider a single isolated interaction, allowing recovery of a specific physical contribution. Second, the potential is never supervised directly, it is recovered implicitly from classical trajectories through acceleration matching, without energy or potential labels. Our input representation (pairwise distances augmented with angle cosines, Sec. IV B) follows a similar philosophy to Behler symmetry functions, enriching pairwise distance information with angular information while avoiding engineered symmetry-function expansions.
E. The Axilrod–Teller interaction in simulation
The AT term has a long history in rare-gas simulation. Barker, Fisher, and Watts incorporated it into quantitative models of liquid argon [24], while Attard's simulation and integral-equation studies of the LJ+AT fluid [25, 26] established the argon-like parameter conventions ( ) that we adopt for physical orientation, under which the three-body interaction increases liquid-state pressure and internal energy by roughly ten percent under representative liquid-state conditions. Its physical consequences extend from crystal-structure selection in noble-gas solids [24] to cohesive-energy corrections in dense helium [27], making it the canonical three-body contribution to the many-body dispersion physics incorporated in modern electronic-structure methods [28]. Equally relevant to the present work is the literature on the AT form's limitations: it is an asymptotic long-range interaction, and at sufficiently short separations three-body exchange interactions become comparable to and eventually exceed the triple-dipole contribution [8]. Consequently, even simulations that treat the bare AT term as the sole three-body interaction, including phase-coexistence studies such as Ref. [7], inherit this short-range limitation. These limits are reflected in the explicit statement of scope given in Sec. III.
III. PHYSICAL SYSTEM DEFINITION
We consider three identical particles of mass m in two spatial dimensions with total potential
We express all dynamical quantities in reduced LJ units, , , , in which the only free parameter of the dynamics is the dimensionless three-body coupling . Hence in these units,
For notational convenience, we suppress the stars on all quantities below. Unless otherwise stated, all lengths, energies, times, and coordinates are therefore understood to be expressed in these reduced LJ units.
Argon-like values (, , [25, 26]) serve only to interpret parameter regimes physically, the dynamics are solved in reduced units throughout. The isolated three-body system of Sec. V A corresponds to with setting the (then arbitrary) energy scale.
The interaction model is directly inspired by classical many-body fluid Hamiltonians incorporating both pairwise Lennard-Jones and three-body Axilrod–Teller contributions: the functional form of the triple-dipole term is identical to that introduced in early Monte Carlo studies of rare-gas systems, where the Hamiltonian is expressed as a sum over two- and three-body contributions [24, 25]. Unlike those studies, which focus on equilibrium thermodynamic properties in large ensembles, the present work considers a minimal three-body system and investigates its real-time dynamics via a Lagrangian formulation. All quantities are nondimensionalized and therefore correspond to the literature values up to a rescaling by the characteristic LJ length and energy parameters.
Scope and physical validity: The AT expression arises under the assumption of negligible overlap between the atomic charge distributions. It is therefore an asymptotic long-range approximation and not a complete three-body potential. At sufficiently short separations, exchange and overlap effects become comparable to and eventually exceed the triple-dipole contribution [8]. Accordingly, the AT interaction is expected to provide a quantitatively reliable description only once the atoms are sufficiently separated that charge overlap is negligible. Hence for the isolated AT term, at short range the contribution is comparatively large but its underlying assumptions are violated, and at long range the assumptions hold but the term is a very small correction to the dominant pair interaction LJ.
Much of the configuration space we sample therefore lies outside the regime where AT quantitatively describes real rare-gas atoms, and we make no claim to such realism. Both the isolated AT system and the LJ+AT composite are physics-inspired analytic models, not meant to be realistic physical descriptions. They are used to test whether symmetry-encoded networks can learn genuinely coupled two- and three-body structure from dynamics. Our conclusions regarding learnability, representation, and identifiability therefore concern the learning problem itself, they do not concern the quantitative modeling of any specific material.
IV. METHODS
Our approach is summarized in Fig. 2: a partially parameterized Lagrangian in which the kinetic term is prescribed analytically and only the interaction potential is learned, as an unknown function of the three-body geometry. Dynamics follow by differentiating this Lagrangian through the Euler–Lagrange equations (Sec. II A), and training matches the resulting accelerations to reference data. The two structural choices, the fixed kinetic term and the augmented input reparameterization, are the subject of this section, else is mostly standard and stated briefly below.

FIG. 2: Schematic of the fixed-kinetic Lagrangian network: known structure (kinetic term, symmetries) is encoded exactly, and only the interaction potential is learned. The potential is not supervised directly, the training signal reaches it only through the accelerations it generates.
TABLE I: Lagrangian parameterizations relevant to this work.
| Method | Learned components |
|---|---|
| DeLaN [2] | and |
| LNN [1] | entire |
| Hamzaogullari & Ozakin [4] | entire , Hessian-regularized |
| This work | analytic |
is a multilayer perceptron with GELU activations as utilized by Hamzaogullari & Ozakin [4], and training minimizes the mean absolute error of predicted accelerations,
Training and validation sets (120k and 24k configurations) sample pairwise distances from a log-uniform mix-ture of dense and sparse regions. The sampling distribution is designed to maximize exposure to the narrow regime where the interaction remains both informative and numerically stable, hence it's an adaptive allocation of data to where the learning signal lives, details are described in V. All remaining details: sampling parameters and construction, optimizer and schedule are given in Appendices A and B; Table I situates our parameterization among existing Lagrangian networks.
A. Fixed kinetic term
We employ a partially parameterized Lagrangian in which only the unknown potential energy is represented by a neural network:
where is described in Sec. IVB. Unlike systems whose generalized-coordinate formulation induces a configuration-dependent mass matrix , our problem is formulated in Cartesian coordinates with known particle masses, so the kinetic energy takes a fixed quadratic form with a constant mass matrix . With T prescribed, the mixed Hessian in Eq. (1) vanishes and the Euler–Lagrange equations reduce identically to
so the learning problem becomes the recovery of a scalar function from its gradient field, well-posed up to an additive constant wherever the data cover configuration space.
With this decomposition, we omit the need to infer the known quadratic kinetic form, and concentrate the representational capacity of the neural network on the unknown interaction physics. Our architecture may therefore be regarded as a domain-specialized variant of a general Lagrangian neural network, in which a priori physical knowledge is incorporated analytically.
Within the class of systems satisfying the conditions described, this specialization does not reduce the model's the relevant expressive power relative to a fully parameterized Lagrangian network.
B. Input reparameterization
The potential network receives the augmented coordinates
computed internally from the Cartesian positions. Since the first three coordinates alone are sufficient to uniquely specify any planar three-body geometry intrinsically, the angular coordinates introduce no additional geometric information, as the interior angles are uniquely determined by the three pairwise distances through the law of cosines. We nevertheless include both distances and angles because this mixed representation exposes radial and angular structure explicitly, an inductive bias that has been used in machine-learned interatomic potentials (Sec. II E) and is supported empirically.
Among the possible angular features, is the natural choice because it is one-to-one on the physical range . With this choice, no input normalization is applied, since over the sampled ranges the internal coordinates are already .
Trivially, the augmented coordinates carry no information absent from the Cartesian positions. The mapping is a symmetry-adapted reparameterization of the same configuration. From the network's perspective, the interaction remains an unknown function inferred from motion data. The empirical evidence in Sec. V A supports this interpretation: the same representation recovers a purely radial potential when trained on Lennard–Jones data (and separately on Newtonian data), without introducing spurious angular dependence, while the identical featurization also succeeds on the composite LJ+AT system. The representation therefore acts as a generic description of three-body geometry and a generic inductive bias for three-body potentials.
Finally, velocities never enter : they appear only in the fixed kinetic term and in the Euler–Lagrange algebra of Eq. (1). Both the learned and the reference accelerations are obtained by differentiating the respective potentials with respect to the Cartesian positions, automatic differentiation passes through the featurization of Eq. (8), so the network is evaluated on internal coordinates while the dynamics remain Cartesian.
V. EXPERIMENTS
We divide the experiments into two groups. The first isolates the three-body interaction entirely, where the training data are generated by the AT term alone, hence the question of whether the network can represent purely non-additive structure is posed in its cleanest form, free of any pairwise background (Sec. V A). The second restores the composite setting of practical interest, a dominant pairwise LJ interaction with three-body corrections of varying relative strength, which shifts the question from representability to identifiability (Sec. V B).
Within the isolated study we evaluate at three stages: (i) potential landscapes and force fields, the instantaneous field-level comparison between learned and analytic dynamics; (ii) the functional geometric dependences, radial and angular, that define the AT interaction in closed form; and (iii) trajectory rollouts, in which model errors accumulate under time integration. The stages are aimed to be complementary, hence each provides information from a different perspective. Reporting all three is aimed to disambiguate the failure modes cor-

FIG. 3: Relative acceleration error along an equilateral configuration sweep for models trained with the proposed dense/sparse sampler and with plain log-uniform sampling. The dense/sparse model reaches relative errors of 8.8%, 0.8%, and 13.5% at r = 0.6, 1.0, and 1.5, against 100.4%, 124.9%, and 747.2% for the log-uniform model over the same points. Both models degrade further into the tail, but the gap persists, an order-of-magnitude advantage holds even where both models are far from quantitatively accurate.
respondingly.
Dataset Design: Because spans several orders of magnitude (Sec. II C), the loss in Eq. (5) is dominated by compact, small-r configurations, where the AT acceleration grows as . This regime carries the information that fixes the interaction and governs rollout accuracy, so the sampler must visit it often. Log-uniform sampling of separations does not, only 28% of its configurations have at least two separations below , compared with 84% for the dense/sparse sampler. We note that the dense/sparse sampler still keeps mixed and extended geometries, since trajectories visit them too. To test the effect, we trained two models identical in every respect except the sampler (Appendix A). Along an equilateral sweep, the dense/sparse model reproduces the analytic acceleration to within for , whereas the log-uniform model has a relative error of at least over the whole sweep (Fig. 3). Covering the same range of r is therefore not enough, and we claim that what matters is how often the strong-interaction regime is visited. This is also directly affecting the balance of the loss, since compact configurations' errors dominate the loss even when they are too rare to be fitted, as under log-uniform sampling, and the model ends up fitting neither regime. The cost is accuracy at large r, where the force is already small and dynamically irrelevant. Both models expectedly degrade there, but the dense/sparse model remains roughly an order of magnitude more accurate, and the 10% of separations drawn from the sparse range keep that region from being left entirely unlearned.
A. Isolated three-body interaction
Unless stated otherwise, results refer to the reference pure-AT model ( , ; Appendix A), evaluated against the analytic dynamics.
1. Potential landscapes and force fields
To assess the learned interaction, we first compare the complete potential landscape and corresponding acceleration field over a two-dimensional slice of configuration space. Two particles are held fixed while the third is evaluated on a uniform grid of positions, producing a continuum of three-body configurations (Fig. 4). This simultaneously inspects the local geometry of the potential surface and the vector field generated by its gradient.
Figure 4 shows close agreement between the learned and analytic potentials throughout the sampled domain, with the residuals remaining small relative to the overall variation of the landscape. The learned acceleration field also reproduces the structure of the analytic field, including the locations of attractive and repulsive flow regions. Aggregated over the displayed domain (which is mostly but not entirely in the dense interval), the relative L1 error is 1.3% in the potential and 1.1% in the acceleration magnitude (magnitude-weighted, App. C).
The potentials are centered before comparison because the zero of potential energy is arbitrary: only potential differences, equivalently their gradients and the resulting accelerations, are physically meaningful. The largest residuals in the figure appear, in absolute terms, right outside the excluded region near , but this is simply because the potential itself is largest there. Measured relatively, this near-field band is in fact the most accurate part of the domain ( for ).
Since the configurations on this evaluation also include many different but not parameterized variations of angular and radial arrangements, it provides an insightful global picture of the learned interaction, which the next two subsections' one dimensional analyses complement.
2. Radial dependence
Uniformly scaling a fixed reference triangle preserves its shape while varying only its overall size. We evaluate six representative reference geometries, comparing learned and analytic potential and acceleration magnitude at each scale by dividing the potential and acceleration values to the fixed-by-geometry truth of the angular term. As shown in Fig. 5, agreement is close for the five families, relative L1 error (magnitude-weighted over the sweep) of 0.25% in potential and 0.66% in acceleration, averaged across Equilateral, Right, Line, Isosceles,

Analytic force field
Learned force field
Force residual

FIG. 4: Field-level comparison for the isolated AT interaction. Two particles (white markers) are held fixed while the third is evaluated over a two-dimensional grid of positions. Top row: analytic potential, learned potential, and their absolute difference. The potentials are centered by subtracting their spatial mean, reflecting the arbitrary additive constant in the potential energy. Bottom row: corresponding acceleration fields shown as streamlines colored by magnitude, together with the pointwise acceleration residual. The region where any pairwise distance falls below the training cutoff is masked. The pink overlay indicates regions that were sampled less densely during training. The two fixed particles are separated by ; axes are in reduced units.
and Scalene. The far-particle family is the exception, with relative L1 error of 87.7% (potential) and 21.6% (acceleration). As the third atom recedes, the net three-body contribution falls fastest for this geometry, so both learned and analytic values ride the numerical floor and a small absolute residual becomes a large relative one, consistent with the visible separation in Fig. 5 and not a true functional-form discrepancy.
Pure LJ control. A natural concern is that including the angular coordinates among the inputs might bias the network toward learning an artificial shape dependence, even when the underlying interaction is purely pairwise. Figure 6 addresses this directly. Using the identical architecture, same geometric representation, and training protocol, but training on a purely Lennard-Jones system, the learned potential remains in good agreement with the analytic radial dependence with a relative L1 error of 0.45% (potential) and 0.76% (acceleration) across all six reference geometries. The representation therefore acts as a neutral symmetry-adapted parameterization and an inductive bias toward many-body angular structure.
Newtonian control. The same conclusion holds for a structurally very different pairwise interaction. Trained on data from three particles under Newtonian gravity ( , which is a 1/r potential with no three-body term), the identical ( ) architecture recovers the gravitational force law to a mean relative acceleration error of 2.6% and reproduces the potential up to its additive gauge constant essentially exactly ( , App. C, Fig. 7). Gravity is a demanding second control because its radial law is not similar to the AT term's. Where AT falls as and LJ as a steep 12–6 wall, gravity is long-ranged and shallower, yet the same featurization fits it without modification. A distances-only ablation, with three radial inputs, no angle cosines, trained on the identical data performs indistinguishably (2.5% mean relative acceleration error, ), confirming that the angular inputs are simply not needed when the interaction carries no angular signal, and that their presence in the full model neither helps nor hurts a purely radial target.
Radial dependence across 6 triangle families ( ): potential (rows 1,3) and acceleration (rows 2,4)

Far particle
Isosceles
Line
Scalene

r
r
r
r
r
r
FIG. 5: Radial dependence of the learned Axilrod–Teller interaction. Each column corresponds to a fixed reference triangle, with all remaining configurations obtained by uniformly scaling that geometry. The horizontal axis is the overall scale factor multiplying a fixed unit shape, so every pairwise distance grows . For the equilateral family is the side length, for the others the linear size of the reference triangle. Because rescaling leaves all angles fixed, each family must follow , . The far-particle family is the sole visibly separating curve. As the third atom recedes –hence surpassing the ceiling distance in training(App. A)–, the net three-body force vanishes fastest, hence both curves ride the numerical/representational floor and their apparent divergence is the asymptotic-decoupling limit, an expected consequence of evaluating outside the training domain. (a) Learned and analytic potentials. (b) Corresponding acceleration magnitudes.
3. Angular dependence
The more characteristic signature of the AT is the angular modulation encoded by the factor . To isolate this dependence in an interpretable way, we fix the characteristic length scale and vary only the triangle shape by continuously changing the included angle while keeping one side of the reference triangle fixed (Fig. 8). As the angle is swept, the learned potential and acceleration magnitude remain in good agreement of mean relative errors 0.81% in potential and 1.06% in acceleration, with their analytic counterparts throughout the angular range, including the transition between the repulsive and attractive branches.
4. Trajectory rollouts
We integrate the learned Euler–Lagrange equations from initial conditions drawn at random within the training bounds (unless noted otherwise) and compare the resulting trajectories against reference trajectories obtained by integrating the exact analytic interaction (Fig. 9).
Radial dependence across 6 triangle families ( ): potential (rows 1,3) and acceleration (rows 2,4)
9

FIG. 6: Pure Lennard–Jones control. The same geometric input representation, including both pairwise distances and angle cosines, is trained on a purely pairwise interaction. The learned potential remains in good agreement with the analytic LJ radial dependence across all reference geometries, indicating that the additional angular inputs do not introduce spurious shape dependence.
Fig. 9(a) shows three qualitative outcomes side by side: an unbound attractive case (i), a bound attractive case that collapses (ii), and a repulsive case whose curvature is confined to a brief initial window before it straightens into free separation (iii).
Over the ensemble, 89 of which remain inside the training domain for the entire window, the rest contributing until the moment they leave it, and we report three statistics. Position error is computed after subtracting the center-of-mass displacement of each frame, so that rigid translation, to which the interaction is blind by construction, is not conflated with actual interaction error. Its ensemble median stays at 1.9% of the typical particle separation over the whole window, rising to 7.1% by the time the window closes. Because the learned potential depends on positions only through translation and rotation-invariant features, the total force on the system sums to zero identically and momentum is conserved up to integration error alone. The center-of-mass drift panel confirms this over the whole window, rising to only by its end), which verifies that the position error above is not concealing a hidden momentum failure.
Finally, we define the relative energy error as the true (analytic) energy functional evaluated on the learned rollout, compared against the same functional evaluated on the ground-truth rollout at the same instant, normalized
Pairwise Newtonian gravity control

FIG. 7: Newtonian gravity control. Learned versus analytic potential (after gauge-fixing by a single additive offset) over a set of random three-body configurations within the training range, for the full model and the distances-only ablation. Both recover the pairwise 1/r potential essentially exactly and 0.9997), with mean relative acceleration errors of 2.6% and 2.5%, confirming that the geometric featurization fits a radial law nothing like the Axilrod–Teller term’s, and that the angular inputs stay inert when the interaction carries no angular signal.
Angular dependence at fixed length scale

FIG. 8: Angular dependence of the learned interaction at fixed length scale. Particle 1 is at the origin, particle 2 at , and particle 3 at , so the two sides meeting at particle 1 are held equal, , while the swept apex angle sets the third side and hence the shape. Thus s fixes the characteristic radial scale while alone varies the triangle shape, isolating the angular factor at (near-)constant size. (a) Potential, after subtracting its mean. (b) Corresponding acceleration magnitude.
by the ground truth's initial energy:
Both rollouts are integrated from the same initial state, so by construction. What Eq. (9) tracks from there is how far the two trajectories' energies pull apart as the rollout proceeds. Over the ensemble, has a median of 11.5% across the whole window, rising to 26.6% by its
(i) attractive, unbound: curves then escapes

(ii) attractive, bound: genuine inspiral
(iii) repulsive: brief bend, then straightens
(a) Three individual rollouts, each showing a qualitatively different outcome (reference solid, learned dashed, particles colour-coded, dots mark initial positions): (i) an attractive ( ) triangle with enough kinetic energy to remain unbound, which curves before eventually separating, (ii) an attractive triangle with too little energy to escape, spiraling in to a direct collision, (iii) a repulsive ( ) triangle, shown over a short window to isolate its brief initial bend before the trajectory straightens into free separation.


Center-of-mass drift
Trajectories still valid


(b) Ensemble statistics over N = 100 random initial conditions, each trajectory contributes to a given time only until it leaves the training-valid region. Left: center-of-mass-corrected position error (median, 10–90% band shaded). Middle: relative energy drift, which is the relative error of the true analytic energy on the learned trajectory's own positions and velocities, of the learned rollouts (individual trajectories in grey, median in black, log scale). Right: drift between the reference and learned centers of mass, as a sanity check.
FIG. 9: Trajectory-level evaluation of the learned dynamics.
end.
This is the most demanding of our three measures, because it is sensitive to the trajectory's full history through a potential whose local steepness varies over many orders of magnitude. As the learned and true rollouts separate in configuration space, by exactly the position and velocity error, is evaluated at two increasingly different states, and the same, modest, bounded separation is weighted by the local force at each instant. Because that force varies by orders of magnitude across the accessible configuration space, an identical positional error is amplified very differently depending on where it occurs. This is also why the model tracks the system's shape far more tightly than it appears to conserve energy over a long rollout.
We note that Eq. (9) is a statement about fidelity to the true dynamics, not about the model's own internal consistency. The learned Lagrangian is time-independent, so it conserves its own energy exactly, up to integrator error evaluated with the network's own learned potential, the learned rollout’s energy is constant to within integrator precision ( relative error). The large values of therefore do not indicate a violation of the model’s structural conservation law, they indicate that the potential it conserves is a close, but imperfect, approximation of the true one, and that this small approximation error compounds, through the steepness described above, into a large discrepancy against the true energy over a long rollout.
5. The canonical configurations of Axilrod and Teller
As a final, gestural check, we revisit the four triangle geometries Axilrod and Teller used to illustrate the shape-dependence of 's sign [5]: the equilateral triangle ( , maximally repulsive), the right triangle ( , repulsive), the collinear configuration ( , attractive), and the far-removed-atom limit, where the sign is set by a single angle through . The learned potential reproduces the correct sign and qualitative dynamics in all four, as shown in V A 5, confirming that the model has captured 's sign structure.
B. Three-body corrections on a pairwise background
Having shown that the isolated three-body interaction is representable (Sec. VA), we restore the pairwise Lennard–Jones background and ask the question that matters for realistic simulation: when does a three-body correction leave a signature in the dynamics that a learned model can actually resolve? We pose the answer as governed by a single comparison, the size of the AT contribution against the model's own fitting-error floor, and the two couplings we study fall on opposite sides of it.
We quantify identifiability directly. Because the acceleration is linear in the AT coupling and the LJ part is common to both systems, the exact contribution a pairwise model omits is . We compare this against the pairwise model's error floor: the LJ-only model's residual against the pairwise dynamics it was trained on, i.e. its irreducible fitting error, given our setup capacity. On the argon-reference configurations ( ) the median floor is in reduced acceleration units (Fig. 11a).
1. Physical coupling: a null result
At the physical of argon [25, 26] the three-body term is not identifiable with our selected budget of architecture and data. Its median magnitude is , roughly five times below the pairwise floor, and it lies below the floor for 85% of configurations: the signal to be learned sits inside the error of the fit. Consistently, a full LJ+AT model trained on this data does not lower the residual against the true composite dynamics, its median residual ( ) is in fact no better than the pairwise model's ( ; Fig. 11b), the three-body branch adding variance without extractable signal. We report this as a definite null result about identifiability at this floor. It is not a claim that the information is absent in principle, since a lower floor could move the boundary, although we expect not substantially.
2. Amplified coupling
At the comparison reverses. The AT contribution (median ) now stands above the pairwise floor over most of configuration space, and the full model resolves it: its median residual against the true dynamics ( ) is smaller than the pairwise model's ( ; Fig. 11b). Taken together, the two couplings bracket the identifiability boundary between and 1.0, the same architecture that represents the three-body term in isolation recovers it in the composite system only when its magnitude clears the model's own error floor.
3. Sensitivity to the inner cutoff
Training closer to argon's reported minimum separation ( [25, 26]) breaks the fit. At the model converges cleanly, with validation error in reduced acceleration units (median error floor ). Pushing the cutoff down to pulls in configurations sitting on the LJ potential's steep repulsive wall, where accelerations run one to two orders of magnitude above the rest of the training set (median for ), against a floor of a few hundredths elsewhere). Fitting these dominates the loss: validation error rises to 2–3, an order of magnitude worse, and training no longer converges cleanly. The physical AT signal we actually want is only in these units, about two orders of magnitude below the resulting error floor, and effectively invisible to the fit. We therefore use the model as the default wherever LJ is included.
VI. SYMBOLIC RECOVERY OF THE INTERACTION LAW
The preceding evaluations inspects the agreement of with pointwise, radially, angularly, and dynamically, but itself remains an opaque network. As a final, independent check, we ask whether a closed-form expression can be extracted from directly, without assuming its functional form in advance. We apply symbolic regression, where we chose PySR [29], an open source symbolic regression library which uses a genetic evolutionary algorithm to fit symbolic expressions to data, because it
Four canonical Axilrod--Teller configurations



FIG. 10: Reference (dashed) and learned (solid) dynamics initialized from the four triangle geometries used by Axilrod and Teller [5] to illustrate the sign of : equilateral, right-angled, collinear, and the far-removed-atom limit.
(a) three-body signal vs. model floor

(b) residual vs. true composite dynamics
FIG. 11: Identifiability of the three-body term on a pairwise background, versus the inner separation (medians per bin). (a) The analytic AT contribution to the acceleration, (what the pairwise model omits) at the physical ( ) and amplified ( ) couplings, against the pairwise (LJ-only) model's error floor. (b) Residual of the pairwise-only and full LJ+AT models against the true composite acceleration, at both couplings.
is easily customizable. It searches over algebraic expressions built from a fixed operator set for one that best reproduces a target dataset, to evaluated on the geometric feature vector of Eq. (8), with particles held at rest so that . Because spans several orders of magnitude over the sampled domain (Sec. V), we use a relative-error objective, which is a stabilized relative squared error loss, in which the prediction error is normalized by the target magnitude plus a constant offset ( ) to avoid singular behavior near zero:
Under a more standard squared error, the search is dominated by the small-r core and returns a degenerate fit, whereas the relative objective weights the full domain and recovers structured expressions.
As a sanity check, applied to the analytic under otherwise identical settings, the search recovers Eq. (2) exactly (coefficients within of the true values), confirming that the feature set, operator set, and objective are together sufficient to find the true law before any claim is made about .
Applied to itself, the search returns,
with the coefficients , , and . Eq. (11) reproduces 's angular numerator and radial law with the correct relative weight between them, matching itself with . The constant is not physical, it is the additive gauge freedom already noted in Eq. (7), absorbed by the search since it never sees forces directly. Against the analytic , the leading two terms of Eq. (11) achieve , consistent with the small residual discrepancy already visible in Secs. VA 1–VA 3. The last term breaks the exchange symmetry possesses exactly, which indicates that itself is only approximately symmetric under particle relabeling, as it marginally improves the fit to itself ( ), but is small ( of ) and hence insignificant.
Feature necessity. Repeating the search with only the three distances , withholding the angle cosines, the recovered expression plateaus at against the analytic potential and recovers only an approximate radial scaling, with no angular term. The search cannot reconstruct from distances alone within the operator budget used here, even though the two representations carry the same information (Sec. IV B). Augmenting the input with the cosines recovers exactly under the same budget. This is independent evidence, from a different method entirely, that the angular coordinates in Eq. (8) provide essential representational structure and are not a redundant convenience.
Robustness of this recovery to the search’s operator set, and full derivation details are given in Appendix D.
VII. DISCUSSION AND CONCLUSIONS
We have shown that Lagrangian Neural Networks, combined with physically informed sampling and domain-specific structure, can recover an irreducible three-body interaction from motion data alone. For the AT interaction, the recovery succeeds at several complementary levels.
The composite Lennard–Jones+AT system further illustrates the conditions under which such a higher-order interaction becomes dynamically identifiable. We recover the three-body contribution when it is sufficiently large relative to the residual error of the learned model, while at the physically more realistic argon coupling its signal remains below this error floor for our data and architecture. This provides a measure of the sensitivity of trajectory-based recovery.
A particularly important aspect of the successful recovery is the design of the data. For a singular and rapidly varying interaction, the sampling strategy is a central part of the learning problem. The data must adequately represent the relevant radial and angular regimes while avoiding both near-singular configurations and dynamically irrelevant far-field regions. Our experiments showed that these choices directly determine whether the steep radial dependence and angular structure can be learned. The resulting log-uniform, mixture-weighted sampling therefore provides a physically motivated way of allocating data toward the regions where the interaction is most informative, and we expect this tailoring to be a transferable ingredient for learning other singular many-body interactions.
The same principle extends to the model itself. By fixing the known kinetic term and restricting the unknown potential to depend only on positions, we incorporate established physical structure directly into the learning problem. This makes the approach substantially more interpretable than a fully black-box dynamical model while preserving the flexibility of deep learning. Within these assumptions, the learned Lagrangian also provides a direct representation from which physical observables and other dynamical quantities can be obtained.
Finally, symbolic regression turns the learned representation into an explicit physical law. From trajectory data and network's own output, without providing any information about its functional form, it recovers the analytic structure of the AT interaction and its amplitude, including the coupling dependence. This combination of LNN-based dynamical recovery and symbolic inference is, to our knowledge, among the first demonstrations of recovering an explicit irreducible three-body potential in this way. More broadly, it illustrates how deep learning can be used to extract interpretable physical structure from dynamics reproduced via itself.
Taken together, these results establish a framework in which physically structured deep learning can serve as a tool for scientific inference. Known structure can be encoded rather than relearned, challenging interactions can be exposed through appropriate data design, and the resulting learned dynamics can be converted into explicit candidate laws. The Axilrod–Teller interaction provides a difficult and physically meaningful test of this idea, while the methodology offers a route toward studying other systems in which higher-order interactions are difficult to formulate or their structure is not known a priori. Its applicability beyond the present setting will depend on the validity of assumptions such as a position-only potential and constant mass matrix, but within these boundaries, trajectory data can contain enough information to both reproduce dynamics, and recover the physics underlying them.
Appendix A: Dataset generation
Configurations are constructed directly in shape space. For each sample: particle 1 is placed uniformly in the simulation box; particles 2 and 3 are placed at distances and from it, each with uniformly random orientation; the configuration is accepted if all three pairwise distances lie in and all particles remain in the box, and rejected otherwise. Distances are drawn from a log-uniform mixture: with probability from and otherwise from , concentrating samples where forces are large and nonlinear while retaining coverage of the weak-interaction regime. Each accepted configuration receives a random global rotation and translation, and particle labels are randomly permuted, enforcing the exact symmetries of the problem at the data level. Velocities are drawn from an isotropic Gaussian, they are stored as part of the state and used to seed trajectory evaluation, but they enter training only through the fixed kinetic term and Euler–Lagrange algebra, never the potential network (Sec. IV B).
The datasets used throughout this work are summa-rized in Table II.
TABLE II: Dataset-generation parameters.
| System | ||||
|---|---|---|---|---|
| AT | ||||
| LJ | ||||
| LJ+AT |
Although the configurations are generated synthetically, the protocol does not depend on this. Because depends only on positions and the loss is evaluated per sample, any set of position-acceleration pairs can be used, including frames from recorded trajectories with accelerations obtained by finite differences. Such data would first need to be resampled to match the dense/sparse distribution. Trajectories sample configurations in proportion to the time spent in them, and so under-represent the compact, strong-force geometries that V shows are essential. The practical cost would be therefore set by the number of close encounters that can be recorded, and by the potential amplification of position noise in finite-difference accelerations near close approach.
Appendix B: Training details
Training details are summarized in the table III.
TABLE III: Training hyperparameters used throughout this work.
| Hyperparameter | Value |
|---|---|
| Optimizer | RAdam |
| Learning rate | |
| Weight decay | |
| Learning-rate scheduler | Cosine annealing |
| Scheduler period () | |
| Minimum learning rate () | |
| Batch size | |
| Training epochs | |
| Hidden layers | |
| Hidden width | |
| Activation | GELU |
Appendix C: Evaluation metrics
Throughout the Experiments section we report the standard mean relative error (MRE), for a quantity (potential or acceleration magnitude) at held-out points. This is a mean of point-wise ratios, and it is unstable wherever passes near zero. A single point with a small true value can dominate the average regardless of how accurate the fit is everywhere else. This happens for physical reasons in our data. The Axilrod–Teller angular factor changes sign, the Lennard–Jones potential crosses zero at , and any three-body contribution vanishes as a particle recedes, so a handful of unremarkable points can otherwise produce a nonsensical headline error.
Wherever this occurs we instead report the magnitude-weighted relative L1 error,
which aggregates errors and magnitudes separately before dividing once. Writing , this is exactly the magnitude-weighted average of the same pointwise ratios MRE averages unweighted. Points with a small true value are down-weighted automatically. The two coincide only when every is equal, and can diverge sharply otherwise. Table IV shows both, side by side, for the two evaluations in this work where the difference is largest.
TABLE IV: Radial dependence (pure AT, ): MRE vs. relative L1 error, per reference shape. The far-particle family’s net force vanishes fastest as the third atom recedes, so a small absolute residual there becomes a large relative one under either metric, reported per-shape.
| Shape | MRE (V) | L1 (V) | MRE (a) | L1 (a) |
|---|---|---|---|---|
| Equilateral | ||||
| Right | ||||
| Line | ||||
| Far particle | ||||
| Isosceles | ||||
| Scalene | ||||
| All 6 (agg.) | ||||
| Excl. far particle |
Where a single fit-quality number is more natural than a paired potential/acceleration error, such as the Newtonian control and the angular-factor recovery diagnostic, we instead report the coefficient of determination,
with the mean of over the evaluation set. is a perfect fit and is no better than predicting the mean.
Appendix D: Robustness of the symbolic recovery
This appendix supports the claims of Sec. VI with the checks omitted from the main text for space.
TABLE V: Same comparison for the pure-LJ control . The far-particle divergence between MRE and L1 is far milder here than for AT (Table IV). Direct numerical evidence of the vs. decay-rate difference between the two interactions.
| Shape | MRE (V) | L1 (V) | MRE (a) | L1 (a) |
|---|---|---|---|---|
| Equilateral | 0.55% | 0.53% | 1.54% | 1.23% |
| Right | 1.17% | 0.16% | 0.34% | 0.48% |
| Line | 0.99% | 0.52% | 0.84% | 0.99% |
| Far particle | 1.56% | 0.77% | 7.39% | 0.96% |
| Isosceles | 1.51% | 0.46% | 0.46% | 0.59% |
| Scalene | 0.66% | 0.27% | 0.25% | 0.33% |
| All 6 (agg.) | 1.07% | 0.45% | 1.81% | 0.76% |
| Excl. far particle | 0.98% | 0.39% | 0.69% | 0.72% |
1. Operator-set dependence
A natural objection to Eq. (11) is that the operator set available to the search, which included a cube and a reciprocal unary operator, was chosen with in mind and so predisposed the search toward . We test this directly on by repeating the search (i) with the cube operator removed, leaving only a square and a recip- rocal, and (ii) with no unary operators at all, so that any power must be built by repeated binary multiplication. Both variants recover the same angular numerator and radial scaling as Eq. (11) ( against the analytic in both cases, against fitting itself), confirming that the recovered structure reflects and not the operator budget. On the analytic control, the same two variants, together with a broadened set including an exponential and a sine as unrelated distractor operators, all recover Eq. (2) to .
2. Non-uniqueness.
The angle cosines are not independent of the side lengths (Sec. IV B): for any triangle, . Consequently Eq. (11) is not obligated to be the unique expression matching : any two polynomials in differing by a multiple of this identity coincide on every physical triangle. Different search runs accordingly may return algebraically distinct but numerically equivalent representatives (e.g. an expression in versus one in ). Hence we can verify their equivalence by reducing both expressions to a common canonical form using the identity.
[1] M. Cranmer, S. Greydanus, S. Hoyer, P. Battaglia, D. Spergel, and S. Ho, “Lagrangian Neural Networks,” ICLR 2020 Deep Differential Equations Workshop, arXiv:2003.04630 (2020).
[2] M. Lutter, C. Ritter, and J. Peters, “Deep Lagrangian Networks: Using Physics as Model Prior for Deep Learning,” ICLR (2019), arXiv:1907.04490.
[3] M. Finzi, K. A. Wang, and A. G. Wilson, “Simplifying Hamiltonian and Lagrangian Neural Networks via Explicit Constraints,” in Advances in Neural Information Processing Systems, vol. 33, pp. 13880–13889 (2020).
[4] A. U. Hamzaogullari and A. Ozakin, “Learning Relativistic Geodesics and Chaotic Dynamics via Stabilized Lagrangian Neural Networks,” arXiv:2601.12519 (2026).
[5] B. M. Axilrod and E. Teller, J. Chem. Phys. 11, 299 (1943).
[6] Y. Muto, Proc. Phys. Math. Soc. Japan 17, 629 (1943).
[7] R. J. Sadus, Fluid Phase Equilib. 144, 351 (1998).
[8] E. E. Polymeropoulos, J. Brickmann, L. Jansen, and R. Block, Phys. Rev. A 30, 1593 (1984).
[9] S. Greydanus, M. Dzamba, and J. Yosinski, “Hamiltonian Neural Networks,” Advances in Neural Information Processing Systems 32, arXiv:1906.01563 (2019).
[10] A. Sanchez-Gonzalez, V. Bapst, K. Cranmer, and P. Battaglia, “Hamiltonian Graph Networks with ODE Integrators,” arXiv:1909.12790 (2019).
[11] R. Bhattoo, S. Ranu, and N. M. A. Krishnan, “Lagrangian Neural Network with Differentiable Symmetries and Relational Inductive Bias,” arXiv:2110.03266 (2021).
[12] R. Bhattoo, S. Ranu, and N. M. A. Krishnan, “Learning the Dynamics of Particle-Based Systems with Lagrangian Graph Neural Networks,” Machine Learning: Science and Technology 4, 015003 (2023).
[13] R. Bhattoo, S. Ranu, and N. M. A. Krishnan, “Learning Articulated Rigid Body Dynamics with Lagrangian Graph Neural Network,” in Advances in Neural Information Processing Systems, vol. 35 (2022).
[14] S. Bishnoi, R. Bhattoo, Jayadeva, S. Ranu, and N. M. A. Krishnan, “Discovering Symbolic Laws Directly from Trajectories with Hamiltonian Graph Neural Networks,” arXiv:2307.05299 (2023).
[15] A. J. Stone, The Theory of Intermolecular Forces, 2nd ed. (Oxford University Press, Oxford, 2013).
[16] J. Behler and M. Parrinello, Phys. Rev. Lett. 98, 146401 (2007).
[17] J. Behler, J. Chem. Phys. 134, 074106 (2011).
[18] J. S. Smith, O. Isayev, and A. E. Roitberg, Chem. Sci. 8, 3192 (2017).
[19] S. Batzner et al., Nat. Commun. 13, 2453 (2022).
[20] E. Kocer, T. W. Ko, and J. Behler, Annu. Rev. Phys. Chem. 73, 163 (2022).
[21] P.-L. Kang, Z.-X. Yang, C. Shang, and Z.-P. Liu, J. Chem. Theory Comput. 19, 7972 (2023).
[22] D. Khan, S. Heinen, and O. A. von Lilienfeld, J. Chem. Phys. 159, 034106 (2023).
[23] C. Scherer, R. Scheid, D. Andrienko, and T. Bereau, J. Chem. Theory Comput. 16, 3194 (2020).
[24] J. A. Barker, R. A. Fisher, and R. O. Watts, Mol. Phys. 21, 657 (1971).
[25] P. Attard, Phys. Rev. A 45, 5649 (1992).
[26] P. Attard, Phys. Rev. A 45, 3659 (1992).
[27] P. Loubeyre, Phys. Rev. Lett. 58, 1857 (1987).
[28] A. Tkatchenko, R. A. DiStasio Jr., R. Car, and M. Schefler, Phys. Rev. Lett. 108, 236402 (2012).
[29] M. Cranmer, “Interpretable Machine Learning for Science with PySR and SymbolicRegression.jl,” arXiv:2305.01582 (2023).