Learning single-index models via harmonic decomposition