On the Statistical Efficiency of Compositional Nonparametric Prediction