potentialpaper

Thompson Sampling using Prior-fitted Diffusion Transformers

Sihwa Park, Jingsen Zhu, Vinamr Jain, Sheng-Yen Chou, Alexander Terenin

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. Thompson sampling is natural randomized strategy for optimizing unknown functions in a black-box manner. In continuous global optimization, Thompson sampling has largely been restricted to Gaussian process priors, as these are essentially the only class for which computing the posterior distribution has been tractable in practice. In this work, we introduce prior-fitted diffusion transformers, which are diffusion models that perform Thompson sampling in-context at inference time, after being pre-trained using the prior-fitted network paradigm. To apply these models, we develop a set of practical non-Gaussian priors for general black-box functions---including those that have characteristics that cannot be achieved under Gaussianity, such as priors over unimodal functions. We also quantify the tradeoff between model size and the number of pre-training iterations, and show that these models follow scaling laws akin to those observed in transformers defined over other modalities. Across a set of global optimization benchmarks, we show that prior-fitted diffusion transformers with non-Gaussian priors can achieve improved performance compared to traditional pipelines built on Gaussian processes.

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 paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

DateVersionSubmitted toPDFEvidence
4 May 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:47 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

This paper focuses on online black box optimization and presents an amortized prior fitted network trained over synthetic function maximizers (x*) as a in-context learning approach for Thompson Sampling (TS).

Generally there is interest in this line of work, however the reviewers generally agree that there are two major areas where the paper needs to be improved before it can be considered for publication at NeurIPS.

Empirical evaluation on the weak side:

  • missing important baselines such as (qLog)EI that show strong empirical performance (and are a practitioner favourite)
  • missing timing/computational information, especially in comparison to GP-based methods
  • possibly missing other Diffusion/Generative BO baselines that are popular now

Justification over baselines, and/or explicit acknowledgment of limitations missing:

  • GP-TS is already at-least, if not more, performant on many of these benchmarks, probably a lot computationally cheaper, and fairly easy for a practitioner to use. What is the justification for the presented method then?
  • If the presented method is not generally better than baselines such as GP-TS, can a practitioner reason (a-priori) about when they should and should not use it over the alternatives?

I would encourage the authors to focus on these areas in their rebuttal.

Final justification

The strength of this work is that it shows using prior fitted networks and in-context learning can be applicable to Bayesian optimisation tasks and is a natural means of implementing Thompson Sampling. I think this is a really elegant idea and implementation, and will be of great interest to those attending NeurIPS and the wider community.

The reviewer concerns that I outline above have been mostly addressed in the discussion below. The reviewers who remained engaged during the reviewer-AC discussion period also agree with acceptance of this work, and I judge the other's concerns to be addressed. While GP-based algorithms remain very strong baselines, the addition of the competing (trained/fine-tuned) diffusion baselines, and the timing information, has really clarified the story and contribution here.

Consequently, I endorse acceptance of this paper, but require the final camera ready version to have:

  • The expanded benchmarks and baselines presented in the discussion.
  • The timing information against the GP methods.

Timing comparison to the other diffusion baselines would be interesting too, and adding the full proof of the proposition and corollary given in response to qZkS's review would also strengthen the final work. I will not make these essential however.

Just one final remark and suggestion as a researcher also actively interested in this area. Something I think these authors should consider in future work is applying these generative Bayesian optimisation approaches to settings where we know GP-based methods are weak. For example, design spaces that are high dimensional, discrete (e.g. sequences), or mixed continuous-discrete etc. There is a growing body of work in this area, and adapting PFNs here could be a really solid contribution -- but probably also really hard!

Area Chair gvmv · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

This paper focuses on online black box optimization and presents an amortized prior fitted network trained over synthetic function maximizers (x*) as a in-context learning approach for Thompson Sampling (TS).

Generally there is interest in this line of work, however the reviewers generally agree that there are two major areas where the paper needs to be improved before it can be considered for publication at NeurIPS.

Empirical evaluation on the weak side:

  • missing important baselines such as (qLog)EI that show strong empirical performance (and are a practitioner favourite)
  • missing timing/computational information, especially in comparison to GP-based methods
  • possibly missing other Diffusion/Generative BO baselines that are popular now

Justification over baselines, and/or explicit acknowledgment of limitations missing:

  • GP-TS is already at-least, if not more, performant on many of these benchmarks, probably a lot computationally cheaper, and fairly easy for a practitioner to use. What is the justification for the presented method then?
  • If the presented method is not generally better than baselines such as GP-TS, can a practitioner reason (a-priori) about when they should and should not use it over the alternatives?

I would encourage the authors to focus on these areas in their rebuttal.

Final justification

The strength of this work is that it shows using prior fitted networks and in-context learning can be applicable to Bayesian optimisation tasks and is a natural means of implementing Thompson Sampling. I think this is a really elegant idea and implementation, and will be of great interest to those attending NeurIPS and the wider community.

The reviewer concerns that I outline above have been mostly addressed in the discussion below. The reviewers who remained engaged during the reviewer-AC discussion period also agree with acceptance of this work, and I judge the other's concerns to be addressed. While GP-based algorithms remain very strong baselines, the addition of the competing (trained/fine-tuned) diffusion baselines, and the timing information, has really clarified the story and contribution here.

Consequently, I endorse acceptance of this paper, but require the final camera ready version to have:

  • The expanded benchmarks and baselines presented in the discussion.
  • The timing information against the GP methods.

Timing comparison to the other diffusion baselines would be interesting too, and adding the full proof of the proposition and corollary given in response to qZkS's review would also strengthen the final work. I will not make these essential however.

Just one final remark and suggestion as a researcher also actively interested in this area. Something I think these authors should consider in future work is applying these generative Bayesian optimisation approaches to settings where we know GP-based methods are weak. For example, design spaces that are high dimensional, discrete (e.g. sequences), or mixed continuous-discrete etc. There is a growing body of work in this area, and adapting PFNs here could be a really solid contribution -- but probably also really hard!

1 comment
Authors · CommentOpenReview ↗

Comparison to classical EI and diffusion-based baselines. We agree this comparison is critically important, and have added it. We tested EI and three diffusion-based methods – DDOM (Krishnamoorthy et al.), DiBO (Yun et al.), and Diff-BBO (Wu et al.). We also added one more empirical benchmark, Swimmer (dim: 16): the Swimmer-v5 MuJoCo RL task, where we optimize a linear policy to maximize episodic return. Here is a link to the anonymized plots: https://anonymous.4open.science/r/plots-6B5B/

Our results show that:

  • Compared to prior diffusion-based approaches, we tend to be stronger overall, mostly as a result of less variability on a per-problem basis – for example, DiBO is strong on all synthetic problems, but weak on most empirical ones. Other baselines' performance similarly varies from problem to problem.
  • Compared to classical EI baseline, we tend to perform competitively. At the same time, no diffusion-based method – ours or baselines – consistently outperforms EI. Diffusion-based black-box optimization is very new, while established BayesOpt pipelines have had a decade of work to optimize their low-level details to maximize performance. As a result, we believe that work in diffusion is useful to the community and should be considered publishable, even if it does not Pareto-improve on classical BayesOpt methods, which no prior paper has done yet and is unlikely to do without the cumulative result of many papers over the coming years.

PFN over TS. Our primary motivation is to simplify and improve the performance of diffusion-based approaches, and indeed our goal is not to beat GP-TS (see previous point regarding GP-EI). Instead, we want to test whether PFN can learn the TS posterior distribution under different priors, thereby providing a non-GP BayesOpt formulation which performs to a non-trivial level. We believe this contribution alone is interesting, as it unlocks a completely different angle of attack for improving both BayesOpt and diffusion-based black-box optimization. Our main empirical contribution is showing that this framework actually works, which immediately enables practitioners to build their own bespoke prior distributions using their domain knowledge. Concretely, we show that (a) PFN is able to learn the TS posterior distribution under non-Gaussian priors sufficiently well to perform strongly, and (b) these non-Gaussian priors can outperform GP-TS, which is restricted by Gaussianity.

Reviewer tndFOpenReview ↗
Rating
2/6
Confidence
4/5
Quality
3/4
Clarity
4/4
Significance
1/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper is concerned with Thompson sampling (TS) for black-box Bayesian optimisation. Rather than using a Gaussian process (GP) surrogate for the observations, the authors propose to use a pre-trained diffusion transformer which has been trained using sequences of observations as inputs and the maximum of the sampled function as the output. The experimental section includes comparisons of different variants of the prior-fitted diffusion transformer acting as a Thompson sampler and GP-based Thompson sampling, in three benchmarks (i.e. well-known functions in global optimisation) and a couple of more empirical evaluations.

Strengths and weaknesses

Quality

The paper is mostly technically sound, with some preliminary evaluations showing the approach is promising when compared to GP-based TS. For it to be a complete piece of work, it would require more extensive empirical evaluations showing how the method performs in terms of input dimension and how it compares to Bayesian optimisation that uses other types of acquisition functions. The minimum should be a comparison against Expected-Improvement.

Clarity

The paper is well-written, and it is easy to follow. Arguably, it has all the details required to reproduce the method. Regarding the experiments, could you clarify if the prior-fitted networks used for the results in Fig. (5) are fitted per function? Or are the same networks used for all the experiments, even the ones in Fig. (6)?

Some minor comments:

  • nn is used both for the number of observations and for n(x)n(x) in Eq. (10).
  • Fig. (3) is mentioned in line 277, but the actual Figure appears far earlier.
  • Line 329: non-hyperparameter

Significance

The contribution of the paper is that it enables black-box TS Bayesian optimisation with pre-fitted networks thanks to the use of a diffusion transformer. I am puzzled by what this means for a practitioner. First, TS wouldn’t be the first option for doing Bayesian optimisation when Expected Improvement has been shown to perform better on average. Second, even if TS were to be used, the experimental section shows a varied set of experiments where TS with a pre-fitted network does not always perform better than GP-TS. When would it be preferable to use this way of doing TS as opposed to using a GPs?

Originality

The paper follows a relatively recent line of research where prior-fitted networks are used for Bayesian optimisation. The contribution boils down to what changes are necessary for the prior-fitted network so that it can be used for a specific type of Bayesian optimisation based on Thompson sampling. The contribution is reasonable, focusing on using a different type of transformer model as a prior-fitted network, but not necessarily a game-changer given that Thompson sampling is not the go-to method for Bayesian optimisation.

Questions

See the section Strengths and Weaknesses

Limitations

See the section Strengths and Weaknesses

Formatting concerns

N/A

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

Thank you for the comments and for recognizing our work’s clarity!


More empirical results. We agree this comparison is important. We tested EI and three diffusion-based methods – DDOM (Krishnamoorthy et al.), DiBO (Yun et al.), and Diff-BBO (Wu et al.). We also added one more empirical benchmark, Swimmer (dim: 16): the Swimmer-v5 MuJoCo RL task, where we optimize a linear policy to maximize episodic return. Here is a link to the anonymized plots. https://anonymous.4open.science/r/plots-6B5B/

Our results show that we perform consistently well across different problem sets whereas the other baselines' performance varies from problem to problem. For example, Diff-BBO performs strongly on two empirical objectives but weakly on all the synthetic benchmarks. We believe the different priors of PFN provide this flexibility to adapt to different problem sets.

PFN over TS. As our motivation is to simplify and improve the performance of diffusion-based approaches, our goal is not to beat TS but to test whether PFN can learn the TS posterior distribution under different priors. Our main contribution is showing that this framework works, so that practitioners can build their own bespoke prior distributions using their domain knowledge. Moreover, we outperform TS on several empirical objectives, which shows that our generalized priors work on real-world empirical tasks besides synthetic benchmarks.

Clarification on training procedure. The PFNs used for both Fig 5 and 6 are fitted per prior. Each starts from the same PFN architecture but is trained on a different prior. For example "PFN (unimodal)" means that at each training step we sample objectives from the unimodal prior distribution and train the model to match the TS posterior distribution of the prior, and all “PFN (unimodal)” in all figures refer to the same pretrained model. Thanks for pointing out this confusion and we will clarify the training procedure in more detail in our revision.

Minor comments. Thank you for all three of these (two different usages of n, figure position and typo) - we will fix them.

Summarizing, our work does not aim to beat Bayesian optimization acquisition functions. Rather, we suggest a novel way to improve diffusion-based black-box optimization, and our experiments support this. We kindly ask that you reconsider the significance of our work.

Reviewer tndF · CommentOpenReview ↗

Significance and originality

I commend the authors for their replies to my comments. My questions/comments on quality and clarity have been largely addressed. As is usual at conferences like NeurIPS or ICML, criteria such as originality and significance are subjective across reviewers and across the scientific program. I still believe the paper lacks in both aspects, and the authors can do a better job in the future to strengthen these two aspects of the paper. I'll keep my score as it is.

Authors · CommentOpenReview ↗

Thank you for your thoughtful feedback. We agree that assessments of originality and significance can vary from reviewer to reviewer. In the meanwhile, we still believe this paper has significant novelty in two respects: (a) this work is the first attempt at diffusion-based black-box optimization using PFN-based posterior learning logic inspired by TS, and therefore connects two currently-separate research areas; and (b) compared to prior work in BayesOpt, it allows to one use non-Gaussian priors, which with further work we believe may eventually overcome longstanding limitations of Gaussian processes and kernel methods in this area. We also empirically showed that our framework performs strongly compared to other diffusion-based baselines. We emphasize that diffusion-based methods for these problems are extremely new: in our results, no diffusion-based method consistently beats GP-EI. There is a lot of precedent of novel methods achieving SOTA performance after a few papers of iteration, rather than on day one, so we respectfully believe our paper should be publishable even without beating GP-EI, as prior papers on diffusion-based black-box optimization were found to be.

We hope this helps to clarify our work and its position in this area. Thank you for your time and contribution to the review process!

Reviewer eF3gOpenReview ↗
Rating
4/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 paper proposes the use of prior-fitted Diffusion models as priors for Thompson sampling.
  • Rather than doing offline training for the diffusion model, the authors propose the use of a prior-fitted diffusion model.
  • The objective for the prior-fitted network is the standard flow-matching objective, not requiring any kind of binning. The architecture used for the model is a standard cross-attention transformer with no positional encodings, to ensure permutation invariance.
  • The empirical comparison is primarily with Gaussian processes and does not include other diffusion based optimization methods, with an unclear separation between the Gaussian process based approach and the prior-fitted diffusion model.
Strengths and weaknesses

Strengths

  1. As opposed to prior works which use Diffusion models for black-box optimization, the authors propose the use of prior-fitted networks and then detail the construction of the synthetic data pipeline.
  2. The paper is written clearly and the method is well described.

Weaknesses

  1. Discussion and comparison to the related work is not sufficient. For instance, an experimental comparison against diffusion-based optimization methods that use offline training would make the paper stronger. Particularly, a comparison against:
    1. Krishnamoorthy et al.
  2. The performance of the Gaussian process based Thompson Sampling baseline is competitive even for the higher dimensional synthetic experiments explored by the authors, as shown in Figure 5, particularly as the number of observations increase. The gap between the proposed diffusion modeling approach and Gaussian process based Thompson sampling is similarly mixed on the empirical benchmarks.
Questions
  1. The benefit of the prior-fitted diffusion model training over offline methods is not clear:
    1. The authors only report the regret of the proposed method and the baselines, rather comparing the distribution of the prior-fitted diffusion model versus methods that do offline learning and do not use prior-fitted diffusion models.
    2. Is it computationally cheaper to use prior-fitted networks versus offline training?
  2. A benefit of Gaussian process based Thompson sampling is that it is training free, using the prior-fitted diffusion model however requires specifying the input distribution and the synthetic pipeline constructions effects the performance of Thompson Sampling. Can the authors recommend a universal synthetic pipeline construction?
Limitations

While the proposed method is simple and the paper is written clearly, with thorough empirical comparisons, the empirical performance of the method compared to Gaussian processes does bring into question the utility of the method. However, if the authors can show that in higher dimensions the proposed method does scale better than GPs, then I would be happy to increase my score.

Final justification

The authors have added multiple diffusion based baselines during the rebuttal period, showing improved performance for diffusion model based black box search.

Formatting concerns

none

3 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the thoughtful feedback, and especially for bringing an additional baseline, DDOM (Krishnamoorthy et al)!


Additional baselines. We tested three diffusion-based methods – DDOM, DiBO (Yun et al.), and Diff-BBO (Wu et al.). We also added one more empirical benchmark, Swimmer (dim: 16): the Swimmer-v5 MuJoCo RL task, where we optimize a linear policy to maximize episodic return. Here is a link to the anonymized plots. https://anonymous.4open.science/r/plots-6B5B/ Based on these results, Diff-BBO shows better performance than DiBO on empirical objectives but performs poorly on synthetic benchmarks. Meanwhile, we perform the most robust results across different problem sets. This shows a limitation of current diffusion-based methods where they cannot adapt to different problems whereas our framework is able to achieve using different priors.

PFN over TS. As our motivation is to simplify and improve the performance of diffusion-based approaches, our goal is not to beat TS but to test whether PFN can learn the TS posterior distribution under different priors. Our main contribution is showing that this framework works, so that practitioners can build their own bespoke prior distributions using their domain knowledge. Moreover, we outperform TS on two empirical objectives, which shows that our generalized priors work on empirical objectives. Our contribution lies in suggesting a conceptually cleaner diffusion-based optimization method that actually works.

Scaling in higher dims. This is a fair and important question. Our current experiments go up to 25 dimensions; to directly address scaling, we will add a controlled comparison of final regret against TS across increasing dimensions and report it in the next draft.

Offline learning methods. We would like to ask the reviewer which offline learning methods that do not use PFN they have in mind. Since these could involve pre-training and take time to train, we would like to carefully check the methods or baselines the reviewer is referring to.

Universal synthetic pipeline. We believe that the two priors presented in the paper, EPW (envelope-plus-wiggles) and Unimodal can be go-to priors for practitioners. Theoretically, both of them resemble the landscape of common optimization objectives, where there is one global with noise around it. Empirically, the PFNs trained on these priors yield reasonable results on both synthetic and empirical benchmarks. Moreover, we will release our code and PFN weight files publicly upon publication, so that others can try this framework without pre-training.

Reviewer eF3g · CommentOpenReview ↗

I appreciate the additional baselines that have been added. The authors have addressed most of my concerns, however, given the weak performance compared to a Gaussian process prior, I will raise my score only to a weak accept.

Authors · CommentOpenReview ↗

Thank you for the positive feedback on our work and for recognizing our additional experiments we added during the rebuttal! While we agree this is a limitation, we’d also like to note that, in our results, no diffusion-based method beats GP-EI – ours or baselines. In some sense, this is not too surprising – we are comparing an extremely new class of black-box optimization approaches with a carefully-engineered pipeline that has had a decade of performance optimization work. However, that pipeline is kernel/GP-based, and therefore suffers from expressive capacity limitations at a fundamental level, while ours allows for arbitrary priors. There is a lot of precedent of novel methods achieving SOTA performance after a few papers of iteration, rather than on day one, so we respectfully believe our paper should reasonably be viewed as publishable even without beating GP-EI, as prior papers on diffusion-based black-box optimization were found to be.

We hope this helps to contextualize our contribution relative to the area. Thank you for your time and contribution to the review process!

Reviewer qZkSOpenReview ↗
Rating
5/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
4/4
Originality
4/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

The paper extends prior-fitted networks to Thompson sampling for function maximization. It frames the problem of finding the maximizer of a function drawn from the posterior distribution, given a sequence of (x,y) observations as context, as an in-context learning problem. More specifically, the paper defines a conditional flow-matching objective in which the context is given as the conditioning variable, and the learned flow transports random noise to the maximizer of a function drawn from the posterior induced by that context. The paper borrows from standard diffusion transformer architectures for conditional generation as the model backbone. The flexibility of the proposed approach arises mainly from the choice of prior, and the paper introduces several methods for generating synthetic training data by sampling random functions (f), context points (x_i), function values (y_i=f(x_i)), and context sizes (n). The paper demonstrates the validity of the method through synthetic experiments and benchmark evaluations.

Strengths and weaknesses

[Strength] A major strength of the paper is that it proposes a simple and conceptually clean framework for applying PFN to BO. Especially, the framework keeps the pretraining recipe close to standard generative modeling: the main modeling flexibility comes from the synthetic prior over functions, rather than from task-specific acquisition heuristics, bespoke guidance losses, or additional uncertainty modules.

[Weaknesses]

  1. The paper’s decision-theoretic framing would be clearer if the authors included a short population-risk statement analogous to the standard PFN posterior predictive result. Namely, under the synthetic prior-generating process, the population minimizer of the conditional flow matching objective should recover the conditional law of x^\ast_f given the context D_n, which is precisely the Thompson sampling distribution. This appears to follow from standard conditional flow-matching arguments but making it explicit would help.
  2. The paper could benefit from more explicitly showing that the transformer + conditional flow matching generation actually learn a posterior distribution over maximizers; see Q2.
  3. The empirical sections could be strengthened; see Q3 and Q4.
Questions

Q1. The PFN framework depends heavily on the transformer’s ability to perform approximate posterior inference in context. Although transformers are universal approximators of sequence-to-sequence functions, it is not clear to me that this alone explains their ability to learn a conditional distribution, especially a posterior distribution. (More precisely, in the paper, the model learns a conditional vector field whose induced terminal distribution is intended to match the in-context posterior distribution over optimizers.) Is there theoretical evidence that transformer-based PFN is even able to realize this intended in-context posterior distribution, beyond generic universal approximation arguments or downstream predictive performance?

Q2. Related to Q1, at least in a model-matched setting such as a GP prior, can the authors compare the learned optimizer distribution, obtained by sampling the learned flow, with ground truth posterior Thompson samples?

Q3. In Figure 5, the performance of several PFN variants appears to plateau after some number of observations, whereas GP-TS often improves more steadily as more data are collected. Could this behavior be related to the choice of pretraining context-size distribution? It would be helpful if the authors could explain this behavior and/or show whether increasing (N) restores inference-time sample-size scaling.

Q4. I do not think Figure 6 alone clearly establishes the merit of the PFN approach compared with the standard Bayesian baseline GP-TS. At best, it seems to show that the proposed method works well on some tasks and is only competitive, or worse, on others. Given the extra prior-modeling effort and GPU pretraining cost required by the proposed approach, stronger empirical evidence would be helpful. Can the authors provide additional benchmarks, compute/wall-clock comparisons, or settings where the proposed non-Gaussian priors yield consistent advantages over GP-TS?

Limitations

I appreciate the simplicity and conceptual cleanliness of the proposed framework. If successful, the framework could be quite impactful: as in standard PFNs, much of the modeling burden is shifted to the prior and synthetic data generation process, which makes the approach relatively easy to scale. However, the current empirical results do not yet convincingly demonstrate that this promise is realized. I understand that large-scale pretraining experiments are expensive, but stronger empirical evidence—through larger-scale pretraining, broader benchmarks—would substantially strengthen the paper.

Final justification

The authors have thoroughly addressed the concerns I raised previously, and I now consider their contribution to be worthy of publication.

Formatting concerns

no specific formatting concerns.

4 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We deeply appreciate the positive feedback and for recognizing the simplicity and conceptual cleanliness of our framework!


Empirical evaluation. We tested EI and three diffusion-based methods – DDOM (Krishnamoorthy et al.), DiBO (Yun et al.), and Diff-BBO (Wu et al.). We also added one more empirical benchmark, Swimmer (dim: 16): the Swimmer-v5 MuJoCo RL task, where we optimize a linear policy to maximize episodic return. Here is a link to the anonymized plots. https://anonymous.4open.science/r/plots-6B5B/

Our results show that we perform consistently well across different problem sets whereas the other baselines' performance varies from problem to problem. For example, Diff-BBO performs strongly on two empirical objectives but weakly on all the synthetic benchmarks. One interesting observation is that the best-performing prior varies across different empirical benchmarks (Unimodal for Lunar Lander and Pest Control, and EPW for Swimmer). This is exactly what we expected since every problem has a different structure and we believe the different priors of PFN provide the flexibility to adapt to different problem sets.

PFN over TS As our motivation is to simplify and improve the performance of diffusion-based approaches, our goal is not to beat TS but to test whether PFN can learn the TS posterior distribution under different priors. It is especially hard to beat EI/TS on synthetic benchmarks since these methods have been well optimized on such problems for a long time. Our main contribution is showing that this framework works, so that practitioners can build their own bespoke prior distributions using their domain knowledge. Moreover, we outperform TS on two empirical objectives, which shows that our generalized priors work on empirical objectives. We believe that our overall results are sufficient to show that this simple PFN-based framework works and leads to a new way to solve black-box optimization problems.

Q1: Theoretical guarantee on learning the intended posterior: We have proven a theorem on the equivalence between optimizing our prior-fitted flow matching objective and learning the intended posterior over the function maximizer. Since only the rebuttal button is currently active, and we would like to make this a separate thread, we will post the proof as a public comment once it is available.

Q2: Ground truth TS distribution. Since the ground truth TS posterior distribution is hard to visualize in higher dimensions, we created a plot for the 2D model-matching case and attached it to the anonymized link under the filename ts-gt.png. https://anonymous.4open.science/r/plots-6B5B/ The plot has four rows. Each column corresponds to a different objective function sampled from the GP prior, and within each subplot the x and y axes are the two input variables. The first row shows the data points given to infer the posterior distribution. The second row shows the objective landscape together with the true-max distribution, marked by a red star. The third row is the posterior distribution from PFN, which we obtain by feeding grid points. The fourth row is the posterior distribution obtained from TS, which serves as the ground truth in this case. One can see that the third and fourth rows look similar in this case, which shows that PFN has the ability to recover this distribution.

Q3: Plateau behavior of PFN. This is an excellent question. We believe that this is because of a fundamental difference of how PFN and GP handle exploitation and exploration. Since our PFN learns the posterior distribution through the diffusion process, the point where it begins to exploit more should be different from GP-based TS. At the same time, our results on the synthetic benchmarks show that PFN models tend to explore better regions than TS in the early optimization stages.

Q4: Computational cost: We include an experimental result, benchmarking the running time of our PFN against EI and TS methods. We aggregate the running time among 4 independent runs with 20 BO iterations (N=20) in each run:

Method           N         Total(s)         Mean(ms)          Std(ms)       Median(ms)          Min(ms)          Max(ms)
------------------------------------------------------------------------------------------------------------------------
ei              20      46.13±24.84  2306.67±1242.10  3531.29±1728.01   1039.19±604.02    231.79±114.76 14234.93±5853.51
ts              20       14.51±0.55     725.69±27.60     118.93±12.96     718.29±15.99     547.59±35.68   1007.41±105.87
pfn             20        9.27±0.01      463.45±0.54        1.01±0.18      463.34±0.44      461.54±1.00      465.31±0.91

Our PFN shows less computational cost than EI and TS. Notably, the running time for each iteration is almost consistent across iterations due to the identical forward pass of the Transformer model, while EI’s and TS’s performance varies across iterations due to different posterior estimations. Despite the pretraining cost, PFN is an amortized approach that benefits from consistently low computation overhead at testing time after the pretraining is completed.

Authors · CommentOpenReview ↗

Follow-up: theory on learning the intended posterior

In response to Reviewer qZkS's Q1:

Is there theoretical evidence that transformer-based PFN is even able to realize this intended in-context posterior distribution, beyond generic universal approximation arguments or downstream predictive performance?

There are several ways to understand this question. The simplest of these is: “is there theory which shows that PFNs trained on the flow matching objective in-principle target the correct posterior?” The answer, as we show below in Proposition 1 and Corollary 1.1, following standard arguments from the flow-matching literature which are adapted to our setting, is “yes” - if the optimization problem is relaxed to the space of measurable functions, we recover the correct target.

Note that this statement is all about the soundness of the training objective - to our knowledge there is not yet any PFN-specific theory of what distributions transformers can represent, nor what conditional distributions gradient descent converges to - and, indeed, given transformer theory is in its infancy, we believe such work is likely of sufficient value that one could write a whole paper about it, publishable separately from any other contributions.

Proposition 1. Prior-fitted flow matching learns the posterior over maximizers

For a target distribution π(X\*)\pi(X^\*) and a source distribution p(Z0)p(Z_0) (e.g., Gaussian), denote the flow-matching loss as

\mathcal L_{\mathrm{FM}}(\pi,v_\theta;D)\ =\ \mathbb E_{\pi(X^\star),p(Z_0),t}\ \left[\ \left\\|\ v_\theta(Z_t,t,D)-U_t(Z_0,X^\star)\ \right\\|^2\ \right].

Let F∼p(f)F\sim p(f), let D=(xi,F(xi))i=1nD={(x_i,F(x_i))}_{i=1}^n, and define

X⋆=arg,max⁡x∈X,F(x),X^\star=\operatorname*{arg\\,max}_{x\in\mathcal X}\\,F(x),

using a fixed measurable tie-breaking rule. Our prior-fitted objective

\ell_\theta\ \triangleq\ \mathbb E_{F,D,Z_0,t}\ \left[\ \left\\|\ v_\theta(Z_t,t,D)-U_t(Z_0,X^\star)\ \right\\|^2\ \right]

can be equivalently written as

ℓθ = ED [ LFM (p(X⋆∣D),vθ;D) ].\ell_\theta\ =\ \mathbb E_D\ \left[\ \mathcal L_{\mathrm{FM}}\ \bigl(p(X^\star\mid D),v_\theta;D\bigr)\ \right].

Thus, conditioned on DD, prior-fitted flow matching targets the posterior distribution of the maximizer X⋆X^\star, i.e., π(X\*)=p(X\*∣D)\pi(X^\*) = p(X^\*\mid D).

Proof sketch

By the factorization p(D,X⋆)=p(D)p(X⋆∣D)p(D,X^\star)=p(D)p(X^\star\mid D),

\begin{aligned}\ \ell_\theta\ &=\ \int p(D,X^\star)\\,\ \mathbb E_{Z_0,t}\ \left[\ \left\\|v_\theta(Z_t,t,D)-U_t\right\\|^2\ \right]\ \\,dX^\star\\,dD\\\\ &=\ \int p(D)\ \int p(X^\star\mid D)\\,\ \mathbb E_{Z_0,t}\ \left[\ \left\\|v_\theta(Z_t,t,D)-U_t\right\\|^2\ \right]\ \\,dX^\star\\,dD\\\\ &=\ \mathbb E_D\ \left[\ \mathcal L_{\mathrm{FM}}\ \bigl(p(X^\star\mid D),v_\theta;D\bigr)\ \right].\ \end{aligned}

Thus, for every in-context dataset DD, the population objective trains the diffusion model against the conditional distribution p(X⋆∣D)p(X^\star\mid D).

Corollary 1.1. Recovery of the Thompson-sampling distribution

The posterior over maximizers is the pushforward of the function posterior under the argmax map:

p(X⋆∣D) = ∫δarg,max⁡f(X⋆),p(df∣D).p(X^\star\mid D)\ =\ \int\delta_{\operatorname*{arg\\,max} f}(X^\star)\\,p(df\mid D).

Equivalently, it is the distribution obtained by sampling f∼p(f∣D)f\sim p(f\mid D) and returning arg,max⁡,f\operatorname*{arg\\,max}\\,f, as in Thompson sampling.

Under standard flow-matching assumptions and exact optimization and integration, the minimizer of the flow-matching loss recovers the target distribution

qθ⋆(X⋆∣D) = p(X⋆∣D)q_{\theta^\star}(X^\star\mid D)\ =\ p(X^\star\mid D)

for datasets DD in the support of the prior-data distribution. If the interpolation retains terminal Gaussian noise with scale σmin⁡>0\sigma_{\min}>0, the learned endpoint is the corresponding Gaussian-smoothed posterior, which converges to the exact posterior as σmin⁡→0\sigma_{\min}\to 0.

Here, we assume the hypothesis space of qθq_\theta is rich enough to cover the space of all measurable functions. As Reviewer qZkS has mentioned, transformers are sequence-to-sequence approximators, so one can expect the assumption can hold in the universal approximation limit and the intended posterior can be learned by our flow matching transformer.

Reviewer qZkS · CommentOpenReview ↗

I appreciate the authors’ detailed response. My primary concerns have been satisfactorily addressed, so I am raising my score from 4 to 5. Regarding the PFN-specific theory and its justification beyond risk-level results, I would like to highlight a recent theoretical development: Kang et al. (2026), Transformers Can Learn Posterior Predictive Distributions In-Context, which demonstrates that PFNs can implement gradient descent for the true PPD under GP regression. I believe this can give a future direction worth exploring.

Authors · CommentOpenReview ↗

We are glad to hear that your main concerns have been satisfactorily addressed. Thank you for the positive assessment of our work and for pointing us to the recent paper on the theoretical development in this area. We will definitely take a look and discuss it in relation to our future work. Thank you for your time and contribution to the review process!

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…