# Duality and computation in the MCU

I  took my kindergartener to see Avengers: Endgame recently. My son was a little disappointed, complaining that the film had too much talking and not enough fighting. To me, the immense popularity of the Marvel Cinematic Universe series and so-called science fiction/fantasy in general is an indicator of how people think they like science but really want magic. Popular science-fictiony franchises like MCU and Star Wars are couched in scientism but are often at odds with actual science as practiced today. Arthur C Clarke famously stated in his third law that “Any sufficiently advanced technology is indistinguishable from magic.” A sentiment captured in these films.

Science fiction should extrapolate from current scientific knowledge to the possible. Otherwise, it should just be called fiction. There have been a handful of films that try to do this like 2001: A Space Odyssey or more recently Interstellar and The Martian. I think there is a market for these types of films but they are certainly not as popular as the fantasy films. To be fair, neither Marvel nor Star Wars (both now owned by Disney) market themselves as science fiction as I defined it. They are intended to be mythologies a la Joseph Campbell’s Hero’s Journey. However, they do have a scientific aesthetic with worlds dominated by advanced technology.

Although I find the MCU films not overly compelling, they do bring up two interesting propositions. The first is dualism. The superhero character Ant-Man has a suit that allows him to change size and even shrink to sub-atomic scales, called the quantum realm in the films. (I won’t bother to discuss whether energy is conserved in these near instantaneous size changes, an issue that affects the Hulk as well). The film was advised by physicist Spiros Michalakis and is rife with physics terminology and concepts like quantum entanglement. One crucial concept it completely glosses over is how Ant-man maintains his identity as a person, much less his shape, when he is smaller than an atom. Even if one were to argue that one’s consciousness could be transferred to some set of quantum states at the sub-atomic scale, it would be overwhelmed by quantum fluctuations. The only self-consistent premise of Ant-Man is that the essence or soul if you wish of a person is not material. The MCU takes a definite stand for dualism on the mind-body problem, a sentiment with which I presume the public mostly agrees.

The second is that magic has immense computational power. In the penultimate Avengers movie, the villain Thanos snaps his fingers while in possession of the complete set of infinity stones and eliminates half of all living things. (Setting aside the issue that Thanos clearly does not understand the the concept of exponential growth. If you are concerned about overpopulation, it is pointless to shrink the population and do nothing else because it will just return to its original size in short time.) What I’d like to know is who or what does the computation to carry out the command. There are at least two hard computational problems that must be solved. The first is to identify all lifeforms.  This is clearly no easy task as we to this day have no precise definition of life. Do viruses get culled by the snap? Do the population of silicon-based lifeforms of Star Trek get halved or is it only biochemical life? What algorithm does the snap use to find all the life forms? Living things on earth range in size from single cells (or viruses if you count them) all the way to 35 metre behemoths, which are comprised of over $10^{23}$ numbers of atoms. How do the stones know what scales they span in the MCU? Do photosynthetic lifeforms get spared since they don’t use many resources? What about fungi? Is the MCU actually a simulated universe where there is a continually updated census of all life? How accurate is the algorithm? Was it perfect? Did it aim for high specificity (i.e. reduce false positives so you only kill lifeforms and not non lifeforms) or high sensitivity (i.e. reduce false negatives and thus don’t miss any lifeforms). I think it probably favours sensitivity over specificity – who cares if a bunch of ammonia molecules accidentally get killed. The find-all-life problem is made much easier by proposition 1 because if all life were material then the only way to detect them would be to look for multiscale correlations between atoms (or find organic molecules if you only care about biochemical life). If each lifeform has a soul then you can simply search for “soulfulness”. The lifeforms were not erased instantly but only after a brief delay. What was happening over this delay. Is magic propagation limited by the speed of light or some other constraint? Or did the computation take time? In Endgame, the Hulk restores all the Thanos erased lifeforms and Tony Stark then snaps away Thanos and all of his allies. Where were the lifeforms after they were erased? In Heaven? In a soul repository somewhere? Is this one of the Nine Realms of the MCU? How do the stones know who is a Thanos ally? The second computation is to then decide which half to extinguish. The movie seems to imply that the choice was random so where did the randomness come from? Do the infinity stones generate random numbers? Do they rely on quantum fluctuations? Finally, in a world with magic, why is there also science? Why does the universe follow the laws of physics sometimes and magic other times. Is magic a finite resource as in Larry Niven’s The Magic Goes Away. So many questions, so few answers.

# AI and authoritarianism

Much of the discourse on the future of AI , such as this one, has focused on people being displaced by machines. While this is certainly a worthy concern, these analyses sometimes fall into the trap of linear thinking because the displaced workers are also customers. The revenues of companies like Google and Facebook depend almost entirely on selling advertisements to a consumer base that has disposable income to spend. What happens when this base dwindles to a tiny fraction of the world’s population? The progression forward will also most likely not be monotonic because as people initially start to be replaced by machines, those left with jobs may actually get increased compensation and thus drive more consumerism. The only thing that is certain is that the end point of a world where no one has work is one where capitalism as we know it will no longer exist.

Historian and author Yuval Harari argues that in the pre-industrial world, to have power is to have land (I would add slaves and I strongly recommend visiting the National Museum of African American History and Culture for a sobering look at how America became so powerful). In the industrial world, the power shifted to those who own the machines (although land won’t hurt) while in the post-industrial world, power falls to those with the data. Harari was extrapolating our current world where large corporations can track us continually and use machine learning to monopolize our attention and get us to do what they desire. However, data on people is only useful as long as they have resources you want. If people truly become irrelevant then their data is also irrelevant.

It’s anyone’s guess as to what will happen in the future. I proposed an optimistic scenario here but here is a darker one. Henry Ford supposedly wanted to pay his employees a decent wage because he realized that they were also the customers for his product. In the early twentieth century, the factory workers formed the core of the burgeoning middle class that would drive demand for consumer products made in the very factories where they toiled. It was in the interest of industrialists that the general populace be well educated and healthy because they were the source of their wealth. This link began to fray at the end of the twentieth century with the rise of the service economy, globalisation, and automation. After the second World War, post-secondary education became available to a much larger fraction of the population. These college educated people did not go to work on the factory floor but fed the expanding ranks of middle management and professionals. They became managers and accountants and dentists and lawyers and writers and consultants and doctors and educators and scientists and engineers and administrators. They started new businesses and new industries and helped drive the economy to greater prosperity. They formed an upper middle class that slowly separated from the working class and the rest of the middle class. They also started to become a self-sustaining entity that did not rely so much on the rest of the population. Globalisation and automation made labor plentiful and cheap so there was less of an incentive to have a healthy educated populace. The wealth of the elite no longer depended on the working class and thus their desire to invest in them declined. I agree with the thesis that the abandonment of the working class in Western liberal democracies is the main driver of the recent rise of authoritarianism and isolationism around the world.

However, authoritarian populist regimes, such as those in Venezuela and Hungary, stay in power because the disgruntled class that supports them is a larger fraction of the population than the opposing educated upper middle class that are the winners in a contemporary liberal democracy. In the US, the disgruntled class is still a minority so thus far it seems like authoritarianism will be held at bay by the majority coalition of immigrants, minorities, and costal liberals. However, this coalition could be short lived. Up to now, AI and machine learning has not been taking jobs away from the managerial and professional classes. But as I wrote about before, the people most at risk for losing jobs to machines may not be those doing jobs that are simple for humans to master but those that are difficult. It may take awhile before professionals start to be replaced but once it starts it could go swiftly. Once a machine learning algorithm is trained, it can be deployed everywhere instantly. As the ranks of the upper middle class dwindle, support for a liberal democracy could weaken and a new authoritarian regime could rise.

Ironically, a transition to a consumer authoritarianism would be smoothed and possibly quickened by a stronger welfare state. A possible jobless economy would be one where the state provides a universal basic income that is funded by taxation on existing corporations, which would then compete for those very same dollars. Basically, the future incarnations of Apple, Netflix, Facebook, Amazon, and Google would give money to an idle population and then try to win it back. Although, this is not a world I would choose to live in, it would be preferable to a socialistic model where the state would decide on what goods and services to provide. It would actually be in the interest of the corporations and their elite owners to lobby for high taxes and to not form monopolies and allow for competition to provide better goods and services. The tax rate would not matter much because in a steady state loop, any wealth inequality is stable regardless of the flux. It is definitely in their interest to keep the idle population happy.

# Technology and inference

In my previous post, I gave an example of how fake news could lead to a scenario of no update of posterior probabilities. However, this situation could occur just from the knowledge of technology. When I was a child, fantasy and science fiction movies always had a campy feel because the special effects were unrealistic looking. When Godzilla came out of Tokyo Harbour it looked like little models in a bathtub. The Creature from the Black Lagoon looked like a man in a rubber suit. I think the first science fiction movie that looked astonishing real was Stanley Kubrick’s 1968 masterpiece 2001: A Space Odyssey, which adhered to physics like no others before and only a handful since. The simulation of weightlessness in space was marvelous and to me the ultimate attention to detail was the scene in the rotating space station where a mild curvature in the floor could be perceived. The next groundbreaking moment was the 1993 film Jurassic Park, which truly brought dinosaurs to life. The first scene of a giant sauropod eating from a tree top was astonishing. The distinction between fantasy and reality was forever gone.

The effect of this essentially perfect rendering of anything into a realistic image is that we now have a plausible reason to reject any evidence. Photographic evidence can be completely discounted because the technology exists to create completely fabricated versions. This is equally true of audio tapes and anything your read on the Internet. In Bayesian terms, we now have an internal model or likelihood function that any data could be false. The more cynical you are the closer this constant is to one. Once the likelihood becomes insensitive to data then we are in the same situation as before. Technology alone, in the absence of fake news, could lead to a world where no one ever changes their mind. The irony could be that this will force people to evaluate truth the way they did before such technology existed, which is that you believe people (or machines) that you trust through building relationships over long periods of time.

# The US election and the future

Political scientists will be dissecting the results of the 2016 US presidential election for the next decade but certainly one fact that is likely to be germane to any analysis is that real wages have been stagnant or declining for the past 45 years. I predict that this trend will only worsen no matter who is in power. The stark reality is that most jobs are replaceable by machines. This is not because AI has progressed to the point that machines can act human but because most jobs, especially higher paying jobs, do not depend heavily on being human. While I have seen some consternation about the prospect of 1.5 million truck drivers being replaced by self-driving vehicles in the near future, I have seen much less discourse on the fact that this is also likely to be true for accountants, lawyers, middle managers, medical professionals, and other well compensated professionals. What people seem to miss is that the reason these jobs are well paid is that there are relatively few people who are capable of doing them and that is because they are difficult for humans to master. In other words, they are well paid because they require not acting particulary human. IBM’s Watson, which won the game show Jeopardy and AlphaGo, which beat the world’s best Go player, shows that machines can quite easily better humans at specific tasks. The more specialized the task, the easier it will be for a machine to do it. The cold hard truth is that AI does not have to improve for you to be replaced by a machine. It does not matter whether strong AI, (an artificial intelligence that truly thinks like a human), is ever possible. It only matters that machine learning algorithms can mimic what you do now. The only thing necessary for this to happen was for computers to be fast enough and now they are.

What this implies is that the jobs of the future will be limited to those that require being human or where interacting with a human is preferred. This will include 1) jobs that most people can do and thus will not be well paid like store sales people, restaurant servers, bar tenders, cafe baristas, and low skill health workers, 2) jobs that require social skills that might be better paid such as social workers, personal assistants, and mental health professionals, 3) jobs that require special talents like artisans, artists, and some STEM professionals, and 4) capitalists that own firms that employ mostly robots. I strongly believe that only a small fraction of the population will make it to categories 3) and 4). Most people will be in 1) or not have a job at all. I have argued before that one way out is for society to choose to make low productivity work viable. In any case, the anger we saw this year is only going to grow because existing political institutions are in denial about the future. The 20th century is over. We are not getting it back. The future is either the 17th or 18th century with running water, air conditioning and health care or the 13th century with none of these.

# Revolution vs incremental change

I think that the dysfunction and animosity we currently see in the US political system and election is partly due to the underlying belief that meaningful change cannot be effected through slow evolution but rather requires an abrupt revolution where the current system is torn down and rebuilt. There is some merit to this idea. Sometimes the structure of a building can be so damaged that it would be easier to demolish and rebuild rather than repair and renovate. Mathematically, this can be expressed as a system being stuck in a local minimum (where getting to the global minimum is desired). In order to get to the true global optimum, you need to get worse before you can get better. When fitting nonlinear models to data, dealing with local minima is a major problem and the reason that a stochastic MCMC algorithm that does occasionally go uphill works so much better than gradient descent, which only goes downhill.

However, the recent success of deep learning may dispel this notion when the dimension is high enough. Deep learning, which is a multi-layer neural network that can have millions of parameters is the quintessence of a high dimensional model. Yet, it seems to be able to work just fine using the back propagation algorithm, which is a form of gradient descent. The reason could be that in high enough dimensions, local minima are rare and the majority of critical points (places where the slope is zero) are high dimensional saddle points, where there is always a way out in some direction. In order to have a local minimum, the matrix of second derivatives in all directions (i.e. Hessian matrix) must be positive definite (i.e. have all positive eigenvalues). As the dimension of the matrix gets larger and larger there are simply more ways for one eigenvalue to be negative and that is all you need to provide an escape hatch. So in a high dimensional system, gradient descent may work just fine and there could be an interesting tradeoff between a parsimonious model with few parameters but difficult to fit versus a high dimensional model that is easy to fit. Now the usual danger of having too many parameters is that you overfit and thus you fit the noise at the expense of the signal and have no ability to generalize. However, deep learning models seem to be able to overcome this limitation.

Hence, if the dimension is high enough evolution can work while if it is too low then you need a revolution. So the question is what is the dimensionality of governance and politics. In my opinion, the historical record suggests that revolutions generally do not lead to good outcomes and even when they do small incremental changes seem to get you to a similar place. For example, the US and France had bloody revolutions while Canada and the England did not and they all have arrived at similar liberal democratic systems. In fact, one could argue that a constitutional monarchy (like Canada and Denmark), where the head of state is a figure head is more stable and benign than a republic, like Venezuela or Russia (e.g. see here). This distinction could have pertinence for the current US election if a group of well-meaning people, who believe that the two major parties do not have any meaningful difference, do not vote or vote for a third party. They should keep in mind that incremental change is possible and small policy differences can and do make a difference in people’s lives.

# Forming a consistent political view

In view of the current US presidential election, I think it would be a useful exercise to see if I could form a rational political view that is consistent with what I actually know and believe from my training as a scientist. From my knowledge of dynamical systems and physics, I believe in the inherent unpredictability of complex nonlinear systems. Uncertainty is a fundamental property of the universe at all scales. From neuroscience, I know that people are susceptible to errors, do not always make optimal choices, and are inconsistent. People are motivated by whatever triggers dopamine to be released. From genetics, I know that many traits are highly heritable and that includes height, BMI, IQ and the Big Five personality traits. There is lots of human variance. People are motivated by different things, have various aptitudes, and have various levels of honesty and trustworthiness. However, from evolution theory, I know that genetic variance is also essential for any species to survive. Variety is not just the spice of life, it is also the meat. From ecology, I know that the world is a linked ecosystem. Everything is connected. From computer science, I know that there are classes of problems that are easy to solve, classes that are hard to solve, and classes that are impossible to solve and no amount of computing power can change that. From physics and geology, I fully accept that greenhouse gases will affect the energy balance on earth and that the climate is changing. However, given the uncertainty of dynamical systems, while I do believe that current climate models are pretty good, there does exist the possibility that they are missing something. I believe that the physical laws that govern our lives are computable and this includes consciousness. I believe everything is fallible and that includes people, markets and government.

So how would that translate into a political view? Well, it would be a mishmash of what might be considered socialist, liberal, conservative, and libertarian ideas. Since I think randomness and luck is a large part of life, including who your parents are, I do not subscribe to the theory of just desserts. I don’t think those with more “talents” deserve all the wealth they can acquire. However, I also do realize that we are motivated by dopamine and part of what triggers dopamine is reaping the rewards of our efforts so we must leave incentives in place. We should not try to make society completely equal but redistributive taxation is necessary and justified.

Since I think people are basically incompetent and don’t always make good choices, people sometimes need to be protected from themselves. We need some nanny state regulations such as building codes, water and air quality standards, transportation safety, and toy safety. I don’t believe that all drugs should be legalized because some drugs can permanently damage brains, especially those of children. Amphetamines and opioids should definitely be illegal. Marijuana is probably okay but not for children. Pension plans should be defined benefit (rather than defined contribution) schemes. Privatizing social security would be a disaster. However, we should not over regulate.  I would deregulate a lot of land use especially density requirements. We should eliminate all regulations that enforce monopolies including some professional requirements that deliberately restrict supply. We should not try to pick winners in any industry.

I believe that people will try to game the system so we should design welfare and tax systems that minimize the possibility of cheating. The current disability benefits program needs to be fixed. I do not believe in means testing for social programs as it gives room to cheat. Cheating not only depletes the system but also engenders resentment in others who do not cheat. Part of the anger of the working class is that they see people around them gaming the system. The way out is to replace the entire welfare system with a single universal basic income. People have argued that it makes no sense for Bill Gates and Warren Buffet to get a basic income. In actuality, they would end up paying most of it back in taxes. In biology, this is called a futile cycle but it has utility since it is easier to just give everyone the same benefits and tax according to one rule then having exceptions for everything as we have now. We may not be able to afford a basic income now but we eventually will.

Given our lack of certainty and incompetence, I would be extremely hesitant about any military interventions on foreign soil. We are as likely to make things worse as we are to make the better. I think free trade is in net a good thing because it does lead to higher efficiency and helps people in lower income countries. However, it will absolutely hurt some segment of the population in the higher income country. Since income is correlated with demand for your skills, in a globalized world those with skills below the global median will be losers. If a lot of people will do your job for less then you will lose your job or get paid less. For the time being, there should be some wage support for low wage people but eventually this should transition to the basic income.

Since I believe the brain is computable, this means that any job a human can do, a robot will eventually do as well or better. No job is safe. I do not know when the mass displacement of work will take place but I am sure it will come. As I wrote in my AlphaGo piece, not everyone can be a “knowledge” worker, media star, or CEO. People will find things to do but they won’t all be able to earn a living off of it in our current economic model. Hence, in the robot world, everyone would get a basic income and guaranteed health care and then be free to do whatever they want to supplement that income including doing nothing. I romantically picture a simulated 18th century world with people indulging in low productivity work but it could be anything. This will be financed by taxing the people who are still making money.

As for taxes, I think we need to go a system that de-emphasizes income taxes, which can be gamed and disincentivizes work, to one that taxes the use of shared resources (i.e. economic rents). This includes land rights, mineral rights, water rights, air rights, solar rights, wind rights, monopoly rights, eco system rights, banking rights, genetic rights, etc. These are resources that belong to everyone. We could use a land value tax model. When people want to use a resource, like land to build a house, they would pay the intrinsic value of that resource. They would keep any value they added. This would incentivize efficient utility of the resource while not telling anyone how to use it.

We could use an auction system to value these resources and rights. Hence, we need not regulate wall street firms per se but we would tax them according to the land they use and what sort of monopoly influence they exploit. We wouldn’t need to force them to obey capital requirements, we would tax them for the right to leverage debt. We wouldn’t need Glass-Steagall or Too Big to Fail laws for banks. We’ll just tax them for the right to do these things. We would also not need a separate carbon tax. We’ll tax the right to extract fossil fuels at a level equal to the resource value and the full future cost to the environment. The climate change debate would then shift to be about the discount rate. Deniers would argue for a large rate and alarmists for a small one. Sports leagues and teams would be taxed for their monopolies. The current practice of preventing cities from owning teams would be taxed.

The patent system needs serious reform. Software patents should be completely eliminated. Instead of giving someone arbitrary monopoly rights for a patent, patent holders should be taxed at some level that increases with time. This would force holders to commercialize, sell or relinquish the patent when they could no longer bear the tax burden and this would eliminate patent trolling.

We must accept that there is no free will per se so that crime and punishment must be reinterpreted. We should only evaluate whether offenders are dangerous to society and the seriousness of the crime. Motive should no longer be important. Only dangerous offenders would be institutionalized or incarcerated. Non-dangerous ones should repay the cost of the crime plus a penalty. We should also do a Manhattan project for nonlethal weapons so the police can carry them.

Finally, under the belief that nothing is certain, laws and regulations should be regularly reviewed including the US Constitution and the Bill of Rights. In fact, I propose that the 28th Amendment be that all laws and regulations must be reaffirmed or they will expire in some set amount of time.

# The simulation argument made quantitative

Elon Musk, of Space X, Tesla, and Solar City fame, recently mentioned that he thought the the odds of us not living in a simulation were a billion to one. His reasoning was based on extrapolating the rate of improvement in video games. He suggests that soon it will be impossible to distinguish simulations from reality and in ten thousand years there could easily be billions of simulations running. Thus there are a billion more simulated universes than real ones.

This simulation argument was first quantitatively formulated by philosopher Nick Bostrom. He even has an entire website devoted to the topic (see here). In his original paper, he proposed a Drake-like equation for the fraction of all “humans” living in a simulation:

$f_{sim} = \frac{f_p f_I N_I}{f_p f_I N_I + 1}$

where $f_p$ is the fraction of human level civilizations that attain the capability to simulate a human populated civilization, $f_I$ is the fraction of these civilizations interested in running civilization simulations, and $N_I$ is the average number of simulations running in these interested civilizations. He then argues that if $N_I$ is large, then either $f_{sim}\approx 1$ or $f_p f_I \approx 0$. Musk believes that it is highly likely that $N_I$ is large and $f_p f_I$ is not small so, ergo, we must be in a simulation. Bostrom says his gut feeling is that $f_{sim}$ is around 20%. Steve Hsu mocks the idea (I think). Here, I will show that we have absolutely no way to estimate our probability of being in a simulation.

The reason is that Bostrom’s equation obscures the possibility of two possible divergent quantities. This is more clearly seen by rewriting his equation as

$f_{sim} = \frac{y}{x+y} = \frac{y/x}{y/x+1}$

where $x$ is the number of non-sim civilizations and $y$ is the number of sim civilizations. (Re-labeling $x$ and $y$ as people or universes does not change the argument). Bostrom and Musk’s observation is that once a civilization attains simulation capability then the number of sims can grow exponentially (people in sims can run sims and so forth) and thus $y$ can overwhelm $x$ and ergo, you’re in a simulation. However, this is only true in a world where $x$ is not growing or growing slowly. If $x$ is also growing exponentially then we can’t say anything at all about the ratio of $y$ to $x$.

I can give a simple example.  Consider the following dynamics

$\frac{dx}{dt} = ax$

$\frac{dy}{dt} = bx + cy$

$y$ is being created by $x$ but both are both growing exponentially. The interesting property of exponentials is that a solution to these equations for $a > c$ is

$x = \exp(at)$

$y = \frac{b}{a-c}\exp(at)$

where I have chosen convenient initial conditions that don’t affect the results. Even though $y$ is growing exponentially on top of an exponential process, the growth rates of $x$ and $y$ are the same. The probability of being in a simulation is then

$f_{sim} = \frac{b}{a+b-c}$

and we have no way of knowing what this is. The analogy is that you have a goose laying eggs and each daughter lays eggs, which also lay eggs. It would seem like there would be more eggs from the collective progeny than the original mother. However, if the rate of egg laying by the original mother goose is increasing exponentially then the number of mother eggs can grow as fast as the number of daughter, granddaughter, great…, eggs. This is just another example of how thinking quantitatively can give interesting (and sometimes counterintuitive) results. Until we have a better idea about the physics underlying our universe, we can say nothing about our odds of being in a simulation.

Addendum: One of the predictions of this simple model is that there should be lots of pre-sim universes. I have always found it interesting that the age of the universe is only about three times that of the earth. Given that the expansion rate of the universe is actually increasing, the lifetime of the universe is likely to be much longer than the current age. So, why is it that we are alive at such an early stage of our universe? Well, one reason may be that the rate of universe creation is very high and so the probability of being in a young universe is higher than being in an old one.

Addendum 2: I only gave a specific solution to the differential equation. The full solution has the form $Y_1\exp(at) + Y_2 \exp(ct)$.  However, as long as $a >c$, the first term will dominate.

Addendum 3: I realized that I didn’t make it clear that the civilizations don’t need to be in the same universe. Multiverses with different parameters are predicted by string theory.  Thus, even if there is less than one civilization per universe, universes could be created at an exponentially increasing rate.