Gravar-mail: From statistical inference to a differential learning rule for stochastic neural networks