3 ms·
Variation calculus is a great lens through which to look at many physics and CS problems. It is IMO under-taught and under-utilized, especially in the machine l
by ur-whale 8y ago
Variation calculus is a great lens through which to look at many physics and CS problems. It is IMO under-taught and under-utilized, especially in the machine learning discipline.
The framework is basically minimization in functional space (as opposed to R^n or a subset thereof, the more common case).
The (to me) surprising thing is that finding an extremum in functional space (i.e. infinite-dimensional space) can be reduced to solving a differential equation, via Euler–Lagrange.
The first problem feels intractable, while the second is "just" numerical integration.
- giomasce 8y agoIt's funny how different backgrounds bring you to having different ideas of what is easy and hard. As a mathematician, to me the easy problem is finding the minimum of the functional (where "easy" means "we can at least try", certainly not "trivial"; some minimum problems are actually relatively easy, some others are very difficult and open), while proving existence of PDEs is exactly why calculus of variations (and many other theories) were invented in the first place.
- ur-whale 8y agoI didn't mean to imply that PDE's were an easy problem. They clearly aren't, especially when it comes to proving some sort of formal property about them (which is something a mathematician would worry about, but which is rarely an engineer's first concern: they'd only worry about that type of thing when numerical integration starts producing "crazy" results). However, there is a very intuitive way to compute an approximate solution to a system of PDE's, namely increase time in very tiny steps and solve the resulting system of equations each time, rinse and repeat. Now, when you deal with arbitrary functions, there are so many ways to "represent" them: as various kind of series, as algebraic composition of elementary functions, as solutions to implicit equations, as solutions to PDE's, as polynomial approximations, as neural networks, etc ... These representations are usually dense in "regular" functional spaces and you do get a lot of mileage out of them. Whichever way you chose to represent functions in your functional space, the problem of finding an extrema over that representation is very much not obvious in the calculus of variation setting (or even that the extremum will be itself be representable, for that matter), whereas the conversion to a system of PDE gives you a clear path to victory - as long as the representation can be differentiated.
- giomasce 8y agoThat's exactly why I say that different viewpoints give different concept of easiness. To me there are a lot of way to find minima (or, at least, critical points) of a functional: the direct method in CV, mountain pass theorems, etc. Most of them just need to know very general information about your space and functional and are actually even simple to visualize.
- agumonkey 8y agoI remember a physics problem where teacher explained that a ball on different paths, even if the height differences would sum to zero would arrive at different times. I often think about this when planning car drives because I believe you could make better use of gravity and use less fuel.
- saagarjha 8y ago> I remember a physics problem where teacher explained that a ball on different paths, even if the height differences would sum to zero would arrive at different times. A good way to think about problems such as these are to look at the extreme cases. In this case, consider a flat plane: the ball takes infinite time, since it never rolls at all. And the fastest path would be a valley (though, as far as being v-shaped as possible), with the ball accelerating part of the way and decelerating at the end, spending the majority of the time at a high speed.
- mlthoughts2018 8y agoI studied computer vision in grad school when these were some of the state of the art methods, like the Mumford-Shah segmentation model and various inpainting models that set up the problem basically as a calculus of variations problem over the appropriate Sobolev space of image intensity functions and/or discontinuity-permitting boundary functions. I’ve worked as a practitioner in computer vision as well and I think I disagree with your “under taught” comment. In practice, the variational methods are not competitive at all with deep learning models, and even very naive transfer learning can apply better inpainting or segmentation than the older variational methods. It is already merely a footnote in the history of computer vision. In 10 years it won’t even merit being part of literature reviews. So for many applied domains of ML, I think spending roughly zero time on these variational methods in schooling is a good idea. You can always come back to them later, but you probably won’t need to. A different application domain, variational Bayesian inference, might be a case where there is more reason to care. Although, things like ADVI are more about one very fixed approach to the problem (minimizing KL divergence to find a best approximating distribution from a class with known differentiability properties), and only in novel research would knowledge of general variational techniques give much value.
- ur-whale 8y ago>In practice, the variational methods are not competitive at all with deep learning models I really don't see why these two things need be pitted against each others. What you're describing (Euler-lagrange applied to computer vision problems) is a direct application of the calculus of variation to the image itself. It's rather naive because it uses an extremely weak representation of the content of the image (i.e. a bunch of pixels which essentially means working with a piecewise-constant basis of the functional space), and as you noted, it is easily beaten by modern techniques. However: Deep neural nets are nothing but another, much more powerful "basis" of functional space (I put "basis" in quote because they're not linear. OTOH, they're generative). A deep net is a finite set of real numbers that maps to a point in functional space, and any arbitrary continuous maps from R^n to R^p can be approximated by deep nets given enough weights and neurons. So, if deep nets are dense in functional space, and "training" a deep net is nothing but solving a minimization problem in functional space, then I don't see why the "calculus of variation" ==> "PDE" via Euler-Lagrange route can't bee applied to training deep nets instead of backprop-based minimizers. Now, if you're claiming that backprop works better than solving the PDE induced by Euler-Lagrange on the functional minimization problem of training a deep-net, I'm very happy to believe you, but I've yet to see literature demonstrating this.
- montalbano 8y agoFeynman on Calculus of variations: “When I was in high school, my physics teacher—whose name was Mr. Bader—called me down one day after physics class and said, ‘You look bored; I want to tell you something interesting.’ Then he told me something which I found absolutely fascinating, and have, since then, always found fascinating. Every time the subject comes up, I work on it. In fact, when I began to prepare this lecture I found myself making more analyses on the thing. Instead of worrying about the lecture, I got involved in a new problem. The subject is this—the principle of least action." The rest at: http://www.feynmanlectures.caltech.edu/II_19.html http://www.feynmanlectures.caltech.edu/II_19.html
- ur-whale 8y agoIf physics is your thing, and it certainly was Feynman's, it'd be hard not to be fascinated by the calculus of variations, it shows up all over the place: - principle of least action (lagrangians) - adiabatic cycles in thermodynamics - quantum mechanics - etc.. and I'm probably missing another 100. Looks like it's a fairly fundamental thing in the world.