[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ Skip to main content
Log in

Specifying and Solving Robust Empirical Risk Minimization Problems Using CVXPY

  • Published:
Journal of Optimization Theory and Applications Aims and scope Submit manuscript

Abstract

We consider robust empirical risk minimization (ERM), where model parameters are chosen to minimize the worst-case empirical loss when each data point varies over a given convex uncertainty set. In some simple cases, such problems can be expressed in an analytical form. In general the problem can be made tractable via dualization, which turns a min-max problem into a min-min problem. Dualization requires expertise and is tedious and error-prone. We demonstrate how CVXPY can be used to automate this dualization procedure in a user-friendly manner. Our framework allows practitioners to specify and solve robust ERM problems with a general class of convex losses, capturing many standard regression and classification problems. Users can easily specify any complex uncertainty set that is representable via disciplined convex programming (DCP) constraints.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
£29.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price includes VAT (United Kingdom)

Instant access to the full article PDF.

Fig. 1
Fig. 2

Data availability

The data used to reproduce our results is available at https://zenodo.org/record/4446043#.Y9Y9ENJBwUE.

References

  1. Aghasi, A., Feizollahi, M., Ghadimi, S.: Rigid: Robust linear regression with missing data (2022). https://arxiv.org/abs/2205.13635

  2. Ben-Tal, A., El Ghaoui, L., Nemirovski, A.: Robust Optimization. Princeton University Press, Princeton (2009)

    Book  Google Scholar 

  3. Bertsimas, D., Brown, D., Caramanis, C.: Theory and applications of robust optimization. SIAM Rev. 53(3), 464–501 (2011)

    Article  MathSciNet  Google Scholar 

  4. Boyd, S., Vandenberghe, L.: Convex Optimization. Cambridge University Press, Cambridge (2004)

    Book  Google Scholar 

  5. Diamond, S., Boyd, S.: CVXPY: a Python-embedded modeling language for convex optimization. J. Mach. Learn. Res. 17, 1–5 (2016)

    MathSciNet  Google Scholar 

  6. El Ghaoui, L., Lebret, H.: Robust solutions to least-squares problems with uncertain data. SIAM J. Matrix Anal. Appl. 18, 1035–1064 (1997)

    Article  MathSciNet  Google Scholar 

  7. Gyódi, K., Nawaro, L.: Determinants of Airbnb prices in European cities: a spatial econometrics approach. Tour. Manag. 86, 104319 (2021)

    Article  Google Scholar 

  8. Schiele, P., Luxenberg, E., Boyd, S.: Disciplined saddle programming. Transactions on Machine Learning Research, pp. 2835–8856 (2024). https://openreview.net/forum?id=KhMLfEIoUm

  9. Shivaswamy, P.K., Bhattacharyya, C., Smola, A.J.: Second order cone programming approaches for 336 handling missing and uncertain data. J. Mach. Learn. Res. 7, 1283–1314 (2006)

  10. Xu, H., Caramanis, C., Mannor, S.: Robust regression and lasso. In: Advances in Neural Information Processing Systems, pp. 1485–1510 (2008)

  11. Xu, H., Caramanis, C., Mannor, S.: Robustness and regularization of support vector machines. J. Mach. Learn. Res. 10, 1485–1510 (2009)

    MathSciNet  Google Scholar 

Download references

Acknowledgements

Stephen Boyd was partially supported by ACCESS (AI Chip Center for Emerging Smart Systems), sponsored by InnoHK funding, Hong Kong SAR, and by Office of Naval Research Grant N00014-22-1-2121. This material is based upon work supported by the National Science Foundation Graduate Research Fellowship Program under Grant No. DGE1745016. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation. This work was also supported by the AI Institute for Resilient Agriculture (NSF-USDA Award Number 2021-67021-35329).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Eric Luxenberg.

Additional information

Communicated by Olivier Fercoq.

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix

Appendix

In this section, we present a helper function that automatically converts problems of the form (1) to problems of the form (3) and (4). This helper function requires the user to pass as inputs the CVXPY variables, constraints and loss function that define (1), and is presented below. The code is available at

figure d

We emphasize that the loss function f provided by the user is not verified to have the claimed curvature properties specified in the mode argument. It is impossible to verify this in general, so the user must be careful to provide a loss function that has the correct curvature properties. We also mention that the user is not limited to pass in a loss function f that is a CVXPY atom. Instead, the user has the flexibility to create a loss function that is a composition of several CVXPY atoms, as follows.

figure e

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Luxenberg, E., Malik, D., Li, Y. et al. Specifying and Solving Robust Empirical Risk Minimization Problems Using CVXPY. J Optim Theory Appl 202, 1158–1168 (2024). https://doi.org/10.1007/s10957-024-02491-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10957-024-02491-6

Keywords

Mathematics Subject Classification

Navigation