Translating sensory inputs to perceptual decisions relies on building internal representations of features critical for solving complex tasks. Yet, we still lack a mechanistic account of how the brain forms these mental templates of task-relevant features to optimize decision-making. Here, we provide evidence for recurrent inhibition: an experience-dependent plasticity mechanism that refines mental templates by enhancing γ-aminobutyric acid (GABA)-mediated (GABAergic) inhibition and recurrent processing in superficial visual cortex layers. We combine ultrahigh-field (7 T) functional magnetic resonance imaging at submillimeter resolution with magnetic resonance spectroscopy to investigate the fine-scale functional and neurochemical plasticity mechanisms for optimized perceptual decisions. We demonstrate that GABAergic inhibition increases following training on a visual (i.e., fine orientation) discrimination task, enhancing the discriminability of orientation representations in superficial visual cortex layers that are known to support recurrent processing. Modeling functional and neurochemical plasticity interactions reveals that recurrent inhibitory processing optimizes brain computations for perpetual decisions and adaptive behavior.