Let’s do something fun today. I have seen the latest craze (or at least it was a couple weeks ago) on Facebook of face aging. Personally, I never watched the last scene of Indiana Jones and the Last Crusade and thought, “That would make a great app. People would love to see themselves aged at an insane rate!” I guess the next big thing will be an app that lets you see what it would look like if someone ripped out your heart.
The big question is: How is this done? Well, there are several methods, but one that could work is something called a generator adversarial network (GAN). That sounds a bit intimidating, but if you break down the name, it becomes easier. Network just implies that we are going to use some neural network, which is just something with nodes and weights. Next is the generator part. This can be the generation of anything really. It can be a picture, text, music, or even a signal. You could write a generator for chocolate chip cookie recipes. The possibilities here are the reason this is a very hot area of research in the field.
Now for the tricky part: “the adversarial.” This goes back to the title. Within this fascinating method, there are actually two models being built and trained. One model is a rotten forger (and consequently the one we will be interested in at the end), and the other is a noble upstanding cop. The forger’s job is to create fakes, and the cop’s job is to distinguish the fakes from the real deal. For the basic version of this, we just set an output. Let’s keep to our example and say “faces.” We want to be able to generate pictures of faces. More specifically, we want our forger to create new fake face images that can pass the cop undetected. How do we train it? Well, we start with a bunch of pictures of faces. We give our forger random numbers to transform into a face (yeah, this part is a bit counterintuitive), which allows us to generate a nearly infinite number of new faces. We then feed the fakes and the real pictures to the cop, and a cycle starts in which each gets better and better at his job until we have created a master forger.
Great, now we can make faces, but how do we age them? This is where it gets even more complex—but not outside the scope of our example. If we have “before and after” examples to show the cop, he can determine whether or not the transformation is genuine, so we would need a lot of older and younger pictures of different people. We can just show our forger the “before” and tell him to do the transformation and start the cycle all over again, having the two battle it out until nothing the other one can do will change the game (really rough approximation of Nash equilibrium from game theory). Now our generator can take a picture of someone’s face and make realistic changes to it so that the person looks older or at least like he or she has had a rough week. We could get into latent vectors, but that is probably best saved for another time. Additionally, this is just one method for this type of problem, and it is really just an archetype. The types of models used for the forger or the cop are really open ended, and there are quite a few variations on this approach. I suspect we will see more and more of these nifty little applications in the future, but I hope they are more pleasant.
Big data is daunting and confusing, yet it is becoming more of a necessity to remain competitive in the modern workplace. We here at Convergent Technologies specialize in simplifying the seemingly opaque. We have helped many organizations of various scales implement sensible data solutions. Let us help get you there!