  We propose a data-driven technique to automatically learn the uncertainty
sets in robust optimization. Our method reshapes the uncertainty sets by
minimizing the expected performance across a family of problems subject to
guaranteeing constraint satisfaction. Our approach is very flexible and can
learn a wide variety of uncertainty sets while preserving tractability. We
solve the constrained learning problem using a stochastic augmented Lagrangian
method that relies on differentiating the solutions of the robust optimization
problems with respect to the parameters of the uncertainty set. Due to the
nonsmooth and nonconvex nature of the augmented Lagrangian function, we apply
the nonsmooth conservative implicit function theorem to establish convergence
to a critical point, which is a feasible solution of the constrained problem
under mild assumptions. Using empirical process theory, we show finite-sample
probabilistic guarantees of constraint satisfaction for the resulting
solutions. Numerical experiments show that our method outperforms traditional
approaches in robust and distributionally robust optimization in terms of
out-of-sample performance and constraint satisfaction guarantees.
