Hierarchical Bayesian Inference in Networks of Spiking Neurons