How do Probabilistic Graphical Models and Graph Neural Networks Look at Network Data?