Classical conditioning has been studied in many different animal models, and even in humans. However, the larval zebrafish with its transparent brain offers a unique opportunity to observe large scale changes in synaptic structure that accompany this form of learning. Accordingly, we have developed a novel paradigm for visualizing synaptic changes that occur during classical conditioning in larval zebrafish. Using this paradigm we have observed striking region-specific changes in the distributions of synapses that drive the rewiring of neural circuits that mediate threat responses. In this grant we will expand this paradigm by monitoring neuronal activity through imaging of genetically encoded calcium indicators throughout the pallium (the homolog of the amygdala) before, during and after classical conditioning and extinction. This will allow us to identify cells that comprise the circuits that control threat and safety and explore their connectivity using optogenetics. We will investigate how different sensory inputs can cause changes in the activity of those cells leading to synapse change, and the formation or extinction of associative memories. A crucial component of these studies will be the recording of field potentials to capture rhythmic activity throughout the pallium and high speed SPIM imaging of genetically encoded voltage indicators to record rhythms in individual cells. By understanding the precise timing of signals that impinge on individual cells we will uncover mechanisms that underlie synaptic plasticity. Our goal is to develop a theoretical model describing the neural circuits that underlie threat detection and how they can change as a result of associative memory formation and extinction.