We develop procedures, based on minimization of the composition f (x) = h(c(x)) of a convex function h and smooth function c, for solving random collections of quadratic equalities, applying our methodology to phase retrieval problems. We show that the prox-linear algorithm we develop can solve phase retrieval problems-even with adversarially faulty measurementswith high probability as soon as the number of measurements m is a constant factor larger than the dimension n of the signal to be recovered. The algorithm requires essentially no tuning-it consists of solving a sequence of convex problems-and it is implementable without any particular assumptions on the measurements taken. We provide substantial experiments investigating our methods, indicating the practical effectiveness of the procedures and showing that they succeed with high probability as soon as m/n ≥ 2 when the signal is real-valued.Algorithm 1: Prox-linear algorithm for problem (3) in Section 6 we provide experimental evidence of the success of our proposed approach. In reasonably high-dimensional settings (n ≥ 1000), with real-valued random Gaussian measurements our method achieves perfect signal recovery in about 80-90% of cases even when m/n = 2. The method also handles outlying measurements well, substantially improving state-of-the-art performance, and we give applications with measurement matrices that demonstrably fail all of our conditions but for which the method is still straightforward to implement and empirically successful.Notation We collect our common notation here. We let · and · 2 denote the usual vector 2 -norm, and for a matrix A ∈ C m×n , |||A||| op denotes its 2 -operator norm. The notation A H means the Hermitian conjugate (conjugate transpose) of A ∈ C m×n . For a ∈ C, Re(a) denotes its real part and Im(a) its imaginary part. We take ·, · to be the standard inner product on whatever space it applies; for, the αth quantile linearly interpolates c ( mα ) and c ( mα ) . For a random variable X, quant α (X) denotes its αth quantile.