John D. Cook, Greg Egan, Dan Piponi and I had a fun mathematical adventure on Twitter. It started when John Cook wrote a program to compute the probability distribution of distances $latex |xy - yx|$ where $latex x$ and $latex y$ were two randomly chosen unit quaternions: • John D. Cook, How far is xy…

The Score Function Estimator Is Widely Used For Estimating Gradients Of Stochastic Objectives In Stochastic Computation Graphs (scg), Eg. In Reinforcement Learning And Meta-learning. While Deriving The First-order Gradient Estimators By Differentiating A Surrogate Loss (sl) Objective Is Computationally And Conceptually Simple, Using The Same Approach For Higher-order Gradients Is More Challenging. Firstly, Analytically Deriving And Implementing Such Estimators Is Laborious And Not Compliant With Automatic Differentiation. Secondly, Repeatedly Applying Sl To Construct New Objectives For Each Order Gradient Involves Increasingly Cumbersome Graph Manipulations. Lastly, To Match The First-order Gradient Under Differentiation, Sl Treats Part Of The Cost As A Fixed Sample, Which We Show Leads To Missing And Wrong Terms For Higher-order Gradient Estimators. To Address All These Shortcomings In A Unified Way, We Introduce Dice, Which Provides A Single Objective That Can Be Differentiated Repeatedly, Generating Correct Gradient Estimators Of Any Order In Scgs. Unlike Sl, Dice Relies On Automatic Differentiation For Performing The Requisite Graph Manipulations. We Verify The Correctness Of Dice Both Through A Proof And Through Numerical Evaluation Of The Dice Gradient Estimates. We Also Use Dice To Propose And Evaluate A Novel Approach For Multi-agent Learning. Our Code Is Available At Https://goo.gl/xkkgxn.

Probabilistic-Programming-and-Bayesian-Methods-for-Hackers - An introduction to Bayesian methods + probabilistic programming in data analysis with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)