News for hackers. Stuff that matters.
Re:Understanding deep learning requires rethinking generaliz... by magicalhippo on Thursday March 04, 2021 @02:43PM (#26347180)
The experiments we conducted emphasize that the effective capacity of several successful neural network architectures is large enough to shatter the training data. Consequently, these models are in principle rich enough to memorize the training data.

So they're fitting elephants[1].

I've been trying to use DeepSpeech[2] lately for a project, would be interesting to see the results for that.

I guess it could also be a decent test for your model? Retrain it with random labels and if it succeeds the model is just memorizing, so either reduce model complexity or add more training data?

[1]: https://www.johndcook.com/blog/2011/06/21/how-to-fit-an-elep...

[2]: https://github.com/mozilla/DeepSpeech

Re:Understanding deep learning requires rethinking generaliz... by mxwsn on Thursday March 04, 2021 @03:13PM (#26347604)
Large model capacity enough to perfectly memorize/interpolate data may not be a bad thing. A phenomenon known as "deep double descent" says that increasing modeling capacity relative to the dataset size can reduce generalization error, even after the model achieves perfect training performance (see work by Mikhail Belkin [0] and empirical demonstrations on large deep learning tasks by researchers from Harvard/OpenAI [1]). Other work argues that memorization is critical to good performance on real-world tasks where the data distribution is often long-tailed [2]: to perform well at tasks where the training data set only has 1 or 2 examples, it's best to memorize those labels, rather than extrapolate from other data (which a lower capacity model may prefer to do).

[0]: https://arxiv.org/abs/1812.11118

[1]: https://openai.com/blog/deep-double-descent/

[2]: https://arxiv.org/abs/2008.03703

Re:Understanding deep learning requires rethinking generaliz... by derbOac on Thursday March 04, 2021 @03:30PM (#26347833)
I think there's something critical about the implicit data universe being considered in the test and training data, and in these randomized datasets. Memorizing elephants isn't necessarily a bad thing if you can be assured there are actually elephants in the data, or if your job is to reproduce some data that has some highly non-random, low entropy (in an abstract sense) features.

I think where the phenomenon in this paper, and deep double descent starts to clash with intuition, is the more realistic case where the adversarial data universe is structured, not random, but not conforming to the observed training target label alphabet (to borrow a term loosely from the IT literature). That is, it's interesting to know that these models can perfectly reproduce random data, but generalizing from training to test data isn't interesting in a real-world sense if both are constrained by some implicit features of the data universe involved in the modeling process (e.g., that the non-elephant data only differs randomly from the elephant data, or doesn't contain any nonelephants that aren't represented in the training data). So then you end up with this: https://www.theverge.com/2020/9/20/21447998/twitter-photo-pr...

I guess it seems to me there's a lot of implicit assumptions about the data space and what's actually being inferred in a lot of these DL models. The insight about SGD is useful, but maybe only underscores certain things, and seems to get lost in some of the discussion about DDD. Even Rademacher complexity isn't taken with regard to the entire dataspace, just over a uniformly random sampling of it -- so it will underrepresent certain corners of the data space that are highly nonuniform, low entropy, which is exactly where the trouble lies.

There's lots of fascinating stuff in this area of research, lots to say, glad to see it here on HN again.

Re:Understanding deep learning requires rethinking generaliz... by medlyyy on Friday March 05, 2021 @07:33AM (#26356118)
Thanks for your [2] link paper, it's an interesting one.

If you think about it, the high-level idea makes some intuitive sense. Since NNs are known to be "equivalent" to kernel methods - which are, to oversimplify, essentially nearest-neighbour + a similarity function - then the ability of NNs to memorise specific training examples can be analogised to adding another "neighbour" to interpolate from. So maybe it's not too surprising that NNs which can do this can have better generalisation performance. (Although it is still surprising, since I certainly wouldn't predict it a priori!)

Really, what is the difference between a "feature" and "memorising a data point"? It seems only a matter of scale - how much of the input space is "relevant" to the learned representation.

Re:Understanding deep learning requires rethinking generaliz... by robbmorganf on Friday March 05, 2021 @08:22AM (#26356556)
> Since NNs are known to be "equivalent" to kernel methods

I remember reading this somewhere, but I can't find the exact paper. Do you think you could link me to it?

Also, I seem to recall the paper didn't provide a method to actually construct the equivalent kernel. Do you know of any work since then that actually constructs an equivalent kernel method?

Re:Understanding deep learning requires rethinking generaliz... by medlyyy on Friday March 05, 2021 @03:34PM (#26361718)
I believe it's this: https://arxiv.org/abs/1711.00165

And then the NTK paper: https://arxiv.org/abs/1806.07572

There is also this which seems to have been produced in parallel, closely related to the first but not exactly the same: https://arxiv.org/abs/1804.11271

Re:Understanding deep learning requires rethinking generaliz... by bloaf on Thursday March 04, 2021 @03:44PM (#26348018)
That's not my reading. I think they are saying that models which *can* over-fit the data in both theory and practice, appear not do so when there are in fact generalizations in the data.
Re:Understanding deep learning requires rethinking generaliz... by magicalhippo on Thursday March 04, 2021 @04:00PM (#26348249)
Ah hmm yes, good point. I forgot this piece from the article:

We observe a steady deterioration of the generalization error as we increase the noise level. This shows that neural networks are able to capture the remaining signal in the data while at the same time fit the noisy part using brute-force.

Since they score well on the test data, they must have generalized to some degree. But since they're just as good at training on random input they also have the capacity to just memorize the training data.

Re:Understanding deep learning requires rethinking generaliz... by trowngon on Thursday March 04, 2021 @06:30PM (#26350025)
Irrespective of the subject Deepspeech is very old archtecture with suboptimal results. You'd better try any recent conformer implementations (flashlight, nemo, wenet, etc) or wav2vec.
Re:Understanding deep learning requires rethinking generaliz... by magicalhippo on Thursday March 04, 2021 @08:32PM (#26351270)
I ended up with DeepSpeech since it was very easy to get started with, and it has support for fairly low-latency inferencing which is very important for my project.

I will take a look at the ones you suggested though, thanks for the heads-up!

Re:Understanding deep learning requires rethinking generaliz... by caddemon on Thursday March 04, 2021 @03:16PM (#26347653)
Would that necessarily imply it is memorizing on the non-random labels though? I know analogies to human learning are overdone, but I definitely have seen humans fall back on memorization when they are struggling to "actually learn" some topic.

So genuinely asking from a technical/ML perspective - is it possible a network could optimize training loss without memorization when possible, but as that fails end up just memorizing?

Re:Understanding deep learning requires rethinking generaliz... by tlb on Thursday March 04, 2021 @03:44PM (#26348025)
There's a spectrum of generalization-memorization. The extreme case of memorization is that it would only correctly classify images with precisely identical pixel values to the ones in the training set. When we say that people have "memorized" something, we are still far more general than that. We might key off a few words, say.

The behavior of highly overparameterized networks is basically what you suggest: they will memorize if needed (which you can test by randomizing labels) but will usually generalize better when possible.

Re:Understanding deep learning requires rethinking generaliz... by hervature on Thursday March 04, 2021 @03:33PM (#26347866)
> is it possible a network could optimize training loss without memorization when possible

What does that even mean? ML is simply a set of tools to minimize (f(x_i) - y_i)^2 (if you don't like squared loss, pick whatever you prefer). In particular, f() here is our neural network. There is no loss without previous data. The only thing the network is trying to do is "memorize" old data.

Re:Understanding deep learning requires rethinking generaliz... by caddemon on Thursday March 04, 2021 @03:54PM (#26348137)
It depends of course how you are defining memorization, but the network doesn't necessarily need to use the entirety of every input to do what you are describing. I would think what people mean when they say "it isn't learning, just memorizing" is that the vast majority of information about all previous inputs is being directly encoded in the network.

The person I was responding to mentioned training on random labels, and if training still goes well the network must be a memorizer. But I don't see why it couldn't be the case that a network is able to act as a memorizer, but doesn't if there are certain patterns it can generalize on in the training data.

Also, there is no human learning without previous data either, but I wouldn't characterize all of human learning as memorization.

Re:Understanding deep learning requires rethinking generaliz... by hervature on Thursday March 04, 2021 @07:02PM (#26350340)
I now understand what you were trying to say. I think it is still wrong to think of it as "memorization vs. generalization". In my opinion, the question is "why does it happen to generalize when it is in the process of memorization?" As alluded to in another comment, my belief is that the dimensionality of neural networks combined with certain optimization schemes favor networks whose outputs aren't overly sensitive to changes in the data. That is basically the definition of generalization. It also explains why double descent occurs. First, it memorizes as best as it can since this is "easy", then the optimization scheme starts to push it towards parameters that yield better generalizability.
Re:Understanding deep learning requires rethinking generaliz... by dumb1224 on Thursday March 04, 2021 @04:14PM (#26348421)
I don't understand the random label training part. Presumably you train on randomised labels which have no relationship with the input but surely it won't generalise well at all given the small probability of predicting the labels correctly by chance (The setup for a Permutation test am I wrong)?
Re:Understanding deep learning requires rethinking generaliz... by magicalhippo on Thursday March 04, 2021 @05:03PM (#26349063)
This was the thing I misread first time around.

If you look at Table 1, you see that the models manage to train almost 100% correctly on the randomized labels, but crucially the control test score is down in the 10% region. This is in stark comparison to roughly 80-90% test score for the properly labeled data.

So it seems to me that when faced with structured data they manage to generalize the structure somehow, while when faced with random training data they're powerful enough to simply memorize the training data.

edit: so just point point out, obviously it's to be expected the test to be bad for random input, after all how can you properly test classification of random data?

So the point, as I understand it, isn't that the randomized input leads to poor test results, but rather that the non-randomized ones manages to generalize despite it being capable of simply memorizing the input.

Re:Understanding deep learning requires rethinking generaliz... by caddemon on Thursday March 04, 2021 @04:44PM (#26348824)
AFAIK that's right, it would be very unlikely to generalize on random labels, which is why I read the comment as suggesting the network shouldn't have low training loss in that situation.