Gabriel Loewinger

Gabriel Loewinger

Machine Learning Research Scientist

Machine Learning Team, National Institute of Mental Health, NIH


I am a machine learning research scientist at the NIMH where I develop statistical and machine learning methods. I completed my PhD in the Department of Biostatistics at Harvard where I was an NIH Graduate Fellowship recipient (NRSA: F31). I was advised by Dr. Giovanni Parmigiani and conducted statistics and machine learning research with a focus on the development of transfer learning methodologies for training predictive models when multiple training datasets are available (i.e., domain generalization and multi-source domain adaptation). I also collaborated closely with Dr. Rahul Mazumder at MIT. My graduate methods research involved tools from mixed integer and convex optimization. At the NIH I have worked on functional data analysis and causal inference methods. My subject area interests include neuroscience and chemical dependence. Please feel free to reach out to me at

Download my CV.

  • Biostatistics
  • Machine Learning
  • Optimization
  • Neuroscience
  • PhD in Biostatistics, 2022

    Harvard University

  • AM in Biostatistics, 2019

    Harvard University

  • BA in Neuroscience, 2012

    Pitzer College

About Me

I grew up in Washington, DC and studied neuroscience at Pitzer College (of the Claremont Colleges). After graduating, I was fortunate to receive a Watson Fellowship to conduct research for one year in Peru, Brazil, Thailand and Vietnam on alternative treatments for chemical dependence. I subsequently spent a year in Nepal on a research Fulbright Fellowship on HIV risk and chemical dependence.

After returning from abroad, I received an NIH postbac research fellowship in the laboratory of Dr. David Lovinger. At the NIH I witnessed how biomedical sciences increasingly rely on and benefit from statistical methods research. This experience motivated me to pursue doctoral training in biostatistics.

My graduate research focused on developing machine learning algorithms that borrow information across different datasets to improve model generalizability. In addition to my advisor, Dr. Giovanni Parmigiani, I collaborated with Dr. Rahul Mazumder at MIT and Dr. Rajarshi Mukherjee at Harvard.

At the NIMH I develop machine learning and statistical methods. I also actively engage in collaborative statistical work with clinicians, neuroscientists, and mental health researchers.

In my free time, I train Brazilian Jiu Jitsu and other forms of grappling. I am also interested in chess, Vipassana meditation and studying languages.


  • Teaching Award, Department of Biostatistics, Harvard University. 2021-2022
  • Harvard Medical School Computational Data Neuroscience Symposium Best Abstract Award. Oct 2020
  • NIH National Research Service Award Pre-Doctoral Fellowship (F31), National Institute on Drug Abuse. Aug 2020
  • Rose Fellowship, Harvard School of Public Health. Nov 2019
  • NIH Technical Intramural Research Training Award. Feb 2015
  • Fulbright Research Fellowship. May 2013
  • Watson Fellowship. May 2012
  • Amgen Scholarship. Mar 2011
  • Claremont Colleges Summer Neuroscience Research Fellowship. Mar 2011

Software Development

CRAN Package
Nov 2023 – Present
I codeveloped the “fastFMM” R package that is freely available on CRAN. The package implements an approach to functional generalized linear mixed models. Click on “CRAN Package” above for a link to download.
CRAN Package
Feb 2023 – Present
I developed and maintain the “sMTL” R package that is freely available on CRAN. The package implements numerous sparse Multi-Task Learning methods. The scalable algorithms implemented in the package are based on block coordinate descent and combinatorial local search. They are coded in Julia for computational efficiency and are called from an easy-to-use R wrapper. Click on “CRAN Package” above for a link to download. Named as one of R Views “Top 40” new CRAN packages of February 2023!
CRAN Package
Feb 2020 – Present
I developed and maintain the “studyStrap” R package that is freely available on CRAN. The package implements numerous methods for training prediction algorithms with multiple training datasets. Click on “CRAN Package” above for a link to download. ~ 11,000 downloads. Named as one of R Views “Top 40” new CRAN packages of February 2020!


(2024). Optimal Ensemble Construction for Multi-Study Prediction with Applications to COVID-19 Excess Mortality Estimation. Statistics in Medicine, (9), 43, pp. 1774–1789.

(2022). Multi-Task Learning for Sparsity Pattern Heterogeneity: A Discrete Optimization Approach. arXiv,

(2022). Hierarchical resampling for bagging in multistudy prediction with applications to human neurochemical sensing. The Annals of Applied Statistics, (16), 4, pp. 2145–2165,

(2021). Protocol for Outcome Evaluation of Ayahuasca-Assisted Addiction Treatment: The Case of Takiwasi Center. Frontiers in Pharmacology, (12), pp. 1203,

(2021). Surprise-Induced Enhancements in the Associability of Pavlovian Cues Facilitate Learning across Behavior Systems. Behavioral Neuroscience,

(2020). Dopamine D2 Receptor Signaling on iMSNs is Required for Initiation and Vigor of Learned Actions. Neuropsychopharmacology, (45), 12, pp. 2087–2097,

(2020). Operant Self-Stimulation of Thalamic Terminals in the Dorsomedial Striatum is Constrained by Metabotropic Glutamate Receptor 2. Neuropsychopharmacology, (45), 9, pp. 1454–1462,

(2016). Low Knowledge and Perceived Hepatitis C Risk Despite High Risk Behaviour among Injection Drug Users in Kathmandu, Nepal. International Journal of Drug Policy, (33), pp. 75-82,

(2013). Phasic Mesolimbic Dopamine Release Tracks Reward Seeking During Expression of Pavlovian-to-Instrumental Transfer. Biological Psychiatry, (73), 8, pp. 747–755,

(2013). Using Dopamine Research to Generate Rational Cannabinoid Drug Policy. Drug Testing and Analysis, (5), 1, pp. 22-26,