Mechanisms of Generalization in Perceptual Learning