Time-Reversal Symmetric ODE Network

In Huh, Eunho Yang, Sung Ju Hwang, Jinwoo Shin

Abstract

Time-reversal symmetry is a fundamental property in classical and quantum mechanics, dictating that system dynamics remain invariant when the time axis is reversed. We propose Time-Reversal Symmetric ODE Networks (TRS-ODENs), a framework that incorporates this symmetry as a soft physical constraint via a novel loss function. By penalizing discrepancies between forward and backward time evolutions, TRS-ODENs learn physical dynamics more sample-efficiently and robustly than standard Neural ODEs. Our evaluations across various classical systems demonstrate that TRS-ODENs accurately capture complex trajectories from noisy data and maintain superior predictive performance even in systems where full time-reversal symmetry does not strictly hold.

Introduction

Predicting the long-term evolution of physical systems—ranging from simple pendulums to chaotic orbits—is a cornerstone of computational physics. While deep learning models like Neural ODEs offer powerful function approximation, they often lack the inherent physical "intuition" required for long-term stability, frequently failing to respect invariants like energy conservation. Existing solutions, such as Hamiltonian ODE Networks (HODENs), enforce energy conservation through rigid architectural constraints. However, these models often fail in real-world scenarios involving non-conservative forces like friction. TRS-ODENs address this by using time-reversal symmetry as a flexible inductive bias, nudging the network toward physical reality without the fragility of hard-coded constraints.

Methodology: Time-Reversal Symmetry as a Regularizer

The core innovation of TRS-ODEN is the introduction of a time-reversal symmetry loss ($L_{TRS}$). In a time-reversible system, flipping the state (e.g., reversing velocity) and evolving backward in time should return the system to its initial state.

Conceptual diagram of time-reversal symmetry in phase space (p, q). The top path shows forward evolution followed by reversal; the bottom path shows reversal followed by backward evolution.

The TRS-ODEN Framework

  1. Loss Function: The model is trained by minimizing a combined objective: $L = L_{data} + \lambda L_{TRS}$. The $L_{TRS}$ term measures the divergence between the predicted forward path and the path generated by reversing the final state and running the ODE solver backward.
  2. Soft Constraints: Unlike HODENs, TRS-ODENs utilize standard Neural ODE architectures. The symmetry is enforced during training, making the model "physics-informed" rather than strictly "physics-constrained."
  3. Handling Irreversibility: For dissipative systems (e.g., damped oscillators), the authors employ a time-dependent weighting for $\lambda$. This allows the model to leverage symmetry principles while still learning the energy-loss characteristics of the system.

Experimental Results

The framework was tested on synthetic Duffing oscillators, chaotic attractors, and real-world coupled oscillators.

Performance on Complex Dynamics

In experiments with non-linear Duffing oscillators, TRS-ODEN significantly outperformed vanilla Neural ODEs and HODENs. As shown in the figure below, TRS-ODEN maintains high trajectory accuracy and better energy conservation compared to baselines.

Performance comparison on a Duffing oscillator. (a-b) Test MSE for trajectory and energy. (c-j) Phase space trajectories and energy conservation over time for different models.

Key findings include:

  • Sample Efficiency: By learning from two directions simultaneously, TRS-ODEN requires fewer training samples to reach high accuracy.
  • Robustness to Noise: On real-world mechanical data containing noise and friction, TRS-ODEN achieved an MSE of 0.36, whereas HODEN (which assumes perfect energy conservation) failed with an MSE of 38.13.
  • Chaos Preservation: The model accurately matched the Lyapunov exponents of chaotic systems, indicating it captured the underlying structural dynamics rather than just memorizing training paths.

Conclusion

TRS-ODENs provide a robust middle ground between unconstrained neural networks and rigid physics-based models. By treating time-reversal symmetry as a regularizer, the framework achieves high sample efficiency and long-term predictive stability across both conservative and non-conservative systems. Future work may explore integrating additional symmetries, such as rotational or reflectional invariance, to further enhance the physical grounding of neural dynamical models.

Summary updated

Abstract

Time-reversal symmetry, which requires that the dynamics of a system should not change with the reversal of time axis, is a fundamental property that frequently holds in classical and quantum mechanics. In this paper, we propose a novel loss function that measures how well our ordinary differential equation (ODE) networks comply with this time-reversal symmetry; it is formally defined by the discrepancy in the time evolutions of ODE networks between forward and backward dynamics. Then, we design a new framework, which we name as Time-Reversal Symmetric ODE Networks (TRS-ODENs), that can learn the dynamics of physical systems more sample-efficiently by learning with the proposed loss function. We evaluate TRS-ODENs on several classical dynamics, and find they can learn the desired time evolution from observed noisy and complex trajectories. We also show that, even for systems that do not possess the full time-reversal symmetry, TRS-ODENs can achieve better predictive performances over baselines.
BibTeX
@inproceedings{huh2020time,
  author = {In Huh and Eunho Yang and Sung Ju Hwang and Jinwoo Shin},
  title = {{Time-Reversal Symmetric ODE Network}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=kHaiz9T_-FR},
}
Figure