The output value of $X$ is determined by $\mathrm{argmin}_i \{\mathrm{t}(X_i)\}$, i.e. the element that spiked first, implemented by fast lateral inhibition between the $X_i$s. It is easy to show that this implements exponentiation and normalization of the energies, leading to a correct implementation of a stochastic transition circuit for Gibbs sampling; see [@VMEJ-circuits-supplemental] for more information. Elements are clocked quasi-synchronously, reflecting the conditional independence structure and parallel update scheme from Figure \[fig:transition\]D, and yields samples from the correct equilibrium distribution.

This spiking implementation helps to narrow the gap with recent theories in computational neuroscience. For example, there have been recent proposals that neural spikes correspond to samples[@fiser2010statistically], and that some spontaneous spiking activity corresponds to sampling from the brain’s unclamped prior distribution[@berkes2011spontaneous]. Combining these local elements using our composition and abstraction laws into massively parallel, low-precision, intentionally stochastic circuits may help to bridge the gap between probabilistic theories of neural computation and the computational demands of complex probabilistic models and approximate inference[@probbrains]. [**(Figure 6 about here.)**]{} \[fig:COMPILER\]

Discussion {#discussion .unnumbered}
==========

To further narrow the efficiency gap with the brain, and scale to more challenging Bayesian inference problems, we need to improve the convergence rate of our architectures. One approach 