About¶
dro is a python package that implements typical DRO methods on linear loss (SVM, logistic regression, and linear regression) for supervised learning tasks. It is built based on the convex optimization solver cvxpy. The dro package supports different kinds of distance metrics \(d(\cdot,\cdot)\) as well as different kinds of base models (e.g., linear regression, logistic regression, SVM, tree-ensembles, neural networks…). Furthermore, it integrates different synthetic data generating mechanisms from recent research papers.
Without specified, our DRO model is to solve the following optimization problem:
where \(U\) is the so-called ambiguity set and typically of the form \(U = \{P: d(P, \hat P_n) \leq \epsilon\}\) and \(\hat P_n := \frac{1}{n}\sum_{i = 1}^n \delta_{(X_i, Y_i)}\) is the empirical distribution of training samples \(\{(X_i, Y_i)\}_{i = 1}^n\). And \(\epsilon\) is the hyperparameter.
As for the latest v0.2.2 version, dro supports:
(1) Synthetic data generation¶
Python Module |
Function Name |
Description |
|---|---|---|
|
|
Basic classification task |
|
Following Section 3.1.1 of [1] |
|
|
Following Section 5.1 of [2] |
|
|
Following Section 4.1 (Classification) of [3] |
|
|
|
Basic regression task |
|
Following Section 3.1.2 of [1] |
|
|
Following Section 3.1.3 of [1] |
|
|
Following Section 3.3 of [1] |
|
|
Following Section 4.1 (Regression) of [3] |
[1] Learning Models with Uniform Performance via Distributionally Robust Optimization.
[2] Certifying Some Distributional Robustness with Principled Adversarial Training.
[3] Distributionally Robust Optimization with Data Geometry.
(2) Linear DRO models¶
Python Module |
Class Name |
Description |
|---|---|---|
|
|
Base class for linear DRO methods |
|
|
Linear chi-square divergence-based DRO |
|
|
Kullback-Leibler divergence-based DRO |
|
|
CVaR DRO |
|
|
Total Variation DRO |
|
|
Marginal-X CVaR DRO |
|
|
Maximum Mean Discrepancy DRO |
|
|
Y|X (ConditionalShiftBased) CVaR DRO |
|
|
Holistic Robust DRO on linear models |
|
|
Wasserstein DRO |
|
Robust satisficing version of Wasserstein DRO |
|
|
|
Sinkhorn DRO on linear models |
|
|
Optimal Transport DRO with Conditional Moment Constraints |
|
|
Outlier-Robust Wasserstein DRO |
(3) NN DRO models¶
Python Module |
Class Name |
Description |
|---|---|---|
|
|
Base model for neural-network-based DRO |
|
|
Chi-square Divergence-based Neural DRO Model |
|
|
Wasserstein Neural DRO with Adversarial Robustness |
|
|
Holistic Robust NN DRO |
(4) Tree-Ensembles DRO models¶
Python Module |
Class Name |
Description |
|---|---|---|
|
|
KL-DRO for XGBoost |
|
|
CVaR-DRO for XGBoost |
|
|
Chi2-DRO for XGBoost |
|
|
KL-DRO for Light GBM |
|
|
CVaR-DRO for Light GBM |
|
|
Chi2-DRO for Light GBM |