Short-term memories with a stochastic perturbation