We consider a commonly studied supervised classi cation of a synthetic dataset whose labels are generated by feeding a one-layer neural network with random iid inputs. We study the generalization performances of standard classi ers in the high-dimensional regime where α = n/d is kept nite in the limit of a high dimension d and number of samples n. Our contribution is three-fold: First, we prove a formula for the generalization error achieved by 2 regularized classi ers that minimize a convex loss. This formula was rst obtained by the heuristic replica method of statistical physics. Secondly, focussing on commonly used loss functions and optimizing the 2 regularization strength, we observe that while ridge regression performance is poor, logistic and hinge regression are surprisingly able to approach the Bayes-optimal generalization error extremely closely. As α → ∞ they lead to Bayes-optimal rates, a fact that does not follow from predictions of margin-based generalization error bounds. Third, we design an optimal loss and regularizer that provably leads to Bayes-optimal generalization error.