The brain picks-up and exploits statistical regularities in the sensory environment. These regularities allow generating predictions about upcoming sensory events and minimizing the discrepancy between predicted and observed events. In a series of recent behavioural, neuropsychological, electrophysiological and fMRI investigations we have systematically investigated how the predictive context of a task influences the orienting of spatial attention and the interaction between the conscious and unconscious processing of visual stimuli. These studies provide new insights on the brain mechanisms that regulate the deployment of attention and consciousness as a function of the probabilistic association between sensory cues and behaviorally relevant sensory events. The results of more recent pupil dilation studies allow also establishing a link with the neuropharmacological regulation of attention.