Distinguishing rule- and exemplar-based generalization in learning systems