Graph Structural Residuals: A Learning Approach to Diagnosis