What are the neural circuits by which the brain differentiates between incidental and meaningful environmental inputs to enable long-lasting changes in sensation and behavior? Experimental evidence indicates that this distinction may be made at the earliest stages of cortical processing, in primary sensory cortex. We have used high-throughput, automated behavioral training in freely-moving mice to determine how the detailed neural circuitry of the cerebral cortex is distinctly changed during acquisition of a tactile reward-based association. We find that training animals in a sensory association task drives distinctive changes in both thalamocortical and intracortical circuitry compared to passive sensory stimulation. These changes are initiated at the very earliest stages of training and may be involved in generating behavioral changes that represent learning.