Live data from Hacker News

Do Machine Learning Models Memorize or Generalize?

pair.withgoogle.com

41–50 of 217 posts

Re: Do Machine Learning Models Memorize or Generalize?

#41

Sometimes I think the reason human memory in some sense is so amazing, is what we lack in storage capacity that machines have, we makeup for in our ability to create patterns that compress the amount of information stored dramatically, and then it is like we compress those patterns together with other patterns and are able to extract things from it. Like it is an incredibly lossy compression, but it gets the job done…

That is essentially what embeddings do

Re: Do Machine Learning Models Memorize or Generalize?

#42

Statistical learning can typically be phrased in terms of k nearest neighbours In the case of NNs we have a "modal knn" (memorising) going to a "mean knn" ('generalising') under the right sort of training. I'd call both of these memorising, but the latter is a kind of weighted recall. Generalisation as a property of statistical models (ie., models of conditional freqs) is not the same property as generalisation in th…

> Statistical learning can typically be phrased in terms of k nearest neighbours

We have suspected that neural nets are a kind of kNN. Here's a paper:

Every Model Learned by Gradient Descent Is Approximately a Kernel Machine

https://arxiv.org/abs/2012.00152

Re: Do Machine Learning Models Memorize or Generalize?

#43
I haven't read the latest literature but my understanding is that "grokking" is the phase transition that occurs during the coalescing of islands of understanding (increasingly abstract features) that eventually form a pathway to generalization. And that this is something associated with over-parameterized models, which have the potential to learn multiple paths (explanations).

https://en.wikipedia.org/wiki/Percolation_theory

A relevant, recent paper I found from a quick search: The semantic landscape paradigm for neural networks (https://arxiv.org/abs/2307.09550)

Re: Do Machine Learning Models Memorize or Generalize?

#44

Statistical learning can typically be phrased in terms of k nearest neighbours In the case of NNs we have a "modal knn" (memorising) going to a "mean knn" ('generalising') under the right sort of training. I'd call both of these memorising, but the latter is a kind of weighted recall. Generalisation as a property of statistical models (ie., models of conditional freqs) is not the same property as generalisation in th…

it's been proven that all models learned by gradient descent are equivalent to kernel machines. interpolation isn't generalization. if theres a new input sufficiently different from the training data the behaviour is unknown

but when the model trains on 13T tokens it is hard to be OOD

Re: Do Machine Learning Models Memorize or Generalize?

#45

Sometimes I think the reason human memory in some sense is so amazing, is what we lack in storage capacity that machines have, we makeup for in our ability to create patterns that compress the amount of information stored dramatically, and then it is like we compress those patterns together with other patterns and are able to extract things from it. Like it is an incredibly lossy compression, but it gets the job done…

That’s not exactly true, there doesn’t seem to be an upper bound (that we can reach) on storage capacity in the brain [0]. Instead, the brain actually works to actively distill knowledge that doesn’t need to be memorized verbatim into its essential components in order to achieve exactly this “generalized intuition and understanding” to avoid overfitting.

[0]: https://www.scientificamerican.com/article/new-estimate-boos...

Re: Do Machine Learning Models Memorize or Generalize?

#46
post #32
post #29

Earlier quoted context omitted.

I have observed this pattern before in computer vision tasks (train accuracy flatlining for a while before test acc starts to go up). The point of the simple tasks is to be able to interpret what could be going on behind the scenes when this happens.

No doubt. But I have also seen what people thought were generalized models failing on outlier, but valid, data. Quite often. Put another way, it isn't just how simple this task seems to be in the number of terms that are important, but isn't it also a rather dense function? Probably better question to ask is how sensitive are models that are looking at less dense functions to this? (Or more dense.). I'm not trying to…

Maybe humans are also failing a lot in out of distribution settings. It might be inherent.

Re: Do Machine Learning Models Memorize or Generalize?

#47

hierarchize would be a better term than generalize

Anything would be better than "grokking". From what I gather they're talking about double descent which afaik is the consequence of overparameterization leading to a smooth interpolation between the training data as opposed to what happens in traditional overfitting. Imagine a polynomial fit with the same degree as the number of data points (swinging up and down wildly away from the data) compared with a much higher…

> It's notoriously awful at extrapolating, ie generalizing to anything without support in the training data.

Scientists are also pretty lousy at making new discoveries without labs. They just need training data.

Re: Do Machine Learning Models Memorize or Generalize?

#50
I was trying to make an AI for my 2d sidescrolling game with asteroid-like steering learn from recorded player input + surroundings.

It generalized splendidly - it's conclusion was that you always need to press "forward" and do nothing else, no matter what happens :)

Post reply on HN