Inflexible behavior is a core characteristic of autism spectrum disorder (ASD), but its underlying cause is unknown. Using a perceptual learning protocol, we observed initially efficient learning in ASD that was followed by anomalously poor learning when the location of the target was changed (over-specificity). Reducing stimulus repetition eliminated over-specificity. Our results indicate that inflexible behavior may be evident ubiquitously in ASD, even in sensory learning, but can be circumvented by specifically designed stimulation protocols.