Show HN: Lava lamp simulated by neural net in infinite loop (github.com)
duralava is a neural network which can simulate a lava lamp in an infinite loop.
It uses a recurrent GAN that learns the physical behavior of the lava lamp.
A noteworthy aspect is that can generate an arbitrarily long video of a (virtual) lava lamp, without diverging even after thousands of frames.
27 comments
[ 4.0 ms ] story [ 75.2 ms ] threadThat’s an interesting aspect, which I haven’t thought of. I think real world lava lamps have very chaotic behavior. I think the neural network, however, just learns the most common behaviors of a lava lamp but so far cannot learn every aspect of a lava lamp. Training a bigger neural network could work though…
I'm not sure if you can use an image or short video as a seed, but in case it's possible, the rest of the real video and the rest of the video generated by this will look similar for a short time, but after a while they will be more and more different.
It's similar to turning on two lamps of the same factory at the same time. In spite they look similar initially, after a while they will look different.
In particular a real lamp will get some vibration the cars in the streets that will affect the content just a little, but after a while the chaotic behavior will make the differences bigger. Also small temperature differences from the sunlight from the window, and other stuff that looks unimportant will cause the real lamp to have a unpredictable behavior after some time.
Cloudflare generating Pseudo-random numbers from 100 lava lamps (4 years ago - 4 comments - gizmodo.com)
https://news.ycombinator.com/item?id=15639320
Lavarand - Hardware random number generator using lava lamps (11 years ago - 0 comments - wikipedia.org)
https://news.ycombinator.com/item?id=15639320
Relevant website -
LavaRnd
http://www.lavarnd.org/lavarnd.html
The method dates back to SGI's Lavarand: https://en.m.wikipedia.org/wiki/Lavarand
A related system, LavaRnd uses webcams that have their lenscaps on, so the sensors are only detecting thermal noise:
https://www.lavarand.org/
But Cloudflare is the most famous implementor of the technique:
https://blog.cloudflare.com/randomness-101-lavarand-in-produ...
ISTR that US embassies tried using atmospheric noise as a seed for generating one-time pads at some point, but that was deprecated as being too vulnerable to undetectable outside interference.
By comparison, the Cloudflare system with the lava lamps in the lobby is tamper-evident.
> The claim was that it is un crackable because truly random. I wonder if this can be used to emulate the physical process and break that encryption.
No. Chaotic processes are so sensitive to initial conditions and perturbations from the environment that any simulation quickly diverges from the actual process being simulated. Other common macroscale systems that exhibit this property are the three body problem and double pendulums.
Maybe the neural network produces good enough looking pictures and it’s cheap to run instead of solving the PDEs. But don’t think its going to be that accurate.
https://en.m.wikipedia.org/wiki/Preconditioner
It's nice work though.
I am however completely awed by the folder in that git repo with 143.000 png files. Checking that into git would have turned my laptop itself into a molten blob of wax, haha.
Edit: rereading my comment, maybe it sounds harsh. Idon't wanna sound like I'm dissing this, GANs are hard and so is image generation. I couldn't have done it better.
Also: nice trick on penalizing poor (growing) noise vectors; another thing you could try is simply always sample a random point on an n-sphere (you divide your random vector by its length, it'll always have length 1)
Don't get me wrong, it's a cool project, but let's not get ahead of ourselves.
It does need to understand certain properties of owls, even if "arrangement of pixels that look like an eye near arrangement of pixels that look like a beak" is as far as it gets. Though as in another thread it is not necessarily the owl (you would need to do something like rendering a la Neural Radiance Fields (NeRF) to get closer to some perfect comprehension of an owl.
But the means by which the network generates frames involves some kind of learned representation of the lava lamp that is more than just a matrix of pixel values, and the network encodes a function for how it predicts this representation will change over time. So it also simulates the lava lamp itself.
On the other hand, the network has no idea about things that would be necessary to perform a remotely accurately simulation, like properties of the chemicals involved or the laws of thermodynamics.
So it simulates really the "experience of a lava lamp".
But it still doesn't do it very well.
Edit: It could be easier than with a lava lamp because for the fire there is no complex physical model. For the lava lamp you have to take care that everything that goes up at some point goes down again etc.