He is Director of Research in the Department of Psychiatry at the Autonomous University of Barcelona (UAB). He directs the Research Unit in Cognitive Neuroscience (URNC) and the Chair "the social brain" at the same university. He is also a researcher at the Hospital del Mar Medical Research Institute (IMIM).
His research is dedicated to the technical application of neuroimaging in the study of mental illnesses, but also to the exploration of how the brain adapts to life challenges as diverse as motherhood or ideological struggle. Vilarroya has disseminated his research in scientific articles, but also in books of essays such as Somos lo que nos contamos (Ariel, 2019), Paraula de robot (Bromera, 2003) or La disolución de la mente (Tusquets, 2002). He has also collaborated in popularising science in the media, especially in the press and radio.