# Is there such a thing like the machine learning paradox?

What it says goes basically like this: no machine learning algorithm can be perfect. If it was, it means it is overfitting and so it is not really perfect because it will not perform ok in real world scenarios.

I searched and I couldn't find any other references to this paradox. The closest I got is the Accuracy Paradox, which says that the usefulness of a model is not really well reflected in its accuracy.

This doesn't sound quite ok to me. For example, a linear model could be perfectly learned, "overfitted" and predicted in the real world. So I suspect it is really about finding the right set of data points from which the results can be inferred. This is, we are trying to approximate from uncertain data, but with the right data we can stop approximating and start calculating.

Is my line of thinking correct? Or is there really no perfect machine learning?

UPDATE: In the light of currently received answers, I think my last paragraph (my line of thinking) can be rephrased as: If we have a model simple enough, why can't we overfit the model, knowing that it will behave correctly in non-trained data? This assumes the training data completely represents the real-world data, which would imply a single model that we can train on.

Keep in mind that what we conceive as "simple" or "feasible" is arbitrary and only depends on computation power and available data -- aspects with are external to ML models themselves.

• The concept of a solved game may be useful. If you have 100% accuracy, the problem is tractable, which is rarely the case in highly complex systems. ML is proving useful in tackling intractable problems, but in a condition of intractability, here a function of bounded rationality, you never have perfect certainty, only perceived optimality. The ML system may even get it right 100% of the time in a given sample, but that is no guarantee it will always do so. – DukeZhou Jun 14 '17 at 17:19
• That said, I'm finding the explanation in the O'Reilly article hard to follow, although there are some good points overall regarding the ethics. I can't see support in his article that 100% accuracy in a test set is categorically sub-optimal, as opposed to merely irrelevant, although he does later mention manipulating the data set to achieve 100% accuracy, which is, obviously, problematic. – DukeZhou Jun 14 '17 at 17:40

Basically Machine Learning is used to solve problems for which giving exact solutions is not (practically or theoretically) possible or feasible. If you have a problem that can be solved with exact and proven methods, you don't need Machine Learning. So Machine Learning is rather about finding solutions by approximations with some error margins. In this sense such systems will never perform perfectly and there always will be room for improvements. (Many real world problems can not be solved perfectly because they are not simply complicated, but chaotic.)

• Thanks a lot! I'm still ruminating over this answer, which seems to have hit the nail in the head. While I agree that ML is used as a shortcut for complex models (hence, error), I struggle to understand why this would still be the case with simplistic functions. However, it occurs to me that ML is completely designed around the concept of approximation, hence some error might always be present. – Alpha Jun 11 '17 at 18:47

This answer will focus on the the concepts of model error and increasing the set of points that a model is meant to fit. Firstly, and most importantly, please understand that the general problem that the OP is grappling with is not new nor confined to machine learning, but rather the other way around, where machine learning is a set of techniques and methods that are being brought to bear on a larger problem of model creation and performance measurement.

## All models have error

And to that end, I introduce one of the most important quotes that one should learn and live by if interested in this domain. IMHO, the simplest form of this concept by Professor Box (the creator of the Box plot!) is

Essentially, all models are wrong, but some are useful

And this is essentially true of all models. They are all necessary simplifications of what we encounter in real world data. All models are built from observation and compilation of experimental data, what we can label as training data, and all are subject to failure once they are tested against additional data points, especially those that fall outside of the observed set included in the training data. This does not necessarily make them not useful.

The original quote from Box is more elaborate in making this point:

Now it would be very remarkable if any system existing in the real world could be exactly represented by any simple model. However, cunningly chosen parsimonious models often do provide remarkably useful approximations. For example, the law PV = RT relating pressure P, volume V and temperature T of an "ideal" gas via a constant R is not exactly true for any real gas, but it frequently provides a useful approximation and furthermore its structure is informative since it springs from a physical view of the behavior of gas molecules.

For such a model there is no need to ask the question "Is the model true?". If "truth" is to be the "whole truth" the answer must be "No". The only question of interest is "Is the model illuminating and useful?".

This is reminding us that the Ideal gas equation is such a theorectical, derived model and that, indeed, it fails to predict accurately 100% of the real-word data points that are observed. It is, also, incredibly useful to understand and predict how the forces modeled behave and interact.

For the simplest model of linear regression, look at bivariate regression. For two observed variables X and Y, you create a regression equation that models the relationship between X and Y. The model, however, isn't actually representing Y, but a new variable, let's call it Y'. Then we arrive at something like:

Y = a + bX

where the coefficients a and b are chosen to minimize the discrepancy between Y' and Y. If we draw out the variables as vectors in a vector space, we would have two vectors Y and Y' that, hopefully, lie very close to each other. But there is a vector e called the error such that:

e = Y - Y

The whole algorithm of linear regression is centered on optimizing a and b to minimize e.

## Sampling from the population

So, all models have some error term that we strive to minimize. And for a particular given set of points we may be able to optimize it such that we take the error perhaps even to zero. But for any real world set of points where we have only been able to observe, and hence to model, a sample of the population of observances, the very next observance will potentially cause the error term to increase! This is true even of models that were not derived with machine-learning

There are many, many useful models that break down for parts of the population of observances, but we still find them useful. Look at Newtonian Gravity which breaks down at certain points of the real-world, but gets most of it right and for which we regularly use for prediction and understanding, in part because it is much simpler to understand and manipulate than something more complex that deals with those other cases, like GR which itself also fails to deal with some complex phenomena like quantum gravity.

# Over/Under fitting

In addition to minimizing the error e, there are two other issues with models and performance, overfitting and underfitting.

In overfitting, a statistical model describes random error or noise instead of the underlying relationship. Overfitting occurs when a model is excessively complex, such as having too many parameters relative to the number of observations. A model that has been overfit has poor predictive performance, as it overreacts to minor fluctuations in the training data.

Underfitting occurs when a statistical model or machine learning algorithm cannot capture the underlying trend of the data. Underfitting would occur, for example, when fitting a linear model to non-linear data. Such a model would have poor predictive performance.

## Summary

So, finally, the premise:

no machine learning algorithm can be perfect. If it was, it means it is overfitting and so it is not really perfect because it will not perform ok in real world scenarios.

Misses the point that

Essentially, all models are wrong, but some are useful.

• Thanks a lot! This is a superb answer. I do understand the points given, but this would apply only to complex models being approximated. Simple deterministic problems do not have the approximation model because of the nature of the problem, but rather because of the nature of the model (which implies simplification... but why should it be that way?). akopacsi's answer seems to discuss that aspect, and with both answers I'm closer to getting the point. Thanks! – Alpha Jun 11 '17 at 18:49

It's true that no general learning algorithm, machine or human, can be perfect. It isn't just a problem with machine learning; it's true of human learning. Not of the type of learning we typically think of as learning, such as mathematics, but things like walking, seeing, etc..

We learn to walk in standard situations, and can do it very well, but the model of walking that most of us have don't cope well with walking in high heels. Now, we can learn that, but that doesn't help us walking on tightropes, etc.

Similarly, optical illusions work because they represent situations we don't encounter in normal life, and so have never learned to deal with. Instead our visual system treats them as apparently similar but familiar situations.

There are lots of situations that we may have to cope with but have never learned to do so. How well we do so depends on our mental model of the activity that we have built up, and how well our "learning algorithm" dealt with the training data we had.