Improving Neural ODE Training with Temporal Adaptive Batch Normalization

Su Zheng, Zhengqi Gao, Fan-Keng Sun, Duane S Boning, Bei Yu, Martin D. WongNeurIPS 2024

TL;DR

Neural Ordinary Differential Equations (Neural ODEs) offer a continuous-depth alternative to standard networks, but they struggle with traditional Batch Normalization (BN). This is because their internal states evolve over a continuous time dimension that standard BN wasn't built to handle. This paper introduces Temporal Adaptive Batch Normalization (TA-BN), which uses temporal interpolation to align statistics across variable time steps, enabling the training of much deeper, more stable, and more parameter-efficient Neural ODEs.

What Problem Does This Paper Address?

Neural ODEs model the evolution of hidden states as a continuous process governed by a differential equation: $dh(t)/dt = f_\theta(h(t), t)$. Unlike standard ResNets with discrete layers, Neural ODEs use an adaptive solver to decide how many "steps" to take to reach the output.

The challenge arises when applying Batch Normalization. Standard BN assumes a fixed set of layers. However, in a Neural ODE, the "time" points visited by the solver can change between the training and testing phases, or even between different batches. This creates a fundamental mismatch:

  1. Misalignment: Population statistics collected at one time point during training might not exist for the specific time point chosen by the solver during inference.
  2. Instability: Simply stacking more layers to make the ODE's derivative function ($f_\theta$) more powerful often leads to "stiffness," causing the solver to fail or require infinitesimally small steps.

Without proper normalization, deeper Neural ODEs frequently suffer from training failures or plateauing accuracy.

Test accuracy vs. Epoch demonstrating that TA-BN enables successful training of 18-layer Neural ODEs, whereas baselines fail or plateau.

Methods

The authors propose Temporal Adaptive Batch Normalization (TA-BN). Instead of trying to force a discrete BN layer into a continuous process, TA-BN treats normalization parameters as continuous functions of time.

Key components include:

  • Predefined Time Grid: TA-BN maintains a fixed set of anchor time points ($T^*$) where it stores learnable parameters ($\gamma, \alpha$) and population statistics ($\mu, \sigma^2$).
  • Temporal Interpolation: When the ODE solver visits an arbitrary time $t_j$, TA-BN uses linear interpolation between the nearest anchor points in $T^*$ to calculate the appropriate normalization values.
  • Dual-Directional Update: During training, mini-batch statistics are used for normalization and then "pushed" back to update the population statistics on the fixed anchor grid via interpolation.

This approach effectively creates a "continuous-time analog" to traditional BN, ensuring that no matter what time steps the adaptive solver chooses, a valid set of normalization statistics is always available.

Datasets

The authors evaluated TA-BN across a diverse range of tasks:

  • Image Classification: MNIST, SVHN, CIFAR-10, CIFAR-100, and Tiny-ImageNet.
  • Physical System Modeling: Robot trajectory datasets (Walker2d-v2 and HalfCheetah-v2) generated by the Mujoco physics engine.
  • Circuit Modeling: Predicting electrical currents in a Charge Pump (CP) analog circuit.

Key Insights and Ideas

  • Statistics are Time-Dependent: The paper demonstrates that the mean and variance of hidden states in a Neural ODE are not static; they evolve significantly over the "depth" (time) of the network. Standard BN variants that ignore this produce meaningless predictions.
  • Enabling "Unmixed" Architectures: Most successful Neural ODEs previously relied on heavy "preprocessing" (like a standard CNN backbone) before the ODE block. TA-BN allows "unmixed" architectures—where the ODE does the heavy lifting—to reach competitive accuracies.
  • Robustness to Batch Size and Noise: Unlike standard mini-batch BN, which degrades with small batches or noisy data, TA-BN remains stable because it can rely on its interpolated population statistics during inference.
TA-BN demonstrates robustness to small batch sizes (left) and data noise (middle), while effectively capturing the time-dependent evolution of mean and variance statistics (right).

Key Results

  • Scaling Up: TA-BN successfully trained an 18-layer U-Net backbone within a Neural ODE, whereas models without BN or with flawed BN variants failed to converge or performed poorly at that depth.
  • State-of-the-Art Efficiency: On CIFAR-10, the TA-BN unmixed architecture achieved 91.1% accuracy with only 2.2M parameters, approaching the efficiency of specialized architectures like MobileNetV2.
  • Physical Systems: In Mujoco robot modeling, TA-BN achieved lower Mean Absolute Error (MAE) and faster convergence compared to all baseline methods. For example, on HalfCheetah-v2, it reached an MAE of 1.28, outperforming the baseline of 1.46.

Limitations and Future Work

  • Runtime Overhead: The interpolation process, while parameter-free, adds a small amount of computational overhead during the ODE solver's execution.
  • Interpolation Strategy: While linear interpolation was found to be the most stable and efficient, the authors suggest that more sophisticated methods (like Gaussian Processes or Splines) could be explored, though they currently suffer from higher complexity or instability in deep models.
  • Theoretical Grounding: While empirically successful, a deeper theoretical analysis of why certain interpolation methods stabilize the "stiffness" of the ODE system better than others remains an open question.

Summary updated

BibTeX
@inproceedings{zheng2024improving,
  author = {Su Zheng and Zhengqi Gao and Fan-Keng Sun and Duane S Boning and Bei Yu and Martin D. Wong},
  title = {{Improving Neural ODE Training with Temporal Adaptive Batch Normalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=ARLEUVVfTL},
}
Figure