GenMLX crossed 10,800 lines of ClojureScript today. A quick snapshot of what went in over the last session.
By the numbers
| Two days ago | Now | |
|---|---|---|
| Lines of code | ~5,700 | ~10,800 |
| Distributions | 22 | 27 |
| Combinators | 8 | 9 |
| Test files | 16 | 29 |
| Test assertions | 337 | 600+ |
New distributions
Five additions: Wishart, inverse-Wishart, broadcasted normal, piecewise uniform, and beta-uniform mixture. The first two fill a gap for Bayesian covariance estimation. Broadcasted normal enables shape-flexible models. The last two are useful priors for density estimation and outlier-robust inference.
Recurse combinator
A fixed-point combinator for recursive generative functions. It wraps a lazy self-reference so a model can call itself at sub-addresses — useful for tree-structured models, recursive grammars, and variable-depth generative processes. Supports the full GFI: simulate, generate, update, and regenerate.
Elliptical slice sampling
A specialized MCMC algorithm for models with Gaussian priors. Unlike MH or HMC, it requires no tuning parameters — no step size, no mass matrix. It works by sampling along elliptical slices defined by the prior, shrinking the bracket until it finds an acceptable point.
MAP optimization
Gradient-ascent point estimation of the posterior mode, complementing the existing sampling-based inference algorithms. Useful as an initialization strategy before MCMC or as a fast approximation when full posterior samples aren’t needed.
Mask update/regenerate and incremental diffs
The Mask combinator now supports update and regenerate (previously only simulate/generate). Combined with the new IUpdateWithDiffs protocol, combinators can propagate change information incrementally — only re-executing the parts of a model that are affected by an update.
Test coverage
Six new test files covering previously untested subsystems: the edit/proposal interface, SMCP3 reversible kernels, kernel composition (chain, cycle, mix, repeat), vectorized update, choicemap algebra, and negative binomial distribution. GenMLX now passes 165/165 Gen.jl compatibility tests and 73/73 GenJAX compatibility tests.
The code is at github.com/robert-johansson/genmlx.
