Symmetry Discovery Beyond Affine Transformations