State-transition models are essential across epidemiology and ecology, but statistical inference remains challenging owing to high-dimensional latent state spaces, temporal dependence, and intractable likelihood functions. Bayesian inference via Markov Chain Monte Carlo (MCMC) enables joint estimation of model parameters and missing event times through data augmentation, but Metropolis-within-Gibbs (MWG) schemes that combine multiple specialised kernels are notoriously difficult to implement. Current probabilistic programming frameworks face a trade-off: automation sacrifices extensibility, whilst flexibility demands substantial implementation overhead. This divide has created a software landscape characterised by tightly coupled, model-specific implementations that resist reuse and extension. We introduce gemlib.mcmc, an MCMC module designed to bridge methodological and applied communities through principled, composable kernel abstractions. The framework employs writer monads from category theory to formalise kernel composition, enabling seamless integration of parameter-estimation and data-augmentation kernels without manual state management. Built on JAX and TensorFlow Probability for high-performance computation, gemlib.mcmc provides an ergonomic interface -- leveraging Python's right-shift operator for intuitive kernel chaining -- whilst maintaining statistical rigour and transparency. Developers can extend the library by implementing only two methods; composition and hardware acceleration are automated. We demonstrate the framework through parameter inference on partially observed epidemic models, showing how complex inference algorithms can be expressed concisely and reused across applications. By reducing implementation burden we provide access to sophisticated MCMC methods and enable applied researchers to employ state-of-the-art algorithms without reimplementation overhead.


翻译:状态转移模型在流行病学和生态学中至关重要,但由于高维潜在状态空间、时间依赖性以及难以处理的似然函数,统计推断仍面临挑战。通过马尔可夫链蒙特卡洛(MCMC)进行的贝叶斯推断能够通过数据增强实现模型参数与缺失事件时间的联合估计,但结合多种专门核的Metropolis-within-Gibbs(MWG)方案以其实现难度著称。当前的概率编程框架面临两难:自动化牺牲可扩展性,而灵活性又要求巨大的实现开销。这一分歧导致软件生态呈现高度耦合、模型特化的实现方式,难以复用和扩展。我们提出gemlib.mcmc——一个MCMC模块,通过原则化、可组合的核抽象来弥合方法学与应用领域之间的鸿沟。该框架采用范畴论中的写入子单子形式化核组合,可实现参数估计核与数据增强核的无缝集成,无需手动管理状态。基于JAX和TensorFlow Probability构建的高性能计算平台,gemlib.mcmc提供了符合人体工程学的接口——利用Python的右移运算符实现直观的核链式组合——同时保持统计严谨性与透明度。开发者只需实现两个方法即可扩展该库,组合与硬件加速过程完全自动化。我们通过部分观测流行病模型的参数推断展示了该框架的能力,揭示了复杂推断算法如何被简洁表达并跨应用复用。通过降低实现负担,我们为复杂MCMC方法提供了访问途径,使应用研究人员能够在不重复实现的前提下采用最先进的算法。

0
下载
关闭预览

相关内容

【GNN】R-GCN:GCN 在知识图谱中的应用
深度学习自然语言处理
11+阅读 · 2020年5月4日
论文浅尝 | 一种嵌入效率极高的 node embedding 方式
开放知识图谱
13+阅读 · 2019年5月12日
不用数学讲清马尔可夫链蒙特卡洛方法?
算法与数学之美
16+阅读 · 2018年8月8日
基于LDA的主题模型实践(二 )MCMC--吉布斯采样
机器学习深度学习实战原创交流
25+阅读 · 2015年9月17日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
边缘计算的军事应用
专知会员服务
7+阅读 · 8月9日
一种考虑资源机动性的武器目标分配混合算法
专知会员服务
9+阅读 · 8月8日
《多域冲突比较支持模型》60页
专知会员服务
14+阅读 · 8月7日
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员