Date
Tuesday, October 27, 2026
Name
Impulse: Fast, General, and Portable Probabilistic Programming via Compiler Augmentation
Session Type
Technical Talk
Abstract

Probabilistic programming frameworks automate Bayesian inference, but their performance is limited by a structural mismatch: the code a scientist writes to naturally express a model is often not the code an efficient sampler should execute. In practice, inference is often dominated by expensive computations entirely determined by fixed data and model structure, not by the sampled parameters. Because this structure is not explicit to a general-purpose compiler, the inference computation appears parameter-dependent and is therefore redundantly repeated across iterations. To eliminate this redundancy, we present Impulse, a probabilistic programming system built on MLIR that preserves probabilistic semantics as first-class compiler primitives. We introduce Sample-Invariant Code Motion (SICM), a compiler pass that performs dataflow analysis to understand operation dependencies on sampled parameters, applies algebraic rewrites to factor out invariant computation, and hoists the invariant computation out of the inference process. Inference algorithms such as NUTS, HMC, Metropolis-Hastings, and stochastic variational inference are all materialized from algorithm-agnostic inference primitives, and therefore share this optimization pipeline. The resulting program lowers to StableHLO for CPU, GPU, and TPU execution. On the PPLBench suite, Impulse achieves a geomean speedup of 1.6x over NumPyro, 5.7x over Stan, and 50x over Turing. SICM enables speedups from 9.2x to 217x on models with sample-invariant structure. On the Comrade black hole imager, a real-world GPU-accelerated astrophysics workload, SICM automatically removes redundancy that is buried deep within library calls and impractical to rewrite at the source level, reducing end-to-end inference time by 3.6x.

Location Name
Grand Ballroom