Skip to main content
QUICK REVIEW

[论文解读] CUQIpy: I. Computational uncertainty quantification for inverse problems in Python

Nicolai A. B. Riis, Amal Alghamdi|arXiv (Cornell University)|May 26, 2023
Gaussian Processes and Bayesian Inference参考文献 53被引用 4
一句话总结

CUQIpy 是一个用于在贝叶斯框架下对反问题进行计算不确定性量化(UQ)的开源 Python 软件包。它使用户能够以直观的语法建模反问题,自动选择最优采样策略,并通过高效、结构感知的采样方法以及与 PyTorch 和 FEniCS 等库的集成,支持大规模成像应用(如 CT 和图像去模糊)。

ABSTRACT

This paper introduces CUQIpy, a versatile open-source Python package for computational uncertainty quantification (UQ) in inverse problems, presented as Part I of a two-part series. CUQIpy employs a Bayesian framework, integrating prior knowledge with observed data to produce posterior probability distributions that characterize the uncertainty in computed solutions to inverse problems. The package offers a high-level modeling framework with concise syntax, allowing users to easily specify their inverse problems, prior information, and statistical assumptions. CUQIpy supports a range of efficient sampling strategies and is designed to handle large-scale problems. Notably, the automatic sampler selection feature analyzes the problem structure and chooses a suitable sampler without user intervention, streamlining the process. With a selection of probability distributions, test problems, computational methods, and visualization tools, CUQIpy serves as a powerful, flexible, and adaptable tool for UQ in a wide selection of inverse problems. Part II of the series focuses on the use of CUQIpy for UQ in inverse problems with partial differential equations (PDEs).

研究动机与目标

  • 应对科学与工程领域中大规模反问题对可扩展且易访问的不确定性量化日益增长的需求。
  • 提供一个用户友好但可扩展的框架,使非专家能够建模贝叶斯反问题,同时为专家提供对采样和计算方法的完全控制。
  • 通过支持针对问题结构(如线性关系和分布关系)量身定制的先进采样策略,弥合理论 UQ 与实际实现之间的差距。
  • 通过插件架构实现与现代数组库(如 PyTorch)和第三方工具的互操作性,以提升性能和灵活性。
  • 通过提供内置测试问题、可视化工具和高效的计算流水线,促进不确定性量化在医学成像和地球科学等实际应用中的采用。

提出的方法

  • 在贝叶斯框架内表述反问题,结合先验知识与噪声数据,生成后验分布。
  • 采用高层级建模接口,其语法与数学符号高度一致,可简洁地指定随机变量和层次化模型。
  • 通过 `BayesianProblem` 类实现自动采样器选择,该类分析问题结构并自动选择最优采样方法(如 NUTS、哈密顿蒙特卡洛),无需用户干预。
  • 支持与数组无关的计算,可无缝使用 NumPy、PyTorch 或其他后端,实现 GPU 加速和自动微分。
  • 提供插件系统,可扩展外部库功能,如 CIL(用于 CT)、FEniCS(用于有限元)和 PyTorch(用于自动微分)。
  • 利用高级采样技术(如结合梯度信息的无 U-转弯采样器 NUTS),在高维空间中高效探索复杂的后验分布。
Figure 1 : Figures generated by CUQIpy ’s automatic UQ analysis of the built-in 2D deconvolution test problem Deconvolution2D with a blurred cookie. Far left: True sharp image. Middle left: Observed blurred and noisy image. Middle right: Deblurred image (posterior mean). Far right: Quantification of
Figure 1 : Figures generated by CUQIpy ’s automatic UQ analysis of the built-in 2D deconvolution test problem Deconvolution2D with a blurred cookie. Far left: True sharp image. Middle left: Observed blurred and noisy image. Middle right: Deblurred image (posterior mean). Far right: Quantification of

实验结果

研究问题

  • RQ1如何设计一个统一、易用且可扩展的软件框架,以支持大规模反问题中的不确定性量化?
  • RQ2自动采样器选择在提升非专家用户在贝叶斯反问题中的可用性和性能方面发挥何种作用?
  • RQ3如何设计概率编程接口,以在高层次抽象与低层次控制之间取得平衡,满足专家用户的需求?
  • RQ4与现代计算后端(如 PyTorch)的集成在多大程度上能提升 UQ 工作流中的性能和可扩展性?
  • RQ5模块化插件架构能否有效扩展核心 UQ 库的功能,使其覆盖医学成像和 PDE 约束问题等多样化应用领域?

主要发现

  • CUQIpy 使用户能够以极简代码建模并求解贝叶斯反问题,其语法直观,与数学符号高度一致。
  • 自动采样器选择功能能有效识别并应用合适的采样策略(如 NUTS),基于问题结构,减轻用户负担并提高可靠性。
  • 通过基于 Pyro 的 `cuqipypyTorch` 插件,该软件包实现了对复杂层次化模型(如八校问题)的高效联合采样,生成 1000 个后验样本和 500 个预热样本。
  • 八校问题中的平均治疗效应估计为 5.6,标准差为 12.7,与成熟软件的结果一致,验证了该框架的准确性。
  • 与 PyTorch 的集成支持自动微分和 GPU 加速,显著提升了大规模问题的性能。
  • 该框架支持广泛的概率分布、计算方法和可视化工具,包括用于后验分析的小提琴图,增强了可解释性和可复现性。
CUQIpy: I. Computational uncertainty quantification for inverse problems in Python

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。