Compositionally Equivariant Representation Learning