将随机程序映射到热力学硬件,实现高效随机采样。
Thermalizing Stochastic Programs

- 将随机程序转为硬件原生的能量模型进行编译。
- 通过误差分析和训练优化,降低编译后残余误差。
- 适用于金融模拟、生态模型等需高效采样的场景。
我们提出一套工具,将通用随机程序映射到专为能效型随机采样设计的热力学硬件。给定以有向因子图(DFG)或参数化随机电路(PSC)表示的目标随机程序,首先介绍一种近似方法,将每个因子编译为硬件原生的能量基模型(EBM)。随后分析因子级误差在整体中的累积机制,并引入两种训练优化策略:上下文匹配与轨迹级REINFORCE后训练,以减少各因子独立训练后遗留的残余误差。所提出的thermalizers框架接收以torx库表达的随机程序,将其因子替换为由thrml库实现并采样的热力学核。我们在多个应用中验证该框架:基于历史市场数据学习一组金融时间序列的联合日间动态的市场模拟器、数学生态学中的概率模型、硬件无法原生表达的EBM吉布斯采样,以及高斯随机电路上的顺序贝叶斯设计循环。
原文摘要 · Abstract (English)
We present a set of tools for mapping general stochastic programs to thermodynamic hardware designed for energy-efficient stochastic sampling. Given a target stochastic program expressed as a Directed Factor Graph (DFG) of stochastic channels, or equivalently as a Parametrized Stochastic Circuit (PSC), we first introduce a method to approximately compile each factor in the DFG to an Energy-Based Model (EBM) that is native to the hardware. We then analyze how the error of the compiled DFG accumulates from the per-factor errors, and introduce two training refinements, context matching and trajectory-level REINFORCE post-training, which can reduce the residual error left by training each factor in isolation. The \texttt{thermalizers} framework takes a stochastic program expressed in the \texttt{torx} library and replaces its factors with thermodynamic kernels implemented and sampled using the \texttt{thrml} library. We demonstrate it on several example applications, including a market simulator that learns the joint day-to-day dynamics of a panel of financial time series from recorded market history alone, a probabilistic model from mathematical ecology, Gibbs sampling of an EBM the hardware cannot natively express, and a sequential Bayesian design loop over a Gaussian stochastic circuit.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。