Outside of linear regression (if you consider that a ML method) it seems like we do not check the residuals after building our ML model. Is there a reason for this? Even if we don't make assumptions like normality, couldn't the residuals offer some information if there is some discernible pattern? Or do most ML methods do a good job at removing any kind of pattern.


2 Answers 2


The main rationale is the (wrongly) perceived low return on investment.

Lack of time and inappropriate training confound the issue. To a lesser extent, these points are aggravated by laziness and technical difficult respectively.

Especially with more complex models it becomes progressively harder to infer why a model made a particular prediction. Yes, there is a multitude of techniques to explain ML predictions (e.g. LIME, SHAP, Partial Dependency and Accumulated Local Effects plots, etc.) but those are "extra steps". And even then, maybe after the effort to get a SHAP force plot or an ALE plot to explain a particular prediction, we are still left with the question as to how affect the model's prediction. We generated some new questions but usually no immediate answers.

Note that in industrial ML applications "usually" we are concerned with prediction as the primary deliverable of our work. As long as the overall RMSE/MAE/Huber loss is "OK" we ship the model. Questions about the actual model estimation and/or attribution (significance) are often downgraded to "nice-to-have". Efron recently published an insightful discussion paper titled "Prediction, Estimation, and Attribution" high-lighting these differences further. I think you will find it enlightening on this matter too.

Just to be clear: You are absolutely correct to say that "the residuals offer some information". Just in many cases, the time to extract, interpreter that information and then to appropriately account for it is not factored in. People should always examine model residuals, perform some model spot-checks, etc. Even the strongest ML methods are far from silver bullets when it comes to prediction.


I'm tending to disagree with user11852's answer. Here's my thinking:

With traditional statistical models, such as regression, the human specifies a model structure that he/she believes is a (or the most) reasonable approximation of some underlying "data generating" model. IF that single model structure does not in fact conform well to the data ... i.e., it is "mis-specified" ... then that lack of fit is often exposed by some non-random pattern in the residuals. Hence, we look for such patterns, as suggestions that a better model specification may exist.

However, a key aspect of most ML techniques, especially those intended for "pure prediction" as Efron's paper describes, is the the human DOES NOT assume or inject any particular structure for the unknown/unseen data generating process. The algorithm finds and learns patterns in the data, but usually it does not intrinsically create anything understandable by normal humans as an underlying data model. (Ensemble methods may even combine many very disparate models, aka inscrutable-cubed.) Hence the label "black box."

But the idea that there is value in the patterns of the residuals from a ML algorithm relies on an underlying assumption that there could be model mis-specification.

I am far from an academic expert, but I'm not aware of any published papers on ML that have found patterns in residuals, that could be used to inform a better specified model. If there are no such patterns, because of the way the algorithms work, then looking for patterns in the residuals could only lead to illusions of discovery. That would be time spent with a negative ROI.

Effron's 2019 paper mentioned above (TU for that, BTW, hadn't seen it before) does have several examples of "concept drift," as a type of predictive error that would have a pattern. However, my belief is that having one or more variables in the set of x'es, capturing dates or data collection sequence order, would have allowed the ML algorithms to identify and compensate for the drift in their predictions. So I don't find Efron's articulation and examples of concept drift to be a compelling refutation on my argument on ML residuals.

Other viewpoints and pushback cheerfully welcomed !!! We're here to learn.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.