Hacker News new | ask | show | jobs
by philipn 4016 days ago
The reason they look so 'fractal-like' (e.g. trippy!) is because they actually are fractals!

In the same way a normal fractal is a recursive application of some drawing function, this is a recursive application of different generation or "recognition -> generation" drawing functions built on top of the CNN.

So I believe that, given a random noise image, these networks don't generate the crazy trippy fractal patterns directly. Instead, that happens by feeding the generated image back to the network over and over again (with e.g. zooming in between).

Think of it a bit like a Rorschach test. But instead of ink blots, we'd use random noise and an artificial neural network. And instead of switching to the next Rorschach card after someone thinks they see a pattern, you continuously move the ink blot around until it looks more and more like the image the person thinks they see.

But because we're dealing with ink, and we're just randomly scattering it around, you'd start to see more and more of your original guess, or other recognized patterns, throughout the different parts of the scattered ink. Repeat this over and over again and you have these amazing fractals!

5 comments

Functional iteration is actually a fun way to draw fractal images in the plane. It goes like this (for anyone interested):

1) Pick a function f: R^2 ==> R^2

2) Pick a region of R^2 (this could be the unit square for instance).

3) For each point in the region do the following:

  a) Plug the point into f. Then plug f(x) into f. Then plug f(f(x)) into f, etc....

  b) The norm of f(f(...f(x)...)) will either run off to infinite or stay bounded.

  c) Record for the original point, x, how many iterations it took the process to run off to infinite (or the maximum if the sequence stayed bounded).
4) Paint by number after assigning a unique color to each possible number of iterations.

Here's the result of this process for the function:

f(x,y) = ( exp(x) * cos(y), exp(x) * sin(y) )

http://i.imgur.com/LZKavio.png

> The reason they look so 'fractal-like' (e.g. trippy!) is because they actually are fractals!

While I agree with your idea about fractals (though you're a bit vague on the math details to know for sure), I also believe that a large reason the images look so "trippy" is because there is some local contrasting effect at work, generating high-saturation rainbow fringes at the edges of details and features. You get loads of that on psychedelics as well.

I bet there's a pretty straightforward reason to explain these rainbow fringes, if one were to dig into it, though.

Another (unrelated) observation I had was the feeling that the neural net seemed to be reproducing JPEG-artifact type fringes in the images? Though it could be that I was just looking at scaled versions of already JPEG-compressed output images, the article doesn't provide details (if only they had been PNGs ...).

That's really cool.

The trippiness is further compounded by the rainbow-ish colour effect produced by the recursive function, which mimics the "shimmering" rainbow effect you commonly get around lights when tripping on LSD.

And also, when under the influence of various drugs you tend to see patterns, particularly faces, where there aren't any.

> The reason they look so 'fractal-like' (e.g. trippy!) is because they actually are fractals!

Do they exhibit self-similarity at different zoom levels?

I believe they do (in the sense that if you take one of these images, zoom it in, and run it through the algorithm again, it'll take the micro-features of the animals it hallucinated and hallucinate more animals on top of them).
Yes, you can see zoomed-in sections of the last image in the article, about halfway down this gallery https://photos.google.com/share/AF1QipPX0SCl7OzWilt9LnuQliat...
These hair features that get re-interpreted as legs are particularly uncanny.