High-performance functional bayesian inference in Scala
summary
Rainier is an open source Scala library that compiles compute graphs for probabilistic models into zero-allocation JVM bytecode using ASM, auto-derives gradients, and eagerly partially evaluates constants so observed data can be curried into the graph. It represents sums as linear/log-line nodes to fold and combine terms, emits compact IR split across methods and classes with a shared globals array for intermediates, and exposes a RandomVariable monad plus generators; benchmarks sometimes show ~10x speed versus Stan and it runs HMC samplers for Stripe production tasks.
AI-written summary · about
chapters (14)
- 0:00Introduction to Rainier
- 1:24Bayesian inference basics
- 7:11Compute graph design
- 17:12Eager partial evaluation
- 18:22Linear and log-line nodes
- 23:02Optimizing compute graphs
- 26:07Bytecode compilation
- 31:27Performance vs Stan
- 33:14Functional modularity
- 36:49Random variable monad
- 41:17Practical modeling example
- 44:31Handling large datasets
- 45:33Generators for predictions
- 48:42Q&A and release notes
related talks
30mProbabilistic modelling with Scala
24mCascade: Write-Once Run-Anywhere Inference on Ray
42mBayes and Bool Walk into a Bar
24mPractical Probabilistic Programming with Figaro
46mScala on the Move!
33mThe state of Scala as a platform for statistical computing
29mProbabilistic Programming: What It Is and How It Works
47mScala: The Unpredicted Lingua Franca for Data Science
