9
$\begingroup$

Large neural networks have low bias and high variance. Training on large datasets greatly reduces the variance allowing them to fit complicated functions. My question is why they seem to have much lower bias than other machine learning models, regardless of how flexible you make the other models. [EDIT thanks for comments - this framing is murky because it's not clear how much of the performance improvement could be attributed to lower variance due to the double descent phenomenon].

It's purported that if you plot amount of data vs performance, neural networks tend to not to plateau as quickly. One could argue that this has something to do with being a universal function approximator, but this apparently applies to other models like kernel methods as well.

Data vs Performance (from https://www.researchgate.net/figure/Performance-Comparison-of-Deep-learning-based-algorithms-Vs-Traditional-Algorithms_fig1_338027948)

What about neural networks makes them especially good at working in regimes with large amounts of data compared to more traditional models which can also be made to be arbitrarily flexible?

I can only speculate it might have something to do with the following (but I can't find definitive sources):

  • weaker inductive bias
  • real-world data (distribution of images, language, etc.) being particularly amenable to NN operations
  • having intermediate/hierarchical representations representations is somehow important (Yann LeCun talks about a Kuhnian [or Le-Kuhnian? 😆] paradigm shift on this point among researchers).
$\endgroup$
14
  • 1
    $\begingroup$ This is still an open research area. $\endgroup$ Sep 20 at 21:09
  • $\begingroup$ "If you plot amount of data vs performance, neural networks tend to not to plateau as quickly. " can you give a source for that? $\endgroup$ Sep 21 at 18:08
  • 2
    $\begingroup$ @Galen that effect described by the MSc thesis sounds a bit like this question Is ridge regression useless in high dimensions ( n≪p )? How can OLS fail to overfit? where adding more parameters had a regularizing effect. Another resemblance is with gradient boosting. Having more hidden units, increasing the width of the network, is like running more models in parallel. $\endgroup$ Sep 22 at 6:21
  • 1
    $\begingroup$ I Seem To Recall, but TITMH (Typed In Too Much Haste) ;o) $\endgroup$ Sep 22 at 10:01
  • 1
    $\begingroup$ @efthimio I don't have a word, I was just speaking in favour of skepticism. Things being "parroted" is exactly the problem. If I did have a word it was " ML needs to start being interested in proper benchmarking and evaluation." i.e. lets have some actual evidence rather than diagrams and assertions. I don't disagree with Andrew Ng, I just suspect there is some qualification required on the applicability of the assertion. $\endgroup$ Sep 22 at 18:57

4 Answers 4

4
+50
$\begingroup$

The existence of a bias-variance tradeoff has been assumed as inevitable (i.e., an axiom) in any model using data, including neural networks.

However, it has been observed since about 2018 that surprisingly, some cases of very large deep neural networks, trained with a correspondingly sufficiently large dataset, do not exhibit the classical bias-variance tradeoff. This means that these networks also generalize better. This phenomenon, termed "double descent", has been duplicated by other researchers. See for example: "Reconciling modern machine-learning practice and the classical bias–variance trade-off", 2019, by Belkin, Hsu, Ma, Mandal, https://www.pnas.org/doi/10.1073/pnas.1903070116.

As of 2022, conclusively explaining this phenomenon is still an open research question, but there have recently been interesting inroads to answering it. For example, the following paper is a theoretical explanation to justify this mysterious phenomenon: "A Universal Law of Robustness via Isoperimetry", 2021, by Bubeck and Sellke, https://arxiv.org/abs/2105.12806 (Outstanding Paper award at NeurIPS 2021)

  • The analysis/explanation is based on a network having a small Lipschitz constant (maximum value of the gradients), meaning the function represented by the network is smooth.
  • The paper also claims that in addition to good generalization, such a phenomenon also implies better robustness to adversarial attacks.
  • The analysis is not limited to neural networks, but is general enough for many other function approximations (including Reproducing Kernel Hilbert Space).
  • The paper gives specific guidance on the number of parameters vs. the amount of data for this phenomenon to occur.

Emphasis: This "double descent" phenomenon does not occur in all deep neural networks trained with a correspondingly sufficiently large dataset. Rather, according to Bubeck and Sellke, it depends on the number of input data points, the effective dimension of the classification, the depth of the network (number of layers), and the overall number of parameters in the network.

Therefore, in other cases, neural networks, even deep ones, will still exhibit the bias-variance tradeoff.

In a sense, this guidance on parameter values in the Bubeck and Sellke paper can be regarded as a falsifiable prediction as to whether their analysis/explanation is (in)correct.

$\endgroup$
4
  • $\begingroup$ Is this related to the “self-regularization” that I’ve heard mentioned? $\endgroup$
    – Dave
    Sep 21 at 13:28
  • $\begingroup$ @Dave regarding "self-regularization": I don't think so, but I'm not 100% sure. self-regularization includes early stopping and various batch size tricks during training. These are inherent to neural networks, but the explanation/analysis by Bubeck and Sellke is based on smoothness in the very high-dimensional parameter space of the network around each input data vector (when such smoothness exists). $\endgroup$
    – Number
    Sep 21 at 13:36
  • $\begingroup$ Great citations. This muddies my attempt to frame the question in terms of bias-variance. I had said that NN bias was lower, but past the "interpolation threshold" the improvement might as well be attributed to a reduction in variance - it's now unclear to me. Thanks for enlightening :) Though these papers explore a novel phenomenon, they don't make decisive claims about why NNs reliably do better (in fact, both show how this particular novelty applies to other models, making the distinction murkier). Are there authoritative sources saying it's unsolved? I put speculations in my question $\endgroup$
    – efthimio
    Sep 21 at 23:02
  • $\begingroup$ @efthimio I've added an important emphasis to my answer, that in other cases, neural networks, even deep ones, will still exhibit the bias-variance tradeoff. As I currently understand, the Bubeck and Sellke paper analysis/explanation is not fully accepted yet (I've added to my answer the falsifiable prediction implied by their paper), therefore, the problem is not accepted as "solved". Some problems in machine learning cannot be proved as true or false as in other parts of mathematics or computer science, perhaps this is one of them. $\endgroup$
    – Number
    Sep 22 at 22:08
1
$\begingroup$

Bias-variance trade-off is an old fashioned concept from classical statistics which fails to be useful in high-dimensional setting.

Here's an example of famous statistician being surprised that overfitting is reduced by increasing the number of parameters in linear regression.

A better way to explain good performance of neural networks is through the lens of statistical learning theory. One direction of work shows that if A) your learner is not very sensitive to small changes in your training set, and B) fits training data data it will also fit test data. See for instance, this paper by Bousquet.

Hastie's paper shows that adding parameters restricts final solution to a smaller L2-norm ball, hence improving stability A). At the same time, adding parameters can improve training fit, hence improving B).

B) is actually the harder part, much of modern progress in NN's has been achieved by coming up with clever ways of fitting the training data and ignoring generalization aspect.

$\endgroup$
1
  • $\begingroup$ (+1) nice references. $\endgroup$
    – mhdadk
    Sep 22 at 23:24
0
$\begingroup$

There are other theorems in mathematical analysis about converging to decent functions (the Stone–Weierstrass theorem about polynomials and Carleson's theorem about Fourier series come to mind). However, neural networks decrease the bias more than other regression models by taking to the extreme the idea of nonlinearity and interaction. A neural network with millions of parameters is routine. A generalized linear model with millions of parameters, due to nonlinear basis functions (e.g., polynomials or splines) and their interactions, is not as common. If you put in all of those nonlinear features and their interactions in a generalized linear model, taking it to a similar extreme as a neural network, I would expect similar issues of high variance and low bias.

In fact, there is a sense in which a neural network (at least some of them) involves a layer (or multiple layers) of feature extraction and then a generalized linear model on the extracted features. After all, if you draw out the usual "web" of a neural network and cover up everything before the final hidden layer, you wind up with something that looks like a generalized linear model.

$\endgroup$
7
  • $\begingroup$ What do we mean by “taking to the extreme the idea of nonlinearity”? Also, framing in terms of GLMs is not so helpful because as you alluded to, you can compose them to make something that is practically a neural network. But why don’t Random Forests work as well with large data? Why don’t cubic splines? $\endgroup$
    – efthimio
    Jun 6 at 15:42
  • $\begingroup$ @efthimio When you have a million parameters (potentially many more) in a neural network, you can bend the regression line in almost any way. // Framing in terms of GLM is helpful specifically because they can be wrestled with to form universal approximators like neural networks are. // I do not know of any convergence theorems for random forests (they might exist, but they might not), but including a bunch of spline terms and interactions between them is basically what a neural network is doing. Neural networks just throw millions of parameters at the problem, rather than dozens. $\endgroup$
    – Dave
    Jun 6 at 15:57
  • $\begingroup$ I think spline is different because it is non-parametric. These models become more flexible as you add more data - it would make sense that these would be similarly effective as neural networks but I don't hear them being used. $\endgroup$
    – efthimio
    Jun 6 at 16:10
  • $\begingroup$ It depends on what you consult. Splines come up on here all the time. Frank Harrell's Regression Modeling Strategies book covers splines early, and he emphasizes the use of splines all the time. $\endgroup$
    – Dave
    Jun 6 at 16:13
  • 1
    $\begingroup$ @RichardHardy I’m as puzzled as anyone about why neural network function approximation is the rage right now. I wonder if some of it is that people forget about nonlinear basis functions in generalized linear models. I recently saw a presentation where that seemed to be the case. Some of it also could be that using a modern and fancy-sounding technique might make it easier to publish in academia or charge a high rate in industry. $\endgroup$
    – Dave
    Sep 18 at 15:34
-1
$\begingroup$

Sidenote: It depends on the situation

The question is a bit of a loaded question. It presupposes that neural networks are better. But, whether neural networks are better depends on the situation. If parametric models are applicable, then often these will work better. If the data generation doesn't follow a complex pattern (so nothing specific for a deep neural network to learn), then often the other shallow machine learning methods work better.

But still, the question is a fair question. The observation that over-parameterized models perform surprisingly good in particular settings, without overfitting (and whether this is only with neural networks or not is actually not relevant), that is not something unreal.

Flat vs Deep

The relationship between deep neural networks and other more shallow machine learning methods (shallow could be kernel methods or decision trees, but they can also be very complicated), is like the relationship between Copernicus model of the solar system and Ptolemy's model of the solar system.

  • In some way, the kernel methods and decision trees are like glorified methods for smoothening or averaging of data. There is no strong connection with any simple underlying process or patterns that may create the observations. The methods are only superficially learning how to be able to describe the observations in a way that it can be interpolated or extrapolated with a sufficient accuracy. If you add more data the methods gain some precision for the area where the data has been added, but their learning capacity stagnates because the models never gain a 'higher level of understanding' of the patterns or some break down of the complexity of the observations into simple building blocks.

  • On the other hand, the deep neural networks are sort of like applying Occam's razor and bring the complex gamut of observations down to a simplified underlying principle, which is captured by the organization of the network (and with every extra network layer the possibilities grow multiplicative increasing the potential complexity and rate of simplifying power). The neural network tries to learn the observation by learning a pattern behind it.

Double descent phenomenon

The over-parameterized networks are susceptible to fitting noise, but the simplest patterns are easier to learn and will become dominant. This is either due to some explicit regularization (obvious in ridge regression or Lasso) or due to some implicit regularization like limits on learning rates and stochastic decent. In this respect an example that more parameters work better is seen in this question: Is ridge regression useless in high dimensions ($n \ll p$)? How can OLS fail to overfit?.

Another effect could be that the multiple parameters work a bit like gradient boosting and are being blended together. When we spèeak about gradient boosting then there are also a lot of parameters fitted, more than the number of data points, but the method uses some average and we consider it not really as increasing the flexibility. This can happen in some similar way in deep neural networks and the first layers create several parallel pattern recognition models that are blended together in other layers.

$\endgroup$
22
  • 2
    $\begingroup$ Why the -1? A constructive comment explaining that would be welcome. $\endgroup$ Sep 21 at 7:51
  • 1
    $\begingroup$ It wasn't me, but I would say that neural networks are the antithesis of Occam's razor! In general the learned representations are distributed and highly redundant - far from simple. IIRC very large neural networks have been shown to be equivalent to Gaussian Processes, which are Bayesian kernel methods. Kernel machines are mostly very similar to RBF neural networks. $\endgroup$ Sep 21 at 17:58
  • 1
    $\begingroup$ I don't have a good reference/citation but it is in this graph that you see across many places on the internet datascience.stackexchange.com/questions/44768/… (also shown in the video of Andrew Ng linked by efthimio) the 'size' relates more to the 'depth'. In some places the labels are also replaced like here researchgate.net/figure/… $\endgroup$ Sep 21 at 19:42
  • 2
    $\begingroup$ @SextusEmpiricus cheers, I'm a bit resistant to schematic drawings without studies to back them up, but if they are from Andew Ng that is better than most! ML is a terrible field for proper empirical studies and for getting carried away with enthusiasm! $\endgroup$ Sep 21 at 19:44
  • 1
    $\begingroup$ @Galen I think "Priors for infinite networks" by Radford Neal (1994) was the paper I was thinking of $\endgroup$ Sep 21 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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