Population Dynamics of Learning and Memory