[D] What is the path to ML research?

I'm currently a freshman in computer science at a fairly respected university. I am very interested by the application and current progress of ML. I really want to eventually do research, and I want to know what steps I should be taking do that. Currently, I'm doing a freshman research program. Besides that, I'm not sure what needs to be done. I've looked it up and I understand that I need to get a phd in something related. Right now my plan is to double major in pure math, and do a 5-year master program my school has.