Distinct mechanisms in visual category learning