In this thesis, I show that a single class of unsupervised learning rules that can be inferred from in vivo data learns neuronal representations consistent with a wide range of datasets. Recurrent neuronal networks endowed with learning rules of this class represent memories as qualitatively different spatiotemporal attractors (i.e. fixed-point attractors, chaotic attractors or transient sequences of activity) depending on the stimuli statistics and learning rule. They match disparate observations from recordings in different species, brain regions and memory tasks, suggesting that memories are differentially represented in brain systems. This thesis provides a unified model for explaining the diversity in neuronal dynamics during memory retrieval.