NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Recurrent Neural Processes

Timon Willi, Jonathan Masci, Jürgen Schmidhuber, Christian OsendorferarXiv 2019

Abstract

We extend Neural Processes (NPs) to sequential data through Recurrent NPs or RNPs, a family of conditional state space models. RNPs model the state space with Neural Processes. Given time series observed on fast real-world time scales but containing slow long-term variabilities, RNPs may derive appropriate slow latent time scales. They do so in an efficient manner by establishing conditional independence among subsequences of the time series. Our theoretically grounded framework for stochastic processes expands the applicability of NPs while retaining their benefits of flexibility, uncertainty estimation, and favorable runtime with respect to Gaussian Processes (GPs). We demonstrate that state spaces learned by RNPs benefit predictive performance on real-world time-series data and nonlinear system identification, even in the case of limited data availability.

Introduction

In modern machine learning, modeling temporal data often requires a trade-off between the expressive power of deterministic deep learning models, such as LSTMs, and the robust probabilistic uncertainty quantification provided by Gaussian Processes (GPs). While Neural Processes (NPs) were developed to bridge this gap by offering linear runtime complexity compared to the $O(N^3)$ cost of GPs, they traditionally assume data exchangeability. This assumption is problematic for time-series data, where the temporal order of observations is fundamental to the underlying dynamics.

Recurrent Neural Processes (RNPs) address this limitation by extending the NP framework to sequential data. RNPs are designed to capture long-term dependencies, provide reliable uncertainty estimates, and adapt to new data points online without requiring full retraining.

The Recurrent Neural Process Framework

Overview of the RNP framework and its application to temporal data. Source, p. 2

Overview of the RNP framework and its application to temporal data.

The RNP framework introduces several key innovations to handle the complexities of temporal sequences. Unlike standard NPs that use a single latent variable, RNPs utilize a hierarchical structure and specialized mappings to align observed time with internal dynamics.

Hierarchical Latent Variables

The detailed hierarchical graphical model of the RNP. Source, p. 3

The detailed hierarchical graphical model of the RNP.

To model multi-scale dynamics, RNPs employ a hierarchy of latent variables. A global "temporal stochastic process" ($v$) governs the overall behavior of the sequence, representing slow-moving trends (analogous to "climate"). Beneath this, local "spatial stochastic processes" ($z_t$) capture faster-moving fluctuations (analogous to "weather"). This separation allows the model to offload different frequency components into different levels of the hierarchy.

Latent Time Mapping and Architecture

Real-world observations often occur at frequencies that differ from the underlying system dynamics. RNPs utilize a Latent Time Mapping ($Q$) to align these scales, effectively allowing the model's internal state to "slow down" or "speed up" to capture long-term patterns.

The RNP architecture consists of three primary components:

  1. Encoder: Utilizes LSTMs to process data subsequences into compact representations.
  2. Aggregator: Combines these representations into a global latent variable, establishing conditional independence among subsequences for efficient inference.
  3. Decoder: An LSTM-based generator that takes the current input, previous hidden states, and latent variables to predict future values.

The model is trained using a specialized Evidence Lower Bound (ELBO), treating the system as a variational autoencoder optimized for stochastic processes.

Experimental Evaluation

The authors evaluated RNPs on two challenging time-series tasks:

  • Electricity Consumption: Using the UCI Individual Household Electric Power Consumption dataset (over 2 million points), the RNP demonstrated performance comparable to complex state-space models like the Deep Kalman Filter (DKF) and Variational RNNs (VRNN).
  • Nonlinear System Identification: On the Coupled Electric Drives dataset, the RNP significantly outperformed standard LSTM baselines. It achieved a Normalized Mean Squared Error (MSE) of 0.238, a substantial improvement over the LSTM's 1.000.

Furthermore, the RNP provided highly reliable uncertainty estimates. For a 90% prediction interval, the model achieved an actual coverage (PICP) of approximately 94.7%, indicating that its confidence intervals are statistically robust.

Discussion and Future Work

RNPs represent a significant step forward in meta-learning for sequences. By learning the underlying process rather than just a single sequence, the model can generalize to new contexts with minimal data points.

However, challenges remain. The mapping between observed and latent time currently relies on manual selection or heuristics; automating this process is a key area for future research. Additionally, ensuring the decoder consistently utilizes the latent space rather than relying solely on local patterns remains an ongoing architectural challenge. Future work may also explore deeper hierarchies to model even more complex, multi-modal temporal data.

Summary updated

BibTeX
@misc{willi2019recurrent,
  author = {Timon Willi and Jonathan Masci and Jürgen Schmidhuber and Christian Osendorfer},
  title = {{Recurrent Neural Processes}},
  year = {2019},
  eprint = {1906.05915},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1906.05915},
}
Figure