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

I am broadly interested in constrained optimization and how it can be used to reliably achieve certain properties in machine learning models. I am curious about the relationships between constrained optimization, game theory, bilevel optimization and variational inference.

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

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: Constrained Optimization, Machine Learning, Sparsity.

Contact: juan43ramirez (at) gmail (dot) com



  • Jan 27: I will attend Khipu 2023 in Montevideo, Uruguay. Glad to be a part of the Latin American AI community.




2020 and beyond

  • Jul 2020: Jose Gallego-Posada, current PhD student at Mila and Université de Montréal will supervise me during my second research practice for the BSc. I am starting to learn about deep generative models.

  • Jul 2020: I am taking Henry Laniado's graduate course in Robust and Non-Parametric Statistics at Universidad EAFIT.

  • Jan 2020: I am now working to develop ML models to responsibly approve credit cards for clients without a financial history as an intern at Tuya's Risk Analytics Lab in Medellín.

  • Jun 2019: I have joined McKinsey & Co. in Belgium as a research intern. I am working with Antoine Stevens and Patrick Dehout in leveraging machine learning for the agricultural and chemical industries.

  • Jan 2019: I travel to Louvain-la-Neuve, Belgium for an exchange semestrer at Université Catholique de Louvain. I am taking Pierre Dupont's graduate courses on Machine Learning and Bioinformatics.

  • Nov 2017: I will be the director of CIGMA-OE , the Mathematical Engineering committee of the Student Organization at Universidad EAFIT. https://www.instagram.com/cigmaoe/?hl=en

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

  • Dec 2015: I got a score amongst the best 0.1% on the Colombian high school examination ICFES. Unfortunately, I did not make the cut for the Andrés Bello prize. Maybe you have to get a score amongst the best 0.01% for that?

  • Dec 2015: I achieved the first place in the National Chemistry Olympiads of Universidad de Antioquia.

Education and Academia


  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.

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

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


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

Professional Experience

  • Tuya, Colombia
    Jan '20 - Jul '20

    Research Intern, Risk Analytics Lab

  • Jun '19 - Oct '19

    Research Intern, ACRE