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.
翻译:我们介绍skwdro,一个用于训练鲁棒机器学习模型的Python库。该库基于在最优传输和机器学习中流行的Wasserstein距离的分布鲁棒优化。该库的目标是通过为PyTorch模块提供一个封装器,使得广大用户能够更轻松地训练鲁棒模型,从而以最少的代码改动实现模型损失的鲁棒化。它同时提供了一些常用目标函数的、与scikit-learn兼容的估计器。实现的核心依赖于对原始鲁棒目标函数进行熵平滑,以确保模型的最大灵活性。该库可在 https://github.com/iutzeler/skwdro 获取,文档位于 https://skwdro.readthedocs.io。