POPL 2025 (series) / LAFI 2025 (series) / LAFI 2025 /
Partially Evaluating Higher-Order Probabilistic Programs without Stochastic Recursion to Graphical Models
Probabilistic programming languages are often distinguished by their support for higher-order functions. We demonstrate that a more nuanced distinction is possible if the focus is set on whether the program induces stochastic control flow in recursions used by higher-order functions. In the case where higher-order functionality is only applied to deterministically known values we can compile a higher-order program into a probabilistic graphical model without restricting expressivity. We provide the implementation of this approach in our probabilistic programming compiler that previously only supported first-order functional abstractions.