8 ms·
The boundary of neural network trainability is fractal
- roydanroy2 3y ago[flagged]
- mchinen 3y agoReposting comment from last time since I'm still curious: This is really fun to see. I love toy experiments like this. I see that each plot is always using the same initialization of weights, which presumably makes it possible to have more smoothness between each pixel. I also would guess it's using the same random seed for training (shuffling data). I'd be curious to know what the plots would look like with a different randomness/shuffling of each pixel's dataset. I'd guess for the high learning rates it would be too noisy, but you might see fractal behavior at more typical and practical learning rates. You could also do the same with the random initialization of each dataset. This would get at if the chaotic boundary also exists in more practical use cases.
- thomashop 3y agoexactly. if they always use the same initialization seed then this isn't very surprising. one would have to do many runs for each point in the grid and average them or something. but i didn't read the paper so maybe they did.
- londons_explore 3y agoI think if you used a random seed for weights and training data order, and reran the experiment enough times to average out the noise, then the resulting charts would then be smooth with no fractal patterns.
- baq 3y agoAn interesting conjecture, well worth a paper in response.
- catlifeonmars 3y agoDo you consider the random seed (or by extension the randomized initial weights) a hyperparameter?
- FredrikMeyer 3y agoRelated: https://news.ycombinator.com/item?id=39349992 https://news.ycombinator.com/item?id=39349992 (seems to be the same content)
- jerpint 3y agoIt feels weird to me to use the hyper parameters as the variables to iterate on, and also wasteful. Surely there must be a family of models that give fractal like behaviour ?
- amelius 3y ago> It feels weird to me to use the hyper parameters as the variables to iterate on Yes, I also think this is strange. In regular fractals the x and y coordinates have the same units (roughly speaking), but here this is not the case, so I wonder how they determine the relative scale.
- freeone3000 3y agoThe fractal behaviour is an undesirable property, not the goal :P ideally every network would be trainable (would converge)! this is the graphed result of a hyperparameter search, a form of optimization in neural networks. If you envision a given architecture as a class of (higher-order) function, the inputs would be the parameters, and the constants would be the hyperparameters. Varying the constants moves to a different function in the class, or, varying the hyperparameters gives a different model with the same architecture (even with the same data).
- blackbear_ 3y agoCould it be that this behavior is just caused by numerical issues and/or randomness in the calculation, rather than a real property of neural networks?
- sigmoid10 3y agoFractals are not caused by randomness. Fractals arise from scale invariance and self similarity, which in turn can come from non linear systems and iterative processes. It is very easy to generate fractals in practice and even the most vanilla neural networks trivially fulfill the requirements (at least when you look at training output). In that sense it would be weird not to find fractal structures when you look hard enough.
- tomxor 3y ago"If we're built from spirals, while living in a giant spiral, then everything we put our hands to, is infused with the spiral" ... Sorry I couldn't help myself.
- nyrikki 3y agoNot exactly, Newton's fractal, which is topological, specifically the wada property, is a boundary condition. It relates to fractal (non-integer) dimensions, which was first described by Mandelbrot in a paper about self similarity. Here is a paper that covers some of that. https://www.minvydasragulskis.com/sites/default/files/publications/ND_2017_v2.pdf https://www.minvydasragulskis.com/sites/default/files/public... In Newton's fractal, no matter how small a circle you can draw, your circle will either contain one root or all the roots. The basins that contain one root are open sets that share a boundary set. Even if you could have perfect information and precision this property holds. This means any change in initial conditions that crosses a boundary will be indeterminate. There is another feature called riddled basins, where every point is arbitrarily close to other basins. This is another situation where even with perfect information and unlimited precision a perturbations would be indeterminate. A positive Laponov exponent which isn't sufficient to prove chaos, but is always positive in the presence of chaos may even be 0 or negative in the above situations. Take the typical predator prey model and add fear and refuge and you hit the riddled basins. Stack four reflective balls in a pyramid and shine different color lights in two sides and you will see the Wada property. Neither of those problems are addressable with the assumption of deterministic effects with finite precision.
- subroutine 3y agoIn case it isn't obvious, you can tap on any of the figures in the PDF or HTML version to watch the video.
- JL-Akrasia 3y agoI'll add to this. It's not only the boundary that is fractal. We'll soon see that learning on one dataset (area of fractal) with enough data will generalize to other seemingly unrelated datasets. There is evidence that the structure neural networks are learning to approximate in a generative fractal of sorts. Finally, we'll need to adapt gradient descent to operate at move between different scales
- ttoinou 3y agoI've produced some KIFS (Kaleidoscopic iterated function system) fractals that look like this
- deleted 3y ago[deleted]
- lawlessone 3y agoWhat does this mean?
- romusha 3y agoNothing
- PaulHoule 3y agoTraining the network is a dynamic process similar to https://en.wikipedia.org/wiki/Julia_set https://en.wikipedia.org/wiki/Julia_set or https://en.wikipedia.org/wiki/Newton_fractal https://en.wikipedia.org/wiki/Newton_fractal
- idiotsecant 3y agoAs another poster pointed out, its much more intuitive with graphics. The parameters that you tweak to control model learning have a self-similar property where as you zoom if you see more and more complexity. Its the very definition of local maxima all over the place.
- xcodevn 3y agoI am not trying to downplay the contribution of the paper, but isn't it obvious that this is the case?
- teaearlgraycold 3y agoObvious to whom?
- bloaf 3y agoI think the "obvious" comment was a bit snarky, but out of curiosity, I posed the question to the Groq website which currently happens to be on the front page right now. (It claims to run Mixtral 8x7B-32k at 500 T/s) And indeed, the AI response indicated that the boundary between convergence and divergence is not well defined, has many local maxima and minima, and could be quote: "fractal or chaotic, with small changes in hyperparameters leading to drastically different outcomes."
- Buttons840 3y agoI'll defend the idea that it was obvious. (Although, it wasn't obvious to me until someone pointed it out, so maybe that's not obvious.) If you watch this video[0], you'll see in the first frame that there is a clear boundary between learning rates that converge or not. Ignoring this paper for a moment, what if we zoom in really really close to that boundary? There are two possibilities, either (1) the boundary is perfectly sharp no matter how closely we inspect it, or (2) it is a little bit fuzzy. Of those two possibilities, the perfectly sharp boundary would be more surprising. [0]: https://x.com/jaschasd/status/1756930242965606582 https://x.com/jaschasd/status/1756930242965606582
- eapriv 3y agoNot only it is not obvious; it is not known to be true.
- barbarr 3y agoI don't think it's obvious per se, but people who have studied numerical methods at the graduate level have likely seen fractal boundaries like this before - even Newton's method produces them [0]. The phenomenon says more about iterative methods than it says about neural networks. [0] https://en.wikipedia.org/wiki/Newton_fractal https://en.wikipedia.org/wiki/Newton_fractal
- otaviogood 3y agoThis is much more interesting if you see the animations. https://x.com/jaschasd/status/1756930242965606582 https://x.com/jaschasd/status/1756930242965606582
- notfed 3y agoFractal zoom videos are worth infinite words.
- paulddraper 3y ago> infinite I see you
- catlifeonmars 3y agoSo what exactly are we looking at here? Did the authors only use two hyperparameters for the purpose of this visualization?
- yazzku 3y agoIt's explained in the post: > Have you ever done a dense grid search over neural network hyperparameters? Like a really dense grid search? It looks like this (!!). Blueish colors correspond to hyperparameters for which training converges, redish colors to hyperparameters for which training diverges.
- catlifeonmars 3y agoI saw this, but am still not clear on what the axes represent. I assume two hyperparameters, or possibly two orthogonal principal components. I guess my point is it’s not clear how/which parameters are mapped onto the image.
- bosco_mcnasty 3y agoyour point is valid but the paper explains it clearly and obviously. they are NOT dimensionally reduced hyperparameters, no. The hyperparameters are learning rates, that's it. X axis, learning rate for input (1 hidden layer). Y axis, learning rate for output layer. So what this is saying, for certain ill-chosen learning weights, model convergence is for lack of a better word, chaotic and unstable.
- phaedrus 3y agoThe blog post would be a better link for this submission. https://sohl-dickstein.github.io/2024/02/12/fractal.html https://sohl-dickstein.github.io/2024/02/12/fractal.html
- calibas 3y agoIt was posted on HN last week: https://news.ycombinator.com/item?id=39349992 https://news.ycombinator.com/item?id=39349992
- omginternets 3y agoI vaguely recall that in vivo neural oscillations also exhibit fractal structure (in some cases at least).
- pmayrgundter 3y agoOne of Wofram's comments is that there appears to be much more internal structure in language semantics that we had expected, contra-Chomsky. We also know the brain, cortex esp, is highly recurrent, so it should be primed for creating fractals and chaotic mixing. So maybe the hidden structure is the set of neural hyperparams needed to put a given cluster of neurons into fractal/chaotic oscillations like this. Seems potentially more useful too.. way more information content than a configuration that yields a fast convergence to a fixed point. Perhaps this is what learning deep NNs is doing: producing conditions where the substrate is at the tipping point, to get to a high-information generation condition, and then shaping this to fit the target system as well as it can with so many free parameters. That suggests that using iterative generators that are somehow closer to the dynamics of real neurons would be more efficient for AI: it'd be easier to drive them to similar feedback conditions and patterns Like matching resonators in any physical system
- thomastjeffery 3y agoAn LLM does not model language. The name is misleading, and should be changed to Large Text Model. Text is infinitely complex. Written text is only somewhat less so. The text people choose to write is full of complex entropy. The language patterns we use to read text, on the other hand, are much more simple. The most complicated part is ambiguity, and we don't resolve that with language. Instead, we resolve ambiguity with context.
- dr_kiszonka 3y agoI wonder if we use LLM because LTM (and LSTM) was taken.
- thomastjeffery 3y agoI doubt it. The entire purpose of an LLM is to make a model that does language (or at least something close enough). It's an easy mistake to name something what you hope it will do instead of what it literally is. Unfortunately, that distinction becomes important later. It's a similar problem with "AI". Artificial Intelligence does not exist, yet we put that name on all kinds of things. This causes real problems, too: by labeling an LLM "AI", we anthropomorphize it. From then on, the entire narrative is misleading.
- ahdsr 3y ago> Some fractals -- for instance those associated with the Mandelbrot and quadratic Julia sets -- are computed by iterating a function, and identifying the boundary between hyperparameters for which the resulting series diverges or remains bounded. Neural network training similarly involves iterating an update function (e.g. repeated steps of gradient descent), can result in convergent or divergent behavior, and can be extremely sensitive to small changes in hyperparameters. Motivated by these similarities, we experimentally examine the boundary between neural network hyperparameters that lead to stable and divergent training. We find that this boundary is fractal over more than ten decades of scale in all tested configurations. Reading this gave me goosebumps
- kraig911 3y agoMakes me think of something I think I read from Penrose about consciousness.
- eapriv 3y agoNote that the paper does not provide a proof of this statement, only some experimental evidence.
- cactusfrog 3y agoEven the boundary for newtons approximation is fractal. This is a feature of non-linear optimization.
- bawolff 3y agoIts interesting how fluid-like this fractal is compared to other fractal-zoom videos i see on the internet. I have no idea how common it is for fractals to be like that.
- scalablenotions 3y agoThe chaotic nature of these images, full of local minimas, makes me intuitively think that genetic algorithm approaches to optmizing hyper parameter searching are better suited than regression-based ones.