Permutation invariant graph learning