Practical Equivariances via Relational Conditional Neural Processes

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.

Paper

Similar papers

Peer review

Reviewer bQ2F2/10 · confidence 4/52023-07-02

Summary

This 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.

Strengths

1. This paper is complete in organization and easy to understand. 2. The relational inductive biases mentioned in this work are crucial in some scenarios but were already studied in previous NP related work (See weakness).

Weaknesses

**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 . **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]. **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. **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]. **5.** The contribution and the organization of the paper are mixed in Line 49-Line 56. **References:** [1] Kawano, M., Kumagai, W., Sannai, A., Iwasawa, Y., & Matsuo, Y. (2021). Group equivariant conditional neural processes. arXiv preprint arXiv:2102.08759. [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. [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. [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. [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.

Questions

No.

Rating

2: Strong Reject: For instance, a paper with major technical flaws, and/or poor evaluation, limited impact, poor reproducibility and mostly unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

1 poor

Presentation

2 fair

Contribution

1 poor

Limitations

Limitations 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. Other limitations are included in the weakness section. The definition of equivariance is incorrect. Some missing citations [1-5].

Reviewer jSJf7/10 · confidence 5/52023-07-07

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?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.

Soundness

4 excellent

Presentation

4 excellent

Contribution

3 good

Limitations

An honest assessment of the limitations is given in Section 7, including the point that the full RCNP model has quadratic scaling.

Reviewer N64F8/10 · confidence 4/52023-07-09

Summary

The 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.

Strengths

**Strengths** 1. 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. 2. The paper is well-structured and clearly presented, with a strong motivation for the research, precise technical statements, and comprehensive background. 3. 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.

Weaknesses

**Weakness** Given 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.

Questions

**Questions** 1. 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. 2. 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.

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

4: You are confident in your assessment, but not absolutely certain. It is unlikely, but not impossible, that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work.

Soundness

4 excellent

Presentation

3 good

Contribution

4 excellent

Limitations

The authors have discussed the limitations of their work and I have no concerns of any potential negative societal impact.

Reviewer C6E46/10 · confidence 3/52023-07-11

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

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Limitations are adequately addressed

Reviewer N64F2023-08-10

Thanks for the detailed response. My questions have been addressed and I strongly support the acceptance of this paper.

Reviewer bQ2F2023-08-11

Major Concerns Still Exist and Keep Scores

Thank the author for the detailed feedback. After reading the review, I tend to keep my score since major concerns still exist, and I will explain them as follows. ***1. Set Transformer & Contributions & Novelty (Major Concern)*** Note that (1) the author claimed "**the Set Transformer was used to achieve invariance together with a comparison function g, however, this work didn’t cite the Set Transformer at all**". As this is a core module in learning invariance and equivariance, this cannot be ignored and the contribution should be clarified in practice. (2) the Set Transformer can learn the equivariant map, while **the model structure of this work resembles too much on that**. (3) The exact equivariance is a bit vague in descriptions. Meanwhile I disagree that previous equivariant CNP work cannot scale with input dimension since the embedding function can be applied to high dimensional input. (4) Since the introduced modules are marginal w.r.t. the Set Transformer, I still doubt the novelty. ***2. Incomplete Analysis*** In the rebuttal, the author claimed >if our method works better, it is because encoding that equivariance is useful. (1) I didn’t see the logics of this discussion. There exist many factors to explain the increased performance, including neural architectures (particularly set transformer), model complexity and etc. (2) the meaning of kl divergence in table (1)/(2) is still not well discussed. ***3. High Runtime Complexity in Testing (Major Concern)*** (1) In Appendix Line 225-227, the proposed method runtime complexity is $\mathcal{O}(MN^2)$, while the runtime complexity for CNPs is $\mathcal{O}(N+M)$ in prediction. **Note that one motivation for developing CNPs is to reduce the inference complexity of Gaussian processes. ** (2) Considering the same runtime complexity, we cannot directly apply the Gaussian process with equivariant kernels to solve the problem, which should be more accurate in capturing equivariance. So what is the benefit of high runtime complexity in this work? ***4. Still Wrong Definition of Equivariance in Line72 Eq. (3)*** Note that the output in Eq. (3) is after the $r$’s transformation; however, there is no equivariant operation w.r.t. the $r$’s output. This violates the definition of equivariance. Also, this is not the standard definition of the ConvCNP paper.

Authorsrebuttal2023-08-11

Our Further Clarifications to Major Misunderstandings

Thank you for your detailed response, to which we respond below. **1a. Set Transformer (Major Misunderstanding)** We apologize for a truly unfortunate typo in our rebuttal (not our paper), which likely emerged while trimming our response. We meant to say "We use **Deep Sets** to achieve invariance to permutations of the context set (see line 128)." The citation in line 128 is the DeepSets paper. **We do not use Set Transformer.** This can be verified by checking our code submitted in the Supplement. Set Transformers differ from DeepSets in that they add an attention mechanism which *learns* interactions between elements of the set. **Our method does not use attention.** Instead, we encode an *exact equivariance* via the comparison function $g$. Notably, this is an orthogonal point. $g$ can likely be applied with Set Transformers (instead of DeepSets) to augment our approach with attention, while at the same time encoding exact equivariances from the start. However, departing from the DeepSet architecture (as mentioned also by you later) would confuse our contribution and muddle the comparison with prior CNP work on exact equivariances, based on (Conv)DeepSets. Thank you for raising this point, which we will add to Related Works and Discussion, with references to the Set Transformer (Lee et al., 2019) and Transformer Neural Processes (Nguyen & Grover, 2022). Apologies for not having included these references before – while they do not deal with exact equivariances, they should definitely be discussed. **1b. Learning Equivariances vs. Implementing Exact Equivariances (Major Misunderstanding)** Overall, the crux seems to be a difference in views between "learning (approximate) equivariances" and "building exact equivariances in the network architecture". Our method does the latter. We stand by our statement that no existing method is able to incorporate *exact* equivariances in the CNP architecture from the start (e.g., like CNNs incorporate exact translational equivariance), in a way which scales well with input dimension. We believe that there is a fundamental conceptual difference between learning approximate equivariances and incorporating specific exact biases directly in the network architecture. Incidentally, the two approaches are not opposed; we could likely incorporate some exact equivariances and let the network learn others. **2. Analysis** **We do not use Set Transformers.** Our architecture is based on DeepSets and a fixed comparison function $g$. We aimed to keep a similar complexity between different networks in terms of e.g. number of parameters. We are happy to answer more specific questions about the analysis. The KL is computed, when possible, between the predictive map of the CNP $p(Y^*| X^*; X, Y)$ and the ground-truth posterior predictive map from the GP. We will include a clear definition, apologies that it was not explained before. This metric was used by e.g. Bruinsma et al. (2023). **3. Runtime Complexity in Testing** First, please note that the complexity for the diagonal RCNP (which, as we proved both in theory and practice, is *exact* for translational equivariance) is only $O(MN)$. This is worth considering given that translational equivariance is such an important property and plenty of CNP work on exact equivariances focuses *exclusively* on that (e.g., ConvCNP, Gordon et al. 2020; ConvGNP, Markou et al., 2022; FullConvGNP, Bruinsma et al., 2020). In practice, diagonal RCNPs can be *faster* at runtime than ConvCNP, their direct counterpart (see Table S1). Second, CNPs are amortized while GPs are not. So even if the asymptotic complexity of FullRCNP is $O(N^2M)$, due to lack of amortization, GPs will need to be trained, which is $O(N^3)$. In many applications, the model receives data sequentially (e.g., BayesOpt), which means that the cost of GP training is applied repeatedly. **4. Definition of Equivariance is Correct** Please note that we are defining equivariance of the *prediction map*. Since a prediction map fully depends on its representation $r$, *we can define equivariance of the prediction map based on properties of $r$* (i.e., invariance), there is no contradiction. We will clarify this in the paper. Our condensed proof is: The standard definition of equivariance for a generic mapping is $$\tau F_Z = F_{\tau Z}$$ Starting from the definitions of the ConvCNP paper (Property 2, Gordon et al., 2019): $$\tau(X,Y) = (\tau X, Y), \qquad \tau f(X) = f(\tau^{-1} X)$$ We apply the defs. above to a prediction map, seen as the function that takes as input the context set $(X, Y)$ and outputs a function that takes as input the target set $X^*$: $$P_{\tau(X,Y)} = \tau P_{(X,Y)} \Leftrightarrow \forall X^*, \ p(\cdot \mid r((\tau X,Y), X^*))= p(\cdot \mid r((X,Y),\tau^{-1}X^*))$$ Applying $\tau^{-1}$ to each side: $$P_{\tau(X,Y)} = \tau P_{(X,Y)} \Leftrightarrow \forall X^*, r((X,Y),X^*) = r((\tau X,Y),\tau X^*)$$ which is our definition (Eq. 3).

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC