Statistical Mechanics of Temporal Association in Neural Networks