Machine “Learning”—An Entertainment [Industry] Edition

Yes, “Machine ‘Learning’,” too, has been one of my “research” interests for some time by now. … Machine learning, esp. ANN (Artificial Neural Networks), esp. Deep Learning. …

Yesterday, I wrote a comment about it at iMechanica. Though it was made in a certain technical context, today I thought that the comment could, perhaps, make sense to many of my general readers, too, if I supply a bit of context to it. So, let me report it here (after a bit of editing). But before coming to my comment, let me first give you the context in which it was made:


Context for my iMechanica comment:

It all began with a fellow iMechanician, one Mingchuan Wang, writing a post of the title “Is machine learning a research priority now in mechanics?” at iMechanica [^]. Biswajit Banerjee responded by pointing out that

“Machine learning includes a large set of techniques that can be summarized as curve fitting in high dimensional spaces. [snip] The usefulness of the new techniques [in machine learning] should not be underestimated.” [Emphasis mine.]

Then Biswajit had pointed out an arXiv paper [^] in which machine learning was reported as having produced some good DFT-like simulations for quantum mechanical simulations, too.

A word about DFT for those who (still) don’t know about it:

DFT, i.e. Density Functional Theory, is “formally exact description of a many-body quantum system through the density alone. In practice, approximations are necessary” [^]. DFT thus is a computational technique; it is used for simulating the electronic structure in quantum mechanical systems involving several hundreds of electrons (i.e. hundreds of atoms). Here is the obligatory link to the Wiki [^], though a better introduction perhaps appears here [(.PDF) ^]. Here is a StackExchange on its limitations [^].

Trivia: Kohn and Sham received a Physics Nobel for inventing DFT. It was a very, very rare instance of a Physics Nobel being awarded for an invention—not a discovery. But the Nobel committee, once again, turned out to have put old Nobel’s money in the right place. Even if the work itself was only an invention, it did directly led to a lot of discoveries in condensed matter physics! That was because DFT was fast—it was fast enough that it could bring the physics of the larger quantum systems within the scope of (any) study at all!

And now, it seems, Machine Learning has advanced enough to be able to produce results that are similar to DFT, but without using any QM theory at all! The computer does have to “learn” its “art” (i.e. “skill”), but it does so from the results of previous DFT-based simulations, not from the theory at the base of DFT. But once the computer does that—“learning”—and the paper shows that it is possible for computer to do that—it is able to compute very similar-looking simulations much, much faster than even the rather fast technique of DFT itself.

OK. Context over. Now here in the next section is my yesterday’s comment at iMechanica. (Also note that the previous exchange on this thread at iMechanica had occurred almost a year ago.) Since it has been edited quite a bit, I will not format it using a quotation block.


[An edited version of my comment begins]

A very late comment, but still, just because something struck me only this late… May as well share it….

I think that, as Biswajit points out, it’s a question of matching a technique to an application area where it is likely to be of “good enough” a fit.

I mean to say, consider fluid dynamics, and contrast it to QM.

In (C)FD, the nonlinearity present in the advective term is a major headache. As far as I can gather, this nonlinearity has all but been “proved” as the basic cause behind the phenomenon of turbulence. If so, using machine learning in CFD would be, by the simple-minded “analysis”, a basically hopeless endeavour. The very idea of using a potential presupposes differential linearity. Therefore, machine learning may be thought as viable in computational Quantum Mechanics (viz. DFT), but not in the more mundane, classical mechanical, CFD.

But then, consider the role of the BCs and the ICs in any simulation. It is true that if you don’t handle nonlinearities right, then as the simulation time progresses, errors are soon enough going to multiply (sort of), and lead to a blowup—or at least a dramatic departure from a realistic simulation.

But then, also notice that there still is some small but nonzero interval of time which has to pass before a really bad amplification of the errors actually begins to occur. Now what if a new “BC-IC” gets imposed right within that time-interval—the one which does show “good enough” an accuracy? In this case, you can expect the simulation to remain “sufficiently” realistic-looking for a long, very long time!

Something like that seems to have been the line of thought implicit in the results reported by this paper: [(.PDF) ^].

Machine learning seems to work even in CFD, because in an interactive session, a new “modified BC-IC” is every now and then is manually being introduced by none other than the end-user himself! And, the location of the modification is precisely the region from where the flow in the rest of the domain would get most dominantly affected during the subsequent, small, time evolution.

It’s somewhat like an electron rushing through a cloud chamber. By the uncertainty principle, the electron “path” sure begins to get hazy immediately after it is “measured” (i.e. absorbed and re-emitted) by a vapor molecule at a definite point in space. The uncertainty in the position grows quite rapidly. However, what actually happens in a cloud chamber is that, before this cone of haziness becomes too big, comes along another vapor molecule, and “zaps” i.e. “measures” the electron back on to a classical position. … After a rapid succession of such going-hazy-getting-zapped process, the end result turns out to be a very, very classical-looking (line-like) path—as if the electron always were only a particle, never a wave.

Conclusion? Be realistic about how smart the “dumb” “curve-fitting” involved in machine learning can at all get. Yet, at the same time, also remain open to all the application areas where it can be made it work—even including those areas where, “intuitively”, you wouldn’t expect it to have any chance to work!

[An edited version of my comment is over. Original here at iMechanica [^]]


 

“Boy, we seem to have covered a lot of STEM territory here… Mechanics, DFT, QM, CFD, nonlinearity. … But where is either the entertainment or the industry you had promised us in the title?”

You might be saying that….

Well, the CFD paper I cited above was about the entertainment industry. It was, in particular, about the computer games industry. Go check out SoHyeon Jeong’s Web site for more cool videos and graphics [^], all using machine learning.


And, here is another instance connected with entertainment, even though now I am going to make it (mostly) explanation-free.

Check out the following piece of art—a watercolor landscape of a monsoon-time but placid sea-side, in fact. Let me just say that a certain famous artist produced it; in any case, the style is plain unmistakable. … Can you name the artist simply by looking at it? See the picture below:

A sea beach in the monsoons. Watercolor.

If you are unable to name the artist, then check out this story here [^], and a previous story here [^].


A Song I Like:

And finally, to those who have always loved Beatles’ songs…

Here is one song which, I am sure, most of you had never heard before. In any case, it came to be distributed only recently. When and where was it recorded? For both the song and its recording details, check out this site: [^]. Here is another story about it: [^]. And, if you liked what you read (and heard), here is some more stuff of the same kind [^].


Endgame:

I am of the Opinion that 99% of the “modern” “artists” and “music composers” ought to be replaced by computers/robots/machines. Whaddya think?

[Credits: “Endgame” used to be the way Mukul Sharma would end his weekly Mindsport column in the yesteryears’ Sunday Times of India. (The column perhaps also used to appear in The Illustrated Weekly of India before ToI began running it; at least I have a vague recollection of something of that sort, though can’t be quite sure. … I would be a school-boy back then, when the Weekly perhaps ran it.)]

 

Advertisements

See, how hard I am trying to become a (Full) Professor of Mechanical Engineering in SPPU?

Currently, I am not only cashless but also jobless. That’s why, I try harder.

I am trying very hard to be a (Full) Professor of Mechanical Engineering, especially at the Savitribai Phule Pune University (or SPPU for short).

That’s right.

And that’s why, I have decided to adopt an official position whereby I abandon all my other research and study interests, especially those related to the mechanics of the quanta. Instead, I have officially decided to remain interested only in the official problems from the Mechanical Engineering discipline proper—not only for my studies, but also for my research interests.

… If only I were to have my first degree in Mechanical Engineering, instead of in Metallurgy! (It was some 37.5–33.5 years ago, with my decision to choose Metallurgy being from some 36.5 years ago.) … If only I were to choose Mechanical right back then, this problem wouldn’t have arisen today. …

Tch! …

…But, well, thinking of my first degree, its circumstances—where I got it from (COEP, the engineering college with the highest cut-off merit in the entire Maharashtra state), in what class (First Class with Distinction, the highest class possible), and, most crucially, for spending all my time at what place (The Boat Club)… You know, looking back some 3.5 decades later of all those circumstances—the circumstances of how I chose Metallurgy, back then, as I was sitting at the Boat Club… Hmmm… Boat Club. … Boat Club! Boat Club!!

It gives me some ideas.

So, to better support my current endeavors of becoming an Officially Approved Full Professor of Mechanical Engineering in SPPU, may be, I should solve some Mechanical Engineering problems related to boats. Preferably, those involving not just fluid mechanics, but also mechanisms and machine design—and vibrations! [Oh yes. I must not forget them! Vibrations are, Officially, a Mechanical Engineering topic. In fact even Acoustics. …]

Thinking along such lines, I then thought of one problem, and sort of solved it too. Though I am not going to share my answer with you, I certainly want to share the problem itself with you. (Don’t ask me for answers until I get the job as an Officially Approved Full Professor in Mechanical Engineering at SPPU.)

OK, so here we go.


The Problem Description:

Consider a boat floating on a stand-still lake. The boat has a very simple shape; it is in the shape of a rectangular parallelpiped (i.e., like a shoe-box, though not quite exactly like a punt).

In the plan (i.e. the top view), the boat looks like this:
mechanicalengineeringboat

 

 

 

 

 

As shown in the figure, at the centers of the front- and back-sides of the boat, there are two circular cylindrical cavities of identical dimensions, both being fitted with reciprocating pistons. These pistons are being driven by two completely independent mechanisms. The power-trains and the prime-movers are not shown in the diagram; in this analysis, both may be taken to be mass-less and perfectly rigid. However, the boat is assumed to have some mass.

We will try to solve for the simplest possible case: perfectly rigid boat walls (with some mass), perfectly rigid but mass-less pistons, complete absence of friction between the pistons and the cylinder walls, etc.

Assume also that both the boat and the lake water are initially stand-still, and that there are no other influences affecting the motions (such as winds or water currents).

Now, let’s put the pistons in oscillatory motions. In general, the frequencies of their oscillations are not equal. Let the frequency for the left- and right-side pistons be f_L and f_R Hz, respectively.

Problem 1:

Build a suitable Mechanical Engineering model, and predict how the boat would move, in each of the following three scenarios:

  • f_L = f_R
  • f_L > f_R
  • f_L < f_R

In each case, determine (i) whether the boat as a whole (i.e. its center of mass or CM) would at all undergo any motion at all or not, (ii) if yes, whether the motion of the CM would have an element of oscillations to it or not, and finally, (iii) whether the boat (i.e. its CM) would undergo a net displacement over a large number of pistons oscillations or not (i.e., the question asks whether the so-called “time-averaged” net displacement occurs in any one direction or not), and if yes, in which direction.

You may make other minor assumptions. For instance, in each of the above 3 cases, you may assume that at time t = 0, both the pistons are at their innermost positions, with each piston beginning its motion by pushing outwards. Also check out the effect of assuming, some other, suitable, values for the initial phases.

Though not at all necessary, if it will help you, you may perhaps consider the case where the higher frequency is an integer multiple of the lower frequency, e.g., in the second of the three cases, assume f_L = n f_R, where n \in \mathcal{N}. However, note that eventually, you are expected to solve the problem in the general case, the one in which the ratio of the frequencies may be any real number. The cases of practical interest may be where the ratio ranges from 0.0 to a real number up to, say, 2.67 or 3.14 (or, may be, 5.25).

Notice that nowhere thus far have we said that the oscillatory motion of the pistons would be SHM (i.e. simple harmonic). You may begin with an SHM, but as a further problem below illustrates, the piston motion may neither be simple-harmonic, nor even symmetrical in the to- and fro-directions.

On the fluid mechanics side: In your analysis, assume that the length of the boat is much, much greater than the stroke-lengths of the pistons. Essentially, we want to ensure that the water waves produced at one end do not significantly affect the local dynamics at the other end.

You may assume a highly simplified model for the fluid—the problem is not supposed to have a crucial bearing on what kind of a fluid you assume. I mean to say, we are not looking for so detailed a model that you would have to perform a CFD analysis. (That task, we will leave to the Naval Architecture engineers.) However, do make sure to note how your model behaves for an inviscid flow vs. for a viscous flow.

So, in short, the problem is to determine the nature of the motion of the boat, if there is any—i.e., to determine if its CM undergoes a net displacement in the time-averaged sense or not, and if yes, in which direction it occurs.

Problem 2:

Assume a relatively smaller stroke-length for one of the pistons, and repeat the problem.

Problem 3:

Assume that one of the frequencies is zero, which is as good as saying that the boat is fitted with only one cylinder-and-piston. Repeat the analysis.

Problem 4:

Continue to assume that one of the frequencies is zero. Now, also assume that the outward stroke of the moving piston happens faster than its inward stroke. Determine the nature of the motion, if any, for the CM of the boat.

Problem 5 (Optional):

Assuming that the prime mover outputs a uniform circular (or rotary) motion, design a suitable mechanism which will help implement the idea of having non-SHM motions—e.g., different stroke-times in the outward and inward directions. Conduct an informal (or a more formal, calculus-based) displacement-, velocity- and acceleration-analysis, if you wish.

Give it a thought whether this entire idea of transforming a circular motion to a nonuniform reciprocating motion can be done away with, thereby saving on energy—in real life, there is friction—using certain ideas from electrical engineering and electronics.

Ooops!

No, no, no! No!! Throw out that horrendous idea! I mean the very last one!!

We want to remain concerned only with the Mechanical Engineering Problems proper. That is the Official position I have adopted, remember?


That’s right. What I described above was, really, really, really only a Mechanical Engineering Problem.

It really, really, really has nothing to do with anything else such as electrical engineering or quantum physics.

[And if even Prof. Thanu Padmanabhan (IUCAA) does not know quantum physics (he told me so once, right in person), why should I be concerned with it, anyway?]

Anyway, so, Officially speaking, I made up this problem only because I want to become an Officially Approved Full Professor of Mechanical Engineering at SPPU.


If you are interested in some other Mechanical Engineering problems, especially on the fluids-thermal side, check out my recent posts on the Eco-Cooler, and see if you can take further the analysis given in them.

I myself had made a much more advanced engineering analysis right at that time, but I am not going to give it—or its results—until some time after I land and join the kind of job I am looking for—a Full Professor’s. (And I hope that you do have the sense to see that this is not a “prestige issue” on my part.)

The post having a preliminary (quantitative) fluids-thermal analysis is here [^], though the qualitative analysis of the problem begins with an earlier post, here [^].


[Guess the problem, as given, is enough for the time being. I may even come back and add one or two variations on the problem! But no guarantees.]

Update right on 2016.12.02: OK, here are a couple of minor variations. What happens if, when a piston comes to a rest at the extreme stroke, it continues staying idle for a while, before resuming its towards-the-center motion? What if the piston motion is such that the point of zero displacement does not occur exactly at the middle of its overall stroke-length?

I may post some further variations on the problem, or suggest alternative analogous problems, in future.

Currently, I am not just cashless but also jobless. That’s why, I try harder.


More, may be later. As to the Song I Like section, I don’t have anything playing at the back of my mind right away, so let me see if something strikes me by the time I come back tomorrow to give a final editing touch to this post. In that case, I will add this section; else, I will not!


[After the update right on 2016.12.02: I am done with this post now, and if there are any errors, I will let them stay. If you find the post confusing somewhere, please do drop me a line, though. Best, and take care.]

[E&OE]