Decontextualized learning for interpretable hierarchical representations of visual patterns