I know, I was there. Had my arguments with creationists, sat alone and dwelled on why did something evolve like this, why didn’t we grow wings and horns. For me, it all got serious when I started to experience a personal renaissance slowly happening around 2009. I started learning tiny pieces about evolution on my biopsychology textbooks, but then I became obsessed with these stuff around 2012, actively searching for more information. The Internet helped a lot; actually, all those youtube videos and lectures expanded my understanding of evolution. The next pieces fit after I enrolled in a graduate programme with a strong focus on animal behaviour and biology. I learned evolution is not all about natural selection, it’s also about randomness and sexual selection and a bunch of other concepts that we’ll just skip here. When I was done there, I was pretty confident that I’ve seen the light, finally, I know how evolution works but nope. I was almost there, but a crucial piece of information was misaligned. In this post, I want to share my current knowledge of evolution using some Adobe Illustrator and results from the current state of my PhD project. You see, I’m not an evolutionary biologist so probably this post won’t give you the most accurate explanation, what I want to do here is to build up a visual intuition. The last “Eureka” happened when I saw bits of evolution with my own eyes, and I realised what this sentence really means: Survival of the fittest, not the best. So I want to do the same here.
First of all, the motto is not from Darwin, but it was Herbert Spencer’s impression of Darwin’s book but let’s get not distracted by who coined it. Back to the content, natural selection is one of the many ways that organisms evolve, and according to good old Wikipedia, it’s defined like this:
Natural selection is the differential survival and reproduction of individuals due to differences in phenotype. It is a key mechanism of evolution, the change in the heritable traits characteristic of a population over generations.
What the fuck, Wikipedia? diFfeRenTiaL sUrviVal aNd reProDuCtiOn of inDivIdUalS dUe to difFeReNcEs in pHeNoTyPe… that’s one of the reasons that people can’t see the beauty in it. Let’s make it simpler using some common sense. Imagine you’re searching for gold, want to reach the X, which by chance, you know it’s located at the lowest point of the field. It’s night by the way so you really can’t see what’s around. How should we reach it? Well, that seems not that terrible, I’d start by walking downwards till I reach a point that every other direction goes up. Probably I’m there, but I don’t know since I don’t have a helicopter view or something. To be sure, I start from a different point once more and see if I end up in the same lowest place. I shall now dig and hope for the best. Let’s make it more abstract using balls and surfaces in the pictures below:
Technically, this is how many optimisation algorithms work to minimise the error of some fancy machine learning tools. Interestingly, a family of optimisation algorithms called “evolutionary algorithms” are inspired by how evolution works. Ok now imagine the surface to be like a mountain full of many hills, again the goal is to find the lowest point because we want the gold baby. You can do the same, keep walking downwards waiting for a flat land with surroundings being higher than itself then dig and hope you’re on the right spot. That’ll take some time since you have to try from a couple of other initial points. Now imagine you’re doing the same, but this time you gathered groups of people to help, they all start from a random position, move downwards step by step. You folks might all reach the same local minimum but probably each will end up in a different low point. Now imagine the space you’re exploring is so vast that during this process people need to settle in those locations like tribes and after a while, they develop their language and culture that if by chance you end up going there, they look pretty different. Ignoring the inner mechanisms of evolution, this is a good analogy for how it’s working. Here, let’s take a look:
Usually, in an evolutionary algorithm, we optimise whatever we want it to be optimised using a population of points on the “error landscape”. The algorithm, in its essence, is pretty simple:
start from a random location, see which solution has the lowest error, start a new population from there, keep moving till you reach a local minimum.
1. TensorFlow Object Detection API: basics of detection (2/2)
2. Understanding and building Generative Adversarial Networks(GANs)- Deep
3. Learning with PyTorchDeep Learning Book Notes, Chapter 1
4. Artificial Intelligence Conference
Here we have parameters to play with, how many points we have in our population? How to reproduce the fittest solution? How tight are the circles around each other? And sometimes, when the population considered to be two different population? And so on. Look at the following figure to see what I mean by the last sentence:
You see, after a while, the population can end up separated into different species. Algorithms such as NEAT exploit this feature to produce many right solutions for the task you’re working on. Hopefully, by now, we have a way to see what does the fittest mean. I know I oversimplified this and you should know it too. For example, this landscape is not static, and we don’t know what are we optimising here. Take a look at this:
The landscape is massive, open-ended, dynamic, and has an unknown number of variables and constraints. But at least now we have a way to look at a toy example. But just for everyone to be on the same page, keep this figure in mind:
I remember reading many times that evolution isn’t smart. It’s just recycling stuff and doing dirty, messy things. But I couldn’t get this, I mean look around you, everything is so perfect for its environment. Tiny stuff does brilliant things how this is messy and not elegant. Until I used NEAT for my project and saw the mess in action. Oh boy, it’s terrible inside. I remember reading about tons of junk DNA that are just there doing apparently nothing, or many things that we carry which had a function at a point but not anymore. Let me show you what’s happening.