Retrieval can render memories labile, allowing them to be modified or erased by behavioral or pharmacological intervention. This phenomenon, known as reconsolidation, defies explanation in terms of classical associative learning theories, prompting a reconsideration of basic learning mechanisms in the brain. We propose that two mechanisms interact to produce reconsolidation: an associative learning mechanism of the form posited by classical theories, and a structure learning mechanism that discovers the units of association by segmenting the stream of experience into statistically distinct clusters (latent causes). We derive this framework from statistical principles, and present a mechanistic implementation. Simulations demonstrate that it can reproduce the major experimental findings from studies of reconsolidation, including dependence on the strength and age of memories, the interval between memory retrieval and extinction, and prediction errors following retrieval. In addition, we present new experimental data confirming the theory's prediction that performing part of extinction prior to retrieval attenuates reconsolidation.