Knowledge-Guided Failure Prediction