How DNNs break the Curse of Dimensionality: Compositionality and Symmetry Learning