Title: Practical Equivariances via Relational Conditional Neural Processes
Venue: NeurIPS 2023
Accepted: yes
Keywords: neural processes

equivariance

Gaussian processes
Abstract: Conditional Neural Processes (CNPs) are a class of metalearning models popular for combining the runtime efficiency of amortized inference with reliable uncertainty quantification. Many relevant machine learning tasks, such as in spatio-temporal modeling, Bayesian Optimization and continuous control, inherently contain equivariances – for example to translation – which the model can exploit for maximal performance. However, prior attempts to include equivariances in CNPs do not scale effectively beyond two input dimensions. In this work, we propose Relational Conditional Neural Processes (RCNPs), an effective approach to incorporate equivariances into any neural process model. Our proposed method extends the applicability and impact of equivariant neural processes to higher dimensions. We empirically demonstrate the competitive performance of RCNPs on a large array of tasks naturally containing equivariances.

Practical Equivariances via Relational Conditional Neural Processes

Abstract

Conditional Neural Processes (CNPs) are a class of metalearning models popular for combining the runtime efficiency of amortized inference with reliable uncertainty quantification. Many relevant machine learning tasks, such as in spatiotemporal modeling, Bayesian Optimization and continuous control, inherently contain equivariances - for example to translation - which the model can exploit for maximal performance. However, prior attempts to include equivariances in CNPs do not scale effectively beyond two input dimensions. In this work, we propose Relational Conditional Neural Processes (RCNPs), an effective approach to incorporate equivariances into any neural process model. Our proposed method extends the applicability and impact of equivariant neural processes to higher dimensions. We empirically demonstrate the competitive performance of RCNPs on a large array of tasks naturally containing equivariances.

1 Introduction

Conditional Neural Processes (CNPs; [10]) have emerged as a powerful family of metalearning models, offering the flexibility of deep learning along with well-calibrated uncertainty estimates and a tractable training objective. CNPs can naturally handle irregular and missing data, making them suitable for a wide range of applications. Various advancements, such as attentive (ACNP; [20]) and Gaussian (GNP; [30]) variants, have further broadened the applicability of CNPs. In principle, CNPs can be trained on other general-purpose stochastic processes, such as Gaussian Processes (GPs; [34]), and be used as an amortized, drop-in replacement for those, with minimal computational cost at runtime.

However, despite their numerous advantages, CNPs face substantial challenges when attempting to model equivariances, such as translation equivariance, which are essential for problems involving spatio-temporal components or for emulating widely used GP kernels in tasks such as Bayesian Optimization (BayesOpt; [12]). In the context of CNPs, kernel properties like stationarity and isotropy would correspond to, respectively, translational equivariance and equivariance to rigid transformations. Lacking such equivariances, CNPs struggle to scale effectively and emulate (equivariant) GPs even in moderate higher-dimensional input spaces (i.e., above two). Follow-up work has introduced Convolutional CNPs (ConvCNP; [15]), which leverage a convolutional deep sets construction to

INT

OOID

(a)

(b)

(c)

(d)

(e)

2

CNP

RCNP

GP

CNP

RCNP

9

0

-2

-2

0

2

-2

0

2

-2

0

2

2

4

6

2

4

6

C

C

induce translational-equivariant embeddings. However, the requirement of defining an input grid and performing convolutions severely limits the applicability of ConvCNPs and variants thereof (ConvGNP [30]; FullConvGNP [2]) to one- or two-dimensional equivariant inputs; both because higher-dimensional implementations of convolutions are poorly supported by most deep learning libraries, and for the prohibitive cost of performing convolutions in three or more dimensions. Thus, the problem of efficiently scaling equivariances in CNPs above two input dimensions remains open.

In this paper, we introduce Relational Conditional Neural Processes (RCNPs), a novel approach that offers a simple yet powerful technique for including a large class of equivariances into any neural process model. By leveraging the existing equivariances of a problem, RCNPs can achieve improved sample efficiency, predictive performance, and generalization (see Figure 1). The basic idea in RCNPs is to enforce equivariances via a relational encoding that only stores appropriately chosen relative information of the data. By stripping away absolute information, equivariance is automatically satisfied. Surpassing the complex approach of previous methods (e.g., the ConvCNP family for translational equivariance), RCNPs provide a practical solution that scales to higher dimensions, while maintaining strong performance and extending to other equivariances. The cost to pay is increased computational complexity in terms of context size (size of the dataset we are conditioning on at runtime); though often not a bottleneck for the typical metalearning small-context setting of CNPs. Our proposed method works for equivariances that can be expressed relationally via comparison between pairs of points (e.g., their difference or distance); in this paper, we focus on translational equivariance and equivariance to rigid transformations.

Contributions. In summary, our contributions in this work are:

We introduce a simple and effective way relational encoding - to encode exact equivariances directly into CNPs, in a way that easily scales to higher input dimensions.

We propose two variants of relational encoding: one that works more generally ('Full'); and one which is simpler and more computationally efficient ('Simple'), and is best suited for implementing translation equivariance.

We provide theoretical foundations and proofs to support our approach.

We empirically demonstrate the competitive performance of RCNPs on a variety of tasks that naturally contain different equivariances, highlighting their practicality and effectiveness.

Outline of the paper. The remainder of this paper is organized as follows. In Section 2, we review the foundational work of CNPs and their variants. This is followed by the introduction of our proposed relational encoding approach to equivariances at the basis of our RCNP models (Section 3). We then provide in Section 4 theoretical proof that relational encoding achieves equivariance without losing essential information; followed in Section 5 by a thorough empirical validation of our claims in various tasks requiring equivariances, demonstrating the generalization capabilities and predictive performance of RCNPs. We discuss other related work in Section 6, and the limitations of our approach, including its computational complexity, in Section 7. We conclude in Section 8 with an overview of the current work and future directions.

Our code is available at https://github.com/acerbilab/relational-neural-processes .

2 Background: the Conditional Neural Process family

In this section, we review the Conditional Neural Process (CNP) family of stochastic processes and the key concept of equivariance at the basis of this work. Following [30], we present these notions within the framework of prediction maps [8]. We denote with x ∈ X ⊆ R d x input vectors and y ∈ Y ⊆ R d y output vectors, with d x , d y ≥ 1 their dimensionality. If f ( z ) is a function that takes as input elements of a set Z , we denote with f ( Z ) the set { f ( z ) } z ∈ Z .

Prediction maps. A prediction map π is a function that maps (1) a context set ( X , Y ) comprising input/output pairs { ( x 1 , y 1 ) , . . . , ( x N , y N ) } and (2) a collection of target inputs X ⋆ = ( x ⋆ 1 , . . . , x ⋆ M ) to a distribution over the corresponding target outputs Y ⋆ = ( y ⋆ 1 , . . . , y ⋆ M ) :

where r = r (( X , Y ) , X ⋆ ) is the representation vector that parameterizes the distribution over Y ⋆ via the representation function r . Bayesian posteriors are prediction maps, a well-known example being the Gaussian Process (GP) posterior:

where the prediction map takes the form of a multivariate normal with representation vector r = ( m , K ) . The mean m = m post (( X , Y ) , X ⋆ ) and covariance matrix K = k post ( X , X ⋆ ) of the multivariate normal are determined by the conventional GP posterior predictive expressions [34].

Equivariance. A prediction map π with representation function r is T -equivariant with respect to a group T of transformations 1 of the input space, τ : X → X , if and only if for all τ ∈ T :

where τ x ≡ τ ( x ) and τ X is the set obtained by applying τ to all elements of X . Eq. 3 defines equivariance of a prediction map based on its representation function, and can be shown to be equivalent to the common definition of an equivariant map ; see Appendix A. Intuitively, equivariance means that if the data (the context inputs) are transformed in a certain way, the predictions (the target inputs) transform correspondingly. Common groups of transformations include translations, rotations, reflections - all examples of rigid transformations. In kernel methods and specifically in GPs, equivariances are incorporated in the prior kernel function k ( x , x ⋆ ) . For example, translational equivariance corresponds to stationarity k sta = k ( x -x ⋆ ) , and equivariance to all rigid transformations corresponds to isotropy , k iso = k ( || x -x ⋆ || 2 ) , where || · || 2 denotes the Euclidean norm of a vector. A crucial question we address in this work is how to implement equivariances in other prediction maps, and specifically in the CNP family.

Conditional Neural Processes. A CNP [10] uses an encoder 2 f e to produce an embedding of the context set, e = f e ( X , Y ) . The encoder uses a DeepSet architecture [48] to ensure invariance with respect to permutation of the order of data points, a key property of stochastic processes. We denote with r m = ( e , x ⋆ m ) the local representation of the m -th point of the target set X ⋆ , for 1 ≤ m ≤ M . CNPs yield a prediction map with representation r = ( r 1 , . . . , r M ) :

where q ( ·| λ ) belongs to a family of distributions parameterized by λ , and λ = f d ( r m ) is decoded in parallel for each r m . In the standard CNP, the decoder network f d is a multi-layer perceptron. A common choice for CNPs is a Gaussian likelihood, q ( y ⋆ m | λ ) = N ( y ⋆ m | µ ( r m ) , Σ ( r m )) , where µ and Σ represent the predictive mean and covariance of each output, independently for each target (a mean field approach). Given the closed-form likelihood, CNPs are easily trainable via maximumlikelihood optimization of parameters of encoder and decoder networks, by sampling batches of context and target sets from the training data.

̸

Gaussian Neural Processes. Notably, standard CNPs do not model dependencies between distinct target outputs y ⋆ m and y ⋆ m ′ , for m = m ′ . Gaussian Neural Processes (GNPs [30]) are a variant of CNPs that remedy this limitation, by assuming a joint multivariate normal structure over the outputs for the target set, π ( Y ⋆ | ( X , Y ) , X ⋆ ) = N ( Y | µ , Σ ) . For ease of presentation, we consider now scalar outputs ( d y = 1 ), but the model generalizes to the multi-output case. GNPs parameterize the mean as µ m = f µ ( r m ) and covariance matrix Σ m,m ′ = k ( f Σ ( r m ) , f Σ ( r m ′ ) ) f v ( r m ) f v ( r m ′ ) , for target points x ⋆ m , x ⋆ m ′ , where f µ , f Σ , and f v are neural networks with outputs, respectively, in R , R d Σ , and R + , k ( · , · ) is a positive-definite kernel function, and d Σ ∈ N + denotes the dimensionality of the space in which the covariance kernel is evaluated. Standard GNP models use the linear covariance (where f v = 1 and k is the linear kernel) or the kvv covariance (where k is the exponentiated quadratic kernel with unit lengthscale), as described in [30].

Convolutional Conditional Neural Processes. The Convolutional CNP family includes the ConvCNP [15], ConvGNP [30], and FullConvGNP [2]. These CNP models are built to implement translational equivariance via a ConvDeepSet architecture [15]. For example, the ConvCNP is a prediction map p ( Y ⋆ | ( X , Y ) , X ⋆ ) = ∏ M m =1 q ( y ⋆ m | Φ X , Y ( x ⋆ m )) , where Φ X , Y ( · ) is a ConvDeepSet. The construction of ConvDeepSets involves, among other steps, gridding of the data if not already on the grid and application of d x -dimensional convolutional neural networks ( 2 d x for FullConvGNP). Due to the limited scaling and availability of convolutional operators above two dimensions, ConvCNPs do not scale in practice for d x > 2 translationally-equivariant input dimensions.

Other Neural Processes. The neural process family includes several other members, such as latent NPs (LNP; [11]) which model dependencies in the predictions via a latent variable - however, LNPs lack a tractable training objective, which impairs their practical performance. Attentive (C)NPs (A(C)NPs; [20]) implement an attention mechanism instead of the simpler DeepSet architecture. Transformer NPs [31] combine a transformer-based architecture with a causal mask to construct an autoregressive likelihood. Finally, Autoregressive CNPs (AR-CNPs [3]) provide a novel technique to deploy existing CNP models via autoregressive sampling without architectural changes.

3 Relational Conditional Neural Processes

We introduce now our Relational Conditional Neural Processes (RCNPs), an effective solution for embedding equivariances into any CNP model. Through relational encoding, we encode selected relative information and discard absolute information, inducing the desired equivariance.

Relational encoding. In RCNPs, the (full) relational encoding of a target point x ⋆ m ∈ X ⋆ with respect to the context set ( X , Y ) is defined as:

where g : X × X → R d comp is a chosen comparison function 3 that specifies how a pair x , x ′ should be compared; R is the relational matrix , comparing all pairs of the context set; f r : R d comp × R d comp +2 d y → R d rel is the relational encoder , a neural network that maps a comparison vector and element of the relational matrix into a high-dimensional space R d rel ; ⊕ is a commutative aggregation operation ( sum in this work) ensuring permutation invariance of the context set [48]. From Eq. 5, a point x ⋆ is encoded based on how it compares to the entire context set.

Intuitively, the comparison function g ( · , · ) should be chosen to remove all information that does not matter to impose the desired equivariance. For example, if we want to encode translational equivariance, the comparison function should be the difference of the inputs, g diff ( x n , x ⋆ m ) = x ⋆ m -x n (with d comp = d x). Similarly, isotropy (invariance to rigid transformations, i.e. rotations, translations, and reflections) can be encoded via the Euclidean distance g dist ( x n , x ⋆ m ) = || x ⋆ m -x n || 2 (with d comp = 1 ). We will prove these statements formally in Section 4.

Full RCNP. The full-context RCNP, or FullRCNP, is a prediction map with representation r = ( ρ 1 , . . . , ρ M ) , with ρ m = ρ full ( x ⋆ m , ( X , Y )) the relational encoding defined in Eq. 5:

where q ( ·| λ ) belongs to a family of distributions parameterized by λ , where λ = f d ( ρ m ) is decoded from the relational encoding ρ m of the m -th target. As usual, we often choose a Gaussian likelihood, whose mean and covariance (variance, for scalar outputs) are produced by the decoder network.

Note how Eq. 6 (FullRCNP) is nearly identical to Eq. 4 (CNP), the difference being that we replaced the representation r m = ( e , x ⋆ m ) with the relational encoding ρ m from Eq. 5. Unlike CNPs, in RCNPs there is no separate encoding of the context set alone. The RCNP construction generalizes easily to other members of the CNP family by plug-in replacement of r m with ρ m . For example, a relational GNP (RGNP) describes a multivariate normal prediction map whose mean is parameterized as µ m = f µ ( ρ m ) and whose covariance matrix is given by Σ m,m ′ = k ( f Σ ( ρ m ) , f Σ ( ρ m ′ ) ) f v ( ρ m ) f v ( ρ m ′ ) .

Simple RCNP. The full relational encoding in Eq. 5 is cumbersome as it asks to build and aggregate over a full relational matrix. Instead, we can consider the simple or 'diagonal' relational encoding:

Eq. 7 is functionally equivalent to Eq. 5 restricted to the diagonal n = n ′ , and further simplifies in the common case g ( x n , x n ) = 0 , whereby the argument of the aggregation becomes f r ( g ( x n , x ⋆ m ) , y n ) .

We obtain the simple RCNP model (from now on, just RCNP) by using the diagonal relational encoding ρ diag instead of the full one, ρ full. Otherwise, the simple RCNP model follows Eq. 6. We will prove, both in theory and empirically, that the simple RCNP is best for encoding translational equivariance. Like the FullRCNP, the RCNP easily extends to other members of the CNP family.

In this paper, we consider the FullRCNP, FullRGNP, RCNP and RGNP models for translations and rigid transformations, leaving examination of other RCNP variants and equivariances to future work.

4 RCNPs are equivariant and context-preserving prediction maps

In this section, we demonstrate that RCNPs are T -equivariant prediction maps, where T is a transformation group of interest (e.g., translations), for an appropriately chosen comparison function g : X × X → R d comp . Then, we formalize the statement that RCNPs strip away only enough information to achieve equivariance, but no more. We prove this by showing that the RCNP representation preserves information in the context set. Full proofs are given in Appendix A.

4.1 RCNPs are equivariant

Definition 4.1. Let g be a comparison function and T a group of transformations τ : X → X . We say that g is T -invariant if and only if g ( x , x ′ ) = g ( τ x , τ x ′ ) for any x , x ′ ∈ X and τ ∈ T .

Definition 4.2. Given a comparison function g , we define the comparison sets :

If g is not symmetric, we can also denote g ( X ⋆ , ( X , Y )) = { ( g ( x ⋆ m , x n ) , y n ) } 1 ≤ n ≤ N, 1 ≤ m ≤ M .

Definition 4.3. A prediction map π and its representation function r are relational with respect to a comparison function g if and only if r can be written solely through set comparisons:

Lemma 4.4. Let π be a prediction map, T a transformation group, and g a comparison function. If π is relational with respect to g and g is T -invariant, then π is T -equivariant.

From Lemma 4.4 and previous definitions, we derive the main result about equivariance of RCNPs.

Proposition 4.5. Let g be the comparison function used in a RCNP, and T a group of transformations. If g is T -invariant, the RCNP is T -equivariant.

As useful examples, the difference comparison function g diff ( x , x ⋆ ) = x ⋆ -x is invariant to translations of the inputs, and the distance comparison function g dist ( x , x ⋆ ) = || x ⋆ -x || 2 is invariant to rigid transformations; thus yielding appropriately equivariant RCNPs.

4.2 RCNPs are context-preserving

The previous section demonstrates that any RCNP is T -equivariant, for an appropriate choice of g . However, a trivial comparison function g ( x , x ′ ) = 0 would also satisfy the requirements, yielding a trivial representation. We need to guarantee that, at least in principle, the encoding procedure removes only information required to induce T -equivariance, and no more. A minimal request is that the context set is preserved in the prediction map representation r , modulo equivariances.

Definition 4.6. A comparison function g is context-preserving with respect to a transformation group T if for any context set ( X , Y ) and target set X ⋆ , there is a submatrix Q ′ ⊆ Q of the matrix Q mnn ′ = ( g ( x n , x ⋆ m ) , g ( x n , x n ′ ) , y n , y n ′ ) , a reconstruction function γ , and a transformation τ ∈ T such that γ ( Q ′ ) = ( τ X , Y ) .

For example, g dist is context-preserving with respect to the group of rigid transformations. For any m , Q ′ = Q m :: is the set of pairwise distances between points, indexed by their output values. Reconstructing the positions of a set of points given their pairwise distances is known as the Euclidean distance geometry problem [38], which can be solved uniquely up to rigid transformations with traditional multidimensional scaling techniques [39]. Similarly, g diff is context-preserving with respect to translations. For any m and n ′ , Q ′ = Q m : n ′ can be projected to the vector (( x 1 -x ⋆ m , y 1 ) , . . . , ( x N -x ⋆ m , y N )) , which is equal to ( τ m X , Y ) with the translation τ m ( · ) = · -x ⋆ m .

Definition 4.7. For any ( X , Y ) , X ⋆ , a family of functions h θ (( X , Y ) , X ⋆ ) → r ∈ R d rep is contextpreserving under a transformation group T if there exists θ ∈ Θ , d rep ∈ N , a reconstruction function γ , and a transformation τ ∈ T such that γ ( h θ (( X , Y ) , X ⋆ )) ≡ γ ( r ) = ( τ X , Y ) .

Thus, an encoding is context-preserving if it is possible at least in principle to fully recover the context set from r , implying that no relevant context is lost. This is indeed the case for RCNPs.

Proposition 4.8. Let T be a transformation group and g the comparison function used in a FullRCNP. If g is context-preserving with respect to T , then the representation function r of the FullRCNP is context-preserving with respect to T .

Proposition 4.9. Let T be the translation group and g diff the difference comparison function. The representation of the simple RCNP model with g diff is context-preserving with respect to T .

Given the convenience of the RCNP compared to FullRCNPs, Proposition 4.9 shows that we can use simple RCNPs to incorporate translation-equivariance with no loss of information. However, the simple RCNP model is not context-preserving for other equivariances, for which we ought to use the FullRCNP. Our theoretical results are confirmed by the empirical validation in the next section.

5 Experiments

In this section, we evaluate the proposed relational models on several tasks and compare their performance with other conditional neural process models. For this, we used publicly available reference implementations of the neuralprocesses software package [1, 3]. We detail our experimental approach in Appendix B, and we empirically analyze computational costs in Appendix C.

5.1 Synthetic Gaussian and non-Gaussian functions

Wefirst provide a thorough comparison of our methods with other CNP models using a diverse array of Gaussian and non-Gaussian synthetic regression tasks. We consider tasks characterized by functions derived from (i) a range of GPs, where each GP is sampled using one of three different kernels (Exponentiated Quadratic (EQ), Matérn5 2 , and Weakly-Periodic); (ii) a non-Gaussian sawtooth

process; (iii) a non-Gaussian mixture task. In the mixture task, the function is randomly selected from either one of the three aforementioned distinct GPs or the sawtooth process, each chosen with probability 1 4 . Apart from evaluating simple cases with d x = { 1 , 2 } , we also expand our experiments to higher dimensions, d x = { 3 , 5 , 10 } . In these higher-dimensional scenarios, applying ConvCNP and ConvGNP models is not considered feasible. We assess the performance of the models in two distinct ways. The first one, interpolation (INT), uses the data generated from a range identical to that employed during the training phase. The second one, out-of-input-distribution (OOID), uses data generated from a range that extends beyond the scope of the training data.

Results. We first compare our translation-equivariant ('stationary') versions of RCNP and RGNP with other baseline models from the CNP family (Table 1). Comprehensive results, including all five regression problems and five dimensions, are available in Appendix D. Firstly, relational encoding of the translational equivariance intrinsic to the task improves performance, as both RCNP and RGNP models surpass their CNP and GNP counterparts in terms of INT results. Furthermore, the OOID results demonstrate significant improvement of our models, as they can leverage translationalequivariance to generalize outside the training range. RCNPs and RGNPs are competitive with convolutional models (ConvCNP, ConvGNP) when applied to 1D data and continue performing well in higher dimension, whereas models in the ConvCNP family are inapplicable for d x > 2 .

Table 1: Comparison of interpolation (INT) and out-of-input-distribution (OOID) performance of our RCNP models and CNP baselines on synthetic regression tasks with varying input dimensions. We show mean and (standard deviation) across 10 runs with different seeds. "F" denotes failed attempts that yielded very bad results. Missing entries could not be run. Statistically significantly best results are bolded . Our methods (RCNP and RGNP) perform better than their CNP and GNP counterparts in terms of both INT and OOID, and scale to higher dimension compared to ConvCNP and ConvGNP.

We further consider two GP tasks with isotropic EQ and Matérn5 2 kernels (invariant to rigid transformations). Within this set of experiments, we include the FullRCNP and FullRGNP models, each equipped with the 'isotropic' distance comparison function. The results (Table 2) indicate that RCNPs and FullRCNPs consistently outperform CNPs across both tasks. Additionally, we notice that FullRCNPs exhibit better performance compared to RCNPs as the dimension increases. When d x = 2 , the performance of our RGNPs is on par with that of ConvGNPs, and achieves the best results in terms of both INT and OOID when d x > 2 , which again highlights the effectiveness of our models in handling high-dimensional tasks by leveraging existing equivariances.

5.2 Bayesian optimization

We explore the extent our proposed models can be used for a higher-dimensional meta-learning task, using Bayesian optimization (BayesOpt) as our application [12]. The neural processes, ours as well as the baselines, serve as surrogates to find the global minimum f min = f ( x min ) of a black-box function. For this task, we train the models by generating random functions from a GP kernel sampled from a set of base kernels-EQ, Matérn-{ 1 2 , 3 2 , 5 2 } as well as their sums and products-with randomly sampled hyperparameters. By training on a large distribution over kernels, we aim to exploit the metalearning capabilities of neural processes. The trained CNP models are then used as surrogates to minimize the Hartmann function [40, p.185] in three and six dimensions, a common BayesOpt test function. We use the expected improvement acquisition function, which we can evaluate analytically. Specifics on the experimental setup and further evaluations can be found in Appendix E.

EQ

5

2

KL divergence(

↓

)

KL divergence(

↓

)

d

x

= 2

d

x

= 3

d

x

= 5

d

x

= 2

d

x

= 3

d

x

= 5

INT

RCNP (sta)

0.26 (0.00)

0.40 (0.01)

0.45 (0.00)

0.30 (0.00)

0.39 (0.00)

0.35 (0.00)

RGNP (sta)

0.03 (0.00)

0.05

(0.00)

0.11

(0.00)

0.03 (0.00)

0.05

(0.00)

0.11

(0.00)

FullRCNP (iso)

0.26 (0.00)

0.31 (0.00)

0.35 (0.00)

0.30 (0.00)

0.32 (0.00)

0.29 (0.00)

FullRGNP (iso)

0.08 (0.00)

0.14 (0.00)

0.25 (0.00)

0.09 (0.00)

0.16 (0.00)

0.21 (0.00)

ConvCNP

0.22 (0.00)

-

-

0.26 (0.00)

-

-

ConvGNP

0.01

(0.00)

-

-

0.01

(0.00)

-

-

CNP

0.33 (0.00)

0.44 (0.00)

0.57 (0.00)

0.39 (0.00)

0.46 (0.00)

0.47 (0.00)

GNP

0.05 (0.00)

0.09 (0.01)

0.19 (0.00)

0.07 (0.00)

0.11 (0.00)

0.19 (0.00)

OOID

RCNP (sta)

0.26 (0.00)

0.40 (0.01)

0.45 (0.00)

0.30 (0.00)

0.39 (0.00)

0.35 (0.00)

RGNP (sta)

0.03 (0.00)

0.05

(0.00)

0.11

(0.00)

0.03 (0.00)

0.05

(0.00)

0.11

(0.00)

FullRCNP (iso)

0.26 (0.00)

0.31 (0.00)

0.35 (0.00)

0.30 (0.00)

0.32 (0.00)

0.29 (0.00)

FullRGNP (iso)

0.08 (0.00)

0.14 (0.00)

0.25 (0.00)

0.09 (0.00)

0.16 (0.00)

0.21 (0.00)

ConvCNP

0.22 (0.00)

-

-

0.26 (0.00)

-

-

ConvGNP

0.01

(0.00)

-

-

0.01

(0.00)

-

-

CNP

4.54 (1.76)

3.30 (1.55)

1.22 (0.09)

6.75 (2.72)

1.75 (0.42)

0.93 (0.02)

GNP

2.25 (0.61)

2.54 (1.44)

0.74 (0.02)

1.86 (0.26)

1.23 (0.17)

0.62 (0.02)

0

10

20

30

40

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

error |min

t

f

(

x

t

)

f

min

|

Hartmann 3d

0

20

40

60

80

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

3.0

error |min

t

f

(

x

t

)

f

min

|

Hartmann 6d

GP

CNP

GNP

ACNP

AGNP

RCNP

RGNP

Results. As shown in Figure 2, RCNPs and RGNPs are able to learn from the random functions and come close to the performance of a Gaussian Process (GP), the most common surrogate model for BayesOpt. Note that the GP is refit after every new observation, while the CNP models can condition on the new observation added to the context set, without any retraining. CNPs and GNPs struggle with the diversity provided by the random kernel function samples and fail at the task. In order to remain competitive, they need to be extended with an attention mechanism (ACNP, AGNP).

5.3 Lotka-Volterra model

Neural process models excel in the so-called sim-to-real task where a model is trained using simulated data and then applied to real-world contexts. Previous studies have demonstrated this capability by training neural process models with simulated data generated from the stochastic Lotka-Volterra predator-prey equations and evaluating them with the famous hare-lynx dataset [32]. We run this benchmark evaluation using the simulator and experimental setup proposed by [3]. Here the CNP models are trained with simulated data and evaluated with both simulated and real data; the learning tasks represented in the training and evaluation data include interpolation , forecasting , and reconstruction . The evaluation results presented in Table 3 indicate that the best model depends on the task type, but overall our proposed relational CNP models with translational equivariance perform comparably to their convolutional and attentive counterparts, showing that our simpler approach does not hamper performance on real data. Full results with baseline CNPs are provided in Appendix F.

5.4 Reaction-Diffusion model

The Reaction-Diffusion (RD) model is a large class of state-space models originating from chemistry [45] with several applications in medicine [13] and biology [22]. We consider here a reduced model representing the evolution of cancerous cells [13], which interact with healthy cells through the

production of acid. These three quantities (healthy cells, cancerous cells, acid concentration) are defined on a discretized space-time grid (2+1 dimensions, d x = 3 ). We assume we only observe the difference in number between healthy and cancerous cells, which makes this model a hidden Markov model. Using realistic parameters inspired by [13], we simulated 4 · 10 3 full trajectories, from which we subsample observations to generate training data for the models; another set of 10 3 trajectories is used for testing. More details can be found in Appendix G.

We propose two tasks: first, a completion task, where target points at time t are inferred through the context at different spatial locations at time t -1 , t and t +1 ; secondly, a forecasting task, where the target at time t is inferred from the context at t -1 and t -2 . These tasks, along with the form of the equation describing the model, induce translation invariance in both space and time, which requires the models to incorporate translational equivariance for all three dimensions.

Results. We compare our translational-equivariant RCNP models to ACNP, CNP, and their GNP variants in Table 4. Comparison with ConvCNP is not feasible, as this problem is three-dimensional. Our methods outperform the others on both the completion and forecasting tasks, showing the advantage of leveraging translational equivariance in this complex spatio-temporal modeling problem.

5.5 Additional experiments

As further empirical tests of our method, we study our technique in the context of autoregressive CNPs in Appendix H.1, present a proof-of-concept of incorporating rotational symmetry in Appendix H.2, and examine the performance of RCNPs on image regression in Appendix H.3.

6 Related work

This work builds upon the foundation laid by CNPs [10] and other members of the CNP family, covered at length in Section 2. A significant body of work has focused on incorporating equivariances into neural network models [33, 4, 23, 41]. The concept of equivariance has been explored in Convolutional Neural Networks (CNNs; [24]) with translational equivariance, and more generally in Group Equivariant CNNs [5], where rotations and reflections are also considered. Work on DeepSets laid out the conditions for permutation invariance and equivariance [48]. Set Transformers [25] extend

this approach with an attention mechanism to learn higher-order interaction terms among instances of a set. Our work focuses on incorporating equivariances into prediction maps, and specifically CNPs.

Prior work on incorporating equivariances into CNPs requires a regular discrete lattice of the input space for their convolutional operations [15, 30]. EquivCNPs [19] build on work by [7] which operates on irregular point clouds, but they still require a constructed lattice over the input space. SteerCNPs [18] generalize ConvCNPs to other equivariances, but still suffer from the same scaling issues. These methods are therefore in practice limited to low-dimensional (one to two equivariant dimensions), whereas our proposal does not suffer from this constraint.

Our approach is also related to metric-based meta-learning, such as Prototypical Networks [36] and Relation Networks [37]. These methods learn an embedding space where classification can be performed by computing distances to prototype representations. While effective for few-shot classification tasks, they may not be suitable for more complex tasks or those requiring uncertainty quantification. GSSM [46] aims to learn relational biases via a graph structure on the context set, while we directly build exact equivariances into the CNP architecture.

Kernel methods and Gaussian processes (GPs) have long addressed issues of equivariance by customizing kernel designs to encode specific equivariances [14]. For instance, stationary kernels are used to capture globally consistent patterns [34], with applications in many areas, notably Bayesian Optimization [12]. However, despite recent computational advances [9], kernel methods and GPs still struggle with high-dimensional, complex data, with open challenges in deep kernel learning [47] and amortized kernel learning (or metalearning) [26, 35], motivating our proposal of RCNPs.

7 Limitations

RCNPs crucially rely on a comparison function g ( x , x ′ ) to encode equivariances. The comparison functions we described (e.g., for isotropy and translational equivariance) already represent a large class of useful equivariances. Notably, key contributions to the neural process literature focus only on translation equivariance (e.g., ConvCNP [15], ConvGNP [30], FullConvGNP [2]). Extending our method to other equivariances will require the construction of new comparison functions.

The main limitation of the RCNP class is its increased computational complexity in terms of context and target set sizes (respectively, N and M ). The FullRCNP model can be cumbersome, with O ( N 2 M ) cost for training and deployment. However, we showed that the simple or 'diagonal' RCNP variant can fully implement translational invariance with a O ( NM ) cost. Still, this cost is larger than O ( N + M ) of basic CNPs. Given the typical metalearning setting of small-data regime (small context sets), the increased complexity is often acceptable, outweighed by the large performance improvement obtained by leveraging available equivariances. This is shown in our empirical validation, in which RCNPs almost always outperformed their CNP counterparts.

8 Conclusion

In this paper, we introduced Relational Conditional Neural Processes (RCNPs), a new member of the neural process family which incorporates equivariances through relational encoding of the context and target sets. Our method applies to equivariances that can be induced via an appropriate comparison function; here we focused on translational equivariances (induced by the difference comparison) and equivariances to rigid transformations (induced by the distance comparison). How to express other equivariances via our relational approach is an interesting direction for future work.

We demonstrated with both theoretical results and extensive empirical validation that our method successfully introduces equivariances in the CNP model class, performing comparably to the translationalequivariant ConvCNP models in low dimension, but with a simpler construction that allows RCNPs to scale to larger equivariant input dimensions ( d x > 2 ) and outperform other CNP models.

In summary, we showed that the RCNP model class provides a simple and effective way to implement translational and other equivariances into the CNP model family. Exploiting equivariances intrinsic to a problem can significantly improve performance. Open problems remain in extending the current approach to other equivariances which are not expressible via a comparison function, and making the existing relational approach more efficient and scalable to larger context datasets.

Acknowledgments and Disclosure of Funding

This work was supported by the Academy of Finland Flagship programme: Finnish Center for Artificial Intelligence FCAI. Samuel Kaski was supported by the UKRI Turing AI World-Leading Researcher Fellowship, [EP/W002973/1]. The authors wish to thank the Finnish Computing Competence Infrastructure (FCCI), Aalto Science-IT project, and CSC-IT Center for Science, Finland, for the computational and data storage resources provided.

References

Wessel Bruinsma. Neural processes. https://github.com/wesselb/neuralprocesses , 2023. Accessed: October 2023.

Wessel P Bruinsma, James Requeima, Andrew YK Foong, Jonathan Gordon, and Richard E Turner. The Gaussian neural process. In 3rd Symposium on Advances in Approximate Bayesian Inference , 2021.

Wessel P Bruinsma, Stratis Markou, James Requeima, Andrew YK Foong, Tom R Andersson, Anna Vaughan, Anthony Buonomo, J Scott Hosking, and Richard E Turner. Autoregressive conditional neural processes. In International Conference on Learning Representations , 2023.

Benjamin Chidester, Tianming Zhou, Minh N Do, and Jian Ma. Rotation equivariant and invariant neural networks for microscopy image analysis. Bioinformatics , 35(14):i530-i537, 2019.

Taco Cohen and Max Welling. Group equivariant convolutional networks. In International Conference on Machine Learning , pages 2990-2999, 2016.

Brian Drawert, Andreas Hellander, Ben Bales, Debjani Banerjee, Giovanni Bellesia, Bernie J Daigle, Jr., Geoffrey Douglas, Mengyuan Gu, Anand Gupta, Stefan Hellander, Chris Horuk, Dibyendu Nath, Aviral Takkar, Sheng Wu, Per Lötstedt, Chandra Krintz, and Linda R Petzold. Stochastic simulation service: Bridging the gap between the computational expert and the biologist. PLOS Computational Biology , 12(12):e1005220, 2016.

Marc Finzi, Samuel Stanton, Pavel Izmailov, and Andrew Gordon Wilson. Generalizing convolutional neural networks for equivariance to lie groups on arbitrary continuous data. In Proceedings of the 37th International Conference on Machine Learning , volume 119 of Proceedings of Machine Learning Research , pages 3165-3176, 2020.

Andrew YK Foong, Wessel P Bruinsma, Jonathan Gordon, Yann Dubois, James Requeima, and Richard E Turner. Meta-learning stationary stochastic process prediction with convolutional neural processes. In Advances in Neural Information Processing Systems , volume 33, pages 8284-8295, 2020.

Jacob R Gardner, Geoff Pleiss, David Bindel, Kilian Q Weinberger, and Andrew G Wilson. GPyTorch: Blackbox matrix-matrix Gaussian process inference with GPU acceleration. In Advances in Neural Information Processing Systems , volume 31, pages 7576-7586, 2018.

Marta Garnelo, Dan Rosenbaum, Chris J Maddison, Tiago Ramalho, David Saxton, Murray Shanahan, Yee Whye Teh, Danilo J Rezende, and SM Ali Eslami. Conditional neural processes. In International Conference on Machine Learning , pages 1704-1713, 2018.

Marta Garnelo, Jonathan Schwarz, Dan Rosenbaum, Fabio Viola, Danilo J Rezende, SM Ali Eslami, and Yee Whye Teh. Neural processes. In ICML Workshop on Theoretical Foundations and Applications of Deep Generative Models , 2018.

Roman Garnett. Bayesian Optimization . Cambridge University Press, 2023.

Robert A Gatenby and Edward T Gawlinski. A reaction-diffusion model of cancer invasion. Cancer Research , 56(24):5745-5753, 1996.

Marc G Genton. Classes of kernels for machine learning: A statistics perspective. Journal of Machine Learning Research , 2(Dec):299-312, 2001.

Jonathan Gordon, Wessel P Bruinsma, Andrew YK Foong, James Requeima, Yann Dubois, and Richard E Turner. Convolutional conditional neural processes. In International Conference on Learning Representations , 2020.

Nikolaus Hansen and Andreas Ostermeier. Completely derandomized self-adaptation in evolution strategies. Evolutionary Computation , 9(2):159-195, 2001.

Nikolaus Hansen, yoshihikoueno, ARF1, Gabriela Kadlecová, Kento Nozawa, Luca Rolshoven, Matthew Chan, Youhei Akimoto, brieglhostis, and Dimo Brockhoff. CMA-ES/pycma: r3.3.0, January 2023. URL https://doi.org/10.5281/zenodo.7573532 .

Peter Holderrieth, Michael J Hutchinson, and Yee Whye Teh. Equivariant learning of stochastic fields: Gaussian processes and steerable conditional neural processes. In International Conference on Machine Learning , pages 4297-4307, 2021.

Makoto Kawano, Wataru Kumagai, Akiyoshi Sannai, Yusuke Iwasawa, and Yutaka Matsuo. Group equivariant conditional neural processes. In International Conference on Learning Representations , 2021.

Hyunjik Kim, Andriy Mnih, Jonathan Schwarz, Marta Garnelo, Ali Eslami, Dan Rosenbaum, Oriol Vinyals, and Yee Whye Teh. Attentive neural processes. In International Conference on Learning Representations , 2019.

Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations , 2015.

Shigeru Kondo and Takashi Miura. Reaction-diffusion model as a framework for understanding biological pattern formation. Science , 329(5999):1616-1620, 2010.

Risi Kondor and Shubhendu Trivedi. On the generalization of equivariance and convolution in neural networks to the action of compact groups. In International Conference on Machine Learning , pages 2747-2755, 2018.

Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE , 86(11):2278-2324, 1998.

Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In Proceedings of the 36th International Conference on Machine Learning , volume 97 of Proceedings of Machine Learning Research , pages 3744-3753, 2019.

Sulin Liu, Xingyuan Sun, Peter J Ramadge, and Ryan P Adams. Task-agnostic amortized inference of Gaussian process hyperparameters. In Advances in Neural Information Processing Systems , volume 33, pages 21440-21452, 2020.

Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proc. International Conference on Computer Vision , 2015.

Alfred J Lotka. Elements of Physical Biology . Williams & Wilkins, 1925.

Zhou Lu, Hongming Pu, Feicheng Wang, Zhiqiang Hu, and Liwei Wang. The expressive power of neural networks: A view from the width. In Advances in Neural Information Processing Systems , volume 30, pages 6231-6239, 2017.

Stratis Markou, James Requeima, Wessel P Bruinsma, Anna Vaughan, and Richard E Turner. Practical conditional neural processes via tractable dependent predictions. In International Conference on Learning Representations , 2022.

Tung Nguyen and Aditya Grover. Transformer neural processes: Uncertainty-aware meta learning via sequence modeling. In Proceedings of the 39th International Conference on Machine Learning , volume 162 of Proceedings of Machine Learning Research , pages 1656916594, 2022.

Eugene P Odum and Gary W Barrett. Fundamentals of Ecology . Thomson Brooks/Cole, 5th edition, 2005.

Chris Olah, Nick Cammarata, Chelsea Voss, Ludwig Schubert, and Gabriel Goh. Naturally occurring equivariance in neural networks. Distill , 5(12):e00024-004, 2020.

Carl Edward Rasmussen and Christopher KI Williams. Gaussian Processes for Machine Learning . MIT Press, 2006.

Fergus Simpson, Ian Davies, Vidhi Lalchand, Alessandro Vullo, Nicolas Durrande, and Carl Edward Rasmussen. Kernel identification through transformers. In Advances in Neural Information Processing Systems , volume 34, pages 10483-10495, 2021.

Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In Advances in Neural Information Processing Systems , volume 30, pages 4077-4087, 2017.

Flood Sung, Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition , pages 1199-1208, 2018.

Abiy Tasissa and Rongjie Lai. Exact reconstruction of Euclidean distance geometry problem using low-rank matrix completion. IEEE Transactions on Information Theory , 65(5):3124-3144, 2019.

Warren S Torgerson. Multidimensional scaling: I. Theory and method. Psychometrika , 17(4): 401-419, 1952.

Aimo Törn and Antanas Zilinskas. Global optimization , volume 350. Springer, 1989.

Clément Vignac, Andreas Loukas, and Pascal Frossard. Building powerful and equivariant graph neural networks with structural message-passing. In Advances in Neural Information Processing Systems , volume 33, pages 14143-14155, 2020.

Vito Volterra. Fluctuations in the abundance of a species considered mathematically. Nature , 118(2972):558-560, 1926.

Edward Wagstaff, Fabian B Fuchs, Martin Engelcke, Ingmar Posner, and Michael A Osborne. On the limitations of representing functions on sets. In International Conference on Machine Learning , pages 6487-6494, 2019.

Edward Wagstaff, Fabian B Fuchs, Martin Engelcke, Michael A Osborne, and Ingmar Posner. Universal approximation of functions on sets. Journal of Machine Learning Research , 23(151): 1-56, 2022.

Naoki Wakamiya, Kenji Leibnitz, and Masayuki Murata. A self-organizing architecture for scalable, adaptive, and robust networking. In Nazim Agoulmine, editor, Autonomic Network Management Principles: From Concepts to Applications , pages 119-140. Academic Press, 2011.

Qi Wang and Herke Van Hoof. Model-based meta reinforcement learning using graph structured surrogate models and amortized policy search. In Proceedings of the 39th International Conference on Machine Learning , volume 162 of Proceedings of Machine Learning Research , pages 23055-23077, 2022.

Andrew Gordon Wilson, Zhiting Hu, Ruslan Salakhutdinov, and Eric P Xing. Deep kernel learning. In International Conference on Artificial Intelligence and Statistics , pages 370-378, 2016.

Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabás Póczos, Ruslan Salakhutdinov, and Alexander J Smola. Deep sets. In Advances in Neural Information Processing Systems , volume 30, pages 3391-3401, 2017.

Appendix

In this Appendix, we include our methodology, mathematical proofs, implementation details for reproducibility, additional results and extended explanations omitted from the main text.

Contents

A Theoretical proofs

In this section, we provide extended proofs for statements and theorems in the main text. First, we show that our definition of equivariance for the prediction map is equivalent to the common definition of equivalent maps (Section A.1). Then, we provide full proofs that RCNPs are equivariant (Section A.2) and context-preserving (Section A.3) prediction maps, as presented in the theorems in Section 4 of the main text.

A.1 Definition of equivariance for prediction maps

We show that the definition of equivariance of a prediction map, which is introduced in the main text based on the invariance of the representation function (Eq. 3 in the main text), is equivalent to the common definition of equivariance for a generic mapping.

First, we need to extend the notion of group action of a group T into R d , for d ∈ N . We define two additional actions, (i) for τ ∈ T and f a function from R d into R p , and (ii) for a couple ( x , y ) ∈ R d × R p . Following [15]:

These two definitions can be extended for n -uplets X and Y :

In the literature, equivariance is primarily defined for a map F : Z ∈ X × R d ↦→ F Z ∈ F ( X , R d ) by:

Conversely, in the main text (Section 2), we defined equivariance for a prediction map through the representation function: a prediction map π with representation function r is T -equivariant if and only if for all τ ∈ T ,

Eqs. S1 and S2 differ in that they deal with distinct objects. The former corresponds to the formal definition of an equivariant map, while the latter uses the representation function, which is simpler to work with for the scope of our paper.

To show the equivalence of the two definitions (Eqs. S1 and S2), we recall that a prediction map π is defined through its representation r :

where Z ≡ ( X , Y ) . Then, starting from Eq. S1 applied to the prediction map,

Noting that τ -1 r (( X , Y ) , X ∗ ) = r (( X , Y ) , τ X ∗ ) , by applying τ -1 to each side of the last line of the equation above, and swapping sides, we get:

that is, Eqs. S1 and S2 are equivalent.

A.2 Proof that RCNPs are equivariant

We recall from Eq. 3 in the main text that a prediction map π with representation function r is T -equivariant with respect to a group T of transformations, τ : X → X , if and only if for all τ ∈ T :

where τ x ≡ τ ( x ) and τ X is the set obtained by applying τ to all elements of X .

Also recall that a prediction map π and its representation function r are relational with respect to a comparison function g : X × X → R d comp if and only if r can be written solely through the set comparisons defined in Eq. 8 of the main text:

We can now prove the following Lemma from the main text.

Lemma (Lemma 4.4) . Let π be a prediction map, T a transformation group, and g a comparison function. If π is relational with respect to g and g is T -invariant, then π is T -equivariant.

Proof. From Eq. 8 in the main text, if g is T -invariant, then for a target set X ⋆ and τ ∈ T :

for all 1 ≤ n ≤ N and 1 ≤ m ≤ M . A similar equality holds for all the comparison sets in the definition of a relational prediction map (see above). Since π is relational, and using the equality above, we can write its representation function r as:

Thus, π is T -equivariant.

From the Lemma, we can prove the first main result of the paper, that RCNPs are equivariant prediction maps for a transformation group T provided a suitable comparison function g .

Proposition (Proposition 4.5) . Let g be the comparison function used in a RCNP, and T a group of transformations. If g is T -invariant, the RCNP is T -equivariant.

Proof. In all RCNP models, elements of the context and target sets are always processed via a relational encoding. By definition (Eqs. 5 and 7 in the main text), the relational encoding is written solely as a function of g (( X , Y ) , ( X , Y )) and g (( X , Y ) , X ⋆ ) , so the same holds for the representation function r . Thus, any RCNP is a relational prediction map with respect to g , and it follows that it is also a T -equivariant prediction map according to Lemma 4.4.

A.3 Proof that RCNPs are context-preserving

We prove here that RCNPs preserve information in the context set. We will do so by providing a construction for a function that reconstructs the context set given the relationally encoded vector ρ m (up to transformations). As a disclaimer, the proofs in this section should be taken as 'existence proofs' but the provided construction is not practical. There are likely better context-preserving encodings, as shown by the empirical performance of RCNPs with moderately sized networks. Future theoretical work should provide stronger bounds on the size of the relational encoding, as recently established for DeepSets [43, 44].

For convenience, we recall Eq. 5 of the main text for the relational encoding provided a comparison function g :

where R ≡ g (( X , Y ) , g ( X , Y )) is the relational matrix. First, we show that from the relational encoding ρ full we can reconstruct the matrix R , modulo permutations of rows or columns as defined below.

Definition A.1. Let R , R ′ ∈ R N × N . The two matrices are equal modulo permutations , denoted R ∼ = R ′ , if there is a permutation σ ∈ Sym ( N ) such that R nn ′ = R ′ σ ( n ) σ ( n ′ ) , for all 1 ≤ n, n ′ ≤ N .

In other words, R ∼ = R ′ if R ′ is equal to R after an appropriate permutation of the indices of both rows and columns. Now we proceed with the reconstruction proof.

Lemma A.2. Let g : X × X → R d comp be a comparison function, ( X , Y ) a context set, X ⋆ a target set, R the relational matrix and ρ full the relational encoding as per Eq. 5 in the main text. Then there is a reconstruction function h , for r = ( ρ 1 , . . . , ρ M ) , such that h ( r ) = R ′ where R ′ ∼ = R .

̸

Proof. For this proof, it is sufficient to show that there is a function h applied to a local representation of any context point, ρ m = ρ full ( x ⋆ m , ( X , Y )) , such that h ( ρ m ) = R ′ , with R ′ ∼ = R . In this proof, we also consider that all numbers in a computer are represented up to numerical precision, so with R we denote the set of real numbers physically representable in a chosen floating point representation. As a final assumption, without loss of generality, we take y n = y n ′ for n = n ′ . If there are non-unique elements y n in the context set, in practice we can always disambiguate them by adding a small jitter.

̸

Let f r : R→ R d rel be the relational encoder of Eq. 5 of the main text, a neural network parametrized by θ r , where R = R d comp × R d comp +2 d y . Here, we also include in θ r hyperparameters defining the network architecture, such as the number of layers and number of hidden units per layer. We pick d rel large enough such that we can build a one-hot encoding of the elements of R , i.e., there is an injective mapping from R to { 0 , 1 } d rel such that one and only one element of the output vector is 1 . This injective mapping exists, since R is discrete due to finite numerical precision. We select θ r such that f r approximates the one-hot encoding up to arbitrary precision, which is achievable thanks to universal approximation theorems for neural networks [29]. Thus, ρ m = ⊕ n,n ′ f r ( g ( x n , x ⋆ m ) , R nn ′ ) is a (astronomically large) vector with ones at the elements that denote ( g ( x n , x ⋆ m ) , R nn ′ ) for 1 ≤ n, n ′ ≤ N .

Finally, we can build a reconstruction function h that reads out ρ m , the sum of one-hot encoded vectors, mapping each 'one', based on its location, back to the corresponding input ( g ( x n , x ⋆ m ) , R nn ′ ) . We have then all the information to build a matrix R ′ indexed by y , that is

̸

Since we assumed y n = y n ′ for n = n ′ , R ′ is unique up to permutations of the rows and columns, and by construction R ′ ∼ = R .

We now define the matrix

for 1 ≤ m ≤ M and 1 ≤ n, n ′ ≤ N . We recall that a comparison function g is context-preserving with respect to a transformation group T if for any context set ( X , Y ) and target set X ⋆ , for all 1 ≤ m ≤ M , there is a submatrix Q ′ ⊆ Q m :: , a reconstruction function γ , and a transformation τ ∈ T such that γ ( Q ′ ) = ( τ X , Y ) . We showed in Section 4.2 of the main text that the distance comparison function g dist is context-preserving with respect to the group of rigid transformations; and that the difference comparison function g diff is context-preserving with respect to the translation group. Similarly, a family of functions h θ (( X , Y ) , X ⋆ ) → R d rep is context-preserving under T if there exists θ ∈ Θ , d rep ∈ N , a reconstruction function γ , and a transformation τ ∈ T such that γ ( h θ (( X , Y ) , X ⋆ )) = ( τ X , Y ) .

With the construction and definitions above, we can now show that RCNPs are in principle contextpreserving. In particular, we will apply the definition of context-preserving functions h to the class of representation functions r of the RCNP models introduced in the paper, for which d rep = Md rel since r = ( ρ 1 , . . . , ρ M ) . The proof applies both to the full RCNP and the simple (diagonal) RCNP, for an appropriate choice of the comparison function g .

Proposition (Proposition 4.8) . Let T be a transformation group and g the comparison function used in a FullRCNP. If g is context-preserving with respect to T , then the representation function r of the FullRCNP is context-preserving with respect to T .

Proof. Given Lemma A.2, for any given m , we can reconstruct Q m :: = ( . . . , R ) (modulo permutations) from the relational encoding. Since g is context-preserving with respect to T , we can

̸

reconstruct ( X , Y ) from R modulo a transformation τ ∈ T . Thus, ρ full is context-preserving with respect to T and so is r .

Proposition (Proposition 4.9) . Let T be the translation group and g diff the difference comparison function. The representation of the simple RCNP model with g diff is context-preserving with respect to T .

Proof. As shown in the main text, the difference comparison function is context-preserving for Q ′ m : = Q mnn | N n =1 = ( g ( x n , x ⋆ m ) , R nn ) N n =1 , for a given m . In other words, we can reconstruct ( X , Y ) given only the diagonal of the R matrix and the comparison between a single target input x ⋆ m and the elements of the context set, g ( x n , x ⋆ m ) . Following a construction similar to the one in Lemma A.2, we can map ρ m back to Q ′ m : . Then since g is context-preserving with respect to Q ′ m : , we can reconstruct ( X , Y ) up to translations.

A potentially surprising consequence of our context-preservation theorems is that in principle no information is lost about the entire context set. Thus, in principle an RCNP with a sufficiently large network is able to reconstruct any high-order interaction of the context set, even though the RCNP construction only builds upon interactions of pairs of points. However, higher-order interactions might be harder to encode in practice . Since the RCNP representation is built on two-point interactions, depending on the network size, it may be harder for the network to effectively encode the simultaneous interaction of many context points.

B Methods

B.1 Training procedure, error bars and statistical significance

This section describes the training and evaluation procedures used in our regression experiments. The training procedure follows [3, Appendix G]. Stochastic gradient descent is performed via the Adam algorithm [21] with a learning rate specified in each experiment. After each epoch during model training, each model undergoes validation using a pre-generated validation set. The validation score is a confidence bound based on the log-likelihood values. Specifically, the mean ( µ val) and standard deviation ( σ val) of the log-likelihood values over the entire validation set are used to calculate the validation score as µ val -1 . 96 σ val / √ N val where N val is the validation dataset size. The validation score is compared to the previous best score observed within the training run, and if the current validation score is higher, the current model parameters (e.g., weights and biases for neural networks) are saved. The models are trained for a set number of epochs in each experiment, and when the training is over, the model is returned with the parameters that resulted in the highest validation score.

To ensure reliable statistical analysis and fair comparisons, we repeat model training using the above procedure ten times in each experiment, with each run utilizing different seeds for training and validation dataset generation and model training. In practice, we generated ten seed sets so that each training run with the same model utilizes different seeds, but we maintain consistency by using the same seeds across different models in the same experiment. Each model is then represented with ten training outcomes in each experiment, and we evaluate all training outcomes with a fixed evaluation set or evaluation sets.

We evaluate the methods based on two performance measures: (i) the log-likelihood, normalized with respect to the number of target points, and (ii) the Kullback-Leibler (KL) divergence between the posterior prediction map π and a target π ∗ , defined as

assuming that π is absolutely continuous to π ∗ with respect to a measure λ (usually, the Lebesgue measure). We report the KL normalized with respect to the number of target points.

Throughout our experiments, we rely on the KL divergence to evaluate the experiments with Gaussian process (GP) generated functions ('Gaussian'), for which we can compute the ground-truth target π ∗ (the multivariate normal prediction of the posterior GP). We use the normalized log-likelihood for all the other ('non-Gaussian') cases. For each model and evaluation set, we report both the average score

calculated across training runs and the standard deviation between scores observed in each training run.

We compare models based on the average scores and also run pairwise statistical tests to identify models that resulted in comparable performance. The results from pairwise comparisons are used throughout the paper in the results tables to highlight in bold the models that are considered best in each experiment. Specifically, we use the following method to determine the best models:

First, we highlight in bold the model (A) that has the best empirical mean metric.

Then, for each alternative model (B), we run a one-sided Student's t-test for paired samples, with the alternative hypothesis that model (B) has a higher (better) mean than model (A), and the null hypothesis that the two models have the same mean. Samples are paired since they share a random seed (i.e., the same training data).

The models that do not lead to statistically significant ( p < 0 . 05 ) rejection of the null hypothesis are highlighted in bold as well.

B.2 Experimental details and reproducibility

The experiments carried out in this work used the open-source neural processes package released with previous work [3]. The package is distributed under the MIT license and available at https: //github.com/wesselb/neuralprocesses [1]. We extended the package with the proposed relational model architectures and the new experiments considered in this work. Our implementation of RCNP is available at https://github.com/acerbilab/relational-neural-processes .

For the purpose of open science and reproducibility, all training and evaluation details are provided in the following sections of this Appendix as well as in the Github repository linked above.

B.3 Details on Figure 1

In Figure 1 in the main text, we compare CNP and RCNP models. The RCNP model used in this example utilizes a stationary kernel to encode translation equivariance. The encoding in the CNP model and the relational encoding in the RCNP model are 256-dimensional, and both models used an encoder network with three hidden layers and 256 hidden units per layer. In addition, both models used a decoder network with six hidden layers and 256 hidden units per layer. We used the CNP architecture from previous work [3] and modeled the RCNP architecture on the CNP architecture. The encoder and decoder networks use ReLU activation functions.

We trained the neural process models with datasets generated based on random functions sampled from a noiseless Gaussian process prior with a Matérn5 2 covariance function with lengthscale ℓ = 0 . 5 . The datasets were generated by sampling 1-30 context points and 50 target points from interval [ -2 , 2] . The neural process models were trained for 20 epochs with 2 14 datasets in each epoch and learning rate 3 · 10 -4 . The datasets used in training the CNP and RCNP models were generated with the same seed.

Figure 1 shows model predictions in two regression tasks. First, we visualized the predicted mean and credible bounds calculated as 1.96 times the predicted standard deviation in the range [ -2 , 2] given 10 context points. This corresponds to the standard interpolation (INT) task. Then we shifted the context points and visualized the predicted mean and credible bounds in the range [2 , 6] . This corresponds to an out-of-input-distribution (OOID) task. The Gaussian process model used as a reference had Matérn5 2 covariance function with lengthscale ℓ = 0 . 5 , the same process used to train the CNP and RCNP models.

C Computational cost analysis

C.1 Inference time analysis

In this section, we provide a quantitative analysis of the computational cost associated with running various models, reporting the inference time under different input dimensions d x and varying context set sizes N . We compare our simple and full RCNP models with the CNP and ConvCNP families.

All results are calculated on an Intel Core i7-12700K CPU, under the assumption that these models can be deployed on devices or local machines without GPU access.

Table S1 shows the results with different input dimensions d x . We set the size of both context and target sets to 20. Firstly, we can see the runtime of convolutional models increase significantly as they involve costly convolutional operations, and cannot be applied in practice to d x > 2 . Conversely, the runtime cost remains approximately constant across d x for the other models. Secondly, our RCNP models have inference time close to that of CNP models, while FullRCNP models are slower (although still constant in terms of d x ). Since context set size is the main factor affecting the inference speed of our RCNP models, we delve further into the computational costs associated with varying context set sizes N , keeping the input dimension d x = 1 and target set size M = 20 constant (Table S2). Given that RCNP has a cost of O ( NM ) , we observe a small, steady increase in runtime. Conversely, the FullRCNP models, with their O ( N 2 M ) cost, show an approximately quadratic surge in runtime as N increases, as expected.

C.2 Overall training time

For the entire paper, we conducted all experiments, including baseline model computations and preliminary experiments not included in the paper, on a GPU cluster consisting of a mix of Tesla P100, Tesla V100, and Tesla A100 GPUs. We roughly estimate the total computational consumption to be around 25 000 GPU hours. A more detailed evaluation of computing for each set of experiments is reported when available in the following sections.

D Details of synthetic regression experiments

We report details and additional results for the synthetic regression experiments from Section 5.1 of the main text. The experiments compare neural process models trained on data sampled from both Gaussian and non-Gaussian synthetic functions, where 'Gaussian' refers to functions sampled from a

Gaussian process (GP). Our procedure follows closely the synthetic regression experiments presented in [3].

D.1 Models

We compare our RCNP models with the CNP and ConvCNP model families in regression tasks with input dimensions d x = { 1 , 2 , 3 , 5 , 10 } . The CNP and GNP models used in this experiment encode the context sets as 256-dimensional vectors when d x < 5 and as 128-dimensional vectors when d x ≥ 5 . Similarly, all relational models including RCNP, RGNP, FullRCNP, and FullRGNP produce relational encodings with dimension 256 when d x < 5 and dimension 128 when d x ≥ 5 . The encoding network used in both model families to produce the encoding or relational encoding is a three-layer MLP, featuring 256 hidden units per layer for d x < 5 and 128 for d x ≥ 5 . We also maintain the same setting across all CNP and RCNP models in terms of the decoder network architecture, using a six-layer MLP with 256 hidden units per layer for d x < 5 and 128 for d x ≥ 5 . The encoder and decoder networks use ReLU activation functions. Finally, the convolutional models ConvCNP and ConvGNP, which are included in experiments where d x = { 1 , 2 } , are employed with the configuration detailed in [3, Appendix F], and GNP, RGNP, FullRGNP, and ConvGNP models all use linear covariance with 64 basis functions.

Neural process models are trained with datasets representing a regression task with context and target features. The datasets used in these experiments were generated based on random functions sampled from Gaussian and non-Gaussian stochastic processes. The models were trained for 100 epochs with 2 14 datasets in each epoch and learning rate 3 · 10 -4 . The validation sets used in training included 2 12 datasets and the evaluation sets used to compare the models in interpolation (INT) and out-of-input-distribution (OOID) tasks included 2 12 datasets each.

D.2 Data

We used the following functions to generate synthetic Gaussian and non-Gaussian data:

Exponentiated quadratic (EQ). We sample data from a GP with an EQ covariance function:

where ℓ is the lengthscale.

Matérn5 2 . We sample data from a GP with a Matérn5 2 covariance function:

where r = || x -x ′ || 2 ℓ and ℓ is the lengthscale.

Weakly periodic. We sample data from a GP with a weakly periodic covariance function:

where ℓ d is the lengthscale that decides how quickly the similarity between points in the output of the function decays as their inputs move apart, ℓ p determines the lengthscale of periodic variations, and p denotes the period.

Sawtooth. We sample data from a sawtooth function characterized by a stochastic frequency, orientation, and phase as presented by:

where ω ∼ U (Ω) is the frequency of the sawtooth wave, the direction of the wave is given as u ∼ U ( { x ∈ R d x : || x || 2 = 1 } ) , and ϕ ∼ U (0 , 1) determines the phase.

Mixture. We sample data randomly from either one of the three GPs or the sawtooth process, with each having an equal probability to be chosen.

In this set of experiments, we evaluate the models using varying input dimensions d x = { 1 , 2 , 3 , 5 , 10 } . To maintain a roughly equal level of difficulty across data with varying input dimensions d x , the hyperparameters for the above data generation processes are selected in accordance with d x :

For the EQ, Matérn5 2 , and weakly periodic functions, we additionally add independent Gaussian noise with σ 2 = 0 . 05 .

The datasets representing regression tasks were generated by sampling context and target points from the synthetic data as follows. The number of context points sampled from each EQ, Matérn5 2 , or weakly periodic function varied uniformly between 1 and 30 · d x , and the number of target points was fixed to 50 · d x . Since the datasets sampled from the sawtooth and mixture functions represent more difficult regression problems, we sampled these functions for 1-30 context points when d x = 1 and 150 · d x context points when d x > 1 , and we also fixed the number of target points to 100 · d x .

All training and validation datasets were sampled from the range X = [ -2 , 2] d x while evaluation sets were sampled in two ways. To evaluate the models in an interpolation (INT) task, we generated evaluation datasets by sampling context and target points from the same range that was used during training, X test = [ -2 , 2] d x . To evaluate the models in an out-of-input-distribution (OOID) task, we generated evaluation datasets with context and target points sampled from a range that is outside the boundaries of the training range, specifically X test = [2 , 6] d x .

D.3 Full results

The results presented in the main text (Section 5.1) compared the proposed RCNP and RGNP models to baseline and convolutional CNP and GNP models in selected synthetic regression tasks. The full results encompassing a wider selection of tasks and an extended set of models are presented in Table S3, S4, S5, S6, S7. We constrained the experiments with EQ and Matérn5 2 tasks (Table S3 and S4) to input dimensions d x = { 1 , 2 , 3 , 5 } owing to the prohibitive computational memory costs associated with the FullRCNP model included in these experiments. The other experiments (Table S5S7) were repeated with input dimensions d x = { 1 , 2 , 3 , 5 , 10 } . Our RCNP models demonstrate consistently competitive performance when compared with ConvCNP models in scenarios with low dimensional data, and significantly outperform the CNP family of models when dealing with data of higher dimensions.

Table S3: Synthetic (EQ). Comparison of the interpolation (INT) and out-of-input-distribution (OOID) performance of our RCNP models with different CNP baselines on EQ function with varying input dimensions. We use normalized Kullback-Leibler divergences as our metric and show mean and (standard deviation) obtained from 10 runs with different seeds. Trivial refers to a model that predicts a Gaussian distribution utilizing the empirical mean and standard deviation derived from the context outputs. "F" denotes failed attempts that yielded very bad results. Missing entries could not be run. Statistically significantly best results are bolded .

We also conducted an additional experiment to explore all the possible combinations of comparison functions with the RCNP and FullRCNP models on EQ and Matérn5 2 tasks. Table S8 provides a comprehensive view of the results for EQ tasks across three input dimensions. The empirical results support our previous demonstration that RCNP models are capable of incorporating translation-equivariance with no loss of information: the stationary versions of the RCNP model

deliver performance comparable to the stationary FullRCNP models. Conversely, since the RCNP model is not context-preserving for rigid transformations, the isotropic versions of the RCNP model exhibit inferior performance in comparison to the isotropic FullRCNPs.

E Details of Bayesian optimization experiments

We report here details and additional results for the Bayesian optimization experiments from Section 5.2 of the main text. We evaluated our proposed approach on a common synthetic optimization test function, the Hartmann function in its three and six dimensional versions [40, p.185]. 1 Each of two test functions is evaluated on a d x -dimensional hypercube X = [0 , 1] d x .

E.1 Models

We compared our proposals, RCNP and RGNP, against CNP and GNP as well as their attentive variants ACNP and AGNP. A GP with a Matérn5 2 kernel additionally served as the 'gold standard' to be compared against. We mostly followed the architectural choices discussed in Section D.1. However, we kept the number of hidden units per layer fixed at 256 and the relational encoding dimension at 128 , irrespective of the dimensionality d x . The models were trained with a learning rate of 3 · 10 -4 over up to 500 epochs with 2 14 datasets in each epoch. A validation set with 2 12 datasets was used to track the training progress and early stopping was performed if the validation score had not improved for 150 epochs.

E.2 Data

The datasets used to train the neural process models were generated based on synthetic functions sampled from a Gaussian process model with kernel k , with context and target set sizes as described in Section D.2. However, while the datasets used in the synthetic regression experiments were generated using fixed kernel setups, the current experiment explored sampling from a set of base kernels. To explore four different training regimes for each d x = { 3 , 6 } , we changed how the GP kernel k ( z ) = θk 0 ( z/ℓ ) with an output scale θ and a lengthscale ℓ was chosen as follows.

(i) Matérn-fixed. The kernel k is a Matérn5 2 kernel with fixed ℓ = √ d x / 4 and θ = 1 .

(ii) Matérn-sampled. The kernel k is a Matérn5 2 kernel, with

where LN is a log-Normal distribution, i.e., log( ℓ ) follows a standard-Normal distribution.

(iii) Kernel-single. The kernel k is sampled as

where U is a uniform distribution over the set.

(iv) Kernel-multiple. The kernel k is sampled as

where NA indicates that no kernel is chosen, i.e., a term in the sum can consist of a single kernel or be missing completely. This setup is based on the kernel learning setup in [35].

See Section D.2 for the precise definition of each kernel. Note that each setting is strictly more general than the one before and entails its predecessor as a special case. Setting (iv) was reported in the main text.

E.3 Bayesian optimization

After training, the neural process models were evaluated in a Bayesian optimization task. Starting from a common set of five random initial observations, x 0 ∈ U (0 , 1) d x , each optimization run performed fifty steps of requesting queries by maximizing the expected improvement acquisition function:

where f ( · ) is the negative target function (as we wanted to minimize f ), f best is the current observed optimum, and the expectation is calculated based on the neural process or GP model predictions. The acquisition function was optimized via PyCMA [17], the Python implementation of Covariance Matrix Adaptation Evolution Strategy (CMA-ES) [16]. Each CMA-ES run was initialized from the best acquisition function value estimated over a random subset of 100 locations from the hypercube. After each step, the newly queried point and its function evaluation were used to update the surrogate model. For neural process models, this means that the point was added to the context set, whereas for the the GP model, this means that the model was also reinitialized and its hyperparameters refit via type-II maximum likelihood estimation. The neural process model parameters were kept fixed without retraining throughout the Bayesian optimization task.

The results reported in Figure 2 in the main paper were computed using a single pretrained neural process model and ten random Bayesian optimization restarts for each model. For the full results presented here, each neural process model was pretrained three times and used as a surrogate model in ten optimization runs initialized with different sets of five observations, giving us a total of thirty optimization runs with each model. See Figure S1 and Figure S2 for the results and their respective discussion.

E.4 Computation time

Each model was trained on a single GPU, requiring about 90 -120 min per run. The subsequent CMA-ES optimization and analysis took about 60 -90 min running on a CPU with eight cores per experiment. The total runtime was approximately 280 h of GPU time and approximately 7 h on the CPUs.

0

10

20

30

40

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

error |min

t

f

(

x

t

)

f

min

|

Matérn-fixed

0

10

20

30

40

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

error |min

t

f

(

x

t

)

f

min

|

Matérn-sampled

0

10

20

30

40

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

error |min

t

f

(

x

t

)

f

min

|

Kernel-single

0

10

20

30

40

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

error |min

t

f

(

x

t

)

f

min

|

Kernel-multiple

GP

CNP

GNP

ACNP

AGNP

RCNP

RGNP

F Details of Lotka-Volterra model experiments

We report here details and additional results for the Lotka-Volterra model from Section 5.3 of the main text.

F.1 Models

The RCNP architecture used in this experiment is modeled on the multi-output CNP architecture proposed in previous work [3, Appendix F]. The multi-output CNP encodes the context set associated with each output as a 256-dimensional vector and concatenates the vectors. The encoder network used in this model is an MLP with three hidden layers and 256 hidden units per layer, and the decoder network is an MLP with six hidden layers and 512 hidden units per layer. The RCNP model replicates this architecture by encoding the targets with respect to the context set associated with each output as 256-dimensional vectors, concatenating the vectors, and using encoder and decoder networks that are the same as the encoder and decoder networks used in the CNP model. We note that the encoder

0

20

40

60

80

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

3.0

error |min

t

f

(

x

t

)

f

min

|

Matérn-fixed

0

20

40

60

80

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

3.0

error |min

t

f

(

x

t

)

f

min

|

Matérn-sampled

0

20

40

60

80

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

3.0

error |min

t

f

(

x

t

)

f

min

|

Kernel-single

0

20

40

60

80

number of queries

0.0

0.5

1.0

1.5

2.0

2.5

3.0

error |min

t

f

(

x

t

)

f

min

|

Kernel-multiple

GP

CNP

GNP

ACNP

AGNP

RCNP

RGNP

network dimensions are the same as used in the synthetic regression experiments (Section D.1) while the decoder network has more hidden units per layer in the multi-output architectures. The encoder and decoder networks use ReLU activation functions.

The models evaluated in these experiments include RCNP, CNP, ACNP, and ConvCNP as well as RGNP, GNP, AGNP, and ConvGNP. RCNP and RGNP models share the architecture described above while the other models are evaluated with the architectures proposed in previous work [3]. However, in contrast to previous work, where CNP, GNP, ACNP, and AGNP models encoded the context associated with each output with a separate encoder, here we used a shared encoder in RCNP, RGNP, CNP, GNP, ACNP, and AGNP. We made this choice based on preliminary experiments carried out with synthetic multi-output data, where we observed that using a shared encoder improved both RCNP and CNP results. We note that all models are extended with a nonlinear transformation to take into account that the population counts modeled in this experiment are positive [3].

The neural process models were trained with simulated data and evaluated with simulated and real data. The models were trained for 200 epochs with 2 14 datasets in each epoch and learning rate 10 -4 . The validation sets used in training included 2 12 datasets also generated based on the simulated data. The evaluation sets generated based on simulated data included 2 12 datasets each and the evaluation sets generated based on real data 2 8 dataset each, and both simulated and real data were used to generate three separate evaluation sets to represent the three task types considered in this experiment: interpolation, forecasting, and reconstruction.

F.2 Data

The datasets used in this task included simulated and real datasets. The simulated datasets were constructed based on simulated predator and prey time series generated using stochastic LotkaVolterra equations. The Lotka-Volterra equations introduced independently by Lotka [28] and Volterra [42] model the joint evolution between prey and predator populations as

where u denotes the prey, v denotes the predators, α is the birth rate of the prey, β is the rate at which predators kill prey, δ the rate at which predators reproduce when killing prey, and γ is the death rate of the predators; the dot denotes a temporal derivative, i.e. ˙ u ≡ d d t u . In this work, we generated simulated data with a stochastic version proposed by [3],

where W u and W v are two independent Brownian motions that add noise to the population trajectories and σ > 0 controls the noise magnitude.

We simulated trajectories from the above equation using the code released with the previous work [3]. The parameters used in each simulation were sampled from: α ∼ U (0 . 2 , 0 . 8) , β ∼ U (0 . 04 , 0 . 08) , δ ∼ U (0 . 8 , 1 . 2) , γ ∼ U (0 . 04 , 0 . 08) , and σ ∼ U (0 . 5 , 10) . The initial population sizes were sampled from u, v ∼ U (5 , 100) , and the simulated trajectories were also scaled by a factor r ∼ U (1 , 5) . To construct a dataset, 150-250 observations were sampled from the simulated prey time series and 150-250 observations from the simulated predator series. The selected observations were then divided into context and target observations based on the selected task type which was fixed in the evaluation sets and selected at random in the training and validation data.

The datasets representing interpolation, forecasting, or reconstruction tasks were created based on the selected simulated observations as follows. To create an interpolation task, 100 predator and 100 prey observations, selected at random, were included in the target set, and the rest were included in the context set. To create a forecasting task, a time point was selected at random between 25 and 75 years, and all observations prior to the selected time point were included in the context set and the rest were included in the target set. To create a reconstruction task, a random choice was made between prey and predators such that the observations from the selected population were all included in the context set while the observations from the other population were divided between the context and target sets by choosing at random a time point between 25 and 75 years and including all observations prior to the selected time point in the context set and the rest in the target set.

The real datasets used to evaluate the neural process models in the sim-to-real tasks were generated based on the famous hare-lynx data [32]. The hare and lynx time series include 100 observations at regular intervals. The observations were divided into context and target sets based on selected task types, and the same observations were used to generate separate evaluation sets for each task. The forecasting and reconstruction task was created with the same approach that was used with simulated data, while the interpolation task was created by choosing at random 1-20 predator observations and 1-20 prey observations that were included in the target set and including the rest in the context set.

F.3 Full results

We evaluate and compare the neural process models based on normalized log-likelihood scores calculated based on each evaluation set and across training runs. We compare RCNP, CNP, ACNP, and ConvCNP models in Table S9 (a) and RGNP, GNP, AGNP, and ConvGNP models with 32 basis functions in Table S9 (b) and with 64 basis functions in Table S9 (c). We observe that the best model depends on the task, and comparison across the tasks indicates that RCNP or RGNP are not consistently better or worse than their convolutional and attentive counterparts. This is not the case with CNP and GNP, and we observe that the other models including RCNP and RGNP are almost always substantially better than CNP or GNP. The models with 64 basis functions performed on average better than the models with 32 basis functions, but we observed that some RGNP, GNP, and AGNP training runs did not converge and most GNP runs did not complete 200 epochs due to numerical errors when 64 basis functions were used. We therefore reported results with 32 basis functions in the main text.

F.4 Computation time

When the models were trained on a single GPU, each training run with RCNP and RGNP took around 6.5-7 hours and each training run with the reference models around 2-3 hours depending on the model. The results presented in this supplement and the main text required 120 training runs, and 10-15 training runs had been carried out earlier to confirm as a sanity check our ability to reproduce the results presented in previous work. The multi-output models used in this experiment were additionally studied in preliminary experiments using synthetic regression data. The computation time used in all the experiments is included in the estimated total reported in Section C.2.

G Details of Reaction-Diffusion model experiments

We report here details and additional results for the Reaction-Diffusion model from Section 5.4 of the main text.

G.1 Models

We compared RCNP, RGNP, ACNP, AGNP, CNP, and GNP models trained using simulated data with input dimensions d x = { 3 , 4 } . We mostly used the architectures described in Section D.1, but since less training data was used in this experiment, we reduced the number of hidden layers in the decoder network to 4. The models were trained for 100 epochs with 2 10 datasets in each epoch and learning rate 10 -4 . The validation sets used in training included 2 8 datasets and the evaluation sets used to compare the models in completion and forecasting tasks included 2 8 datasets each.

G.2 Data

We generated simulated data using a simplified equation inspired by the cancer evolution equation from Gatenby and Gawlinski [13]. The equation involves three quantities: the healthy cells ( z , t ) ↦→ u ( z , t ) , the cancerous cells ( z , t ) ↦→ v ( z , t ) , and an acidity measure ( z , t ) ↦→ w ( z , t ) , with

t ∈ [0 , T ] and z ∈ E ⊂ R 2 . Their temporal and spatial dynamics are described by:

where r u , r v , and r w are apparition rates, k u and k v control the maximum for the number of healthy and cancerous cells, d u and d w are death rates relative to other species, and D v and D w are dispersion rates.

Wesimulate trajectories from Eq. S8 on a discretized space-time grid using the SpatialPy simulator [6]. For the purpose of our experiment, we selected realistic parameter ranges that would also produce quick evolution. The selected parameter ranges are therefore close to [13], but for example the diffusion rates were increased. The parameters for the simulations are sampled according to the following distributions: k u = 10 , k v = 100 , r u ∼ U (0 . 0027 , 0 . 0033) , r v ∼ U (0 . 027 , 0 . 033) , r w ∼ U (1 . 8 , 2 . 2) , D v ∼ U (0 . 0009 , 0 . 0011) , D w ∼ U (0 . 009 , 0 . 011) , d w = 0 , d u ∼ U (0 . 45 , 0 . 55) . These parameters lead to a relatively slowly-growing number of cancerous cells, with a fast decay in healthy cells due to acid spread, as depicted in Figure S3. The process starts with the healthy cells count u constant across the whole space, cancerous cells count v zero except for one cancerous cell at a uniformly random position, and acid count w zero across the whole space.

Sane cellscount

t=0

t=1

t=2

10

8

6

910

012345678910

012

8910

Cancer cells count

t=0

t=1

t=2

10

8

6

10

10

Acid count

t=0

t=1

=2

4.0

3.5

3.0

2.5

2.0

1.5

1.0

0.5

0.0

012

2345678910

We generated a total 5 · 10 3 trajectories on a 11 × 11 grid at times t = 0 , . . . , 5 . We used the first 4 · 10 3 trajectories to generate datasets for model training and the other 10 3 to generate datasets for evaluation. The datasets were generated by sampling from the trajectories as follows. First, we extracted the population counts at three consecutive time points from a trajectory and time point selected at random. We then sampled 50-200 context points and 100-200 target points from this subsample to create a dataset representing either a completion or forecasting task. For the completion task, the context and target points were sampled from the subsample at random, and for the forecasting task, all context points were sampled from the first two time points, and all target points from the third time point were included in the subsample. All datasets included in the training and validation data represented the completion task.

Finally, the input and output variables at each context and target point were determined as follows. In the experiments reported in the main text, we considered the case of partial observations, where only the difference u -v is observed. This makes the simulator model a hidden Markov model and thus intractable. Predicting future states of the quantity u -v without running inference and without having access to w is a challenging problem, similar to several application cases of interest. In this appendix, we additionally consider a scenario where we include the acid count in the input variables and take the healthy cells count as the output variable.

G.3 Additional results

Apromising scientific application of neural processes is inferring latent variables given other measured quantities. To explore this capability, we attempt to infer the quantity of healthy cells ( u ( z , t ) ) given as input the acidity concentration ( w ( z , t ) ) for some z , t . For this study, we augmented the inputs to ( z , t, w ( z , t )) . Notably, the regression problem is not equivariant in the last input dimension, so we encoded w ( z , t ) in a non-relational manner also in the RCNP and RGNP models. The results are presented in Table S10. The difference between the completion and forecasting tasks is small in this experiment, and the best results are observed with RGNP in both tasks. AGNP performance is surprisingly poor and will require further investigation.

G.4 Computation time

On GPU, for all methods the training runs of this experiment were particularly fast, each one lasting no more than 5 minutes. We carried out a total of 10 training runs for each method, with a total of 120 training runs. We also performed around 60 exploratory training runs (with longer training time, larger networks, etc .). The total training time comes to less than 15 hours.

H Additional experiments

In addition to the experimental evaluation in the main paper and their extended discussion in the sections above, we explored several further experimental setups to demonstrate the wide applicability of our proposal. These are (i) an application of the autoregressive structure proposed by [3] to our proposed approach (Section H.1), (ii) a demonstration of how to incorporate rotational equivariance into the model (Section H.2), and (iii) an exploration of the method's performance on two popular image data regression tasks (Section H.3).

H.1 Autoregressive CNPs

To further demonstrate the effectiveness of our RCNP architectures, we ran a set of experiments adopting an autoregressive approach to both our RCNP and other CNP models. Autoregressive

CNPs (AR-CNPs) are a new family of CNP models which were recently proposed by [3]. Unlike traditional CNPs, which generate predictions independently for each target point, or GNPs, which produce a joint multivariate normal distribution over the target set, AR-CNPs define a joint predictive distribution autoregressively, leveraging the chain rule of probability. Without changing the CNP architectures and the training procedure, AR-CNPs feed earlier output predictions back into the model autoregressively to predict new points. This adjustment enables the AR-CNPs to capture highly dependent, non-Gaussian predictive distributions, resulting in better performance compared to traditional CNPs.

In this experiment, we compare AR-RCNP, AR-CNP, and AR-ConvCNP on synthetic regression data. The AR approach is applied at the evaluation stage to generate the target predictions autoregressively. When applying AR, the training method for the models remains unchanged. Thus, for this experiment, we use the same models that were trained with synthetic data. Details about the data generation and model configurations can be found in Section D. We chose the translational-equivariant version of RCNP for each task.

The full results are reported in Table S11. As we maintain consistent experimental settings with previous synthetic experiments (Section D), we can directly compare the performance of models without the AR approach (Table S3-S7) to those enhanced with the AR approach. We observe that the AR approach improves RCNP performance in the Gaussian experiments in all dimensions and in the non-Gaussian sawtooth and mixture experiments when d x > 1 . When d x = 1 , AR-RCNP results are comparable to RCNP results in the mixture task and worse in the sawtooth task. We also observe that AR-CNP results are worse than CNP results in most sawtooth and mixture experiments. Overall we can see that AR-RCNPs are better than AR-CNPs across all dimensions and tasks under both INT and OOID conditions, and achieve close performance compared with AR-ConvCNPs under d x = 1 in the Gaussian experiments.

Table S11: Comparison of the interpolation (INT) and out-of-input-distribution (OOID) performance of AR-RCNP model with other AR baselines on various synthetic regression tasks with varying input dimensions. We show the mean and (standard deviation) obtained from 10 runs with different seeds. 'F' denotes failed attempts that yielded very bad results. Our AR-RCNP method performs competitively in low dimension, and scales to higher input dimensions ( d x > 2 ), where AR-ConvCNP is not applicable.

H.1.1 Computation time

The AR procedure is not used in model training, so the training procedure aligns with that of standard CNP models. The experiments reported in this section used AR with models trained for the synthetic regression experiments in Section 5.1. If the models had been trained from scratch, we estimate that the total computational cost for these experiments would have been approximately 2000 GPU-hours. AR is applied in the evaluation phase, where we predict target points autoregressively. This process is considerably lengthier than standard evaluation, with the duration influenced by both the target set size and data dimension. Nonetheless, since only a single pass is required during evaluation, the overall computational time remains comparable to standard CNP models.

H.2 Rotation equivariance

The experiments presented in this section use a two-dimensional toy example to investigate modeling datasets that are rotation equivariant but not translation equivariant. We created regression tasks based

on synthetic data sampled from a GP model with an exponentiated quadratic covariance function and mean function m ( x ) = ∥ ARx ∥ 2 2 , where A = diag ( a ) is a fixed diagonal matrix with unequal entries and R is a random rotation matrix. We considered an isotropic-kernel model version with the standard EQ covariance function (Equation S3) and an anisotropic-kernel model version with the covariance function k ( x , x ′ ) = exp( -|| BRx -BRx ′ || 2 2 ) , where B = diag ( b ) is a fixed diagonal matrix with unequal entries and R is the same random rotation matrix as in the mean function. Both models use the anisotropic GP mean function defined previously.

We generated the datasets representing regression tasks by sampling context and target points from the synthetic data generated with isotropic-kernel or anisotropic-kernel model version as follows. The number of context points sampled varied uniformly between 1 and 70, while the number of target points was fixed at 70. All training and validation datasets were sampled from the range X = [ -4 , 0] × [ -4 , 0] . To evaluate the models in an interpolation (INT) task, we generated evaluation datasets by sampling context and target points from the training range. To evaluate the models in an out-of-input distribution (OOID) task, we generated evaluation datasets with context and target points sampled in the range [0 , 4] × [0 , 4] .

We chose a comparison function g that is rotation invariant but not translation invariant defined as 2

Since 'simple' RCNPs are only context preserving for translation-equivariance and not for other equivariances (Proposition 4.9), we combine the rotation-equivariant comparison function with a FullRCNP model.

We compared FullRCNP with the rotation-equivariant comparison function, FullRCNP (rot), with CNP and ConvCNP models in both the isotropic-kernel and anisotropic-kernel test condition. We also used isotropic-kernel data to train and evaluate a translation-equivariant ('stationary') RCNP version, RCNP (sta), that uses the difference comparison function. The model architectures and training details were the same as in the two-dimensional synthetic regression experiments (Section D.1).

The results reported in Table S12 show that, as expected, the isotropic-kernel test condition is easier than the anisotropic-kernel test condition where the random rotations change the covariance structure. The best results in both conditions are observed with ConvCNP when the models are evaluated in the interpolation task and with FullRCNP (rot) when the models are evaluated in the OOID task. Since the input range in the OOID task is rotated compared to the training range, FullRCNP (rot) results are on the same level in both tasks while the other models are not able to make reasonable predictions in the OOID task. We also observe that that the FullRCNP (rot) results in the interpolation task are better than CNP or RCNP (sta) results in the isotropic-kernel test condition and similar to CNP in the anisotropic-kernel test condition.

H.2.1 Computation time

The models were trained on a single GPU, and each training run took around 6 hours with FullRCNP, 2 hours with CNP, 4 hours with ConvCNP and 3 hours with RCNP. The results provided in this

appendix required 70 training runs and consumed around 250 GPU hours. Additional experiments related to this example consumed around 2500 GPU hours.

H.3 Image datasets

The experiments reported in the main paper demonstrate how RCNP can leverage prior information about equivariances in regression tasks including tasks with more than 1-2 input dimensions. In this section, we provide details and results from additional experiments that used MNIST [24] and CelebA [27] image data to create regression tasks. The neural process models were used in these experiments to predict the mean and variance over pixel values across the two-dimensional image given some pixels as observed context. The experiments investigate how RCNP compares to other conditional neural process models when the assumption about task equivariance is incorrect.

H.3.1 Setup

The experiments reported in this section compared RCNP, CNP, and ConvCNP models using interpolation tasks generated based on 16 × 16 pixel images. The pixels were viewed as data points with d x = 2 input variables that indicate the pixel location on image canvas and d y output variables that encode the pixel value. The output dimension depended on the image type. Pixels in grayscale images were viewed as data points with one output variable ( d y = 1 ) that takes values between 0 and 1 while pixels in RGB images were viewed as data points with three output variables ( d y = 3 ) that each take values between 0 and 1 to encode one RGB channel. We evaluated the selected models using standard MNIST and CelebA images (Section H.3.2) and examined modeling translation equivariance with toroidal MNIST images (Section H.3.3).

The model architectures used in the image experiments match the architectures used in the synthetic regression experiments (Section D.1) extended with an output transformation to bound the predicted mean values between 0 and 1. While we used images with multiple output channels, there was no need to use a multi-output architecture such as discussed in Section F.1. This is because we assumed that all output channels are observed when a pixel is included in the context set and unobserved otherwise, meaning that the output channels in image data are not associated with separate context sets. RCNP models were used with the standard stationary comparison function unless otherwise mentioned.

The models were trained for 200 epochs with 2 14 datasets in each epoch and learning rate 3 · 10 -4 , and tested with validation and evaluation sets that included 2 12 datasets each. The log-likelihood score that is used as training objective is usually calculated based on the predicted mean and variance, but when the models were trained on MNIST data, we started training with the predicted variance fixed to a small value. This was done to prevent the neural process models from learning to predict the constant background values with low variance and ignoring the image details. We trained with the fixed variance between epochs 1-150 and with the predicted variance as usual between epochs 151-200.

The datasets used to train and evaluate the neural process models were generated as follows. Each dataset was generated based on an image that was sampled from the selected image set and downscaled to 16 × 16 pixels. The downscaled images were either used as such or transformed with random translations as explained in Section H.3.3. The context sets generated based on the image data included 2-128 pixels sampled at random while the target sets included all 256 pixels. The evaluation sets used in each experiment were generated with the context set size fixed to 2, 20, 40, and 100 pixels.

H.3.2 Experiment 1: Centered images (no translation)

The experiments reported in this section used MNIST and CelebA images scaled to the size 16 × 16 (Figure S4). The normalized log-likelihood scores calculated based on each evaluation set and across training runs for each neural process model are reported in Table S13. The best results are observed with ConvCNP, while the order between RCNP and CNP depends on the context set size. CNP results are better than RCNP results when predictions are generated based on N = 2 context points while RCNP results are better when more context data is available.

We believe CNP works better than RCNP when N = 2 because the absolute pixel locations are generally informative about the possible pixel values in the MNIST and CelebA images. This means

(a)

(b)

G3

that the regression tasks generated based on these images are not translation equivariant and the assumption encoded in the RCNP comparison function is incorrect. Since RCNP does not encode the absolute target location, it needs context data to make predictions that CNP and ConvCNP can make based on the target location alone (Figure S5).

While RCNP needs context data to work around the incorrect assumption about translation equivariance, RCNP results are better than CNP results when more context data is available. We believe this is because the context set representation in CNP does not depend on the current target location while RCNP can learn to preserve context information that is relevant to the current target. For example, while CNP looses information about the exact observed values when the context set is encoded, RCNP generally learns to reproduce the observed context. RCNP may also learn to emphasize context points that are close to the current target and may learn local features that are translation equivariant.

H.3.3 Experiment 2: Translated images

The interpolation tasks in the previous image experiments do not exhibit translation equivariance since the input range is fixed and the image content is centered on the canvas. To run an image experiment with translation equivariance, we converted the 16 × 16 MNIST images into toruses and applied random translations to move image content around. The translations do not change the relative differences between image pixels on the torus, but when the torus is viewed as an image, both the absolute pixel locations and relative differences between pixel locations are transformed. This means that to capture the translation equivariance, we needed to calculate differences between pixel locations on the torus.

The experiments reported in this section compare models trained using either centered image data (Figure S4 (a)) or image data with random translations on the torus (Figure S6). We ran experiments with both RCNP (sta) that calculates the difference between pixel locations on the image canvas and RCNP (tor) that calculates the difference between pixel locations on the torus. The models trained with centered image data were evaluated with both centered and translated data while the models

(a)

(b)

N=2

N=40

N=100

Context

RCNP

ConvCNP

CNP

N=2

N=40

N=100

Context

RCNP

ConvCNP

CNP

7

口

trained with translated data were evaluated with translated data. The normalized log-likelihood scores are reported in Table S14.

The results in Table S14 (a) extend the results discussed in the previous section (Table S13 (a)). The results indicate that when the models are trained and tested with interpolation tasks generated based on centered image data, RCNP (sta) works better than RCNP (tor). We believe this is because the relative locations calculated based on pixel coordinates on the image canvas are more informative about the absolute location than relative locations calculated on the torus. In other words, while RCNP (sta) and RCNP (tor) do not encode the absolute target location on the image canvas, RCNP (sta) can learn to derive equivalent information based on regularities between context sets.

The image interpolation task becomes translation equivariant on the torus when the models are trained or tested using the image data with random translations. The results reported in Table S14 (b) indicate that using differences calculated on the torus allows RCNP (tor) to generalize between centered and translated images while the other models are not able to make sensible predictions in this OOID task. All models work well when trained with matched data (Table S14 (c)), meaning that training on image data with random translations allows the other models to learn the equivariance which is encoded in RCNP (tor). The best results in Table S14 (c) are observed with ConvCNP, while RCNP (tor) and RCNP (sta) are similar to CNP when N = 2 and better than CNP when more context data is available.

H.3.4 Computation time

The models were trained on a single GPU, and each training run with RCNP took around 3-4 hours, each training run with CNP around 1-2 hours, and each training run with ConvCNP around 4.5-5.5 hours depending on the training data. The results presented in this supplement required 110 training runs with total runtime around 350 hours. In addition other experiments carried out with image data took around 2000 hours.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper is an extension of the conditional neural process. The primary contribution is to augment the conditional neural process with the relational structure. The developed model was examined in synthetic regression, Bayesian optimization, Lotka-Volterra simulation, and others.\n\nSTRENGTHS:\n1. This paper is complete in organization and easy to understand.\n2. The relational inductive biases mentioned in this work are crucial in some scenarios but were already studied in previous NP related work (See weakness).\n\nWEAKNESSES:\n**1. Unclear Motivation.** The motivation for using relational inductive biases is not well clarified in the Introduction section, e.g., in which scenarios or datasets the relational information is required. Meanwhile, I am not sure of the definition of relational in this work, and it seems the concept is similar to that in Set Transformer .\n\n**2. Lack of Novelty.** The novelty of this work seems relatively limited. There have been extensive works to incorporate equivariance into neural process models, such as work in [1-4]. As for the use of relational inductive bias, especially when the input/output are high dimensional, this has appeared in work [5].\n\n**3. Incomplete Analysis.** In Table (1)/(2), the kl divergences are reported, but I did not find what it means in the results. Notably, most empirical analysis claims the proposed model outperforms others, but the reasons behind these observations, e.g., what kind of equivariance matters, are unclear.\n\n**4. Missing benchmarks and baselines.** Images naturally hold translation equivariance/invariance properties and are more appropriate for evaluation. This work fails to compare with other equivariant (C)NPs [1-4].\n\n \n**5.** The contribution and the organization of the paper are mixed in Line 49-Line 56.\n\n**References:**\n\n[1] Kawano, M., Kumagai, W., Sannai, A., Iwasawa, Y., & Matsuo, Y. (2021). Group equivariant conditional neural processes. arXiv preprint arXiv:2102.08759.\n\n[2] Holderrieth, P., Hutchinson, M. J., & Teh, Y. W. (2021, July). Equivariant learning of stochastic fields: Gaussian processes and steerable conditional neural processes. In International Conference on Machine Learning (pp. 4297-4307). PMLR.\n\n[3] Markou, S., Requeima, J., Bruinsma, W., Vaughan, A., & Turner, R. E. (2021, October). Practical Conditional Neural Process Via Tractable Dependent Predictions. In International Conference on Learning Representations.\n\n[4] Foong, A., Bruinsma, W., Gordon, J., Dubois, Y., Requeima, J., & Turner, R. (2020). Meta-learning stationary stochastic process prediction with convolutional neural processes. Advances in Neural Information Processing Systems, 33, 8284-8295.\n\n[5] Wang, Q., & Van Hoof, H. (2022, June). Model-based meta reinforcement learning using graph structured surrogate models and amortized policy search. In International Conference on Machine Learning (pp. 23055-23077). PMLR.\n\nQUESTIONS:\nNo.\n\nLIMITATIONS:\nLimitations are highlighted in Section 7. Here it seems that the runtime complexity of predictive distributions is higher than that of Gaussian processes, which is quadratic w.r.t. the number of data points. Remember that one of the motivations in CNPs or NP-like models is the reduction of runtime complexity.\nOther limitations are included in the weakness section.\nThe definition of equivariance is incorrect.\nSome missing citations [1-5].", "TITLE": "Official Review", "RECOMMENDATION": 2, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 1, "DATE": "2023-07-02"}

comments: SUMMARY:
This work introduces a new member of the neural process model family that is designed for biasing the model towards representing equivariances in the data. It does this by including relational information among the context set, and between the predicted and context inputs in the encoder for a new input. Also, only the relational information is used for encoding and the absolute information is discarded. Experiments are given for a several types of equivariances/applications to show the method successfully models equivariances in the data.

STRENGTHS:
Simple but effective technical idea with convincing experiments. For instance, I found Figure 1 very illuminating. The work shows promise for scaling GP-like models (or rather, emulating GP kernels) for distributions over functions to large data/dimensions.

WEAKNESSES:
The full RCNP variant has tractability issues, although it is shown that the simpler RCNP using the diagonal elements of the relational matrix performs satisfactorily.

Equivariances other than translations and rigid transformations, and other variants of CNP are left to future work. Would it not be too much effort to examine a few of them in this paper?

QUESTIONS:
Rather than inputting the full unweighted relational matrix to the embedding, would it be possible to learn which pairs of context set input/outputs and the value of their comparison function to attend to? In addition to weighting pairs of data points, some variant of attention could help break the quadratic scaling.

What is the cause of the jagged mean line for RCNP in Figure 1 (b), (e) relative to CNP and GPs?

LIMITATIONS:
An honest assessment of the limitations is given in Section 7, including the point that the full RCNP model has quadratic scaling.
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 4
DATE: 2023-07-07

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper presents a novel approach for incorporating equivariance into conditional neural processes (CNPs) which can scale to high dimensions. Modelling equivariance is essential to improve the performance of CNPs. Unlike previous approaches that use convolution and become impractical with increased input dimensions, this work uses relational information and discards absolute information. As a result, this simple method can handle high-dimensional inputs. The authors also prove that their approach is context preserving which means they do not lose other information. Their empirical results demonstrate that the proposed method is comparable to convolutional CNPs, GNPs etc. on a diversified range of tasks.\n\nSTRENGTHS:\n**Strengths**\n\n1. This paper addresses the challenge of incorporating equivariance into Conditional Neural Processes (CNPs) for high-dimensional problems. The proposed models are shown to be translation-equivariant, allowing them to scale to higher dimensions and are comparable/outperform existing CNP and GNP models on a wide range of tasks.\n2. The paper is well-structured and clearly presented, with a strong motivation for the research, precise technical statements, and comprehensive background. \n3. The paper provides robust theoretical results, all of which are supported by proof. The empirical investigation is extensive, covering a diversified range of tasks. The authors demonstrate the effectiveness of their models through experiments on synthetic Gaussian and non-Gaussian regression tasks, Bayesian optimization, Lotka-Volterra models and reaction-diffusion models.\n\nWEAKNESSES:\n**Weakness**\n\nGiven the extensive use of RGNP in the experiments and its significant role in the paper's findings, it would still be beneficial for the authors to provide a concise description or a mathematical formulation of the RGNP in the main text. Even though it is not difficult to extend the mathematical description of RCNP to RGNP.\n\nQUESTIONS:\n**Questions**\n\n1. I wonder if there is a middle ground between the full RCNP and the diagonal RCNP. In the matrix terminology, it is a bit similar to a low-rank approximation of the full comparison set. I think this would allow people to balance computational cost and expressivity. Also by only comparing only to a subset of K \"important\" context points, we can lower the cost to O(NK) rather than the quadratic cost of the full RCNP.\n2. By only using pairwise comparison in the model construction, I wonder whether we would lose high-order interaction which involves more than two context points.\n\nLIMITATIONS:\nThe authors have discussed the limitations of their work and I have no concerns of any potential negative societal impact.", "TITLE": "Official Review", "RECOMMENDATION": 8, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-09"}

comments: SUMMARY:
The authors propose a class of neural processes that can be constructed to enforce invariance to particular properties like translation and rotation.

STRENGTHS:
- As far as I know, the proposed architecture and technique for enforcing invariances in Section 3 is novel.
- Improvements are shown over standard neural processes on a range of tasks
- The authors show both theoretically and empirically that the proposed architecture does indeed enforce the invariances described.

WEAKNESSES:
- Choosing $g$ in Eq 5 to enforce a particular invariance seems difficult. The authors provide choices that enforce isotropy and translation invariance, but it would not be obvious how to enforce a different type of invariance.

QUESTIONS:
See weaknesses

LIMITATIONS:
Limitations are adequately addressed
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2023-07-11