State Derivative Normalization for Continuous-Time Deep Neural Networks

Jonas Weigand, Gerben I. Beintema, Jonas Ulmen, Daniel Görges, Roland Tóth, Maarten Schoukens, Martin Ruskowski

TL;DR

Training continuous-time neural networks (like Neural ODEs) often fails due to numerical instability and poor gradient flow. This paper introduces State Derivative Normalization (SDN), a method that uses a single normalization constant $\tau$ to simultaneously scale the hidden states, their derivatives, and the time domain. By applying this simple scaling, the authors achieve state-of-the-art results on a classic control engineering benchmark, outperforming existing black-box identification methods.

What Problem Does This Paper Address?

In the world of system identification—building mathematical models of physical systems from data—Continuous-Time (CT) models like Neural Ordinary Differential Equations (NODEs) are highly prized. They align well with physics, handle irregular sampling naturally, and are intuitive for controller design.

However, training them is notoriously difficult. Standard deep learning relies on data normalization (like z-scoring) to keep gradients in a healthy range. In a CT model, you aren't just mapping input $A$ to output $B$; you are integrating a derivative over time. If the "hidden" state derivatives or the time intervals are poorly scaled, the solver might struggle with "stiffness," gradients might vanish or explode, and the optimization process often collapses. Until now, there hasn't been a unified theory or a practical guide on how to normalize these internal dynamics effectively.

Methods

The authors propose a simple but powerful modification to the state-space equation: $$\dot{\hat{x}}(t) = \frac{1}{\tau} f_{NN}(\hat{x}(t), u(t))$$ Here, $\tau$ is the normalization factor. The paper provides three distinct ways to interpret this $\tau$:

  1. State Normalization: It scales the magnitude of the hidden states.
  2. Derivative Normalization: It scales the output of the neural network.
  3. Time-Based Normalization: It effectively rescales the integration time (e.g., turning seconds into "unitless" time steps).

To find the best $\tau$, the authors suggest three strategies:

  • Trainable Parameter: Treat $\tau$ as a weight that the neural network learns during backpropagation.
  • Cross-validation: Perform a grid search to find the $\tau$ that minimizes validation error.
  • BLA Heuristic: Use a Best Linear Approximation (BLA)—a simple linear model of the system—to estimate the ratio between state variance and derivative variance. This provides a "smart" starting point for $\tau$ before training even begins.

Datasets

The primary evaluation is performed on the Cascaded Tank System (CTS) benchmark. This is a real-world experimental setup consisting of two water tanks where the upper tank overflows into the lower one. It is a challenging dataset because it includes "hard" nonlinearities like saturation (when the tank is full) and overflow.

Key Insights and Ideas

  • The Unified Scaling Law: The most elegant insight is that state, derivative, and time normalization are mathematically coupled. Solving one via $\tau$ effectively solves the others.
  • The "Broad Valley" of Success: The authors found that there isn't just one perfect $\tau$. Instead, there is a wide range (a "valley") of normalization factors that lead to high-performance models. However, the default value ($\tau=1$) often sits outside this valley, explaining why many models fail without tuning.
  • Linearity Helps Nonlinearity: Surprisingly, a simple linear approximation (BLA) can accurately predict the optimal normalization factor for a highly nonlinear system. This suggests that the "global" dynamics of the system are enough to set the numerical scale for the "local" neural network learning.

Key Results

The SDN approach significantly improved model accuracy on the Cascaded Tank benchmark:

  • Baseline vs. SDN: Without proper scaling ($\tau=1$), the median Root Mean Squared Error (RMSE) was 0.75V. With SDN, the RMSE dropped to approximately 0.20V - 0.22V.
  • Beating the State-of-the-Art: The proposed method outperformed all previous black-box methods in the literature, including Deep Subspace Encoders (0.22V) and Truncated Simulation Error Minimization (0.33V).
  • Stability: Using SDN led to much more consistent results across different random initializations, reducing the "luck" required to train a good model.

Limitations and Future Work

While the results are impressive, the authors note a few areas for further exploration:

  • Constant vs. Varying $\tau$: The paper uses a constant $\tau$ across the entire simulation. However, some physical systems change their "stiffness" over time. A time-varying or state-dependent normalization factor might be necessary for more complex, multi-scale systems.
  • Solver Interaction: The study focused on a fixed-step Runge-Kutta 4 solver. How SDN interacts with adaptive-step solvers (which change their own time steps based on error tolerances) remains an open question.
  • Generalization: While the CTS benchmark is a standard in the field, testing SDN on high-dimensional systems (like soft robotics or fluid dynamics) would further validate its robustness.

Summary updated

BibTeX
@inproceedings{weigand2024state,
  author = {Jonas Weigand and Gerben I. Beintema and Jonas Ulmen and Daniel Görges and Roland Tóth and Maarten Schoukens and Martin Ruskowski},
  title = {{State Derivative Normalization for Continuous-Time Deep Neural Networks}},
  booktitle = {IFAC-PapersOnLine},
  year = {2024},
  doi = {10.1016/j.ifacol.2024.08.537},
}

Loading related content...

Figure