I am a second year PhD student at Mila and DIRO under the supervision of Simon Lacoste-Julien.

I am interested in constrained optimization for deep learning. I am working on how to reliably solve constrained optimization problems with some of the following characteristics: non-convexity, non-smoothness, non-differentiability, stochastic constraints, and large numbers of constraints.

Check out Cooper, a library for constrained optimization in Pytorch that I co-founded.

Previously, I was an intern at Simon's group at Mila under the supervision of Jose Gallego-Posada. Before that, I graduated from the BSc in Mathematical Engineer at Universidad EAFIT. During the BSc, I spent a summer at McKinsey & Co. as a research intern.

Research interests: (Non-Convex) Constrained Optimization, Min-Max Optimization, Deep Learning, Sparsity, Fairness.

Contact: juan43ramirez (at) gmail (dot) com






2020 and beyond

  • Jul 2020: Jose Gallego-Posada, PhD student at Mila will be my supervisor for my undergraduate thesis. I will be working on deep generative models.

  • Jun 2019: Now part of McKinsey & Co. in Belgium as a research intern. Working with Antoine Stevens and Patrick Dehout in ML for the agricultural and chemical industries.

  • Jan 2019: Arrived in Louvain-la-Neuve, Belgium for an exchange semestrer at the Université Catholique de Louvain.

  • Nov 2017: I have been appointed as president of CIGMA-OE, the Mathematical Engineering chapter of the Student Organization at Universidad EAFIT.

  • Dec 2015: I was awarded a full scholarship for the Bachelor's degree in Mathematical Engineering at Universidad EAFIT.

  • Dec 2015: Scored amongst the best 0.1% on the Colombian high school examination ICFES. Unfortunately, I did not obtain an Andrés Bello prize.

  • Dec 2015: Ranked first in the National Chemistry Olympiads of Universidad de Antioquia.



  1. Controlled Sparsity via Constrained Optimization or: How I Learned to Stop Tuning Penalties and Love Constraints. J. Gallego-Posada, J. Ramirez, A. Erraqabi, Y. Bengio and S. Lacoste-Julien. NeurIPS, 2022.


  1. Omega: Optimistic EMA Gradients. J. Ramirez, R. Sukumaran, Q. Bertrand and G. Gidel. LatinX in AI workshop at ICML, 2023.

  2. L0onie: Compressing COINs with L0-constraints. J. Ramirez and J. Gallego-Posada. Sparsity in Neural Networks Workshop, 2022.

  3. Flexible Learning of Sparse Neural Networks via Constrained L0 Regularization. J. Gallego-Posada, J. Ramirez and A. Erraqabi. LatinX in AI Workshop at NeurIPS, 2021.


  1. J. Gallego-Posada and J. Ramirez (2022). Cooper: a general-purpose library for constrained optimization in Pytorch [Computer software].