acceptodds
Under review as a conference paper at ICLR 2027

BAM! Bayesian Anything Model: a foundation model for generative computational imaging

11 views

Abstract

Generative models are transforming Bayesian computational imaging, yet the field still lacks physics-aware foundation models. Current practice falls into two camps. Large foundation image models are deployed as plug-and-play priors with zero-shot approximate likelihood guidance, which introduces significant bias and computational cost. Physics-aware generative models avoid this bias, but each is tied to a specific dataset, task and instrument. We introduce BAM (Bayesian Anything Model), a lightweight foundation model for few-step, physics-aware posterior sampling that generalises robustly to unseen data and tasks, zero-shot or with minimal finetuning. BAM upgrades the operator-conditioned Reconstruct Anything Model (RAM) backbone (Terris et al.) into a conditional flow map, so instrument physics is specified at inference time rather than fixed during training. BAM has just 36M parameters and is pre-trained jointly on large image corpora and libraries of forward operators. A single network then draws posterior samples in a few steps, with no likelihood approximation and no guidance weights to tune. Across linear inverse problems on FFHQ, AFHQ, LSUN, DIV2K and the Kohler camera-shake benchmark, BAM outperforms in just 3 steps both specialised models and leading zero-shot methods in sample quality, at a fraction of their computational cost. BAM gives the community an accessible entry point to generative computational imaging, lowers the economic and environmental cost of training imaging models, and opens a new path for research on physics-aware Bayesian computational imaging. Code and weights will be released upon acceptance.

Primary area:
probabilistic methods (Bayesian methods, variational inference, sampling, UQ, etc.)
Keywords:
Bayesian imaging, Diffusion Models, Inverse problems, Flow maps, Distilled models, Foundational models

Reviews

Among:
Shape:
1234this paper, Top 4%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 3.33 over 3 reviews, above 96% of the others.
Reviewer_AtXaOpenReview ↗
Rating
4(+1)
Confidence
4
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

The paper proposes BAM, a new model for solving linear inverse problems. BAM has two key aspects: (i) it is degradation-aware, meaning that the forward operator is given as an input at inference time, so a single network covers many inverse problems; and (ii) it draws samples from the posterior distribution in only a few steps by learning a conditional flow map. Importantly, the underlying architecture (built on RAM) is lightweight (36M parameters), which makes inference cheap and fine-tuning accessible. Numerical results on several datasets and inverse problems validate the method, showing strong perceptual quality with only three network evaluations.

Critical strengths
  1. While the building blocks of the method are largely well-known techniques (the RAM backbone and flow maps trained via Lagrangian self-distillation), putting everything together is challenging, and the paper does a good job in this regard. Furthermore, some design choices are smart. The rescaling of the measurement through the stochastic interpolant in (7) supports the large dynamic range associated with the different noise levels of flow matching/diffusion, and its benefit is clearly shown in Appendix D.1 (+4 dB). Similarly, the two auxiliary losses in (12) (LPIPS and contrast) are a simple way to improve perceptual quality without resorting to adversarial training. This overall leans me towards a positive assessment of the paper.

  2. Numerical results are strong, particularly with only a few steps: with three NFEs, a BAM variant attains the best LPIPS in 38 of 40 settings and the best CMMD in 36 of 40.

Critical weaknesses
  1. Perception vs. distortion. The contribution list is not clear about which aspect (perception or distortion) is improved compared to the baselines. Table 1 shows that RAM is better in PSNR in most settings, whereas BAM is better in LPIPS and CMMD. This is expected, since a posterior sample is not meant to beat the MMSE estimator in PSNR (distortion–perception trade-off), but then the claim that BAM "outperforms [...] in sample quality" (abstract and contributions) should explicitly refer to perceptual quality, and the trade-off should be analyzed (see Question 1). Why it is consequential: this is the central claim of the paper, and as stated, it is only partially supported by the results.

  2. Missing comparison with InvFusion. InvFusion (Elata et al., 2025) is very close to BAM: a supervised posterior sampler conditioned on the forward operator. However, it is only discussed in Appendix A.2 and is not compared experimentally. While I understand that the backbone is different (it's a transformer-based architecture, and it incorporates the degradation in a different way), and also the training is different, it would be useful to at least compared them in some example. While I understand this might be challenging for the rebuttal, I would appreciate just a comparison in some inverse problem.

Questions for authors

Clarifications (answers could affect my assessment)

  1. Distortion–perception trade-off. If BAM is used as an MMSE estimator, does it recover the performance of RAM? More generally, does BAM allow traversing the distortion–perception trade-off, as observed in other flow-map approaches to inverse problems (e.g., [9])? Table 10 partially answers this (the mean of 64 draws outperforms RAM* in four of five problems), but only on FFHQ at a single noise level, and at 64 times the cost. A more complete answer would make the paper stronger, because then RAM is just a particular case of BAM. It would also address Critical Weakness 1.

  2. Role of the noise level σy\sigma_y. The paper states that σy\sigma_y is not supplied to the network, so that vθv_\theta acts "partially blindly", because "σy\sigma_y is easily estimated from yy". However, (i) the sampler in (13) requires σy\sigma_y explicitly, and (ii) since σ\sigma is a deterministic function of tt during training, σ(t)\sigma(t), and the sampling schedule is chosen so that the final step matches σy\sigma_y, the network effectively receives σy\sigma_y through tt. Could the authors clarify this? Moreover, the claim that σy\sigma_y is easily estimated is not justified by a reference or an experiment, and it is not obvious for measurements such as compressed sensing. Could you report results with an estimated vs. the true σy\sigma_y?

  3. Köhler and blind experiments. The paper claims that BAM outperforms RAM and Carbajal et al. on the Köhler dataset, but this is shown only qualitatively (Figures 21 and 22). Appendix E.4 states that no ground truth is available in this setting, yet Figure 22 shows a ground-truth crop, and the Köhler benchmark does provide ground-truth images. Could you report PSNR/LPIPS on this benchmark, as is standard? Which σy\sigma_y is supplied to the sampler for these real images, where the noise level is unknown, and how sensitive is BAM to errors in the estimated operator A^\hat{A} and in σy\sigma_y? Also, this experiment is not really "blind"; I think it is more of a "robustness" experiment, because the model still relies on an external estimator of the degradation (the KPN of Carbajal et al.), as the authors acknowledge in the limitations. Can the authors clarify this?

  4. Training cost. While the model is lightweight, training requires 170 hours on 8 H100 GPUs (~1,360 GPU-hours), which somewhat contrasts with the claim that BAM lowers the economic and environmental cost of training imaging models. Why does a lightweight network need a full node for training? Is this because of the selected batch size, or the cost of the JVP in the LSD loss? Also, why is the model initialized from the public RAM checkpoint? Is this initialization necessary, and how does BAM perform when trained from scratch? Otherwise, the cost of training RAM should also be taken into account.

  5. Fine-tuning. In Figure 17, BAM* seems to "smooth" the details. This is consistent with Table 6, where fine-tuning on FFHQ improves PSNR but worsens FID (e.g., super-resolution at σy=0.025\sigma_y = 0.025: 45.5 → 56.5; deblurring: 40.6 → 47.3). Is fine-tuning pushing the model closer to RAM? Do you have any explanation for why this happens?

Suggestions

  1. Scope. The method only works on linear inverse problems with additive Gaussian noise, which the authors acknowledge in the limitations. However, I think the "foundation model" and "Anything" framing oversells what is shown: the non-linear JPEG experiment requires fine-tuning (zero-shot BAM obtains 16.1 dB in Table 9), and the noise levels are restricted to σy≤0.05\sigma_y \leq 0.05. I suggest adjusting the framing accordingly.

  2. Architecture. The modification of the RAM architecture (separate measurement and image-state branches fused via (16), Appendix B) is an important aspect of the paper and a contribution in itself. I suggest briefly describing it in the main paper.

  3. Related works. I suggest discussing the following closely related papers:

    • Multitask learning with stochastic interpolants [1], which also trains a single interpolant-based model to handle multiple tasks, as BAM does across operators.
    • The SHARP family [2, 3], which uses restoration networks trained across degradations as priors for inverse problems.
    • Other approaches to posterior sampling for linear inverse problems, namely energy models learned via anisotropic diffusion [4] and exact posterior score estimation [8].
    • In the paragraph "Conditional diffusion and bridge models sample the posterior": PMRF [5], which is directly related to the perception–distortion discussion in Critical Weakness 1; stochastic interpolants with data-dependent couplings [6], which perform conditional generation from the degraded measurement; InDI [7], which restores images in a few steps by directly iterating from the degraded image; and Palette [10], one of the first conditional diffusion models for image restoration.

    I think some of these works, together with InvFusion (currently in Appendix A.2), deserve to be discussed in the main paper, at least in a few sentences in the introduction. The background could be compressed to make room (for instance, presenting both diffusion and flow matching feels a bit redundant).

[1] Negrel, H., Coeurdoux, F., Albergo, M., & Vanden-Eijnden, E. (2025). Multitask Learning with Stochastic Interpolants. NeurIPS 2025

[2] Hu, Y., Delbracio, M., Milanfar, P., & Kamilov, U. (2024, May). A restoration network as an implicit prior. ICLR 2024

[3] Hu, Yuyang, Albert Peng, Weijie Gan, Peyman Milanfar, Mauricio Delbracio, and Ulugbek S. Kamilov. "Stochastic deep restoration priors for imaging inverse problems." ICML 2025

[4] Zilberstein, Nicolas, Santiago Segarra, Eero Simoncelli, and Florentin Guth. "Learning Normalized Energy Models for Linear Inverse Problems." ICML 2026

[5] Ohayon, G., Michaeli, T., & Elad, M. (2025, May). Posterior-mean rectified flow: Towards minimum MSE photo-realistic image restoration. ICLR 2025.

[6] Albergo, M. S., Goldstein, M., Boffi, N. M., Ranganath, R., & Vanden-Eijnden, E. (2024). Stochastic interpolants with data-dependent couplings. ICML 2024.

[7] Delbracio, M., & Milanfar, P. (2023). Inversion by direct iteration: An alternative to denoising diffusion for image restoration. TMLR

[8] Mammadov, Abbas, Ozgur Kara, Kaan Oktay, Iskander Azangulov, Adil Kaan Akan, Hyungjin Chung, James Matthew Rehg, and Yee Whye Teh. "Exact Posterior Score Estimation for Solving Linear Inverse Problems." NeurIPS 2026 (posted on arXiv in June)

[9] Zilberstein, Nicolas, Morteza Mardani, and Santiago Segarra. "Flow Map Denoisers: Traversing the Distortion-Perception Plane for Inverse Problems." NeurIPS 2026 (posted on arXiv in June)

[10] Saharia, C., Chan, W., Chang, H., Lee, C., Ho, J., Salimans, T., Fleet, D., & Norouzi, M. (2022). Palette: Image-to-image diffusion models. In ACM SIGGRAPH 2022 Conference Proceedings.

12 comments

Question 1 (Critical Weaknesses): Distortion–perception

The contribution list is not clear about which aspect (perception or distortion) is improved compared to the baselines. Table 1 shows that RAM is better in PSNR in most settings, whereas BAM is better in LPIPS and CMMD. This is expected, since a posterior sample is not meant to beat the MMSE estimator in PSNR (distortion–perception trade-off), but then the claim that BAM “outperforms […] in sample quality” (abstract and contributions) should explicitly refer to perceptual quality, and the trade-off should be analyzed (see Question 1). Why it is consequential: this is the central claim of the paper, and as stated, it is only partially supported by the results.

Response

We thank the reviewer for this question.

“Sample quality” means perceptual quality. When we write that BAM outperforms RAM in sample quality, we mean perceptual quality, as the visual comparisons in the paper show. The no-reference metrics we added support this (see our response to Reviewer 2). BAM is above RAM and RAM-FT on MUSIQ and Q-Align in all 12 dataset/problem/metric columns of Table 1, for example, 68.78 vs 51.25 MUSIQ and 3.66 vs 2.75 Q-Align on FFHQ deblurring.

We run the same experiment of Table 10 on DIV2K, getting similar conclusions:

BAM as a regressor, at RAM’s cost. BAM’s network predicts a flow map Fθ(xt,yt;t,s)F_\theta(x_t, y_t; t, s). Its diagonal s=ts = t is trained by flow matching, so one evaluation at s=ts = t gives a posterior-mean estimate:

x^=xt−t∗Fθ(xt,yt;t,t), (1 NFE).\hat x = x_t - t* F_\theta(x_t, y_t; t, t), \text{ (1 NFE)}.

This uses the same cost as RAM, and no averaging over 64 draws as in Table 10. We evaluated it on all six settings of Table 1 (FFHQ and DIV2K, σy=0.05\sigma_y = 0.05), with the Table 1 checkpoint, images, observations and seeds.

PSNR ↑ / LPIPS ↓:

MethodNFEsFFHQ deblurFFHQ SR×4FFHQ inpaintDIV2K deblurDIV2K SR×4DIV2K inpaint
BAM, regressor (s = t = 1)130.37 / 0.25629.88 / 0.27931.99 / 0.21925.12 / 0.34525.11 / 0.36027.12 / 0.262
BAM, posterior sample (Table 1)329.63 / 0.25028.84 / 0.27231.50 / 0.22824.48 / 0.34924.30 / 0.36226.61 / 0.267
RAM130.54 / 0.35131.15 / 0.35825.55 / 0.38625.63 / 0.42725.79 / 0.43023.52 / 0.412
RAM-FT131.53 / 0.34131.01 / 0.35232.40 / 0.28826.00 / 0.41925.88 / 0.42227.61 / 0.325

Results:

  • Against RAM. At the same cost, the BAM regressor nearly recovers RAM’s distortion performance on deblurring and SR, at 0.2–1.3 dB below. It is much better on inpainting (+6.4 dB on FFHQ, +3.6 dB on DIV2K), and its LPIPS is 0.07–0.15 lower than RAM’s in every setting.
  • Against RAM-FT. RAM-FT is fine-tuned per dataset and is 0.4–1.6 dB higher in PSNR, but its LPIPS is still 0.06–0.08 worse.
  • Against BAM’s own samples. The regressor gains 0.5–1.0 dB PSNR over BAM’s 3-step samples, at about the same LPIPS.

One network covers the trade-off. The same network gives a near-MMSE estimate in one evaluation (on the diagonal s=ts = t), posterior samples in three evaluations (through the flow-map jumps), and their average (Table 10), which outperforms RAM. In this sense, a RAM-like regressor is a special case of BAM. We highlight that this near-MMSE estimate, because of the extra losses used during training, is still sharper than the true MMSE, as the LPIPS above shows. We will add this experiment to the paper.

We updated both qualitative and quantitative results in Appendix E.6 of the revised manuscript.

Question 2 (Critical Weaknesses): Evaluate InVfusion on at least one problem/dataset

Missing comparison with InvFusion. InvFusion (Elata et al., 2025) is very close to BAM: a supervised posterior sampler conditioned on the forward operator. However, it is only discussed in Appendix A.2 and is not compared experimentally. While I understand that the backbone is different (it’s a transformer-based architecture, and it incorporates the degradation in a different way), and also the training is different, it would be useful to at least compare them in some example. While I understand this might be challenging for the rebuttal, I would appreciate just a comparison in some inverse problem.

Response

We thank the reviewer for the suggestion. We added an experimental comparison with InvFusion on the FFHQ ×4\times 4 super-resolution problem in Table 1 (σy=0.05\sigma_y = 0.05).

Setup. No InvFusion checkpoint is available for this setting. We therefore trained InvFusion with the official code and its FFHQ HDiT architecture, run at 512×512512 \times 512, using the bicubic ×4\times 4 operator and noise level of Table 1. Training took about 45 h on 2 H100 GPUs. We evaluate with the official sampler: 32 Heun steps, i.e. 63 network evaluations. The test protocol is that of Table 1: the same 64 test images, observations and metric implementations.

FFHQ restoration results on 64 images at measurement noise level (σy=0.05\sigma_y=0.05). The Gaussian blur has standard deviation (σ=3.0\sigma=3.0). The ground truth scores 71.71 on MUSIQ and 4.04 on Q-Align.

TaskMethodNFEsPSNR (dB) ↑LPIPS ↓CMMD ↓FID ↓MUSIQ ↑Q-Align ↑
4xSRInvFusion6328.850.2990.1252.370.623.97
BAM328.840.2720.1950.468.653.61
BAM-FT329.370.2680.1962.463.683.30
Gaussian debInvFusion6329.150.27220.063742.1873.344.166
BAM329.630.25040.098744.9868.783.661
BAM-FT330.160.24460.082551.6165.643

Computational cost. We measured both models on the same NVIDIA H100 GPU, restoring one 512×512512 \times 512 image at a time. Each figure is the median over 16 images, after warm-up.

BAMInvFusion
Parameters35.7M170.4M (4.8×4.8\times)
Network evaluations363
Time per image0.62 s11.4 s (18×18\times)
Peak GPU memory1.13 GiB (fp32)0.84 GiB (fp16)
Problems covered by one modelall problems and noise levels of the paperone operator and one noise level

Discussion.

  • Accuracy and perceptual quality. BAM matches InvFusion’s PSNR (28.84 vs 28.85 dB) and is better in LPIPS (0.272 vs 0.299) and FID (50.4 vs 52.3). BAM-FT improves the PSNR to 29.37 dB.
  • Distributional and no-reference metrics. InvFusion is better on CMMD and on the no-reference metrics MUSIQ and Q-Align. This is consistent with a large diffusion model trained specifically for this single problem.
  • Cost. BAM reaches this quality with a 4.8×4.8\times smaller network and 21 times fewer network evaluations, which makes it 18×18\times faster. InvFusion’s peak memory at batch size 1 is slightly lower because the official code runs in half precision; both models fit in about 1 GiB.
  • Scope. Most importantly, the InvFusion model above serves a single operator at a single noise level, while one BAM network handles every problem and noise level in the paper, and adapts to new operators given at inference time.

We have added this comparison to the revised manuscript and expanded the discussion in Appendix A.2.

Question 1: Distortion–perception trade-off

If BAM is used as an MMSE estimator, does it recover the performance of RAM? More generally, does BAM allow traversing the distortion–perception trade-off, as observed in other flow-map approaches to inverse problems (e.g., [9])? Table 10 partially answers this (the mean of 64 draws outperforms RAM* in four of five problems), but only on FFHQ at a single noise level, and at 64 times the cost. A more complete answer would make the paper stronger, because then RAM is just a particular case of BAM. It would also address Critical Weakness 1.

Response Please see our first comment.

Reviewer_4UJPOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
3
Read review
Paper summary

This paper proposes BAM, a lightweight generative model for computational imaging inverse problems. The core idea is to extend the existing physics-aware reconstruction architecture of RAM to a conditional Flow Map framework, enabling efficient few-step posterior sampling. To facilitate this adaptation, the authors introduce targeted architectural modifications, along with a noise-aware measurement conditioning scheme and a corresponding sampling strategy. These designs allow a single model to address a wide range of imaging inverse problems.

Critical strengths

1.BAM achieves competitive reconstruction quality with only 36M parameters and three neural network evaluations, offering a favorable trade-off between computational efficiency and perceptual quality compared with existing methods.

2.By integrating the physics-aware RAM backbone into a conditional Flow Map framework, BAM can handle various imaging inverse problems and noise levels within a single model, reducing the need for task-specific training.

Critical weaknesses

1.The proposed method primarily builds upon existing techniques, including the RAM architecture, Flow Maps, and Lagrangian self-distillation. The main contributions lie in integrating these components and introducing task-specific adaptations, such as architectural modifications and noise-aware measurement conditioning, rather than developing fundamentally new theoretical formulations.

2.Although BAM is presented as a foundation model with strong generalization capabilities, its evaluation is conducted on a relatively limited set of datasets, often with small test subsets. This raises concerns about whether the reported results sufficiently demonstrate the model's generalization ability across diverse image distributions. I suggest extending the evaluation to additional benchmarks, such as ImageNet-1K Validation, MS COCO 2017 Validation, Urban100, BSDS500 Test, and CelebA-Test, to provide stronger evidence of generalization and robustness.

3.The noise-aware measurement conditioning scheme is one of the key contributions of this paper, yet its effectiveness is not sufficiently validated. First, the ablation study is conducted on only 16 test images, which is too limited to establish the robustness of the reported improvements. Second, the authors only evaluate this scheme at a single noise level (σy=0.05\sigma_y = 0.05), without investigating its effectiveness under different noise levels. Third, the evaluation relies primarily on PSNR, lacking additional metrics to assess perceptual quality. Moreover, some examples in Fig. 8 appear visually better when conditioned on the original measurement yy rather than the proposed yσy_\sigma, despite the reported quantitative improvements. This discrepancy deserves further discussion.

4.Explicit conditioning on the forward operator AA is a central component of BAM's physics-aware design. However, the paper does not provide an ablation study to quantify its contribution. I suggest comparing BAM with an operator-agnostic variant that does not explicitly incorporate AA, while maintaining comparable model capacity and training settings. Such an experiment would help clarify the importance of physics-aware conditioning and its contribution to reconstruction quality and generalization across different inverse problems.

5.The experimental evaluation mainly relies on PSNR, LPIPS, FID, and CMMD. Although these metrics provide useful assessments of reconstruction fidelity and distributional similarity, they do not fully characterize the perceptual quality of individual generated images. I suggest including additional no-reference image quality assessment metrics, such as Q-Align and MUSIQ, to provide a more comprehensive evaluation.

6.Although BAM builds upon the RAM architecture, the main paper provides limited details on the specific architectural modifications introduced to adapt RAM to the conditional Flow Map framework. A more comprehensive architectural description, preferably accompanied by a detailed network diagram, would improve the clarity and reproducibility of the proposed method.

Questions for authors

See the Weaknesses.

7 comments

Question 1 - Main Contribution

The proposed method primarily builds upon existing techniques, including the RAM architecture, Flow Maps, and Lagrangian self-distillation. The main contributions lie in integrating these components and introducing task-specific adaptations, such as architectural modifications and noise-aware measurement conditioning, rather than developing fundamentally new theoretical formulations.

Response

We thank the reviewer for this important observation. We agree that BAM builds on established components, including the RAM architecture, flow maps, and Lagrangian self-distillation, and we do not claim new theoretical formulations for these methods. Rather, our contribution lies in creatively bringing these components together into a unified, rigorous and highly competitive framework for lightweight, physics-aware posterior sampling across multiple imaging inverse problems using a single pretrained network.

Although individual components are established, their integration is not straightforward. RAM was originally designed for deterministic regression-based reconstruction. Flow maps and Lagrangian self-distillation focus on generative transport without explicitly incorporating the physics of inverse problems; and often rely on significantly larger networks. Adapting them to posterior sampling requires conditioning the transport on noisy measurements and forward operators, while learning a consistent generative mapping. Therefore, our contributions extend beyond architectural modifications and can be summarised as follows:

  • Posterior sampling. BAM transforms an operator-conditioned reconstruction network into a conditional flow map that generates diverse posterior samples.
  • Physics-aware flow map learning. We adapt Lagrangian self-distillation to a normalized stochastic interpolant of the measurements, allowing the model to exploit both the observations and the forward operator. This enables a single network to handle different inverse problems without operator-specific retraining or approximate likelihood guidance at inference time.
  • Generalisation and computational efficiency. Combined with a lightweight 36M-parameter architecture, BAM produces high-quality posterior samples in only three steps and generalizes to unseen tasks and data distributions. Our experiments show competitive or improved performance over specialized generative and leading zero-shot methods at substantially lower computational cost.

We therefore view BAM’s main novelty as methodological rather than theoretical. It provides a practical and scalable framework for physics-aware posterior sampling across heterogeneous imaging inverse problems. We have revised the introduction to state the paper’s main contributions more explicitly.

Question 2 - Additional experiments

Although BAM is presented as a foundation model with strong generalization capabilities, its evaluation is conducted on a relatively limited set of datasets, often with small test subsets. This raises concerns about whether the reported results sufficiently demonstrate the model’s generalization ability across diverse image distributions. I suggest extending the evaluation to additional benchmarks, such as ImageNet-1K Validation, MS COCO 2017 Validation, Urban100, BSDS500 Test, and CelebA-Test, to provide stronger evidence of generalization and robustness.

Response:

Summary results of BAM evaluated on ImageNet

Problemσ_yMethodMUSIQ ↑Q-Align ↑PSNR ↑SSIM ↑LPIPS ↓FID ↓
––Ground truth61.903.10––––
Gaussian deb0.025BAM51.152.1623.680.6610.320137.5
RAM42.051.9824.740.7160.365156.5
Gaussian deb0.05BAM49.742.0823.450.6450.346143.0
RAM40.841.9224.290.6930.389176.8
Bicubic SR×40.025BAM50.552.1122.310.6410.344135.2
RAM42.032.0322.110.7110.377157.5
Bicubic SR×40.05BAM47.981.9722.100.6230.369144.5
RAM39.951.9419.270.6560.435202.4
80% inpainting0.025BAM51.892.2225.580.7580.24672.3
RAM51.212.2322.790.7360.359146.0
80% inpainting0.05BAM47.901.9624.940.6950.31489.4
RAM49.172.2022.860.7350.366144.3
Demosaicing0.025BAM59.732.7231.440.8850.14429.1
RAM61.932.8629.760.8800.270104.4
Demosaicing0.05BAM51.132.2327.560.7160.30265.6
RAM59.672.7328.390.8420.315130.0

MS COCO 2017 validation

σy=0.05\sigma_y = 0.05. GT MUSIQ (68.51) and Q-Align (3.88)

ProblemMethodPSNR (dB) ↑VGG LPIPS ↓CMMD ↓FID ↓MUSIQ ↑Q-Align ↑
Gaussian deblurringRAM25.470.4171.121123.0455.972.717
Gaussian deblurringBAM24.820.3310.42278.8760.582.943
Bicubic SR×4RAM25.830.4181.014127.8655.332.689
Bicubic SR×4BAM24.630.3440.56984.3360.522.917
80% inpaintingRAM23.440.4030.802115.9262.532.934
80% inpaintingBAM26.750.2480.24740.0966.823.476

Urban100

σy=0.05\sigma_y = 0.05 GT MUSIQ (71.78) and Q-Align (4.33)

ProblemMethodPSNR (dB) ↑VGG LPIPS ↓CMMD ↓FID ↓MUSIQ ↑Q-Align ↑
Gaussian deblurringRAM21.890.4031.038105.0861.783.106
Gaussian deblurringBAM21.600.3420.41071.6863.873.280
Bicubic SR×4RAM22.190.3930.749108.2962.613.179
Bicubic SR×4BAM21.740.3380.49268.0665.163.290
80% inpaintingRAM21.840.3310.61183.1968.783.473
80% inpaintingBAM24.700.2040.22531.9971.103.941

We thank the reviewer for suggesting these benchmarks. We extended the evaluation of BAM without dataset-specific fine-tuning to ImageNet-1K validation, MS COCO 2017 validation, and Urban100. On ImageNet-1K, we evaluated Gaussian deblurring, 80% random inpainting, ×4\times4 super-resolution, and demosaicing. On MS COCO 2017 and Urban100, we compared BAM with RAM on deblurring, inpainting, and super-resolution at (\sigma_y=0.05).

Across all six task–dataset comparisons on MS COCO 2017 and Urban100, BAM achieved lower LPIPS, CMMD, and FID and higher MUSIQ and Q-Align scores. BAM also improved inpainting PSNR by 3.31 dB on MS COCO 2017 and 2.86 dB on Urban100. RAM achieved higher PSNR for deblurring and super-resolution. These results provide additional evidence that BAM generalizes across image distributions and restoration tasks. We have included the quantitative results and representative examples of ImageNet restorations in the revised manuscript, Appendix G.

Question 3 - Noise-aware conditioning

The noise-aware measurement conditioning scheme is one of the key contributions of this paper, yet its effectiveness is not sufficiently validated. First, the ablation study is conducted on only 16 test images, which is too limited to establish the robustness of the reported improvements. Second, the authors only evaluate this scheme at a single noise level (σy=0.05\sigma_y = 0.05), without investigating its effectiveness under different noise levels. Third, the evaluation relies primarily on PSNR, lacking additional metrics to assess perceptual quality. Moreover, some examples in Fig. 8 appear visually better when conditioned on the original measurement (y) rather than the proposed (y), despite the reported quantitative improvements. This discrepancy deserves further discussion.

Response:

Gaussian deblurring results on LSDIR test dataset

ProblemMethodσ=0.025 MUSIQ ↑σ=0.025 Q-Align ↑σ=0.025 PSNR ↑σ=0.025 SSIM ↑σ=0.025 LPIPS ↓σ=0.05 MUSIQ ↑σ=0.05 Q-Align ↑σ=0.05 PSNR ↑σ=0.05 SSIM ↑σ=0.05 LPIPS ↓
–Ground truth70.184.08–––70.184.08–––
Gaussian deb with yty_tBAM66.683.5528.270.84420.195361.143.1626.720.74650.2866
Gaussian deb with yyBAM67.083.5223.230.75690.204058.762.9022.360.64810.3252

We thank the reviewer for this valuable observation. We have extended the ablation from the original 16-image subset to 200 different test images, evaluated at two measurement-noise levels, σy∈{0.025,0.05}\sigma_y\in\{0.025,0.05\}, and included SSIM, LPIPS, MUSIQ, and Q-Align alongside PSNR. For Gaussian deblurring, conditioning on yty_t consistently improves PSNR, SSIM, LPIPS, and Q-Align compared with conditioning on the original measurement yy. At σy=0.025\sigma_y=0.025, PSNR increases from 23.23 to 28.27 dB, while at σy=0.05\sigma_y=0.05 it increases from 22.36 to 26.72 dB. The only exception is MUSIQ at σy=0.025\sigma_y=0.025, where conditioning on yy scores slightly higher (67.08 versus 66.68). This difference illustrates that no-reference perceptual quality and reconstruction fidelity do not always agree, and individual examples can favour either conditioning strategy. Overall, the evaluation on 200 test images, across both noise levels and multiple fidelity and perceptual metrics, provides stronger evidence of the effectiveness and robustness of the proposed noise-aware conditioning.

Appendix D.1 of the revised manuscript now presents both the quantitative and qualitative results.

Reviewer_AfiuOpenReview ↗
Rating
4(+1)
Confidence
3
Informativeness
3
Presentation
3
Soundness
3
Read review
Paper summary

This paper introduces the Bayesian Anything Model (BAM), a foundation model for linear inverse problems. BAM builds on the lightweight RAM architecture and extends it into a conditional generative model designed for Bayesian posterior sampling using learned flow maps. The model is conditioned on the degraded observation y, the known linear forward operator A, the measurement-noise level, and a pair of time stamps (t,s), allowing it to learn finite transport between different points along the generative trajectory. The authors use a rectified-flow-style interpolation to construct intermediate states and train the model using a combination of local flow-matching supervision and Lagrangian self-distillation, which encourages the learned finite-time flow maps to remain consistent with the underlying instantaneous velocity field. Perceptual and adversarial objectives are additionally incorporated to improve visual quality. At inference time, BAM performs posterior sampling with a three-step sampling scheme that enables fast generation of multiple plausible reconstructions conditioned on the same observation. They evaluated the method using DIV2K and FFHQ across several image restoration and linear inverse problems, and compared the results with both zero-shot methods and supervised methods. BAM achieves strong reconstruction performance while also leading generation metrics (CMMD and FID) across the evaluated tasks.

Critical strengths

This paper introduces an interesting approach for training a lightweight, flow-map-based foundation model for linear inverse problems. The authors carefully design multiple training objectives and align the training procedure with a rectified-flow-style interpolation for the denoising process. They further unify several important linear inverse problems within a single foundation-model training framework and incorporate Gaussian noise at varying levels to improve robustness to different measurement conditions. Based on this formulation, the paper also develops an efficient posterior sampling scheme and provides a thorough comparison with several families of competing methods. Aside from the technical contributions, the paper is also presented in a clear and concise manner. The authors clearly discuss both the advantages and limitations of the proposed BAM method, which makes the scope and practical implications of the work easy to understand.

Critical weaknesses
  1. Despite that BAM proposed more complicated flow-map training with 3 steps of posterior sampling, from the results shown in table 1, the original RAM backbone remains highly competitive in reconstruction fidelity while requiring only one network evaluation.
  2. The generation process relies on access to the degradation operator A and also the noise level sigma, which might not be known in some real world applications
  3. The zero-shot baselines are somewhat limited. Methods based directly on pretrained flow-matching foundation models, such as D-Flow, FlowDPS, and FMPlug, would provide more relevant comparisons to BAM’s foundation-model setting. Such experiments would help clarify whether inverse-problem-specific flow-map training is necessary compared with using a general-purpose flow prior with inference-time conditioning. Moreover, It would also be interesting to investigate whether BAM itself can serve as the generative backbone for these zero-shot methods, by doing this could further demonstrate the applicability and extensibility of the proposed model.
Questions for authors

Non-linear problems nowadays bring in more attention. The authors only discussed that BAM is developed and evaluated primarily for linear inverse problems with a known forward operator A in the paper. Could the authors discuss whether the proposed operator-conditioned flow-map framework can be extended to nonlinear inverse problems? What would be the major technical obstacle?

8 comments

Question 1

Despite that BAM proposed more complicated flow-map training with 3 steps of posterior sampling, from the results shown in table 1, the original RAM backbone remains highly competitive in reconstruction fidelity while requiring only one network evaluation.

Response

We thank the reviewer for raising this important practical consideration. The original RAM backbone scores highly on PSNR in the majority of the numerical experiments. This is because RAM is trained as a mean-square regressor and hence targets the posterior mean, the optimal MSE estimator, resulting in high PSNR scores. In contrast, BAM is trained to generate accurate posterior samples, providing information about the posterior distribution that is not captured by RAM. At the sample level, one expects the PSNR to be lower since the expected PSNR over the test dataset is maximised by a perfect mean-square regressor. The quality of BAM’s samples can be seen in the remaining metrics (LPIPS, CMMD, FID, MUSIQ and Q-Align), which are all significantly improved over RAM in general. To assess BAM as a regressor to the conditional mean, one should consider not a single sample of BAM but a Monte Carlo estimate of the posterior mean computed through many conditionally independent samples from BAM. We compare such Monte Carlo estimates from BAM to RAM in Appendix E.5. On 4 out of 5 problems on the FFHQ dataset, we find that the posterior mean from BAM has a higher PSNR than RAM.

While BAM is trained primarily to generate accurate posterior samples, we note the flow model formulation allows us to use BAM as a regressor with a single neural function evaluation at inference time. Indeed, taking a single step of BAM with s=t≈1s=t\approx1 allows us to predict the posterior mean. In Table 16, we show that even though this is not a primary objective in the training of BAM, the performance of BAM in this setting is broadly comparable to RAM over several problems on two datasets.

Question 2

The generation process relies on access to the degradation operator A and also the noise level sigma, which might not be known in some real-world applications

Response

We thank the reviewer for highlighting this practical limitation. We comment that the key contributions in this work are the development of the BAM foundation model and the conditional flow with a coupled noisy measurement process. The scheme used to sample this flow in Section 3 is a sensible choice provided one has access to the measurement operator AA and the noise level. The development of Blind conditional flow sampling schemes which estimate these parameters at inference time is highly possible and left to future work. Such schemes have been extensively studied for conditional diffusion models [1,2], and for conditional regressors [3,4]. Numerical experiments in Appendix E.4 show that the BAM network is robust to slight misspecification of the degradation operator, which indicate the learned network will generalise well to such samplers.

[1] Laroche, C., Almansa, A. and Coupete, E., 2024. Fast diffusion EM: a diffusion model for blind inverse problems with application to deconvolution. In 2024 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV) (pp. 5259-5269). IEEE.

[2] Chung, H., Kim, J., Kim, S., & Ye, J. C. (2023). Parallel Diffusion Models of Operator and Image for Blind Inverse Problems. In (CVPR) Conference on Computer Vision and Pattern Recognition (pp. 6059–6069). https://openaccess.thecvf.com/content/CVPR2023/html/Chung_Parallel_Diffusion_Models_of_Operator_and_Image_for_Blind_Inverse_CVPR_2023_paper.html

[3] Carbajal, G., Vitoria, P., Lezama, J., & Musé, P. (2023). Blind Motion Deblurring With Pixel-Wise Kernel Estimation via Kernel Prediction Networks. IEEE Transactions on Computational Imaging, 9, 928–943. https://doi.org/10.1109/TCI.2023.3322012

[4] Carbajal, G., Almansa, A., & Musé, P. (2025). Blur2seq: Blind Deblurring and Camera Trajectory Estimation from a Single Camera Motion-blurred Image. http://arxiv.org/abs/2510.20539

Question 3

The zero-shot baselines are somewhat limited. Methods based directly on pretrained flow-matching foundation models, such as D-Flow, FlowDPS, and FMPlug, would provide more relevant comparisons to BAM’s foundation-model setting. Such experiments would help clarify whether inverse-problem-specific flow-map training is necessary compared with using a general-purpose flow prior with inference-time conditioning. Moreover, it would also be interesting to investigate whether BAM itself can serve as the generative backbone for these zero-shot methods; doing this could further demonstrate the applicability and extensibility of the proposed model.

Response

We thank the reviewer and have added FlowDPS (Kim et al., ICCV 2025) to the zero-shot methods.

Setup. We ran the official code with its default settings: SD3-medium, 28 steps, CFG 2.0, step size 15. We used the same observations, seeds and prompts as the LATINO-PRO runs of Table 1 (σy=0.05\sigma_y = 0.05, 64 images per setting).

SettingMethodNFEsPSNR ↑LPIPS ↓FID ↓CMMD ↓MUSIQ ↑Q-Align ↑
FFHQ deblurringBAM329.630.25044.980.1068.783.66
FlowDPS5627.640.450129.361.7533.982.09
FFHQ SR ×4BAM328.840.27250.420.1968.653.61
FlowDPS5627.840.46290.051.5552.682.80
FFHQ inpaintingBAM331.500.22832.090.0870.743.77
FlowDPS5627.730.486104.981.7246.802.65
DIV2K deblurringBAM324.480.34934.430.0661.334.09
FlowDPS5621.770.605125.120.5131.242.66
DIV2K SR ×4BAM324.300.36239.550.0861.254.09
FlowDPS5620.520.604106.470.3641.083.28
DIV2K inpaintingBAM326.610.26720.460.0266.334.34
FlowDPS5622.060.604135.100.7036.452.99

FlowDPS’s NFEs are 28 steps × 2 transformer evaluations, because of classifier-free guidance.

Results. BAM is better than FlowDPS on every metric in all six settings:

  • 1.0–4.6 dB higher PSNR;
  • 0.19–0.34 lower LPIPS;
  • much lower FID and CMMD;
  • higher MUSIQ and Q-Align.

Cost. A key advantage of BAM over these zero-shot methods is that it needs only a small network, not a large prior model. Each FlowDPS sample requires 56 evaluations of the SD3 transformer, plus 84 backpropagations through the VAE decoder (3 gradient steps per sampling step). That is about 7–11 s per 512² image and about 27 s per 1024² image on an H100. BAM uses 3 evaluations of a much smaller network.

Resolution. Methods built on pixel or latent diffusion/flow priors are tied to the resolution their prior was trained at. BAM is trained on 512² crops and applied directly to 1024² DIV2K images.

Combining the two. BAM could, in principle, replace the likelihood step inside a method like FlowDPS. This would require dedicated fine-tuning (e.g., unrolling), and the resulting method would likely still need more than three steps. Table 1 of the revised manuscript now includes the results for FlowDPS.

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

Related papers

Loading the map…

Discussion (0)

Sign in to comment.