Text this: Optimal equivariant architectures from the symmetries of matrix-element likelihoods