The response of a neuron to sensory stimuli can only give correlational support for functional hypotheses. To experimentally test causal function, the neural activity needs to be manipulated in a cell-type-specific as well as spatially and temporally precise way. We review recent optogenetic experiments on parvalbumin-positive cortical interneurons that link modeling studies of synchronization to experimental studies on attentional modulation of gamma oscillations in primates.