Set-shifting, a form of behavioral flexibility, requires an attentional shift from one stimulus dimension to another. We extended an established rodent set-shifting task1 by requiring attention to different stimuli according to context. The task was combined with specific lesions to identify neuron subtypes underlying a successful shift.