skwdro: a library for Wasserstein distributionally robust machine learning

Vincent Florian, Waïss Azizian, Franck Iutzeler, Jérôme Malick.

Year: 2026, Volume: 27, Issue: 8, Pages: 1−7


Abstract

We present skwdro, a Python library for training robust machine learning models. The library is based on distributionally robust optimization using Wasserstein distances, popular in optimal transport and machine learnings. The goal of the library is to make the training of robust models easier for a wide audience by proposing a wrapper for PyTorch modules, enabling model loss' robustification with minimal code changes. It comes along with scikit-learn compatible estimators for some popular objectives. The core of the implementation relies on an entropic smoothing of the original robust objective, in order to ensure maximal model flexibility. The library is available at https://github.com/iutzeler/skwdro and the documentation at https://skwdro.readthedocs.io

PDF BibTeX code