Abstract
Conditional neural processes (CNPs) are attractive meta-learning models that produce well-calibrated predictions and are trainable via a simple maximum likelihood procedure. Although CNPs have many advantages, they are traditionally unable to model dependencies in their predictions. Various works propose solutions to this, but these come at the cost of either requiring approximate inference or being limited to Gaussian predictions. In this work, we instead propose to change how CNPs are deployed at test time, without any modifications to the model or training procedure. Instead of making predictions independently for every target point, we autoregressively define a joint predictive distribution using the chain rule of probability. We show that this simple procedure allows factorized Gaussian CNPs to model highly dependent, non-Gaussian predictive distributions. In an extensive range of tasks with synthetic and real data, we show that CNPs in autoregressive (AR) mode not only significantly outperform non-AR CNPs, but are also competitive with more sophisticated models that are significantly more computationally expensive and challenging to train.
Introduction
Conditional Neural Processes (CNPs) combine the flexibility of deep learning with the principled uncertainty quantification of probabilistic models. They are particularly valued in meta-learning for their simple training objectives and ability to produce well-calibrated marginal predictions. However, standard CNPs suffer from a significant limitation: they assume that predictions at different target locations are independent given the context.
This independence assumption prevents the model from capturing correlations between points. When sampling from a standard CNP, the result is often a "noisy cloud" of points rather than a coherent, structured function. While variants like Latent Neural Processes (LNPs) or Gaussian Neural Processes (GNPs) attempt to address this, they introduce complexities such as approximate inference (e.g., ELBO) or restrictions to Gaussianity. This paper introduces Autoregressive Conditional Neural Processes (AR CNPs), a method to unlock complex dependency modeling using standard CNP architectures through a modified test-time deployment strategy.
The Autoregressive Framework
The innovation of the AR CNP lies in its application of the chain rule of probability at test time. Rather than predicting all target points simultaneously, the model generates predictions sequentially, treating previous predictions as additional context.
Procedure: Autoregressive Application
- Selection: Choose a target input location $x_i$ from the set of points to be predicted.
- Prediction and Sampling: Use the CNP to predict the distribution for the value $y_i$ at $x_i$, then draw a sample from this distribution.
- Context Augmentation: Add the newly sampled pair $(x_i, y_i)$ to the existing context set.
- Iteration: Repeat the process for the remaining target points, using the expanded context to inform subsequent predictions.
By feeding samples back into the model, the non-linear feedback loop allows the joint predictive distribution to capture complex, non-Gaussian correlations, even if the underlying CNP outputs a simple Gaussian at each individual step.
Experimental Evaluation
The authors evaluated the AR CNP across a diverse suite of benchmarks, ranging from synthetic regression to complex environmental modeling.
- Synthetic Regression: In tasks involving 1D and 2D Gaussian Processes and non-Gaussian "sawtooth" processes, AR CNPs demonstrated a remarkable ability to capture structural dependencies. In the sawtooth task, the AR procedure allowed the model to "collapse" onto a specific coherent shape once the first few points were sampled, whereas standard CNPs remained stuck in a vague, multimodal average.
- Real-World Time Series: The model was tested on EEG data and predator-prey population dynamics (the classic hare-lynx dataset). In these cases, AR CNPs significantly improved log-likelihood scores, often outperforming more specialized models.
- Environmental Science: The researchers applied AR CNPs to Antarctic cloud cover fraction (ERA5 data) and statistical temperature downscaling. For the downscaling task, they introduced a multi-scale convolutional architecture to handle high-resolution (1km) topography. The AR approach produced sharp, realistic spatial samples that captured geographical features like coastlines, which were blurred in non-AR baselines.
Key Insights
Expressivity Without Retraining
Perhaps the most significant finding is that the "intelligence" required to model dependencies is already latent within standard CNPs. The AR procedure simply extracts this capacity at test time. This means researchers can achieve state-of-the-art generative performance without the instability of training Latent NPs or the constraints of FullConvGNPs.
Non-Gaussianity from Gaussian Likelihoods
While a standard CNP with a Gaussian likelihood is restricted to unimodal marginals, the AR feedback loop enables the modeling of multimodal joint distributions. This is crucial for tasks where the underlying process may have multiple valid trajectories that only become clear after observing a few points.
The Consistency-Expressivity Trade-off
Neural Processes typically aim for "consistency" (where the order of points does not matter). AR CNPs intentionally break this property to gain expressive power. The authors found that using a random ordering during the AR process at test time is a robust strategy that effectively averages out potential errors from the initial sampling steps.
Denoising Trick
To produce "noiseless" samples, the authors suggest a two-step process: first, generate a noisy AR sample, then pass that entire sample back through the model as context and take the predictive mean. This results in smooth, coherent function realizations.
Limitations and Future Directions
The primary trade-off for the AR CNP's performance is computational cost. Predicting $N$ points requires $N$ forward passes, leading to $O(N)$ inference time compared to the $O(1)$ cost of a standard CNP. Future work may explore "block AR sampling"—predicting groups of points simultaneously—to mitigate this bottleneck. Additionally, while random ordering is effective, investigating optimal or adaptive ordering strategies remains an open research question.
Conclusion
AR CNPs provide a simple, powerful, and training-free method to upgrade Conditional Neural Processes. By leveraging the chain rule at test time, these models can capture complex dependencies and non-Gaussian structures that were previously thought to require much more complex architectures. This work bridges the gap between neural distribution estimation and neural processes, offering a new path for scalable and expressive probabilistic modeling.
Summary updated