Depends if you want a competitive specialty. I wish I did something after M1, but I'll try to get a chart review or something in M3 or early M4. Though I'm not really planning on doing something competitive unless I end up with an exceptional Step I. If I do well on Step I and get a lot of honors in M3 maybe I'll attempt derm otherwise I'm doing IM then a subspecialty.
Supposedly the research listed on publications about the specialties also includes undergrad research. Individuals that match into competitive specialties also tend to have "the whole nine yards" so in order to separate yourself from the others you have to have something unique. Most of them are going to have research experience.