Spectral Transformer Neural Processes
XIANHE CHEN, Hao Chen, Yingzhen Li
NeurIPS 2026
TL;DR. STNPs augment Transformer Neural Processes with context-adaptive spectral features, inducing a spectral-mixture-kernel bias for better modelling of periodic and quasi-periodic data.
Abstract. Time series, spatial data, and images are natural applications of Neural Processes. However, when such data exhibit strong periodicity and quasi-periodicity, existing methods often suffer from underfitting and generalise poorly beyond the training distribution. In this work, we propose Spectral Transformer Neural Processes (STNPs), a frequency-aware extension of Transformer Neural Processes (TNPs). STNPs introduce a Spectral Aggregator that estimates an empirical context spectrum, compresses it into a spectral mixture, samples task-adaptive spectral features, and concatenates them with time-domain embeddings, thereby injecting a spectral-mixture-kernel bias into TNPs. This design reshapes the similarity geometry, allowing inputs that are distant in Euclidean space to remain close in an induced periodic manifold while enhancing time--frequency interactions. Extensive experiments on synthetic regression tasks, real-world time-series datasets, and an image dataset demonstrate that STNPs consistently improve predictive performance over existing baselines, extending Neural Processes beyond translation equivariance toward effective modelling of periodicity and quasi-periodicity.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:44 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The paper modifies transformers with a spectral aggregator which provides a spectral view of the context points in neural processes. This is useful for in context learning of periodic data which the authors demonstrate in their experiments. The approach is well designed (though possibly over-engineered?), and seems to provide good empirical performance. The over engineering concerns could be addressed by showing how sensitive the approach is to grid / mixture choices and providing ablations to isolate the value of each of the components. For the rebuttal, focus on this and addressing the reviewers questions around speed trade-offs (and whether similar performance can be achieved by just using larger transformers), failure modes and baselines.
Final justification
Reviewers were unanimous in recommending acceptance and the authors did a good job of addressing concerns during the rebuttal.
Read meta-review
Meta-review
The paper modifies transformers with a spectral aggregator which provides a spectral view of the context points in neural processes. This is useful for in context learning of periodic data which the authors demonstrate in their experiments. The approach is well designed (though possibly over-engineered?), and seems to provide good empirical performance. The over engineering concerns could be addressed by showing how sensitive the approach is to grid / mixture choices and providing ablations to isolate the value of each of the components. For the rebuttal, focus on this and addressing the reviewers questions around speed trade-offs (and whether similar performance can be achieved by just using larger transformers), failure modes and baselines.
Final justification
Reviewers were unanimous in recommending acceptance and the authors did a good job of addressing concerns during the rebuttal.
2 comments
Post-Discussion Summary
Dear Area Chair 1Gk5,
We sincerely thank you and the reviewers for the constructive engagement throughout the discussion period, which has helped us further improve the paper. We believe that the major concerns have now been addressed, and the reviewers' closing comments suggest that our responses have satisfactorily addressed their concerns. We would like to provide a brief recap of how we addressed these concerns.
We addressed: (i) the concern regarding possible over-engineering through component ablations, grid and mixture sensitivity analyses, practical hyperparameter guidance, and an amortised-GMM interpretation of our method; (ii) concerns regarding computational trade-offs and model capacity through runtime and memory profiling, together with a scaling study of TNPs ranging from 0.25M to 2M parameters, showing that STNP retains complexity and that its performance cannot be matched simply by scaling the baseline models; and (iii) concerns regarding failure modes and baseline coverage by demonstrating that STNP remains competitive on non-periodic RBF and Matérn tasks, improves calibration over TNP, and compares favourably with an exact SM-GP baseline. We also confirmed that the NP baselines follow the standard TNP training protocol and that all forecasting baselines use the same official FEDformer protocol, making their results directly comparable.
Beyond these major concerns, we addressed several reviewer-specific questions. Reviewer 1 asked whether STNP can represent multiple periodic components at different scales. We clarified that the existing periodic-GP and sawtooth benchmarks already contain multiple harmonics spanning broad frequency ranges. Reviewer 2 asked about the scope of the theoretical claims and the omission of related work. In the revised paper, we will clearly distinguish the feature-level theoretical results from the model-level properties of STNP and expand the discussion of the relevant literature. We also identified and corrected two transcription errors in Table 1. Reviewer 3 raised several implementation questions, for which we provided detailed explanations.
The reviewers' assessments are reflected in their closing comments:
Reviewer 1: "All raised weaknesses have been adequately addressed with concrete evidence."
Reviewer 2: "Given the overall strength of the paper and the thorough rebuttal, I am satisfied with the response and will increase my score."
Reviewer 3: "I am generally satisfactory with the authors' helpful rebuttal which addresses most of my clarification questions."
We are very grateful to you and the reviewers for carefully reading our manuscript and for guiding us to focus on the central concerns. Your active engagement throughout the discussion period has substantially improved the paper.
If the paper is accepted, we will revise the manuscript to: (i) include the hyperparameter recommendations and computational-overhead results; (ii) clarify that we use the same evaluation protocols as TNP and FEDformer, and add the SM-GP and calibration results; (iii) more clearly distinguish the feature-level theoretical results from the model-level properties of STNP and expand the related-work discussion; and (iv) correct the two transcription errors in Table 1.
Corrected Table 1: Target log-likelihood on the synthetic benchmarks (higher is better). The corrected entries are shown in bold.
| Task | NP | CNP | ANP | CANP | BNP | BANP | ConvCNP | SConvCNP | TNP | TETNP | Ours |
|---|---|---|---|---|---|---|---|---|---|---|---|
| RBF | |||||||||||
| Matérn | |||||||||||
| Sawtooth | |||||||||||
| Periodic |
We respectfully hope that this recap will be helpful in your final assessment. Thank you again for your time, careful consideration, and constructive guidance.
Sincerely,
The Authors
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The author(s) proposed Spectral Transformer Neural Processes (STNP). The main idea is to augment Transformer Neural Processes with a context-dependent spectral embedding. They estimate frequency information from the context set by compressing the empirical spectrum in terms of a spectral mixture and using sampled Fourier features along with the conventional token embeddings. This later is fed into the TNP backbone. Doing it this way enables the model adapt to periodic inductive bias. In Section 3.2, the nice property is presented to support the method foundation. The model was evaluated in several experiments on synthetic regression, image completion, traffic, forecasting, and Chimet climate data.
Strengths and weaknesses
Couple of strengths I can observe:
-
The motivation is clear: TNPs lack an explicit mechanism for periodic or quasi-periodic structure.
-
The spectral embedding is well justified through its connection to spectral mixture kernels from the theory they proposed.
-
The experiments cover a reasonably broad range of synthetic and real-world tasks.
Several weaknesses:
-
Perhaps the author(s) could give clearer guidance on choosing spectral hyperparameters, especially the frequency grid, period range, number of mixture components, and samples per component. I can see that they made choices in experiments, but a guidance will benefit other researchers.
-
Would it be a good idea to provide certain sensitivity analysis across datasets. This strengthens showing how robust the method is to spectral design choices.
-
The method is more complex than TNP, and the practical cost/benefit trade-off is not fully explored.
Questions
Couple of questions (to assist my understanding):
-
In Section 3.1, is the fixed frequency grid learned during training, or fully specified as hyperparameters?
-
For the scalar case in Eq. (2), should C_in = 4, or are there additional channels used in the implementation?
-
In Eq. (4), how is numerical stability handled when a component weight is very small?
-
Is the sampled frequency redrawn at every forward pass, or fixed after being sampled once for a context set?
-
In the forecasting experiments, what exactly are and , and how are context and target sets constructed from a sliding window? particularly when etc are in multiple channels.
-
Which experiments use phase shifts , and which set ?
Limitations
Some limitations, such as choosing the frequency grid and component/sample allocation, were mentioned in the paper. However, I think this could be expanded with more discussion on hyperparameter sensitivity and computational overhead.
Final justification
The authors provided a helpful rebuttal that addressed my main concerns. They clarified the spectral hyperparameter choices, sensitivity analysis, computational overhead, frequency-grid construction, numerical stability, resampling strategy, and the forecasting setup. These responses make the method’s practical use and implementation clearer.
While I still encourage the authors to incorporate these clarifications into the final paper, the rebuttal improves my confidence in the method and its empirical support. I am therefore increasing my rating to 5.
Formatting concerns
Nil
3 comments
Rebuttal
We thank you for recognising the clear motivation of our work and look forward to having further discussions with you! We address your concerns below.
Weakness 1: Perhaps the author(s) could give clearer guidance on choosing spectral hyperparameters, especially the frequency grid, period range, number of mixture components, and samples per component. I can see that they made choices in experiments, but a guidance will benefit other researchers.
ANSWER: Thank you for raising this practical issue. Prior work on spectral mixture kernels suggests using a moderate, mildly over-complete number of components: is a common practical choice, while typically only approximately 5–7 components receive substantial weight [1,2]. Too small a may under-represent a multimodal spectrum, whereas an excessively large can complicate optimization and reduce performance [2].
instead controls the number of sampled frequencies per component. Owing to the normalization ,
so increasing does not amplify the component; it represents the same spectral mass using more sampled frequency bases. Jung et al. [3] evaluate and observe generally smoother optimisation trajectories as increases, with much of the benefit already obtained by , suggesting diminishing returns. Together with our ablation in Appendix A.6, Table 10, these results support and as a practical starting point.
[1] Wilson et al. "Gaussian process kernels for pattern discovery and extrapolation." International Conference on Machine Learning. PMLR, 2013.
[2] Chen et al. "Gaussian processes with skewed Laplace spectral mixture kernels for long-term forecasting." Machine Learning 110, 2213–2238 (2021).
[3] Jung et al. "Approximate inference for spectral mixture kernel." arXiv preprint arXiv:2006.07036 (2020).
Weakness 2: Would it be a good idea to provide certain sensitivity analysis across datasets. This strengthens showing how robust the method is to spectral design choices.
ANSWER: Thank you for this suggestion. Appendix A.6, Table 10 already examines under a fixed budget , grid sizes , and CNN versus FFN responsibility networks across three context regimes. The results favor moderate allocations, show that is sufficient without monotonic gains from larger grids, and consistently support the frequency-local CNN, especially under sparse contexts.
Weakness 3: The method is more complex than TNP, and the practical cost/benefit trade-off is not fully explored.
ANSWER: We would like to offer another perspective on our model. STNP can be viewed as augmenting the TNP backbone with a two-stage task-conditioned spectral inference module. The first stage is analogous to a classical DFT-style spectral estimator, but it operates on sparsely and irregularly located context points. The second stage is analogous to fitting a Gaussian mixture model to the resulting empirical spectrum, yet it does not require a separate per-task Expectation-Maximization procedure. Instead, the spectral decomposition is amortized by the neural network.
The ablation results in Appendix A.6, Table 10 support this two-stage interpretation:
| Category | Variant | |||
|---|---|---|---|---|
| Full model | STNP (ours) | 0.63 | 1.02 | 1.14 |
| Embedding parameterization | -0.36 | -0.35 | -0.35 | |
| 0.10 | 0.21 | 0.29 | ||
| 0.46 | 0.60 | 0.71 | ||
| Responsibility network | CNN (ours) | 0.63 | 1.02 | 1.14 |
| FFN | 0.05 | 0.67 | 0.81 |
Fixed Fourier features, which do not infer a task-specific spectrum, remain near the TNP failure level. Using the context-dependent discrete spectrum improves performance, confirming the value of spectral extraction, while direct spectral sampling improves it further. The full STNP performs best, showing the additional benefit of organising discrete spectral evidence into continuous components . The CNN–FFN ablation further indicates that exploiting local structure along the frequency axis is important, especially under sparse contexts.
We profiled TNP and STNP on both a synthetic GP task and the larger DTD benchmark; the table reports STNP/TNP ratios. The relative overhead decreases as the sequence grows because the TNP backbone increasingly dominates. Thus, STNP preserves TNP's asymptotic complexity while incurring a modest finite-size overhead in return for the substantial predictive gains reported in the paper.
| Benchmark | Training time | Inference time | Training peak memory | Inference peak memory |
|---|---|---|---|---|
| Synthetic GP, | ||||
| DTD, |
Question 1: In Section 3.1, is the fixed frequency grid learned during training, or fully specified as hyperparameters?
ANSWER: The fixed frequency grid is fully specified through hyperparameters and is not learned during training.
Question 2: For the scalar case in Eq. (2), should , or are there additional channels used in the implementation?
ANSWER: Yes. For the scalar case in Eq. (2), , and no additional channels are used in our implementation.
Question 3: In Eq. (4), how is numerical stability handled when a component weight is very small?
ANSWER: In our implementation, we add a small constant to the denominator when computing both the mean and variance in Eq. (4):
This prevents division by zero and avoids excessively large numerical values when is very small.
Question 4: Is the sampled frequency redrawn at every forward pass, or fixed after being sampled once for a context set?
ANSWER: The frequencies are resampled at every forward pass, conditioned on the current context set, rather than being sampled once and then fixed. This adaptive, context-conditioned sampling helps STNP infer task-specific periodic structure more effectively: the spectral representation is dynamically instantiated from the current context instead of being a fixed frequency matrix.
Question 5: In the forecasting experiments, what exactly are and , and how are context and target sets constructed from a sliding window? Particularly when , etc. are in multiple channels.
ANSWER: Following the Autoformer/FEDformer forecasting pipeline, we define the input associated with timestamp as
where is the scalar temporal coordinate, measured in hours, days, or weeks depending on the dataset, and contains deterministic calendar covariates derived from the same timestamp, such as month, day, weekday, hour, and minute. Thus, the additional dimensions of are timestamp features rather than separate temporal axes. The corresponding output is
which contains all variables observed at that timestamp.
For a sliding window beginning at index , with look-back length and forecasting horizon , we construct
Therefore, the first consecutive timestamps form the context set, and the immediately following timestamps form the target set. In a multivariate dataset, the episode still contains context points and target points, but each output is a -dimensional vector. The output channels are not flattened into separate context or target points.
Importantly, although may be multidimensional, the STNP spectral branch is applied only to the scalar temporal coordinate:
The complete token embedding is then
Question 6: Which experiments use phase shifts , and which set ?
ANSWER: For the results currently reported in the paper, we use . We also conducted experiments both with and without phase shifts on synthetic and time-series datasets and observed only small performance differences between the two settings. One possible explanation is that a phase shift corresponds to a rotation of the two-dimensional Fourier feature:
Since is an orthogonal rotation, it preserves the norm and inner products of this paired Fourier feature. Thus, introducing a phase shift does not by itself remove this information, which may partly explain the relatively small performance difference observed in our experiments. However, because this rotation depends on the context set, it cannot in general be absorbed into one fixed downstream projection and may affect optimisation and finite-sample performance.
Thanks
I am generally satisfactory with the authors' helpful rebuttal which addresses most of my clarification questions. In particular, they clarified that the frequency grid is fixed by hyperparameters, the scalar implementation uses , numerical stability is handled with a small denominator constant, frequencies are resampled at each forward pass, and the forecasting setup applies the spectral branch only to the scalar temporal coordinate. The additional discussion on spectral hyperparameter choices, sensitivity, and computational overhead is also useful. However, some practical concerns remain, especially that the guidance and cost-benefit discussion should be made clearer in the main paper. Hope this can be consolidated in the final version. Overall, the rebuttal strengthens my confidence, and I am also happy to increase my rating.
Thank you very much for your feedback
Thank you very much for your thoughtful follow-up and for your positive assessment of our rebuttal. We greatly appreciate your willingness to increase the rating. We agree that the practical guidance and cost–benefit discussion should be made more prominent. In the revised manuscript, we will consolidate the spectral hyperparameter recommendations, sensitivity findings, and computational overhead analysis in the main paper to make these practical considerations clearer. Thank you again for your constructive feedback, which has helped us improve the presentation of the work.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper proposes a new type of Transformer neural process, which augments TNPs with a spectral feature extractor. The method estimates a rough empirical spectrum from the context set, compresses it into a spectral mixture, samples task-adaptive Fourier features, and concatenates them with the standard TNP embeddings. The goal is to make TNPs better at periodic regression. The experiments include synthetic periodic/sawtooth tasks, image completion, time-series imputation, and forecasting experiments.
Strengths and weaknesses
Strengths
- I like the main idea: the paper identifies a real weakness of standard TNPs on periodic structure, and the proposed method is clean and effective.
- The writing is clear, and the method is also easy to understand at a high level: estimate task-specific frequencies from the context, turn them into Fourier features, and let the TNP use them in its representation.
- The experiment set is quite comprehensive. The gains on synthetic periodic and sawtooth tasks are especially clear, and the ablations help show that the spectral aggregator is doing more than simply adding fixed Fourier features.
Weaknesses
- I think the main theoretical claim is a bit stronger than what is actually shown. The SM-kernel result applies to the raw spectral feature inner product, while the actual model concats these features with an MLP, projects them, and then applies learned query/key maps. Thus the kernel interpretation is a useful motivation, but not a strict characterization of the attention similarity used by the final model.
- The method also relies on several spectral design choices, such as the frequency grid, period range, number of mixture components, and samples per component. The paper gives useful ablations, but it would still be helpful to better understand how robust the method is when the relevant period range is unknown or misspecified.
- The related work is missing a few closely related papers [1-3].
[1] Huang et al. "Practical equivariances via relational conditional neural processes." NeurIPS 2023.
[2] Ashman et al. "Approximately equivariant neural processes." NeurIPS 2024.
[3] Zhen et al. "Learning to learn kernels with variational random features." ICML 2020.
Questions
- Does the performance gap between STNP and TNP remain if TNP is scaled up? More generally, do the gains shrink as the base TNP becomes larger?
- Why does TNP collapse so severely on periodic and sawtooth? It is worse than CNP on sawtooth, and worse than ANP/BNP on periodic. I checked the original TNP paper [4] and the TNP-KR paper [5], it seems the conclusion is the opposite. Do you follow the standard way to train the model?
- How sensitive are the main results to the frequency-grid period range, which appears to be set per-dataset?
[4] Nguyen et al. "Transformer neural processes: Uncertainty-aware meta learning via sequence modeling." ICML 2022.
[5] Jenson et al. "Transformer Neural Processes-Kernel Regression." arXiv preprint 2024.
Limitations
Yes
Final justification
The rebuttal satisfactorily addressed my main concerns, including the scope of the theoretical claims, robustness to scaling, and missing related work. The remaining issues are minor and mainly concern carefully verifying the corrected experimental results and ensuring consistent reporting in the final version; overall, I therefore support acceptance.
Formatting concerns
N/A
3 comments
Rebuttal
We sincerely appreciate your careful reading of the manuscript and the detailed recognition of its strengths, including the main idea, the clarity and effectiveness of our method, and the extensive experiments, and look forward to having further discussions with you! We address the concerns below.
Weakness 1: I think the main theoretical claim is a bit stronger than what is actually shown. The SM-kernel result applies to the raw spectral feature inner product, while the actual model concats these features with an MLP, projects them, and then applies learned query/key maps. Thus the kernel interpretation is a useful motivation, but not a strict characterization of the attention similarity used by the final model.
ANSWER: Thank you for pointing out this potential ambiguity and for your positive assessment of our motivation. We will revise the relevant sentences to make the scope of our claims more precise and explicit. Proposition 3.1, Corollary 3.2, and Proposition 3.3 concern the raw spectral feature map and its induced inner product, rather than the complete STNP model. We will clearly distinguish these feature-level results from the model-level properties of STNP in the revised paper.
Weakness 2: The method also relies on several spectral design choices, such as the frequency grid, period range, number of mixture components, and samples per component. The paper gives useful ablations, but it would still be helpful to better understand how robust the method is when the relevant period range is unknown or misspecified.
Question 3: How sensitive are the main results to the frequency-grid period range, which appears to be set per-dataset?
ANSWER: Thank you for raising this practical question. We would like to clarify that the frequency grid is an auxiliary set of candidate frequencies used to construct an empirical energy spectrum from the irregularly sampled context set; it is not a discrete set to which the final inferred frequencies are constrained.
For a context set , this operation can be understood schematically as evaluating a non-uniform Fourier-type energy score, for example
at each candidate frequency . The resulting empirical spectrum is subsequently processed to predict continuous spectral-mixture parameters . Therefore, the predicted frequencies are not restricted to the grid points. This differs from a standard DFT because the context locations are irregularly sampled across tasks.
In practice, we recommend using a conservatively broad range. Candidate frequencies unsupported by the context generally receive relatively low empirical energy and can be downweighted by the subsequent spectral decomposition. Thus, moderate over-coverage is usually preferable to excluding a relevant frequency.
Weakness 3: The related work is missing a few closely related papers [1–3].
[1] Huang et al. "Practical equivariances via relational conditional neural processes." NeurIPS 2023.
[2] Ashman et al. "Approximately equivariant neural processes." NeurIPS 2024.
[3] Zhen et al. "Learning to learn kernels with variational random features." ICML 2020.
ANSWER: Thank you for pointing out these closely related works. We will include and discuss them in the revised paper. [1] introduces Relational CNP, which impose exact equivariances through relational encodings based on pairwise comparisons and scale to higher-dimensional inputs without convolutional grids. [2] extends this direction to approximately equivariant NPs, using learnable fixed inputs to allow equivariant architectures to depart from exact symmetry in a data-driven manner. [3] proposes MetaVRF, which treats random Fourier bases as latent variables and uses variational meta-learning to infer task-adaptive spectral distributions for a kernel ridge regression base learner.
Question 1: Does the performance gap between STNP and TNP remain if TNP is scaled up? More generally, do the gains shrink as the base TNP becomes larger?
ANSWER: Thank you for this important question. We scaled TNP to 0.25M, 0.5M, 1M, and 2M parameters:
| Model | Target LL ↑ | RMSE ↓ | Predictive std | ECE ↓ |
|---|---|---|---|---|
| TNP 0.25M | -0.34772 | 0.48583 | 0.42063 | 0.05270 |
| TNP 0.5M | -0.34767 | 0.48581 | 0.42061 | 0.05268 |
| TNP 1M | -0.34767 | 0.48581 | 0.42058 | 0.05266 |
| TNP 2M | -0.34770 | 0.48584 | 0.42053 | 0.05277 |
Within the evaluated range, increasing the size of TNP does not improve its performance.
An intuitive comparison can be made with language models. A language model operates on a finite vocabulary: the same token appears repeatedly throughout training, allowing its embedding to accumulate stable and globally reusable semantic information. Formally, discrete tokens and continuous coordinates belong to fundamentally different input spaces:
Thus, in function meta-learning, an exact coordinate is rarely observed repeatedly, and the model cannot rely on repeated occurrences to learn a fixed meaning for each coordinate. Moreover, an absolute coordinate has no stable meaning across tasks: the same may correspond to a peak, a trough, or a different phase depending on the task-specific period and shift. The model must therefore generalise through geometric relations between coordinates. For a smooth non-periodic function, Euclidean locality is often an effective inductive bias; for a periodic function, locality remains useful but is insufficient:
The unknown period must itself be inferred from a sparse and irregular context set. A larger TNP provides more generic capacity, but its standard MLP embedding still requires the model to rediscover this periodic geometry from scratch for every task.
Question 2: Why does TNP collapse so severely on periodic and sawtooth? It is worse than CNP on sawtooth, and worse than ANP/BNP on periodic. I checked the original TNP paper [4] and the TNP-KR paper [5]; it seems the conclusion is the opposite. Do you follow the standard way to train the model?
[4] Nguyen et al. "Transformer neural processes: Uncertainty-aware meta learning via sequence modeling." ICML 2022.
[5] Jenson et al. "Transformer Neural Processes-Kernel Regression." arXiv preprint 2024.
ANSWER: Thank you for raising this important concern and for prompting us to re-examine the baseline results carefully. We follow the official BNP pipeline [6], which was subsequently adopted by [4] . TNP-KR [5], in contrast, uses a different experimental protocol. It samples periods from , corresponding to frequencies and only 2–8 cycles over . Our benchmark instead contains 8–40 cycles and uses the frequency range as in [4].
During this re-examination, we identified two transcription errors in the periodic row of Table 1. First, the reported ANP value was taken from the experiment, although Table 1 reports the setting. The correct target log-likelihood at is , rather than . Red curve in Appendix A.6, Figure 7 in the original submission has the right values. Second, the BNP entry was inadvertently copied from its context log-likelihood field; its correct target log-likelihood is . We will correct both values. These typos do not change our major experimental conclusions.
ANP performs better than TNP at and , but worse at and . BNP and TNP remain close. We provide the relevant context/target LL below.
| Model | ||||
|---|---|---|---|---|
| ANP | 1.2377 / -0.1806 | 1.1915 / -0.1916 | 0.8914 / -0.4473 | 0.8694 / -0.6533 |
| BNP | -0.3023 / -0.3719 | -0.2491 / -0.3942 | -0.3052 / -0.3635 | -0.2492 / -0.4094 |
| TNP | -0.3096 / -0.3614 | -0.3080 / -0.3480 | -0.3165 / -0.3479 | -0.3185 / -0.3462 |
We would also like to clarify that TNP is not worse than CNP on the sawtooth benchmark; both obtain .
The result in [4] is not opposite to ours. Its models are trained only on RBF-kernel GP tasks and then evaluated zero-shot on Matérn and periodic kernels. The paper reports poor log-likelihood on the periodic kernel (BNP performs best among all baselines in the zero-shot periodic setting). Our experiment instead asks whether the models can meta-learn a distribution of periodic functions when both the training and evaluation tasks are drawn from the periodic-kernel family.
The results reveal that ANP is highly sensitive to the context. To investigate this behaviour, we evaluated all four checkpoints on the same functions and targets using the same fixed set of 25 context points.
| Training regime | RMSE | Pred. std | RMSE/std | 90% cov. | 95% cov. | Decoder std | Latent std |
|---|---|---|---|---|---|---|---|
| 0.437 | 0.431 | 1.01 | 90.0% | 94.8% | 0.428 | 0.053 | |
| 0.449 | 0.436 | 1.03 | 89.0% | 94.0% | 0.435 | 0.041 | |
| 0.490 | 0.374 | 1.31 | 77.6% | 84.4% | 0.370 | 0.058 | |
| 0.533 | 0.313 | 1.70 | 67.2% | 74.8% | 0.310 | 0.045 |
The degradation is primarily an overconfidence and calibration failure, rather than evidence that additional context is intrinsically harmful.
[6] Lee et al. "Bootstrapping neural processes." NeurIPS 2020.
Thank you for the detailed response and the additional analyses. The clarifications on the scope of the theoretical results, the sensitivity to model scaling, and the missing related work address my main concerns. I also appreciate that the authors carefully re-examined the baseline results and identified the transcription errors in Table 1.
Given the overall strength of the paper and the thorough rebuttal, I am satisfied with the response and will increase my score. Since the re-examination revealed errors in the reported baseline values, I would encourage the authors to carefully audit all tables, figures, and corresponding descriptions before the final version, to ensure that the results are accurate and consistently reported.
Thank you very much for your feedback
Thank you very much for your positive feedback and raising the score. It truly helps us improve our work. We greatly appreciate your careful reading and constructive feedback throughout the review process. We will carefully audit all tables, figures, and corresponding descriptions for the final version. Thank you again for your positive assessment of our work.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 4/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
Problem Statement Neural Processes (NPs) are meta-learning models that map context sets to predictive distributions, enabling data-efficient learning with uncertainty quantification. However, existing NP variants struggle with periodic and quasi-periodic data - common in time series, spatial data, and images - because standard ReLU-MLP embeddings are piecewise-linear and cannot encode frequency-domain structure. This causes models to underfit periodic patterns and generalize poorly beyond the training distribution.
Setup The authors propose Spectral Transformer Neural Processes (STNPs), which augment Transformer Neural Processes (TNPs) with a Spectral Aggregator module. This module operates in four steps: (1) estimate an empirical discrete spectrum from context observations via cosine/sine projections onto a fixed frequency grid; (2) compress this high-dimensional spectrum into Q Gaussian mixture components using a CNN responsibility network that exploits local spectral continuity; (3) compute mixture weights, means, and variances through probabilistic aggregation; (4) sample task-adaptive frequencies from each component and construct spectral embeddings concatenated with standard MLP features. The theoretical foundation draws on Bochner's theorem, showing that the induced kernel matches a spectral-mixture kernel in expectation.
Experiment Design Evaluation spans synthetic GP regression (RBF, Matérn, Periodic kernels, Sawtooth functions), image completion on the DTD texture dataset, and seven real-world time-series benchmarks, including electricity, traffic, weather, and climate forecasting tasks. Baselines include NP, CNP, ANP, TNP, TETNP, ConvCNP, SConvCNP, and bootstrapping variants. Ablations isolate contributions of spectral estimation, compression, sampling, and the CNN architecture.
Key Contribution
- A principled spectral aggregator that injects task-adaptive periodic inductive biases into TNPs
- Theoretical proofs of translation equivariance, kernel stationarity, and validity as conditional stochastic processes
- Consistent empirical improvements across diverse periodic/quasi-periodic tasks
Findings STNP achieves 43-85% relative error reduction on real-world forecasting benchmarks and substantially outperforms baselines on periodic regression (log-likelihood of 1.12 vs 0.20 for TETNP). Ablations confirm that task-adaptive spectral estimation - not merely sinusoidal features - drives the gains, with the CNN responsibility network providing crucial local spectral aggregation. The method extends naturally to multi-dimensional inputs and multi-output settings while maintaining the same asymptotic complexity as standard TNPs.
Strengths and weaknesses
Strengths
- Well-Motivated Problem with Principled Solution
- The paper clearly identifies a fundamental limitation: standard TNP embeddings use ReLU-MLPs, which are piecewise-linear and cannot encode periodicity by construction. The proposed solution is grounded in Bochner's theorem, connecting stationary positive-definite kernels to spectral measures
- Strong Theoretical Contributions
- The theoretical development is rigorous and complete, Proposition 3.1 establishes translation equivariance of spectral features via block-diagonal rotation matrices. Proposition 3.3 shows the conditional kernel (in expectation over sampled frequencies) is stationary and matches a spectral-mixture kernel. Proposition 3.4 verifies STNPs define valid conditional stochastic processes via the Kolmogorov extension theorem.
- The proofs in Appendix A.5 are very detailed.
- Comprehensive and Diverse Experimental Evaluation
- Synthetic tasks: Four GP kernels (RBF, Matérn, Periodic) plus structured non-Gaussian benchmarks (Sawtooth)
- Image completion: DTD texture dataset with 2D spatial periodicity
- Real-world time series: Six-dataset general benchmark, along with California traffic flow and Chichester Harbour climate data.
- Systematic Ablation Studies
- The ablations in Section 4.4 and Appendix A.7 effectively isolate component contributions
Weakness
- Incomplete Computational Cost Analysis
- While Section A.4 proves the asymptotic complexity remains O(N²) (dominated by TNP backbone attention), the practical overhead of the spectral branch is not characterized, No wall-clock training/inference time comparisons, No GPU memory overhead measurements
- Significant Hyperparameter Sensitivity
- Table 10 reveals substantial sensitivity to the (Q, D₀) configuration. The paper acknowledges this as "an open and worthwhile direction" but provides no practical guidance. Given that real applications have unknown context budgets at deployment, this is a significant limitation.
- Limited Failure Mode Analysis
- Include experiments on non-periodic baselines (e.g., purely smooth GP functions) and analyze calibration metrics.
- Missing Relevant Comparisons
- No direct comparison with Gaussian processes using learned spectral mixture kernels [Wilson & Adams, 2013]
- FEDformer, Autoformer appear only in Table 15 as reference points
Questions
-
What is the wall-clock training time ratio of STNP vs TNP on the synthetic and real-world benchmarks?
-
How does STNP handle data with multiple periodic components at vastly different scales?
-
How do the predictive uncertainties from STNP compare to baselines in terms of calibration?
Limitations
This paper makes a great contribution to the neural processes literature by introducing a principled mechanism for incorporating frequency-domain inductive biases. The theoretical grounding via Bochner's theorem and spectral mixture kernels is elegant, and the experimental improvements are consistent and often substantial. The four-step Spectral Aggregator is well-designed, and the ablations convincingly demonstrate the value of each component.
The main weaknesses are practical rather than conceptual: missing computational cost analysis, significant hyperparameter sensitivity without guidance, and lack of failure mode characterization. These issues limit immediate applicability but do not undermine the core contribution.
Final justification
All raised weaknesses have been adequately addressed with concrete evidence. I am raising my score from Borderline Accept to Accept.
Formatting concerns
No
3 comments
Rebuttal
We would first of all like to thank you for the positive evaluation of the paper's motivation, originality, theoretical contributions, and experimental validation, and look forward to having further discussions with you! We now address the weaknesses and questions raised.
Weakness 1: While Section A.4 proves the asymptotic complexity remains (dominated by TNP backbone attention), the practical overhead of the spectral branch is not characterized. No wall-clock training/inference time comparisons and no GPU memory overhead measurements are provided.
Question 1: What is the wall-clock training time ratio of STNP vs. TNP on the synthetic and real-world benchmarks?
ANSWER: Thank you for raising this important practical consideration. We profiled TNP and STNP in both a smaller-context synthetic setting and a large-context real-world setting. All ratios below are STNP/TNP, so values above one denote the overhead of STNP.
| Benchmark | Training time | Inference time | Training peak memory | Inference peak memory |
|---|---|---|---|---|
| Synthetic GP, | ||||
| DTD, |
The substantially smaller relative overhead on DTD is consistent with our asymptotic analysis: at large sequence lengths, the shared quadratic attention computation constitutes a larger fraction of the total runtime.
Weakness 2: Table 10 reveals substantial sensitivity to the configuration. The paper acknowledges this as "an open and worthwhile direction" but provides no practical guidance. Given that real applications have unknown context budgets at deployment, this is a significant limitation.
ANSWER: Thank you for highlighting this concern. We will add practical guidance to the revised paper. The allocation of and has been studied experimentally in the literature on spectral mixture kernels and Gaussian processes. Prior work [1–3] suggests that is often a reasonable default. Experiments in [1–3] also indicate that approximately five to seven components often receive substantial weights. Meanwhile, [2] shows that an excessively large may degrade performance, whereas a very small may provide insufficient approximation capacity.
As for , increasing it does not increase the total energy of a component. For the -th component, the embedding is
Its squared norm is
Therefore, , independently of . Increasing neither amplifies the component nor increases its total weight. Instead, it distributes the same spectral mass over more randomly sampled frequency bases, yielding a finer and more stable random spectral representation.
Consistent with this interpretation, the experiments in [3] suggest that, as increases from to and then to , the training curves exhibit less stochastic fluctuation and tend to converge faster. The improvement from to appears more pronounced than that from to , which may indicate that the stability benefit of frequency sampling gradually saturates. Taken together, a potentially useful practical starting point is and . These observations are also broadly consistent with our ablation results for and in Appendix A.6, Table 10.
[1] Wilson et al. "Gaussian process kernels for pattern discovery and extrapolation." International Conference on Machine Learning. PMLR, 2013.
[2] Chen et al. "Gaussian processes with skewed Laplace spectral mixture kernels for long-term forecasting." Machine Learning 110, 2213–2238 (2021).
[3] Jung et al. "Approximate inference for spectral mixture kernel." arXiv preprint arXiv:2006.07036 (2020).
Weakness 3: Include experiments on non-periodic baselines (e.g., purely smooth GP functions) and analyze calibration metrics.
Question 3: How do the predictive uncertainties from STNP compare to baselines in terms of calibration?
ANSWER: Thank you for raising this point. We evaluated STNP on non-periodic smooth-GP tasks generated using RBF and Matérn kernels. The results are shown in Table 1. On both tasks, STNP performs similarly to or slightly better than the baselines. These results suggest that introducing the spectral representation does not degrade predictive performance when the data contain no periodic structure.
We also evaluated predictive calibration using expected calibration error (ECE; lower is better):
| Model | ECE error |
|---|---|
| NP | |
| ANP | |
| BANP | |
| BNP | |
| CANP | |
| CNP* | |
| TNP | |
| ConvCNP | |
| SConvCNP | |
| TETNP | |
| STNP |
STNP obtains the second-lowest ECE point estimate, close to ConvCNP and SConvCNP, while outperforming most of the remaining baselines in this comparison. Importantly, STNP reduces ECE by approximately % relative to its TNP backbone.
Weakness 4:
- No direct comparison with Gaussian processes using learned spectral mixture kernels [Wilson & Adams, 2013].
- FEDformer and Autoformer appear only in Table 15 as reference points.
ANSWER: We have implemented an exact GP with the spectral mixture kernel of Wilson et al. (2013). Both methods are evaluated on the same periodic benchmark.
| Method | Test-time fitting | Context LL (in-sample) | Target LL | Target RMSE | Predictive std |
|---|---|---|---|---|---|
| STNP | None | ||||
| Classic SM-GP | 4 restarts, 200 steps each |
The SM-GP obtains a moderately higher context score. However, this is an in-sample posterior-predictive score because the same context observations are used for hyperparameter fitting, posterior conditioning, and evaluation. On held-out targets, STNP outperforms SM-GP. These results show that the advantage of STNP is not explained by the absence of a learned spectral GP baseline. Under this sparse-context protocol, SM-GP can produce overly concentrated predictions.
There is also an important computational distinction. Although an exact SM-GP does not usually form the matrix inverse explicitly, each marginal-likelihood evaluation requires a Cholesky factorisation of the context covariance matrix, with time and memory.
We would like to clarify that the forecasting experiments were implemented using the official FEDformer benchmarking pipeline. Consequently, Autoformer, FEDformer, STNP, and the other compared models use the same data preprocessing, chronological train/validation/test splits, input and prediction lengths, normalisation procedure, and metric computation. Therefore, the Autoformer and FEDformer results are directly comparable with those of the models evaluated in this paper. We referred to them as "reference results" only to distinguish standard forecasting architectures from the NP-family baselines, rather than to indicate that they were evaluated under a different protocol.
Question 2: How does STNP handle data with multiple periodic components at vastly different scales?
ANSWER: Thank you for raising this question. We would like to clarify that our existing periodic-GP and sawtooth benchmarks already contain data with multiple periodic components at vastly different scales.
For the periodic-GP benchmark, the period is sampled independently for every task. The periodic kernel admits the Fourier expansion
Accordingly, a GP function sampled from this kernel can be viewed as a random Fourier series:
Thus, a sampled function is not restricted to a single sinusoidal frequency; it is a random combination of harmonics. Since is sampled independently for each task, the fundamental frequency varies over .
The sawtooth benchmark provides an even more explicit multi-scale test. A sawtooth wave with amplitude , base frequency , and shift admits the Fourier series
In our benchmark, we truncate this series and construct each function from Fourier components with frequencies
Consequently, each individual function contains 10–20 periodic components and spans a 10–20-fold frequency range. Across the full task distribution, the frequencies range approximately from 3 to 100. The performance of STNP on these benchmarks therefore provides evidence that it can infer and represent multiple periodic components operating at substantially different frequency scales.
All queries are adequately addressed, raising my rating to Accept.
Thank you for the thorough rebuttal and for filling in the missing numbers. Status per point:
Resolved:
- W1/Q1 (wall-clock, memory): The measured overhead is modest -- to on training time, to on inference time, and under on peak memory in both settings, with overhead shrinking further at the larger DTD sequence length as expected from the asymptotic analysis. This adequately characterizes the practical cost of the spectral branch. Please add this table to the paper.
- W3 (calibration, non-periodic results): STNP obtains the second-lowest ECE () among all baselines, essentially matching ConvCNP and SConvCNP, and improves substantially over its own TNP backbone (). Combined with the RBF/Matern results showing no regression on non-periodic tasks, this resolves the concern that the spectral branch could hurt calibration or non-periodic performance. Please add both results to the paper.
- W2 (Q,D_0 guidance): The invariance argument for and the recommended defaults (-, ) are convincing and consistent with Table 10. Please add this as a proper subsection in the revision, not just the rebuttal.
- Q2 (multi-scale periodicity): Satisfying -- the existing periodic-GP and sawtooth benchmarks already span a frequency range. Please make this explicit in the benchmark description.
- W4 (SM-GP, FEDformer/Autoformer): The new SM-GP baseline and honest in-sample-vs-target discussion resolve this, as does the protocol clarification. Please add both to the paper and relabel Table 15.
Overall: All raised weaknesses have been adequately addressed with concrete evidence. I am raising my score from Borderline Accept () to Accept, contingent on the promised additions (overhead table, ECE/non-periodic results, Q/D_0 guidance, SM-GP baseline) being incorporated into the camera-ready revision.
Thank you for your positive feedback
Thank you very much for your positive reassessment and detailed summary. We greatly appreciate your constructive guidance. We will incorporate all the requested additions, including the overhead results, calibration and non-periodic evaluations, guidance, and the SM-GP comparison, into the revised manuscript.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Summary
Dear Area Chair 1Gk5,
We sincerely thank you for your time, effort, and careful evaluation of our manuscript, as well as for the clear summary. We greatly appreciate the reviewers' constructive feedback. Below, we summarise the key strengths noted by the reviewers and our responses.
(We refer to Reviewer ACFT as R1, Reviewer 1APx as R2, and Reviewer twjA as R3.)
Key strengths highlighted by the reviewers:
We are especially grateful that our discussion helped resolve Reviewer 3's concerns, and we sincerely thank Reviewer 3 for raising the overall rating to 5 and the Clarity rating to 4. We also sincerely thank Reviewer 1 for awarding an Originality rating of 4 and Reviewer 2 for awarding a Clarity rating of 4 and an initial rating of 4.
Responses to the main concerns raised in the initial meta-review:
We assess the sensitivity of the approach and provide ablations:
We also provide another perspective in which STNP augments TNP with an amortised Gaussian mixture model of the task-specific spectrum. (R3-W3)
We directly measured the finite-size overhead and separately scaled the TNP backbone. STNP retains the same O(N2) asymptotic complexity as TNP because the shared attention computation dominates at large sequence lengths. (R1-W1/Q1; R3-W3)
Increasing TNP from 0.25M to 2M parameters does not recover the missing periodic structure. Its target LL remains low. Thus, generic capacity alone does not substitute for STNP's task-conditioned spectral inductive bias. (R2-Q1)
Regarding potential failure modes, we have evaluated STNP on non-periodic smooth GP tasks generated with RBF and Matérn kernels. STNP achieves higher target LL than the baselines on both tasks. (R1-W3/Q3)
We compare against an exact SM-GP baseline. (R1-W4) For the NP baselines, we follow the standard training protocol used by the original TNP work. Our re-evaluation further confirms that TNP is not guaranteed to outperform ANP or BNP on periodic tasks and may perform worse. (R2-Q2) For time-series forecasting, Autoformer, FEDformer, STNP, and the other baselines use the same official FEDformer protocol, so their results are directly comparable. (R1-W4)
All the above analyses, comparisons, and discussions will be incorporated into the final version.
Thank you again for your careful reading and thoughtful evaluation. We are happy to provide any further clarification.
Respectfully and sincerely,
The Authors