# 贝叶斯历史匹配

作为一种调整复杂计算机模型的技术，贝叶斯历史匹配逐步推进，依据观测数据剔除输入参数空间中那些模型输出会显得不合理的部分；它依赖代理模型（快速统计替代物）和不合理性度量，而不是对模拟器进行完整的贝叶斯反演。<sup>[1](https://www.bayesianstatistics.com/Bayesian_History_Matching)</sup> 该方法由杜伦大学的彼得·克雷格（Peter Craig）、迈克尔·戈德斯坦（Michael Goldstein）、艾伦·塞赫尔特（Allan Seheult）和詹姆斯·史密斯（James Smith）于1996年提出，用于将油气藏模拟器与生产历史相匹配，此后被应用于气候建模、宇宙学、流行病学、系统生物学和交通建模。<sup>[2](https://durham-repository.worktribe.com/output/1675851)</sup><sup> • </sup><sup>[3](https://pmc.ncbi.nlm.nih.gov/articles/PMC5748965/)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 克雷格、戈德斯坦、塞赫尔特和史密斯（1996），《匹配油气藏生产历史的贝叶斯线性策略》，《贝叶斯统计》第5卷<sup>[2](https://durham-repository.worktribe.com/output/1675851)</sup> |
| 核心思想 | 剔除与观测不一致的参数空间区域，而不是为最佳拟合输入赋予概率分布<sup>[4](https://onlinelibrary.wiley.com/doi/10.1002/env.2405)</sup> |
| 不合理性 | 代理模型期望与观测数据之间的标准化距离，按观测误差、模型偏差和代理模型不确定性缩放；高于截断值（通常为3）的输入被丢弃<sup>[5](https://wires.onlinelibrary.wiley.com/doi/full/10.1002/wics.1645)</sup><sup> • </sup><sup>[6](https://www.jstatsoft.org/article/view/v109i10/4587)</sup> |
| 迭代单元 | 一个“波次”：构建代理模型，切掉不合理空间，在剩余NROY区域运行新模拟，重新训练<sup>[7](https://www.mdpi.com/1996-1073/17/16/4014)</sup> |
| 乌干达HIV案例研究 | 22个输入、18个输出、9个波次；非不合理区域缩小为原始空间的10<sup>−11</sup>，第9波次中65%的模拟器运行同时拟合全部18个输出<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup> |
| 星系形成案例研究 | Galform模拟器，17个输入；到第4波次，非不合理区域仅为原始空间的0.039%，在更严格截断值下的最终第5波次中产生306次可接受运行<sup>[9](https://arxiv.org/abs/1405.4976)</sup> |
| 软件 | R包hmer（伊什考斯卡斯和麦金利）实现了贝叶斯线性代理和历史匹配；疾病建模研究所提供了一个Python实现<sup>[6](https://www.jstatsoft.org/article/view/v109i10/4587)</sup><sup> • </sup><sup>[10](https://github.com/InstituteforDiseaseModeling/historymatching)</sup> |

## 历史匹配为何存在

复杂模拟器，如气候模型、油藏模拟器和流行病模型，每次运行可能需要数小时甚至数天，并且有数十个不确定输入。需要大量模拟器评估的校准算法，例如在全参数空间上运行马尔可夫链蒙特卡洛，在这些条件下变得不切实际。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup> 历史匹配在目标上也不同于肯尼迪和奥哈根风格的贝叶斯校准：贝叶斯校准为最拟合观测的输入设置赋予概率分布，而历史匹配则通过剔除与数据不一致的参数空间区域来重新聚焦搜索。<sup>[4](https://onlinelibrary.wiley.com/doi/10.1002/env.2405)</sup> 这种重新表述使模型是否适用于目的这一问题成为校准工作的一部分，将问题从寻找最佳输入转变为排除不可能包含可接受输入的区域。<sup>[11](https://www.tandfonline.com/doi/full/10.1080/01621459.2018.1514306)</sup>

这种计算刻意比完整的概率反演更轻量。历史匹配只需要期望和方差，这对贝叶斯线性分析已经足够，并且它避免通过同时覆盖所有输出的似然函数来建模每个输入的可能性。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup><sup> • </sup><sup>[12](https://pmc.ncbi.nlm.nih.gov/articles/PMC12105788/)</sup> 这使其适用于那些被认为不够准确、不足以支持完整贝叶斯分析的模拟器。<sup>[13](https://academic.oup.com/jrsssc/article/66/4/717/7058323)</sup>

## 代理模型

代理模型是模拟器的快速统计近似，由相对较少的模拟器运行构建，可在任意输入点提供期望输出和不确定性估计。<sup>[6](https://www.jstatsoft.org/article/view/v109i10/4587)</sup> 在标准形式中，每个输出被建模为输入的回归函数的加权和加上一个相关项；回归函数通常是多项式，相关结构通常是高斯过程，其协方差随输入距离衰减。<sup>[14](https://maths.dur.ac.uk/users/andrew.iskauskas/historyMatching.html)</sup>

给定训练运行后，代理模型通过贝叶斯线性更新在任意未评估点进行调整，该更新仅使用新点与训练数据之间的协方差，需要一次对所有点都相同的矩阵求逆。这比再次运行模拟器快得多，并且在每个点提供不确定性，而不是单一的确定性答案。<sup>[14](https://maths.dur.ac.uk/users/andrew.iskauskas/historyMatching.html)</sup> 代理模型评估耗时约10<sup>−5</sup>秒，远远快于模拟器运行。<sup>[6](https://www.jstatsoft.org/article/view/v109i10/4587)</sup>

## 不合理性度量

不合理性度量量化模拟器在候选输入处的期望输出与观测数据之间的距离，并按所有相关不确定性来源进行缩放。<sup>[1](https://www.bayesianstatistics.com/Bayesian_History_Matching)</sup> 对于单个输出，其形式为

\[ I(x)^2 = \frac{(E[g(x)] - z)^2}{\mathrm{Var}(g(x)) + \mathrm{Var}(d) + \mathrm{Var}(e)}, \]<sup>[22](https://mogp-emulator.readthedocs.io/en/latest/methods/thread/ThreadGenericHistoryMatching.html)</sup>

其中 \( E[g(x)] \) 和 \( \mathrm{Var}(g(x)) \) 是代理模型在输入 \( x \) 处的调整期望和方差，\( z \) 是观测值，\( \delta \) 表示观测误差等不确定性。<sup>[14](https://maths.dur.ac.uk/users/andrew.iskauskas/historyMatching.html)</sup> 在校准文献使用的多变量表述中，

\[ I(\boldsymbol{\theta}) = (\mathbf{y}^p - E[\mathbf{f}(\boldsymbol{\theta})])^T (\mathbb{V}[\mathbf{y}^p - E[\mathbf{f}(\boldsymbol{\theta})]])^{-1} (\mathbf{y}^p - E[\mathbf{f}(\boldsymbol{\theta})]), \]

任何使 \( I(\boldsymbol{\theta}) \) 超过阈值的 \( \boldsymbol{\theta} \) 都被判定为不合理并丢弃。<sup>[5](https://wires.onlinelibrary.wiley.com/doi/full/10.1002/wics.1645)</sup> 阈值因问题而异；常见的起点是截断值3，其动机来自普克尔斯海姆三西格玛规则，该规则指出对于单峰连续分布，95%的概率质量位于距均值三个标准差以内。<sup>[6](https://www.jstatsoft.org/article/view/v109i10/4587)</sup>

不确定性预算通常包括观测误差、代理模型（代码）不确定性、随机模拟器的集合变异性，以及模型偏差——这是对模拟器局限性的事先承认，可防止过拟合和过度自信的预测。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup> 当同时匹配多个输出时，常见规则是仅当输入通过最大不合理性检验及其他变体检验时，才认为该输入非不合理；在HIV案例研究中，从第4波次起，输入必须通过所用的全部三项检验，其中一项检验的阈值选为近似自由度为18的卡方分布的95%临界值。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup>

## 波次与NROY区域

历史匹配按波次推进。在第一波次中，根据初始模拟器运行设计构建代理模型，在整个输入空间上评估不合理性，并丢弃所有超过截断值的输入。幸存区域称为尚未排除（NROY）区域。在后续每个波次中，在当前NROY区域内运行额外模拟，在该区域上训练和验证新的代理模型，并进一步丢弃一部分不合理输入。<sup>[7](https://www.mdpi.com/1996-1073/17/16/4014)</sup> 由于每个波次将新的模拟器运行集中在仍可能出现可接受匹配的地方，代理模型恰好在关键区域变得更准确，非不合理空间随每次迭代而收缩。<sup>[13](https://academic.oup.com/jrsssc/article/66/4/717/7058323)</sup>

随着NROY空间收缩，对其采样变得更困难。早期波次可以从全空间均匀采样并拒绝失败样本；后期波次使用现有非不合理样本的扰动或专门设计。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup> 文献中出现两种停止准则：一种是实用性准则，即最新波次的实际模拟器运行中有很高比例本身是非不合理的；另一种是结构性准则，即代理模型方差已小于系统中剩余的不确定性，因此除非下调这些不确定性，NROY空间不太可能进一步收缩。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup><sup> • </sup><sup>[15](https://pmc.ncbi.nlm.nih.gov/articles/PMC4288726/)</sup>

## 案例研究

**乌干达HIV。** 安德里亚纳基斯及其同事的教程将一个动态、事件驱动、基于个体的随机HIV模拟器（22个输入、18个输出）与乌干达的人口学、行为学和流行病学数据进行历史匹配。经过9个波次后，非不合理区域缩小为原始输入空间的10<sup>−11</sup>，在其中进行的模拟器评估有65%的概率同时拟合全部18个输出。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup> 对同一模拟器的后续分析通过除均值外还代理输出方差，使历史匹配适应随机输出；经过六个波次后，参数空间缩小了10<sup>11</sup>倍，与早期变体相比，方差代理将所需时间降至70%，模拟器评估次数减少43%。<sup>[13](https://academic.oup.com/jrsssc/article/66/4/717/7058323)</sup>

**星系形成。** 弗农、戈德斯坦和鲍尔将该方法应用于Galform——杜伦大学计算宇宙学研究所的星系形成模拟，有17个输入和7个代理输出。到第4波次，非不合理区域仅占原始输入空间的0.039%；当第4波次的代理模型方差低于模型偏差与观测误差之和时，迭代终止，最终第5波次产生了306次满足更严格截断值 \( I_M(x) < 2.5 \) 的运行。<sup>[9](https://arxiv.org/abs/1405.4976)</sup>

**心脏数字孪生。** 在一项虚拟患者心脏模型的队列研究中，14个生物标志物各用一个高斯过程代理模型进行代理。由于为一位患者训练的代理模型可复用于其他患者，87.41%的非不合理参数组合无需运行任何额外模拟即可找到。将假设的测量不确定性从每个生物标志物均值的10%降至5%，使最终参数空间缩小了6个数量级，表明可实现的收缩程度对数据精度有多强的依赖。<sup>[16](https://link.springer.com/article/10.1007/s10439-022-03095-9)</sup>

## 与其他校准方法的关系

历史匹配通常被定位为概率校准的先导步骤或补充手段，而非竞争方法。它可以排除大量后验概率极低的输入空间区域，之后可在大大缩小的NROY空间上运行完整的贝叶斯分析，如MCMC。<sup>[17](https://academic.oup.com/mnras/article/466/2/2418/2691461)</sup> 2025年在洛伦兹96系统上对四种基于代理模型的贝叶斯校准方法进行的比较发现，校准-代理-采样以高计算代价提供了优异性能，目标导向的贝叶斯最优实验设计以更少的模型评估达到相当精度，而历史匹配表现出中等有效性，但作为先导步骤有用。<sup>[18](https://arxiv.org/abs/2508.13071)</sup> 在理想化气候问题上与集合卡尔曼反演的比较中，两种方法在低维情形下产生了参数值的一致后验分布。<sup>[19](https://meetings-archive.aps.org/smt/2025/mar-c37/1/)</sup>

石油文献中一个值得注意的警告是，贝叶斯风格的辅助历史匹配表述通常假设模拟器能在测量误差内复现油田数据，这一假设对实际资产并不成立，可能导致低估预测不确定性。<sup>[20](https://jpt.spe.org/bayesian-style-history-matching-another-way-underestimate-forecast-uncertainty)</sup> 在该方法内部，模型偏差项是这一局限性的指定位置，历史匹配对偏差的显式处理是其显著特征之一。<sup>[8](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)</sup>

## 软件

由杜伦大学的安德鲁·伊什考斯卡斯和TJ·麦金利编写的R包hmer提供贝叶斯线性代理和历史匹配，包括自动代理模型训练、诊断以及用于生成波次的点提议方法；1.6.2版已在CRAN上。<sup>[6](https://www.jstatsoft.org/article/view/v109i10/4587)</sup><sup> • </sup><sup>[21](https://www.stat.ethz.ch/CRAN/web/packages/hmer/index.html)</sup> 流行病学家已用它来匹配结核病和HIV模拟器。<sup>[6](https://www.jstatsoft.org/article/view/v109i10/4587)</sup> 疾病建模研究所维护着一个用于模型校准和不确定性量化的Python实现。<sup>[10](https://github.com/InstituteforDiseaseModeling/historymatching)</sup>

## References

1. [Bayesian History Matching, BayesianStatistics.com](https://www.bayesianstatistics.com/Bayesian_History_Matching)
2. [Craig, P., Goldstein, M., Seheult, A. H., Smith, J. A. (1996). Bayes linear strategies for matching hydrocarbon reservoir history. Bayesian Statistics 5, 69–95. Durham Repository](https://durham-repository.worktribe.com/output/1675851)
3. [Bayesian uncertainty analysis for complex systems biology models, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC5748965/)
4. [Salter, J. M. et al. (2016). A comparison of statistical emulation methodologies for multi-wave calibration of environmental models. Environmetrics](https://onlinelibrary.wiley.com/doi/10.1002/env.2405)
5. [Sung, C. L. et al. (2024). A review on computer model calibration. WIREs Computational Statistics](https://wires.onlinelibrary.wiley.com/doi/full/10.1002/wics.1645)
6. [Iskauskas, A., McKinley, T. J. (2024). Emulation and History Matching Using the hmer Package. Journal of Statistical Software 109(10)](https://www.jstatsoft.org/article/view/v109i10/4587)
7. [Calibration under Uncertainty Using Bayesian Emulation and History Matching: Methods and Illustration on a Building Energy Model. Energies 17(16), 4014](https://www.mdpi.com/1996-1073/17/16/4014)
8. [Andrianakis, I. et al. (2015). Bayesian History Matching of Complex Infectious Disease Models Using Emulation: A Tutorial and a Case Study on HIV in Uganda. PLOS Computational Biology 11(1): e1003968](https://journals.plos.org/ploscompbiol/article?id=10.1371%2Fjournal.pcbi.1003968)
9. [Vernon, I., Goldstein, M., Bower, R. (2014). Galaxy Formation: Bayesian History Matching for the Observable Universe. Statistical Science. arXiv:1405.4976](https://arxiv.org/abs/1405.4976)
10. [InstituteforDiseaseModeling/historymatching, GitHub](https://github.com/InstituteforDiseaseModeling/historymatching)
11. [Uncertainty Quantification for Computer Models With Spatial Output Using Calibration-Optimal Bases. Journal of the American Statistical Association](https://www.tandfonline.com/doi/full/10.1080/01621459.2018.1514306)
12. [Systematic structural discrepancy assessment for computer models, PMC](https://pmc.ncbi.nlm.nih.gov/articles/PMC12105788/)
13. [Andrianakis, I. et al. (2017). History Matching of a Complex Epidemiological Model of HIV Transmission by Using Variance Emulation. JRSS Series C 66(4), 717–740](https://academic.oup.com/jrsssc/article/66/4/717/7058323)
14. [History Matching, Andrew Iskauskas, Durham University](https://maths.dur.ac.uk/users/andrew.iskauskas/historyMatching.html)
15. [Bayesian History Matching of Complex Infectious Disease Models, PMC version](https://pmc.ncbi.nlm.nih.gov/articles/PMC4288726/)
16. [Rodero, C. et al. (2022). Calibration of Cohorts of Virtual Patient Heart Models Using Bayesian History Matching. Annals of Biomedical Engineering 51, 241–252](https://link.springer.com/article/10.1007/s10439-022-03095-9)
17. [Constraints on galaxy formation models from the galaxy stellar mass function and its evolution. MNRAS 466, 2418](https://academic.oup.com/mnras/article/466/2/2418/2691461)
18. [Holthuijzen, M. F. et al. (2025). Surrogate-based Bayesian calibration methods for climate models. arXiv:2508.13071](https://arxiv.org/abs/2508.13071)
19. [Comparing the performance of calibration algorithms on a hierarchy of climate problems. APS Global Physics Summit 2025](https://meetings-archive.aps.org/smt/2025/mar-c37/1/)
20. [Bayesian-Style History Matching: Another Way To Underestimate Forecast Uncertainty? Journal of Petroleum Technology](https://jpt.spe.org/bayesian-style-history-matching-another-way-underestimate-forecast-uncertainty)
21. [hmer: History Matching and Emulation Package, CRAN](https://www.stat.ethz.ch/CRAN/web/packages/hmer/index.html)
22. [Thread: History Matching, Multi-Output GP Emulator 0.7.2 documentation](https://mogp-emulator.readthedocs.io/en/latest/methods/thread/ThreadGenericHistoryMatching.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 11, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 物质世界与数学 › 数学与统计学 › 统计学与概率论 › Bayesian statistics › Bayesian model selection, design, and applications › Bayesian experimental design and search theory › Bayesian history matching

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/bayesian-history-matching

English original: https://www.edgepedia.org/bayesian-history-matching
