Brown University researchers report that pupil dilation during surprise marks the moment the brain swaps an old mental context for a new one.