I've been wondering, why is it so important to have principled/theoretical machine learning? From a personal perspective as a human, I can understand why principled Machine Learning would be important:

  • humans like understanding what they are doing, we find beauty and satisfaction to understanding.
  • from a theory point of view, mathematics is fun
  • when there are principles that guide design of things, there is less time spent on random guessing, weird trial and error. If we understood, say, how neural nets really worked, maybe we could spend much better time designing them rather than the massive amounts of trial and error that goes into it right now.
  • more recently, if the principles are clear and theory is clear too, then there should be (hopefully) more transparency to the system. This is good because if we understand what the system is working, then AI risks that lots of people hype about pretty much goes away immediately.
  • principles seem to be a concise way to summarize the important structures the world might have and when to use a tool rather than another.

However, are these reasons strong enough really to justify an intense theoretical study of machine learning? One of the biggest criticism of theory is that because its so hard to do, they usually end up studying some very restricted case or the assumptions that have to be brought essentially make the results useless. I think I heard this once at a talk at MIT by the creator of Tor. That some of the criticism of Tor he has heard is the theoretical argument but essentially, people are never able to prove things about the real scenarios of real life because they are so complicated.

In this new era with so much computing power and data, we can test our models with real data sets and test sets. We can see if things work by using empiricism. If we can get instead achieve AGI or systems that work with engineering and empiricism, is it still worth pursuing principled and theoretical justification for machine learning, especially when the quantitate bounds are so difficult to achieve, but intuitions and qualitative answers are so much easier to achieve with a data driven approach? This approach was not available in classical statistics, which is why I think theory was so important in those times, because mathematics was the only way we could be sure things were correct or that they actually worked the way we thought they did.

I've personally always loved and thought theory and a principled approach was important. But with the power of just being able to try things out with real data and computing power has made me wonder if the high effort (and potentially low rewards) of theoretical pursue is still worth it.

Is theoretical and principled pursue of machine learning really that important?

  • 1
    $\begingroup$ "Without theory, you are relying on the hope that empirical results apply to any new datasets on which you will apply the ML methods. However, some properties or assumptions that happened to hold when you observed your empirical results might not necessarily be there moving forward on new datasets." $\endgroup$ Dec 23, 2017 at 5:37

8 Answers 8


There's no right answer to this but, maybe, "everything in moderation." While many recent improvements in machine learning, i.e., dropout, residual connections, dense connections, batch normalization, aren't rooted in particularly deep theory (most can be justified in a few paragraphs), I think there's ultimately a bottleneck for just how many such results can make a huge impact. At some point you have to sit down and work out some extra theory to make the next big leap. As well, theory can guide intuition because it can prove the quality or limitations of a model to within a reasonable doubt. This is particularly important for figuring if say, SGD is better than Momentum for a particular problem. That's the nice thing about theory: it forces you to abstract the problem you're solving, and in many cases this can be very beneficial because abstract objects are rigorously defined and you can easily see similarities between two seemingly different objects.

The big example that comes to mind is support vector machines. They were originally devised by Vapnik and Chervonenkis in the early 60s, but really took off in the early 90s when Vapnik and others realized that you can do nonlinear SVMs using the Kernel Trick. Vapnik and Chervonenkis also worked out the theory behind VC dimension, which is an attempt at coming up with a complexity measure for machine learning. I can't think of any practical application of VC dimension, but I think the idea of SVMs was likely influenced by their work on this. The Kernel Trick itself comes from abstract-nonsense mathematics about Hilbert spaces. It might be a stretch to say that it's necessary to know this abstract nonsense to come up with SVMs, but, I think it probably helped out quite a bit, especially because it got a lot of mathematicians excited about machine learning.

On the subject of ResNet, there's been some really neat work recently suggesting that Residual architectures really don't need to be 100s of layers deep. In fact some work suggests that the residual connections are very similar to RNNs, for example Bridging the Gaps Between Residual Learning, Recurrent Neural Networks and Visual Cortex", Liao et al. I think this definitely makes it worth looking into deeper because it suggests that theoretically, ResNet with many layers is in fact incredibly inefficient and bloated.

The ideas for gradient clipping for RNNs were very well justified in the now famous paper "On the difficulty of training recurrent neural networks" - Pascanu, et. al. While you could probably come up with gradient clipping without all the theory, I think it goes a long way toward understanding why RNNs are so darn hard to train without doing something fancy, especially by drawing analogies to dynamical system maps (as the paper above does).

There's a lot of excitement about Entropy Stochastic Gradient Descent methods. These were derived from Langevin dynamics, and much of the theoretical results are rooted firmly in classical theoretical PDE theory and statistical physics. The results are promising because they cast SGD in a new light, in terms of how it gets stuck in local fluctuations of the loss function, and how one can locally smooth the loss function to make SGD be much more efficient. It goes a long way toward understanding when SGD is useful and when it behaves poorly. This isn't something you can derive empirically by trying SGD on different kinds of models.

In the paper Intriguing properties of neural networks, the authors summarize that neural networks are sensitive to adversarial examples (defined as calculated, sleight perturbations of an image) due to high Lipchitz constants between layers. This is still an active area of research and can only be understood better through more theoretical derivations.

There's also the example of Topological Data Analysis, around which at least one company (Ayasdi)has formed. This is a particularly interesting example because the techniques used for it are so specific and abstract that even from today, it will still take a lot of time to see where the ideas from this theory end up. My understanding is that the computational complexity of the algorithms involved tends to be quite high (but then again it was equally high for neural networks even 20 years ago).


The answer to this question is actually very simple. With theoretical justification behind the machine learning model we at least can prove that when some more or less realistic conditions are met, there are some guarantees of optimality for the solution. Without it, we don't have any guarantees whatsoever. Sure, you can say "let's just check what works and use it for the particular problem", but this isn't feasible since there is a infinite number of ways how you could solve any machine learning problem.

Say that you want to predict some $Y$, given some $X$. How do you know that $X + 42$ is not an optimal way to solve it? What about $X + 42.5$? Or, $\sqrt{X - 42}$? Maybe just return $42$ as your prediction? Or if $X$ is odd use $X+42$ and otherwise return $0$? Sure, all those suggestions sound absurd, but how can you be sure, without any theory, that one of them wouldn't be optimal? With an infinite number of possible solutions, even the simplest problem becomes unsolvable. Theory limits your "search space" of the feasible models for some class of the problems (you know which models are worth considering and which not).

  • 2
    $\begingroup$ is checking if your trained model works on validation and test sets not enough? Like what guarantees do theoretical bounds have if their bounds can't actually be used? $\endgroup$ Dec 12, 2017 at 20:07
  • 8
    $\begingroup$ @CharlieParker ok, so start with cross-validating all the $X + c$ models where $c$ is in $(-\infty, \infty)$, how long would it take to find the best one? Notice that this is just a very simple model and you can do much more then adding the constant, so after checking the infinite number of such models, you would need to check an infinite number of classes of infinite numbers of models... Moreover: how do you know that cross-validation "works"? You know this on theoretical grounds. $\endgroup$
    – Tim
    Dec 12, 2017 at 20:19

Just looking at the question: Is theoretical and principled pursue of machine learning really that important?

Define what you mean by "important". Coming from a philosophical point of view it's a fundamental distinction if you want to describe something or understand something. In a somewhat crude answer it is the difference between being scientific or something else. The practical part of it is of no concern to the underlying question. If something is too hard to prove, or even impossible to prove this in itself is an important discovery. (Enter Goedel et al.) But this does not mean it is irrelevant. It may at least seem irrelevant from a pragmatic point of view. But it should be at least be recognized as something of principal importance and value.

Consider an analogy: medicine as a whole (and from its past) is non scientific. In certain ways it can actually never be. It is a discipline that is entirely governed by its outcome. In most cases there is nothing like "truth". But it turns out, that some parts can actually be scientific -- and this is where most of the planned progress is happening.

Another extremely short description might be: without theory you can make a lot of money. If it's really useful for a "greater good", then you even might get a Nobel prize for it. But you will never ever get the Fields medal.

  • 1
    $\begingroup$ +1 I find this an interesting answer to the OP, but would ask you to elaborate on medicine as non-scientific. Isn't the diagnostic process of finding what is ailing a patient, a process where differential diagnoses (a theoretic concept of suspected diseases) are supposed, and data is collected to predict which disease is the most probable? ... $\endgroup$
    – IWS
    Dec 20, 2017 at 15:25
  • $\begingroup$ (cont'd) ... aren't there prognoses, where doctors try to estimate the future course of disease based on available data, which can be and usually is checked by follow-up and empiric findings? And finally, is science a quest for some higher but existent truth, or do we approximate a construct of truth which we believe is present right now? $\endgroup$
    – IWS
    Dec 20, 2017 at 15:26
  • $\begingroup$ Actually the question of medicine runs a little deeper. Science is basically just a method or a process. For science "to work" you have to have the ability to test hypotheses on equal ground with the inherent possibility of falsification. In short: if you can't prove a theory wrong, it is non-scientific. For medicine this has far too many ethical implications and since you can't treat someone at the same point in time with different options hypothesis testing is really hard. [...] $\endgroup$
    – cherub
    Dec 21, 2017 at 15:09
  • $\begingroup$ Regarding the second part (science as quest for truth) -- again, it's just a method. It seems to be the most successful method humankind has come up with. But it's not based believe, it's based on facts. And in some ways it is also a closed system. There is no (scientific) distinction between the truth and a constructed that appears to be the very same. Agreement among scientist might give you some rules of thumb (e.g. Occams Razor), but science is no compass in the seas of non-science. $\endgroup$
    – cherub
    Dec 21, 2017 at 15:16

Here's a simple example from my own work.

I fit a lot of neural nets to continuous outcomes. One determines the weights by backpropagation. Eventually, it'll converge.

Now, the top-layer activation function is identity, and my loss is squared error. Because of theory, I know that the top-level weight vector that minimizes the squared-error loss is good old $$ \mathbf{\left(A^TA\right)^{-1}A^Ty} $$ where $\mathbf{A}$ are the activations at the top level and $y$ are the outcomes. When I short-circuit backprop by using a closed-form solution for the top-level weights, I only need backprop for optimizing the lower-level weights.

My net converges way faster.

Thank you, theory.


Empiricism vs Theory

You wrote:

One of the biggest criticism of theory is that because its so hard to do, they usually end up studying some very restricted case or the assumptions that have to be brought essentially make the results useless.

This I think demonstrates the main divide between the two views which we can call empirical and theoretical.

From an empirical point of view, as you described as well, theorems are useless because they are never complex enough to model the real world. They talk about simplified ideal scenarios which don't apply anywhere in the real world. So what's the point in doing theory.

However from a theoretical point of view the opposite is true. What can empiricism teach us beyond "I ran this method on this dataset and it was better than running that other method on this same dataset". This is useful for one instance but says little about the problem.

What theory does is provides some guarantees. It also allows us to study simplified scenarios exactly so that we can start understanding what is going on.


Imagine an actual example: you want to see how concept drift (when the data changes over time) affects your ability to learn. How would a pure empiricist approach this question? All he can do really is to start applying different methods and think about tricks he can do. The whole procedure might be similar to this:

  • Take past 300 days and try to detect if the mean of that variable has changed. OK it somewhat worked.
  • What if we try 200 days instead?
  • OK better, let's try to change the algorithm once the drift occurs.
  • Obtain more datasets and see which method developed so far works best.
  • Results are not conclusive, maybe guess there are more than one type of concept drifts going on?
  • Try simulations. What if we simulate some concept drift and then apply different methods using different number of days used to detect if change has occurred.

What we have here is quite precise results on a few data sets. Maybe the data was so that updating the learning algorithm based on observations of 200 past days gave the highest accuracy. But will the same work for other data? How reliable is this 200 days estimate? Simulations help - but they don't reflect real world - same problem theory had.

Now imagine the same from a theoretical standpoint:

  • Simplify the scenario to an absurd level. Maybe use a 2-variate normal distribution with a mean suddenly changing over time.
  • Choose your conditions clearly - pick the model that is optimal on normal data. Assume you know that the data is normal. All you don't know is when the shift in means occur.
  • Device a method for detecting when the shift has occurred. Again can start with 200 past observations.
  • Based on these setting we should be able to calculate the average error for the classifier, average time it takes for the algorithm do detect if change has occurred and update. Maybe worst case scenarios and guarantees within 95% chance level.

Now this scenario is clearer - we were able to isolate the problem by fixing all the details. We know the average error of our classifiers. Can probably estimate the number of days it would take to detect that change has occurred. Deduce what parameters this depends on (like maybe the size of the change). And now based on something produce a practical solution. But most importantly of all: this result (if correctly calculated) is unchanging. It's here forever and anyone can learn from it.

Like one of the fathers of modern machine learning - Jürgen Schmidhuber likes to say:

Heuristics come and go – theorems are for eternity.

Lessons from other fields

Also briefly wanted to mention some parallels to physics. I think they used to have this dilemma as well. Physicists were studying frictionless objects of infinite mass moving inside infinite space. At first glance what can this tell us about reality where we want to know how snowflakes move in the wind. But it feels like theory carried them quite a long way.


Humans have been able to build ships, carriages and buildings for centuries without the laws of physics. But since modern science, we have been able to take those technologies to a whole new level. A proven theory allows to make improvements in a principled manner. We would have never made it to the moon or have computers without a mathematical theory of matter and computation.

Machine learning is just another field of science and engineering like any other. A principled approach to machine learning has provided us with kernel machines, structured learning, and ensemble methods (boosting, random forests).


You mentioned some reasons, of which the ability to interpret ML results is the most important, in my opinion. Let us say the AI driven property guard decided to shoot the neighbor's dog. It would be important to understand why it did so. If not to prevent this from happening in future, then at least to understand who's liable and who's going to pay the owner compensation.

However, to me the most important reason is that understanding the principles on which the algorithm is founded allows to understand its limitations and improve its performance. Consider use of euclidean distance in ML. In many clustering algorithms you start with the definition of the distance between example, then proceed finding the boundaries between the features of examples that group them proximity. Once you increase the number of features, the euclidean distance stops working at some point. You can spend a lot of time trying to make it work, or - if you know that euclidean distance as a proximity measure doesn't work in infinite dimensional limit - simply switch to some other distance metric, such as Manhattan, then proceed to work on real problems. You can find a ton of examples such as this one, where knowing the theory saves a lot of time.

  • 2
    $\begingroup$ I have heard this assertion before, but I don't think I am aware of any specific example that would demonstrate this: is there an example of some data that are not clustering well with Euclidean distances but are clustering well with Manhattan distances? $\endgroup$
    – amoeba
    Dec 19, 2017 at 19:28
  • 1
    $\begingroup$ @amoeba here's the common reference, though I ran into this earlier in a different context. If you look at the ratio of the volume of a hypersphere inside a unit hypercube, it shrinks to zero as the dimensionality of hypercube goes to infinity. Basically in higher dimensions all convex bodies collapse into points - my interpretation $\endgroup$
    – Aksakal
    Dec 19, 2017 at 19:46

I think it is very difficult for this not to be a philosophical discussion. My answer is really a rewording of good points already mentioned here (+1s for all); I just want to point to a quote from Andrew Gelman that really spoke to me as someone who trained as a computer scientist. I have the impression that many of the people who call what they do machine learning also come from computer science. The quote is from a talk that Gelman gave at the 2017 New York R Conference called Theoretical Statistics is the Theory of Applied Statistics:

Theory is scalable.

Theory tells you what makes sense and what does not under certain conditions. Do we want to do thousands or tens of thousands or millions of simulations to get an idea of the truth? Do we want to do empirical comparisons on more and more benchmark datasets? It's going to take a while, and our results may still be brittle. Further, how do we know that the comparisons we do make sense? How do we know that our new Deep Learner with 99.5% accuracy is really better than the old one that had 99.1% accuracy? Some theory will help here.

I'm a big fan of simulations and I use them a lot to make sense of the world (or even make sense of the theory), but theoretical machine learning is the theory of applied machine learning.


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.