arXiv:2610.13234cs.LGOct 2026

Manuscript Offprint

arXiv:2610.13234

Learning Schwarzschild Geodesic Motion with Lagrangian Neural Networks

Sukru Caglar, Sena Kalabalik, Abdullah Umut Hamzaogullari, Arkadas Ozakin

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

Sukru Caglar, 1,∗^{1,*} Sena Kalabalik, 1^{1} Abdullah Umut Hamzaogullari, 1,2^{1,2} and Arkadas Ozakin 1^{1}

1^{1}Department of Physics, Bogazici University, Istanbul, Turkey

2^{2}Department of Computer Engineering, Bogazici University, Istanbul, Turkey (Dated: October 12, 2026)

Lagrangian Neural Networks (LNNs) learn dynamics from trajectory data by parameterizing a scalar Lagrangian and deriving accelerations through the Euler–Lagrange equation, providing a variational inductive bias that improves physical consistency over purely data-driven models. LNNs have recently been extended to general relativistic settings, leaving Schwarzschild geodesics as an open challenge. Training on complex relativistic systems is hindered by the diversity of the dynamics, as well as numerical instabilities and the difficulty of adequately sampling physically relevant, diverse orbital regimes. We introduce two coordinated improvements: a decoupled position–velocity normalization scheme that independently rescales each coordinate and its time derivatives, reweighting acceleration targets to balance contributions across all channels; and an energy-constrained log-uniformly sampled dataset generation strategy informed by the innermost stable circular orbit (ISCO) structure. With these improvements, our model accurately reproduces perihelion precession and relativistic time dilation, conserves energy and angular momentum to within a few percent even after completing multiple orbits around the central mass and predicts orbital trajectories across eight orbital scenarios in close, medium, and far-field regimes. These results establish that LNNs, augmented with physically motivated normalization and sampling, can reliably learn geodesic dynamics in curved spacetime. Our work also represents the first successful training of LNNs on Schwarzschild geodesics and offers a promising direction for data-driven modeling of complex relativistic systems.

I. INTRODUCTION

Learning the dynamics of a system directly from trajectory data has become a central goal in scientific machine learning [1]. Among these approaches, Lagrangian Neural Networks (LNNs) [2] are particularly appealing because they parameterize a scalar Lagrangian and derive equations of motion through Euler-Lagrange structure:

q¨=(∇q˙∇q˙⊤L)−1[∇qL−(∇q∇q˙⊤L)q˙](1)\ddot{\mathbf{q}}=(\nabla_{\dot{\mathbf{q}}}\nabla_{\dot{\mathbf{q}}}^{\top}\mathcal{L})^{-1}[\nabla_{\mathbf{q}}\mathcal{L}-(\nabla_{\mathbf{q}}\nabla_{\dot{\mathbf{q}}}^{\top}\mathcal{L})\dot{\mathbf{q}}] \tag{1}

Rather than fitting accelerations directly, LNNs learn a scalar Lagrangian whose functional derivatives through the Euler–Lagrange operator produce the equations of motion. This variational framing imposes a geometric inductive bias: the mass matrix (velocity Hessian) encodes the system’s effective metric, while the stationary-action principle ensures accelerations are consistent with an underlying scalar potential. As a result, LNNs tend to exhibit better physical fidelity, energy conservation, and out-of-distribution extrapolation than models that bypass this structure.

Our work directly builds on the stabilized LNN baseline of Hamzaogullari and Ozakin [3]. That framework introduced key Sylvester regularization and Lorentzian prior for mass matrix to stabilize the training in relativistic settings, successfully demonstrating geodesic learning in Anti-de Sitter ( AdS4AdS_{4}) spacetime.

Schwarzschild geodesic motion is also a strong testbed for this regularized LNN structure. However, extending this baseline to the Schwarzschild spacetime exposes vulnerabilities due to substantial regime diversity [4]. System contains near-circular bound orbits with subtle relativistic precession, higher-eccentricity trajectories with stronger radial variation, and trajectories near stability boundaries which are sensitive to small local error accumulation over long rollouts. The need to optimize for different regimes simultaneously makes the learning task more challenging. A successful model must therefore provide both low one-step prediction error for variety of regions and stable long-horizon integration with physically meaningful behavior.

We also observe additional failure modes tied to mixed-scale coordinates and derivatives, where input coordinates with vastly different magnitudes cause poorly conditioned optimization and loss domination by a subset of input channels.

A second challenge is data quality in six-dimensional phase space. Uniform sampling of (q,q˙)(q, \dot{q}) tends to overproduce plunge or escape states while under-sampling delicate bound-orbit regions, reducing data efficiency and degrading performance in the regimes most relevant for geodesic learning.

To address these issues, we introduce a coordinated set of improvements on top of the baseline framework [3]:

  • a physics-aware normalization strategy that decouples spatial and velocity scales and reweights acceleration targets.

  • an energy-constrained dataset generation scheme informed by ISCO structure to control eccentricity coverage.

We also retain stabilization mechanisms introduced by [3] that mitigate pathological Hessian behavior during

training and rollout.

The remainder of this paper is structured as follows. In Section II we review the Lagrangian Neural Network framework and the Schwarzschild geodesic equations that define our learning target. Section III surveys related work in physics-informed learning and relativistic ML. Section IV details our two key methodological contributions and explains how each addresses the failure modes identified in the baseline approach. Section V presents a comprehensive experimental evaluation organized around training convergence (Section VA), trajectory prediction accuracy close, medium, and far orbital regimes (Section VB), time-dilation fidelity (Section VC), and structural analysis of the learned acceleration functions, Lagrangian, and mass matrix (Section VD and Section VE). Finally, Section VI summarizes our findings and outlines directions for future work.