symbolic-pymc
symbolic-pymc copied to clipboard
Automatic MAP methods for sparsity-inducing, non-smooth log-likelihoods
There's nearly enough in place to start automating the application of proximal methods. I've outlined some of the basic ideas here and here.
To recap, this would involve simple identifications of convex/concave log-likelihoods through the use of a representative table of primitive convex functions and their algebraic closure properties. Identification of convexity would also serve as a means of determining the applicable proximal methods, because a large set of such methods can be "tabled" in direct connection with many primitive convex functions (e.g. see this paper).
FYI: we can add a proximal Langevin sampler to PyMC and extend the aforementioned functionality to posterior sampling.
That'd be awesome!
The first steps toward this involve the construction of miniKanren goals (or facts tables) to identify simple, convex likelihood + penalty terms within a model's log-likelihood graph (e.g. squared error terms from Gaussian log-likelihoods, l1 penalties from Laplace prior log-likelihoods, etc.)
This is something we could do now in both PyMC4/TensorFlow and PyMC3/Theano; however, the latter has better graph canonicalization, so the goals would be simpler and more widely applicable.
Once those goals are in place, we will need to create sampler step functions that implement proximal methods. Fortunately, I already have an implementation of the most basic one, the proximal gradient, for use with Theano objects here.