@blueberry have you ever looked into automatic-differentiation: http://alexey.radul.name/ideas/2013/introduction-to-automatic-differentiation/ e.g. https://github.com/log0ymxm/clj-auto-diff ?
Or do you think this is a nice idea, but will have terrible performance? It looks like some of these compilers are very impressive, e.g. https://github.com/Functional-AutoDiff/STALINGRAD
I currently miss an automatic differentiation framework like theano, tensorflow or torch in Clojure
Many of the stochastic approaches for inference in bayesian graphical models also use gradients and parametrized distributions, e.g. variational autoencoders.
An example are the latest approaches of "compiling" SMC with proposal networks for high-dimensional distributions coming form people around Anglican. https://arxiv.org/abs/1706.00400 https://arxiv.org/abs/1705.10306
I think this approach holds very large promise for high-dimensional probabilistic inference, either in graphical models or "non-parametric" models of turing-complete probabilistic programming languages.