Statistical Foundations for Learning on Graphs