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

Neural Processes

Marta Garnelo, Jonathan Schwarz, Dan Rosenbaum, Fabio Viola, Danilo J. Rezende, S. M. Ali Eslami, Yee Whye TeharXiv 2018

Abstract

Neural Processes (NPs) represent a significant advancement in probabilistic modeling, combining the mathematical elegance and uncertainty handling of Gaussian Processes (GPs) with the representational power and computational efficiency of Deep Neural Networks (DNNs). By learning to represent distributions over functions, NPs can rapidly adapt to new observations at test time with linear scaling, effectively bypassing the cubic complexity inherent in traditional Bayesian non-parametric models. This paper summarizes the NP framework, its architectural components, and its performance across diverse regression and optimization tasks.

Introduction: The Probabilistic Trade-off

In modern machine learning, researchers often navigate a fundamental trade-off between two paradigms. Deep Neural Networks excel at learning complex, high-dimensional patterns from large datasets but are typically static after training; incorporating new information usually requires computationally expensive retraining or complex meta-learning strategies. Conversely, Gaussian Processes provide a robust probabilistic framework for defining distributions over functions, allowing for instant adaptation and principled uncertainty quantification. However, GPs suffer from $O(n^3)$ scaling complexity and require the manual selection of kernels, which may not capture the underlying data distribution effectively.

Neural Processes address this gap by proposing a neural-network-based approximation of a stochastic process. The goal is a model that maintains the speed and representational flexibility of DNNs while inheriting the "uncertainty-aware" properties of GPs.

The Neural Process Framework

The NP defines a conditional distribution over functions. Given a set of context points $C = \{(x_i, y_i)\}_{i=1}^n$, the model predicts the values $y_T$ for a set of target inputs $x_T$.

High-level graphical model of a Neural Process.

As shown in the plate notation above, the model assumes that the context observations inform a global latent variable $z$, which in turn generates the target outputs conditioned on the target locations.

Architectural Components

The NP architecture is built on four primary modules designed to handle data as an unordered set, ensuring the property of exchangeability:

  1. The Encoder ($h$): Maps individual context pairs $(x_i, y_i)$ into a latent representation space.
  2. The Aggregator ($a$): Combines individual representations into a single global representation $r$. To ensure permutation invariance, a symmetric operation such as a mean is typically employed.
  3. The Latent Variable ($z$): The representation $r$ parameterizes a distribution (often a Gaussian) from which the global latent variable $z$ is sampled. This variable captures the functional uncertainty.
  4. The Decoder ($g$): A neural network that takes the sampled $z$ and target locations $x_T$ to produce the final predictions $y_T$.
Detailed Neural Process architecture showing the flow from context to target sets.

The model is trained using Variational Inference by maximizing the Evidence Lower Bound (ELBO), which balances reconstruction accuracy of the target values with a KL-divergence penalty that regularizes the latent distribution against a learned prior.

Evaluation and Key Insights

The authors evaluated NPs across several domains, including 1-D function regression, 2-D image completion (MNIST and CelebA), black-box optimization, and contextual bandits.

Key Advantages

  • Implicit Kernels: Unlike GPs, NPs learn an "implicit kernel" directly from data, enabling them to model complex, high-dimensional structures like human faces without manual feature engineering.
  • Linear Scalability: NPs scale at $O(n+m)$, where $n$ and $m$ are the number of context and target points, respectively. This is a massive improvement over the cubic scaling of GPs.
  • Global Uncertainty: By sampling a global latent $z$, NPs can generate coherent function samples consistent with the context data, rather than just independent point-wise predictions.

Results

In 1-D regression, NPs demonstrate GP-like behavior: as context points increase, predicted variance decreases and the mean converges to the ground truth. In image completion tasks, NPs successfully "imagine" missing pixels in faces or digits, with samples becoming more consistent as more context pixels are provided. Furthermore, in optimization tasks like Thompson sampling, NPs reached the global minimum in roughly 4x fewer steps than random search, approaching the performance of GPs with optimal kernels while remaining computationally efficient.

Limitations and Future Directions

Despite their strengths, NPs face a "bottleneck problem" where all context information is compressed into a single global variable $z$, potentially losing fine-grained details. Additionally, while NPs are highly efficient, they remain an approximation and lack the strict mathematical guarantees of exact GPs. Future work aims to scale these models to higher-dimensional inputs and address the information bottleneck to improve reconstruction fidelity.

Summary updated

BibTeX
@misc{garnelo2018neural,
  author = {Marta Garnelo and Jonathan Schwarz and Dan Rosenbaum and Fabio Viola and Danilo J. Rezende and S. M. Ali Eslami and Yee Whye Teh},
  title = {{Neural Processes}},
  year = {2018},
  eprint = {1807.01622},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1807.01622},
}
Figure