Can Data Diversity Enhance Learning Generalization?