Pirhaji earned a Bachelor's degree in Biotechnology from the University of Tehran in 2008 and a Master's degree in 2010. She began working on metabolomics and the interactions between proteins and metabolites during her doctoral studies at the Massachusetts Institute of Technology (MIT). During her PhD, she worked as an intern at Merck & Co. She recognized that machine learning could be useful to analyze these interactions. Together with her advisor Ernest Fraenkel, Pirhaji founded ReviveMed. She completed her PhD at MIT in 2016.