Pages

Sunday, 22 January 2012

The most beautiful human face

I'm going to try and explore an interesting aspect of beauty, i.e. symmetry, in this post by breaking it down and rebuilding it from scratch using fractals, cellular automata, and statistical learning. I'm doing this because recently, I read an article somewhere (I'm trying to find it, believe me) that spoke about teaching machines to identify beauty and then photograph it in nature in the form of flying birds, trees, running/leaping animals, etc. I want to explore how machines may be taught what beautiful can be by considering one small example, the human face, putting it together as a mathematical procedure, and then examining it.

Let's begin.

On either sides of a straight line, consider a process that begins called fractalizing. A fractal is any figure such that how many ever smaller pieces it's broken down to, each piece has the same shape as the overall figure. So, when two processes fractalize on either sides of that axis very, very similarly, symmetry is born. And any high degree of similarity is rare because each time a fractal is formed, there is an associated chance of error that pushes the process to move this way or that in space.

[caption id="attachment_21347" align="aligncenter" width="529" caption="A spiral where each arm displays a fractal geometry (notice how every branch - large and small - is an image of the entire spiral)"][/caption]

It so happens that one of the characteristics of a visually-perceived object that we usually look for is beauty, and the important thing about beautiful objects is that they are usually symmetric. If I drew a straight line using a special computerized program on a 2D surface, and then instructed it to commence a fractalizing process on either side of that line in opposite directions and moving away, what are the chances that the line won't be an axis of symmetry? None, given that there are no damping or noise-generating functions coming in the way.

As a second step, then, let me introduce a small damping function on both sides of the line. The processes should now experience a hindrance in their progress, something that keeps them from flexing their muscles entirely. For example, if the processes' task was to draw a sine wave on either sides of the origin-line, they'd now be drawing one with a steadily dropping amplitude.

[caption id="attachment_21346" align="aligncenter" width="529" caption="A damped sine wave (with persistent damping, the amplitude of the wave - or its "volume" - falls at an exponential rate to zero)"][/caption]

If the damping functions act symmetrically, then damping should occur equally on both sides. However, if I tweaked them to be asymmetrical and partly random (like a differential function on two variables, one of whose values is drawn from a normal distribution chart), then we'd start to see variations from one side to another. Let's take this one step further and start the fractal processes on either sides of a plane instead of a line and in 3D space, with the dampers allowed to act on very small sections of the fractals. We'd start to see a 3D figure emerge with time that was mostly symmetrical.

Since these processes are programmable, let's introduce cellular automata (CA). Basically, CA is a tool for microstructure modeling that works with discrete parameters, like the grid on a sheet of graph paper, or the one I'm using to simulate the asymmetrical fractals. Using CA, I program these processes to assume different shapes depending on how far they have moved from the plane. For instance, if they've been plotting out smaller and smaller squares for 5 cm, I can instruct them to chart out larger and larger triangles for the next 10 cm, and so on. A similar instruction can be doled out to the damping functions.

[caption id="attachment_21348" align="aligncenter" width="199" caption="In the cellular automaton shown above, each cell on the grid is hexagonal. The automaton is called an Oscillator if run according to the program called Rule 34/2."][/caption]

Now, let deploy this program to recreate an arbitrary human face. Based simply on technologies like facial recognition, I can access a range of imperfections-of-symmetry on a human face and program a series of damping functions. And based on the same technology, I can access the specifics of what makes a human face - the physical dimensions, the ratios, the curvatures of various parts - and program a series of surface-generating processes. (At this juncture, you're probably wondering why I chose fractals instead of normal curves: they're smoother as a plot and have interesting properties that allow them to be modified in different ways.)

I went through the trouble of describing all this because they define the resources at hand to address a problem: would it be possible to statistically zero in on the most beautiful human face? Or, a set of the most beautiful human faces? As the program runs and generates billions of faces, each face can be identified by a human user as being beautiful or not. Using that as feedback, it seems theoretically possible that the machine should be able to compile a range of different values for different parameters (such as various facial features) that, together, make a beautiful face.

[caption id="attachment_21350" align="aligncenter" width="316" caption="Facial recognition"][/caption]

The judgment of beauty is a subjective action. It is definitely more than just symmetry, but symmetry in this case is only a control variable, something to hold fixed while we change everything else around it. We are also continuously eliminating the subjective aspect - which works as a fuzzy logic. By iterating the processes over and over again to generate different faces, the provision of feedback on some of those faces should enable the machine to create only beautiful ones from statistical memory at some point. However, this is only a theoretical argument because I have not defined the number of lessons after which a machine is considered to have finished "learning".

At the same time, can this number be fixed at the number of people who have ever lived in the last 4,000 years? Because that's all that we human beings have had to go by for our assessment of beauty, too.

No comments:

Post a Comment