English

DeGAS: Gradient-Based Optimization of Probabilistic Programs without Sampling

Programming Languages 2026-01-22 v1

Abstract

We present DeGAS, a differentiable Gaussian approximate semantics for loopless probabilistic programs that enables sample-free, gradient-based optimization in models with both continuous and discrete components. DeGAS evaluates programs under a Gaussian-mixture semantics and replaces measure-zero predicates and discrete branches with a vanishing smoothing, yielding closed-form expressions for posterior and path probabilities. We prove differentiability of these quantities with respect to program parameters, enabling end-to-end optimization via standard automatic differentiation, without Monte Carlo estimators. On thirteen benchmark programs, DeGAS achieves accuracy and runtime competitive with variational inference and MCMC. Importantly, it reliably tackles optimization problems where sampling-based baselines fail to converge due to conditioning involving continuous variables.

Keywords

Cite

@article{arxiv.2601.15167,
  title  = {DeGAS: Gradient-Based Optimization of Probabilistic Programs without Sampling},
  author = {Francesca Randone and Romina Doz and Mirco Tribastone and Luca Bortolussi},
  journal= {arXiv preprint arXiv:2601.15167},
  year   = {2026}
}
R2 v1 2026-07-01T09:14:27.996Z