Live data from Hacker News

Where is Noether's principle in machine learning?

cgad.ski

61–70 of 81 posts

Re: Where is Noether's principle in machine learning?

#61

so I think this is a great connection that deserves more thought. as well as an absolutely gorgeous write-up. The main problem I see with it is that most of the time you don't want the optimum for your objective function, as that frequently results in overfitting. this leads to things like early stopping being typical.

Thanks so much!

And yes, that's quite true. When parameter gradients don't quite vanish, then the equation

=

becomes

= -

where g_theta is the gradient with respect to theta.

In defense of my hypothesis that interesting approximate conservation laws exist in practice, I'd argue that maybe parameter gradients at early stopping are small enough that the last term is pretty small compared to the first two.

On the other hand, stepping back, the condition that our network parameters are approximately stationary for a loss function feels pretty... shallow. My impression of deep learning is that an optimized model _cannot_ be understood as just "some solution to an optimization problem," but is more like a sample from a Boltzmann distribution which happens to concentrate a lot of its probability mass around _certain_ minimizers of an energy. So, if we can prove something that is true for neural networks simply because they're "near stationary points", we probably aren't saying anything very fundamental about deep learning.

Re: Where is Noether's principle in machine learning?

#62

I love the simple but elegant formatting of this blog. cgadski: what did you use to make it?

Thank you!

In the beginning, I used kognise's water.css [1], so most of the smart decisions (background/text color, margins, line spacing I think) probably come from there. Since then it's been some amount of little adjustments. The font is by Jean François Porchez, called Le Monde Livre Classic [2].

I draft in Obsidian [3] and build the site with a couple python scripts and KaTeX.

[1] https://watercss.kognise.dev/

[2] https://typofonderie.com/fr/fonts/le-monde-livre-classic

[3] https://obsidian.md/

Re: Where is Noether's principle in machine learning?

#63
post #42
post #34

A related paper I just found and am digesting: https://arxiv.org/abs/2012.04728 Softmax gives rise to translation symmetry, batch normalization to scale symmetry, homogeneous activations to rescale symmetry. Each of those induce their own learning invariants through training.

That's also a neat result! I'd just like to highlight that the conservation laws proved in that paper are functions of the parameters that hold over the course of gradient descent, whereas my post is talking about functions of the activations that are conserved from one layer to the next within an optimized network. By the way, maybe I'm being too much of a math snob, but I'd argue Kunin's result is only superficiall…

Not GP, but thanks for your detailed comment and the paper reference.

Re: Where is Noether's principle in machine learning?

#64
post #7

How does he create those animations? I'd like to make them as well for myself.

They seem to be built with some love by the author. Apparently they have written it in Haxe, judging from the comment in the page source.

Haha yeah, took some love. I have a scrappy little "framework" that I've been adjusting since I started making interactive posts last year. Writing my interactive widgets feels a bit like doing a game jam now: just copy a template and start compiling+reloading the page, seeing what I can get onto the screen. I've just been using the canvas2d API.

Besides figuring out a good way of dealing with reference frames, the only trick I'd pass on is to use CSS variables to change colors and sizes (line widths, arrow dimensions, etc.) interactively. It definitely helps to tighten the feedback loop on those decisions.

Re: Where is Noether's principle in machine learning?

#65

This is one of those links where just seeing the title sets you off, thinking about the implications. I'm going to have to spend more time digesting the article, but one thing that jumps out at me, and maybe it's answered in the article and I don't understand it, is the role of time. Generally in physics, you're talking about a quantity being conserved over time, and I'm not sure what plays the role of time when you'…

Time is not special regarding symmetries and conserved quantities. In general you can consider any family of continuous transformations parametrised by some real variable s: be it translations by a distance x, rotations by an angle φ, etc. These are technically one-parameter subgroups of a Lie group.

Then, if your dynamical system is symmetrical under these transformations you can construct a quantity whose derivative wrt s is zero.

Re: Where is Noether's principle in machine learning?

#66
post #7

Earlier quoted context omitted.

They seem to be built with some love by the author. Apparently they have written it in Haxe, judging from the comment in the page source.

Oh that's way out of my league unfortunately. I wonder if there's a library or something that does something like this.

Not quite what you're looking for, but worth pointing out that Grant Sanderson of 3Blue1Brown has published the "framework" he uses for his math videos on GitHub.

https://github.com/3b1b/manim

Re: Where is Noether's principle in machine learning?

#67
post #61

so I think this is a great connection that deserves more thought. as well as an absolutely gorgeous write-up. The main problem I see with it is that most of the time you don't want the optimum for your objective function, as that frequently results in overfitting. this leads to things like early stopping being typical.

Thanks so much! And yes, that's quite true. When parameter gradients don't quite vanish, then the equation = becomes = - where g_theta is the gradient with respect to theta. In defense of my hypothesis that interesting approximate conservation laws exist in practice, I'd argue that maybe parameter gradients at early stopping are small enough that the last term is pretty small compared to the first two. On the other h…

Your work here is so beautiful, but perhaps one lesson is that growth and learning result where symmetries are broken. :-D

Re: Where is Noether's principle in machine learning?

#68
post #42
post #34

A related paper I just found and am digesting: https://arxiv.org/abs/2012.04728 Softmax gives rise to translation symmetry, batch normalization to scale symmetry, homogeneous activations to rescale symmetry. Each of those induce their own learning invariants through training.

That's also a neat result! I'd just like to highlight that the conservation laws proved in that paper are functions of the parameters that hold over the course of gradient descent, whereas my post is talking about functions of the activations that are conserved from one layer to the next within an optimized network. By the way, maybe I'm being too much of a math snob, but I'd argue Kunin's result is only superficiall…

I wouldn't call drawing a distinction between an isomorphism and an analogy to be maths snobbery. I would call it mathematics. :)

Re: Where is Noether's principle in machine learning?

#69
post #9

As a complete amateur I was wondering if it could be possible to use that property of light ("to always choose the most optimal route") to solve the traveling salesman problem (and the whole class of those problems as a consequence). Maybe not with an algorithmic approach, but rather some smart implementation of the machine itself.

This is pretty likely, it's been done with DNA: https://pubmed.ncbi.nlm.nih.gov/15555757/

Physics contains a lot of 'machinery' for solving for low energy states.

Re: Where is Noether's principle in machine learning?

#70
Very nice article! I recently had a long chat with chatgpt on this topic, although from a slightly different perspective.

A neural network is a type of machine that solves non linear optimization problems, and the principle of least action is also a non linear optimization problem that nature solves by some kind of natural law.

This is the one thing that chatgpt mentioned which surpised me the most and which I had not previously considered.

> Eigenvalues of the Hamiltonian in quantum mechanics correspond to energy states. In neural networks, the eigenvalues (principal components) of certain matrices, like the weight matrices in certain layers, can provide information about the dominant features or patterns. The notion of states or dominant features might be loosely analogous between the two domains.

I am skeptical that any conserved quantity besides energy would have a corresponding conserved quantity in ML, and the Reynolds operator will likely be relevant for understanding any correspondence like this.

iirc the Reynolds operator plays an important role in Noethers theorem, and it involves an averaging operation similar to what is described in the linked article.

Post reply on HN