Advice for a math PhD student who is also interested in a part of EE/CS I'm a pure math (geometry/topology-oriented) PhD student at a top-level American university. I recently got interested in machine learning and read the recent papers. Unfortunately, machine learning will never need the mathematics I'm currently studying. There are some branches of machine learning which require some sophisticated mathematics, but I'm interested only in the mainstream of ML (as well as the pure math topics I'm currently studying), which requires only the basic knowledge of mathematics. I'm interested in neither something like application of algebraic topology to ML, nor industry after graduation.   

It seems that most pure math PhD students and professors aren't interested in such unrelated subjects. If I will do research on ML with EECS students or professors, I suppose I will be considered as unproductive. 

I was wondering if you would give me an advice me, so that I can continue studying the both subjects without having to be worried?
I think you are correct in your estimate that doing ML work that requires only basic knowledge of mathematics probably won't get you hired, promoted, or tenured in a mathematics department.  

The best I can say is this: If you publish enough in your pure math area for hiring, promotion, or tenure, then doing additional ML work can be a plus.  Interdisciplinary work and public outreach could be emphasized at your future institution.

The other possibility would be getting a job in industry related to ML, and giving up on your pure math career.  A Ph.D. in math, even in an unrelated field, may be useful for getting hired at such a place.