About Dro
dro is an open source Python package that implements distributionally robust optimization methods for supervised learning. Instead of fitting a model only to the empirical training distribution, a DRO model minimizes the worst case expected loss across an ambiguity set of nearby distributions, which makes the fitted model more resilient to distribution shift. The package is built on the convex optimization solver cvxpy and is currently at version 0.4.2.
It is aimed at machine learning researchers and practitioners who need robust models or want to compare DRO formulations. It supports linear models such as SVM, logistic regression and linear regression, along with neural network and tree ensemble models. Supported formulations include group DRO, f divergence DRO, Wasserstein DRO, MMD DRO, Bayesian parametric DRO, Sinkhorn DRO, kernel DRO, mixtures of distance metrics and DRO on personalized losses. The package also includes synthetic data generators drawn from recent research papers, and the documentation offers a tutorial, worked examples for each method and a full API reference.
The package is free. Its source is on GitHub under the MIT license. The installation guide asks users to prepare a MOSEK license before installing, because several models rely on the MOSEK solver, which is licensed separately by its own vendor.
The documentation site is generated with Sphinx and presents the project as a gift to the DRO research community, which reflects its academic origin rather than a commercial product with paid support.