Zero-Shot Generalization during Instruction Tuning: Insights from Similarity and Granularity