Photo of Juan Ramirez

Juan Ramirez

PhD Candidate · Mila & Université de Montréal · Supervised by Simon Lacoste-Julien · Expected graduation: mid-2027

I work on constrained deep learning: scalable methods for training neural networks under explicit requirements such as fairness, sparsity, and safety.

My research spans the algorithms, theory, and applications of Lagrangian methods for these problems. I also work on Feasible Learning, a paradigm we introduced in 2025, and co-lead the development of Cooper, an open-source PyTorch library for constrained optimization. At NeurIPS 2025, I co-organized the first Workshop on Constrained Optimization for Machine Learning.

During my PhD, I interned on the Machine Learning Research team at Morgan Stanley in New York (Summer 2026). Before that, I completed a BSc in Mathematical Engineering at Universidad EAFIT and held research internships at Mila and McKinsey.

I am on the job market and plan to defend my thesis in June 2027.

Selected Work

Learning paradigm · AISTATS 2025

Feasible Learning: A Sample-Centric Paradigm

Feasible Learning trains models by solving a feasibility problem that bounds the loss on every training example, rather than optimizing for average performance. It is a sample-centric alternative to ERM for settings where tail behavior and per-example reliability matter.

Open-source software

Cooper: A PyTorch Library for Constrained Deep Learning

Cooper implements Lagrangian-based first-order update schemes and makes it easy to combine constrained optimization algorithms with PyTorch models, autograd, and modern training pipelines. Version 1.0 was released in April 2025; see the docs. Now at 160+ stars on GitHub.

Theory · ICLR 2026

Dual PI Control is the Augmented Lagrangian Method in Disguise

Dual optimistic ascent (PI control) performs well empirically but has lacked formal guarantees. We show that it is equivalent to gradient descent-ascent on the Augmented Lagrangian in the single-step, first-order regime commonly used in constrained deep learning. The result helps explain its practical success and establish its limits.

Perspective · NeurIPS 2026 Position Paper Track

Position: Adopt Constraints Over Fixed Penalties in Deep Learning

We argue that fixed penalty terms are the wrong default for enforcing explicit requirements in deep learning. When a problem naturally specifies targets to satisfy, we should formulate it as a constrained optimization problem and use methods designed to enforce those requirements directly.

News

Archive

2025

2024

2023

2022

2021

Publications

* denotes equal contribution. ^ denotes equal supervision.

Preprints

  1. J. Gallego-Posada*, Juan Ramirez*, M. Hashemizadeh*, and S. Lacoste-Julien. Cooper: A Library for Constrained Optimization in Deep Learning. arXiv:2504.01212, 2025.

Conference

  1. Juan Ramirez, M. Hashemizadeh, and S. Lacoste-Julien. Position: Adopt Constraints Over Fixed Penalties in Deep Learning. In NeurIPS Position Paper Track, 2026.
  2. Juan Ramirez and S. Lacoste-Julien. Dual Optimistic Ascent (PI Control) is the Augmented Lagrangian Method in Disguise. In ICLR, 2026.
  3. Juan Ramirez*, I. Hounie*, J. Elenter*, J. Gallego-Posada*, M. Hashemizadeh, A. Ribeiro^, and S. Lacoste-Julien^. Feasible Learning. In AISTATS, 2025.
  4. M. Sohrabi*, Juan Ramirez*, T. H. Zhang, S. Lacoste-Julien, and J. Gallego-Posada. On PI Controllers for Updating Lagrange Multipliers in Constrained Optimization. In ICML, 2024.
  5. M. Hashemizadeh*, Juan Ramirez*, R. Sukumaran, G. Farnadi, S. Lacoste-Julien, and J. Gallego-Posada. Balancing Act: Constraining Disparate Impact in Sparse Models. In ICLR, 2024.
  6. J. Gallego-Posada, Juan Ramirez, A. Erraqabi, Y. Bengio, and S. Lacoste-Julien. Controlled Sparsity via Constrained Optimization or: How I Learned to Stop Tuning Penalties and Love Constraints. In NeurIPS, 2022.

Workshop

  1. Juan Ramirez, R. Sukumaran, Q. Bertrand, and G. Gidel. Omega: Optimistic EMA Gradients. LatinX in AI Workshop at ICML, 2023. Oral.
  2. Juan Ramirez and J. Gallego-Posada. L0onie: Compressing COINs with L0-constraints. Sparsity in Neural Networks Workshop, 2022.
  3. J. Gallego-Posada, Juan Ramirez, and A. Erraqabi. Flexible Learning of Sparse Neural Networks via Constrained L0 Regularization. LatinX in AI Workshop at NeurIPS, 2021. Best poster award.

Service

Invited Talks

Teaching Assistantships