Perceptual decisions are better when they take uncertainty into account. Here we show that human decision-making accounts for uncertainty arising not only from external factors, but from the observer's cognitive state. We manipulated uncertainty in an orientation categorization task from trial to trial using only an attentional cue. Category and confidence decision boundaries shifted in an approximately Bayesian fashion. This responsiveness likely improves perceptual decisions in natural vision.Sensory representations are inherently noisy. In vision, stimulus factors such as low contrast, blur, and visual noise can increase an observer's uncertainty about a visual stimulus. Optimal perceptual decision-making requires taking into account both the sensory measurements and their associated uncertainty 1 . When driving on a foggy day, for example, you may be more uncertain about the distance between your car and the car in front of you than you would be on a clear day, and try to keep further back. Humans often respond to sensory uncertainty in this way 2,3 , adjusting both their choice 4 and confidence 5 behavior. Confidence is a metacognitive measure that reflects the observer's degree of certainty about a perceptual decision 6,7 .Uncertainty, however, often arises not from the external world but from one's internal state. Attention is a key internal state variable that governs the uncertainty of visual representations 8,9 ; it modulates basic perceptual properties like contrast sensitivity 10,11 and spatial resolution 12 . Interactions between attention and perceptual decision-making have been of interest [13][14][15][16][17][18][19] , but the formal modeling tools used to investigate uncertainty in perception have not yet been applied to the uncertainty due to one's attentional state. It is therefore unknown whether and how humans take attention-dependent uncertainty into account when making perceptual decisions. Here we combined psychophysical experiments with modeling of the experimental data and model comparison to determine the influence of attention on perceptual decision rules.Observers categorized drifting grating stimuli as drawn from either a narrow distribution around horizontal (SD = 3• , category 1) or a wide distribution around horizontal (SD = 12 • , category 2) (Figure 1a) 4 . This task requires distinguishing a more specific from a more general perceptual category, similar to determining whether an approaching person is someone you know. Four stimuli were briefly presented on each trial, and a response cue indicated which stimulus to report. Observers reported both their category choice (category 1 vs. 2) and their degree of confidence on a 4-point scale using a single button press (Figure 1b). Using a single button press prevented post-choice influences on the confidence judgment 20 and emphasized that confidence should reflect the observer's perception rather than a preceding motor response. Twelve observers participated, with about 2000 trials per observer.We manipulated voluntary (endogenous)...