Social Safety Nets, Evolution, and the Local Maxima

Sure social safety nets are Samaritan, but is there more to it than just morals? From a pragmatic perspective is there a productive aspect of having a social safety net? Analysis via an evolutionary standpoint can help serve a good reference frame for answering this question.

The evolutionary algorithm can be thought of as a method of problem solving and is often used in the fields of machine learning and AI as an optimization algorithm. The algorithm is much like what you have learned from a basic bio text book and is composed of several discrete steps that continue in a loop. Here is the general idea of these steps via wikipedia:

  1. Generate the initial population of individuals with varying characteristics (first generation)
  2. Evaluate the fitness of each individual
  3. Repeat on the population:
    1. Select the best fit individuals for reproduction
    2. Breed new individuals via crossover and mutation operations to create new individuals
    3. Evaluate the individuals fitness of the new generation
    4. Replace least-fit population with new individuals

But how is simulating the evolutionary process, a form of optimization? Let’s give some context. For example lets look at one aspect of the parenting process; what age should a mother stop taking care of its cub? Too early and the cub does not have the means to protect and take care of itself. Too late and it may drain resources from the mother while not giving the initiative for the cub to learn independence. There is an optimal solution from an evolutionary standpoint and that is the age which allows for the most successful off springs, and this is the solution that the evolutionary algorithm tries to arrive at. This can be graphically represented by the image below,

offsprings vs age of release.png

figure 1

where the y-axis represents the number of successful offsprings and the x-axis represents the age of release by the mother. The relationship between the two variables is defined by the function p(a), the # successful offsprings as a function of the age of release. The optimal age, a*, allows for the optimal number of offsprings, p*. The optimal solution therefore can be represented by the point p(a*). However it is hard to suppose that the relationship between the two variables is one that has one maxima and one that is completely continuous. Various reasons that quickly come to mind e.g. 1) not all points of development are equally substantial to survival of the cub, the completion of the development of a muscle, limb, or any other functional part of the body can make a drastic difference from one that is still in development (discontinuous), 2) not all developments happen together but can happen in succession, the completion of the development of a muscle, limb, or any other functional part of the body may prompt the next stage of development which could leave the infant at a more vulnerable state, which may allow for a time frame in which the cub can learn to get by. The modified model is represented below,

offspring vs age of release 2.0

figure 2

where p(a*) represents the solution to the optimization of the function p(a).

When the genes or the bit representation of the age of release is modified from generation to generation via crossover or mutation, the individuals in the species moves along the given function p(a). Although the movement is discrete, it is limited enough that we can think of it as continuous. Complex and drastic changes to the gene pool happens gradually in most cases because of how the crossover process works. Indeed it is this gradual process that gives the evolutionary process its direction and efficiency. If gene pools were completely random from generation to generation, it would only be by chance that we would reach the optimal solution. This is conceptually equivalent to a bogo sort where there is no guaranteed time until a solution is reached and thus can run forever. It would ruin the point of having genes in the first place. The gene pool is analogous to memory, it stores data about what kind of genes were successful in the past and helps limit the approximations for success. Thus the gradual feature of evolution is a limiter which gives the algorithm direction towards a maxima.

gradual evolution.png

figure 3

The graph above illustrates the gradual change of the fittest individuals from generation 1 (s) to generation 2 (e). (p(as) -> p(ae)); note that this is different from the average fitness of each generation or the fitness of every individual in the generation.

We’ve still forgotten about one crucial variable and that is the number of successful off springs is also dependent on the environment and the abundance of resources that is available. The image below shows an simplified example.

cutoff environment

figure 4

Here the zero-line or the cutoff point at which an individual must lie above to survive and make off springs has risen considerably (from 0 to 0*), possibly due to a drought or some other reason of scarcity. In simulation terms, we can think of it as raising the fitness criteria in order to save processing power. In reality however an environmental change would also have an impact on the function p(a) as well, maybe new environments make new characteristics more advantageous. For the sake of simplicity and for the sake of the argument that we will be making, we will ignore these effects as they will be arbitrary anyways. The orange/red tinged area above represents the total population after the rise in the zero-line, and both the orange/red and purple tinged areas represents the total population with the original zero line. Both can respectfully be represented by an equation of integrals if you want to think in mathematical terms as they are simply the areas under the curves. As we can clearly see and expect, the lower the zero-line the greater the population (total area beneath the curve; orange area vs. orange + purple area). However what is also important to note is that the lower the zero-line the greater the genetic diversity (the domain of the function/length of the area under the curve); there exists a larger variety of ages at which the mother releases her cubs at the original zero line than at the raised zero-line.  The lowest relevant zero-line is at which all variations of the gene pool can have offspring. In this example it is the original zero-line, where all ages on the function exist in the population. However as we can imagine supporting such a population makes the algorithm more resource intensive and possibly less efficient, whether it be more CPU to simulate more individuals or more environmental resources to support that many more individuals.

This leads us to the disadvantages of the evolutionary algorithm. The limiting of the approximation for success is also limiting success itself. Evolution most of the time does not give us the best solution but rather gives us a good enough solution. Biologically we observe these results via imperfections and flaws. In conceptual terms this is the difference between a maxima and a local maxima; the function p(a) in the figures illustrate two distinct hills, but one is clearly higher than the other. As insinuated by wikipedia’s step by step of the genetic algorithm and what we have mentioned earlier, it is the process of the least fit being replaced by the most fit in the next generation which makes the algorithm efficient. If we were to keep all individuals of various finesses, then it would be a complete search for the optimal solution, checking every variation and option rather than making more of an educated guess. Also similar to a breadth first search, it would make each generation exponentially more resource intensive as the population would grow exponentially with no limiter. In philosophical terms, what even is fitness at the point at which every individual survives?


figure 5

The figure above represents a limitation of the evolutionary algorithm. The function p(a) is characterized by 2 local maximas (the one on the right being the global maxima). The solution to this set is again represented by p(a*). The purple area represents the current population. As you can see the zero-line does not allow for all genetic variations on the function to exist (important is the fact that it does not allow for the successful reproduction of the genes that characterize the trench in between the two maximas). As you can see this poses a problem with the algorithm, since genes are changed somewhat gradually, there is no way for the current gene pool to expand across the dip in the function to reach the true global maxima (a*, p*). This is illustrated by the arrow from p(a1) to p(a2), which is not possible under the current circumstances. Now why would the population be limited to the left side to begin with? It could be a limitation of where the gene pool first began, or it could be a result of some event in the past that impacted the genetic diversity.

If the zero-line rises due to economic or resource deficiency, the zero-line can be lowered via resource or economic abundance. Most importantly, a social safety net can also help lower the cutoff as it provides those with inadequate “fitness” to survive and reproduce. Thus the problem prior can technically be solved via allocating more resources or socially via a social safety net.


figure 6

The figure above shows how lowering the zero-line now enables the population to reach the global maxima (in this case the optimal age of release by the mother). Notice how the path from p(a1) to p(a2) is now possible. If we are running an evolutionary algorithm on a simulation, and we believe that the process is stuck in a specific hump of the function like above, we can simply add more computational power and enable more diversity in the population. Likewise a population can achieve similar results by expanding its genetic pool by taking care of the less genetically fit (in other words by spending more resources).

Why does this all matter?

it matters

figure 7

The figure above depicts a negative change in environment. Due to a lack of resources, the zero-line has risen considerably high. Most importantly, the zero-line is above the local maxima on the left, and if the population were limited to the purple area it would surely go extinct. Out of the whole function it would only be a population that exists in the red shaded area that would be able to survive this event. Thus is the importance of genetic diversity. In essence, social safety nets is a population’s investment for a better solution; a better solution which will be its insurance in times of hardship. In a Darwinian perspective, the idea of caring for the less fit is not merely just a result of the development of social behaviors (strength in numbers), but it also has its advantages too (even if it is costly in terms of resources available to the population).

Some last remarks: the cost of a social safety net can effect the fitness or the success of those that are fit and effect the function p(a) (since they may be spending some of their resources), possibly reducing the heights of the local maximas. However the point of the whole process is to simply increase genetic diversity as the social safety net can easily be eliminated if needed (especially in times of scarcity) and thus those effects can in the short run be nullified or changed. Genetic diversity however takes longer to develop. The idea of investing in prosperity and saving in scarcity is not a practice that is limited to human beings. Thus as a long term insurance policy, the system still makes sense.