The nervous system adapts constantly and dynamically to the sensory environment and input on the basis of stimulus features, probability and regularity in order to predict future sensory input. This adaptative and predictive process shapes perception and is the at the center of our research. The model for studying this phenomenon are the primary sensory cortices in rodents with a particular focus on the neuronal representation of deviating stimuli. Deviating stimuli are of interest as they usually have a high saliency and therefore are potent trigger for reallocating the attentional focus. Neuronal activity signalling deviant stimuli is well described in human EEG recordings. Such a mismatch negativity wave in the EEG (‘MMN’) is a robust and most-likely hard-wired phenomenon. Additionally, these deviant-detecting circuits are disturbed in a range of neurological and neuropsychiatric disorders such as schizophrenia. However, the underlying neuronal circuitry is unknown. In order to dissemble this circuitry we employ different behavioural and in-vivo physiological methods such as high-density single-neuron recordings, optogenetics and operant conditioning. Furthermore, we are interested in modelling these pathologies as well due to their close and intricate relationship with the deviance detection mechanisms.