Neural Differential Equations for Learning to Program Neural Nets Through Continuous Learning Rules

Kazuki Irie, Francesco Faccio, Jürgen Schmidhuber

In the world of deep learning, we often oscillate between discrete-time models (like standard RNNs and Transformers) and continuous-time models (like Neural Ordinary Differential Equations, or NODEs). While NODEs offer an elegant framework for handling irregularly sampled data, they have historically lacked the architectural richness and scalability of their discrete counterparts.

A new paper from Kazuki Irie, Francesco Faccio, and Jürgen Schmidhuber bridges this gap. By combining the principles of Neural ODEs with classic synaptic learning rules, they have created Continuous-Time Fast Weight Programmers (FWPs)—a scalable, high-performance family of models that brings the power of linear Transformers to the continuous-time domain.

TL;DR

The authors introduce continuous-time versions of Fast Weight Programmers and linear Transformers by modeling synaptic learning rules (like Hebbian or Delta rules) as differential equations. These models solve the scalability bottlenecks of existing Neural Controlled Differential Equations (NCDEs) and set new state-of-the-art results on challenging time-series benchmarks.

What Problem Does This Paper Address?

Processing sequential data that arrives at irregular intervals is a major challenge. While standard recurrent networks assume fixed time steps, Neural Ordinary Differential Equations (NODEs) allow hidden states to evolve continuously. However, the most popular sequential variant—Neural Controlled Differential Equations (NCDEs)—suffers from a major "scalability wall."

In a standard NCDE, the network must produce a massive tensor to transform the input at every infinitesimal step. This leads to a quadratic explosion in parameters as the hidden state size increases. Furthermore, while discrete-time research has flourished with diverse architectures like Transformers, continuous-time models have largely remained stuck in "vanilla" recurrent configurations.

Methods

The core idea is to treat a neural network's weights as dynamic variables that evolve according to a learning rule expressed as an ODE.

The authors propose two main flavors:

  1. Direct NODE-based FWPs: The learning rule is embedded directly into the vector field of the ODE. A "slow" network generates keys, values, and learning rates from the input, which then drive the continuous update of a "fast" weight matrix $W(t)$.
  2. NCDE-based FWPs: These use a differentiable control signal (derived from the input) to drive the weight updates, making them more robust to how the input signal is parameterized.

They implement three classic learning rules in this continuous framework:

  • Hebbian-style: Simple additive updates based on outer products.
  • Oja-style: A normalized version of Hebbian learning that ensures stability.
  • Delta-style: An error-correction rule that allows the network to "overwrite" old memories, which is crucial for long-term dependencies.

By using outer products to update weights, these models only require the "slow" network to output vectors, circumventing the quadratic parameter growth seen in standard NCDEs.

Datasets

The models were evaluated on three distinct types of time-series tasks:

  • Speech Commands: Regularly sampled, short audio sequences for keyword spotting.
  • PhysioNet Sepsis: Irregularly sampled medical data with many missing values, requiring binary prediction of sepsis.
  • EigenWorms: Extremely long sequences (over 17,000 steps) with complex long-term dependencies, involving the classification of roundworm movement types.

Key Insights and Ideas

  • Scalability via Outer Products: By parameterizing the weight update as an outer product of vectors (key $\otimes$ value), the authors achieve the expressivity of a large dynamic memory without the parameter explosion of standard NCDEs.
  • The Delta Rule is Essential for Long Sequences: On the EigenWorms dataset, the Delta rule variant vastly outperformed Hebbian and Oja rules. This "aha moment" confirms that the ability to actively manage and overwrite memory is just as critical in continuous time as it is in discrete time.
  • Adjoint Method for $O(d^2)$ States: While standard backpropagation would be prohibitively memory-intensive for large fast-weight matrices, the continuous adjoint sensitivity method allows for memory-efficient training, making these large-state models practical.

Key Results

The proposed models consistently outperformed existing baselines, often by significant margins.

Performance on Speech Commands and PhysioNet Sepsis. The FWP variants show a massive jump in Speech Commands accuracy compared to the GRU-ODE baseline.

As seen in the table above, on the Speech Commands task, the FWP variants achieved ~85-90% accuracy, nearly doubling the performance of the GRU-ODE baseline (~48%). On PhysioNet Sepsis, they showed marked improvements in the difficult "no-OI" (no observation intensity) scenario.

Performance on the EigenWorms task. The Delta-rule variant achieves a new state-of-the-art for ODE-based models.

The results on EigenWorms are perhaps the most striking. The Delta-rule NCDE achieved 91.8% accuracy, far surpassing the previous best Neural Rough Differential Equation (NRDE) result of 83.8%.

Limitations and Future Work

Despite the strong results, the authors note a few hurdles:

  • Hyperparameter Sensitivity: The models can be sensitive to learning rates and the specific configuration of the ODE solver.
  • Interpolation Dependency: Like all NCDE-style models, performance depends on how the discrete input data is interpolated into a continuous signal (e.g., using cubic splines).
  • Depth: This work focused on single-layer "fast weight" updates. Extending this to deeper, multi-layered continuous-time Transformers is a promising but unexplored direction.

By successfully porting the logic of Fast Weight Programmers to the world of differential equations, this research provides a powerful new toolkit for anyone working with complex, irregularly sampled temporal data.

Summary updated

BibTeX
@inproceedings{irie2022neural,
  author = {Kazuki Irie and Francesco Faccio and Jürgen Schmidhuber},
  title = {{Neural Differential Equations for Learning to Program Neural Nets Through Continuous Learning Rules}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=gIGeujOKfyV},
}
Figure