Sunday, September 18, 2016

AI and Krugman's Hot Dogs

Yes, I know, I missed a great clickbait headline opportunity… But as Wayne Campbell would say, I'm not worthy!

Anyway, I've been studying the issue of potential revolution in artificial intelligence and robotics extensively for the last few years. I've read thousands of pages, including most of the recent major economics papers, and general public books (this one just ordered). And I'm actually doing a good deal of learning about artificial intelligence, itself, as in studying textbooks.

Note to economists: You'll actually be very comfortable with much, or all, of AI. One of the five major types of machine learning (which basically is AI) is statistical modeling, especially Bayesian Monte Carlo. And all five, which can be powerfully combined, involve very advanced mathematics. And the goal of the ML is always maximizing a utility function! (or equivalently, minimizing a loss function)

So ML will be, in fundamental ways, very familiar and comfortable to an economist. But there are some important differences. It's not perfect optimization or bust (or no pub). You recognize that's usually not realistic. You just try to get the highest utility score you can, even if, as is usual, you don't know if that's the global optimum. And you don't just assume a local optimum is the global optimum.

I think there's a lot economists can learn from ML scientists, but there's also, I think, a lot ML scientists can learn from economists. For example, with evolutionary algorithms (one of the five ML methods), algorithms compete to be the highest scoring on the utility function, and they mutate to evolve, and can even reproduce sexually! where the features of two algorithms are spliced and combined. In the explanations of this I've seen, and it's benefits and costs, I have not seen something that occurred to me quickly from financial economics.

With options, you place much greater value on assets that have a high variance, all other things equal. As the upside benefits you far more than the downside costs you. Likewise, consider sexual reproduction. Suppose one species has good members, but not great ones; there's little variation, but they always reproduce for a good, but not great, average. Now, suppose another species is poor on average, and has some members which overall are not very good, but they do have some great feature, or features. That second species will evolve to take over the first with sexual reproduction, because eventually it will produce offspring which have the best of the greatest members all spliced together in some offspring. Those offspring, even if initially rare, will then eventually take over because they will be so super-fit, and become the bulk of the future populations. So, the lesson is that sexual reproduction of algorithms will be more likely to have benefits that outweigh the computational costs, the greater the variability (and it might be very beneficial to look for ways to juice up the variability.)

Note, in the natural world at least, there are complications, as genes proliferate in future populations, or not, in a tribe, so the success of a whole tribe is an important factor. And a tribe's success depends on some specialization and variety of members. Also, note that in the natural world, especially, sexual reproduction is extremely costly, yet it has nonetheless evolved to be in every organism beyond the most simple, so the logic for it is very powerful.

This whole thing does give you an idea of the interdisciplinary nature of artificial intelligence, and how the field could benefit from learning from, and collaboration with, other fields -- and vice versa.

The AI field is fascinating, and I have gained many insights already. I will eventually have a long blog post/article on all of this, but given the size of this issue, it's best not to wait, and get down some insights and ideas along the way. This is both to help my thinking and understanding, and hopefully to provide some.

So, without further ado, let's get to today's topics.

Krugman's Hot Dogs

The blog of The Bank of England, Britain's central bank, recently had a sanguine post on the whole robots/AI's issue. The author, B of E economist John Lewis, uses Nobel Prize winning economist Paul Krugman's hot dog mini-model as a justification for his optimism:
Technology can lead to workers being displaced in one particular industry, but this doesn’t hold for the economy as a whole.  In Krugman’s celebrated example, imagine there are two goods, sausages and bread rolls, which are then combined one for one to make hot dogs.  120 million workers are divided equally between the two industries:  60 million producing sausages, the other 60 million producing rolls, and both taking two days to produce one unit of output.  Now suppose technology doubles productivity in bakeries.  Fewer workers are required to make rolls, but this increased productivity will mean that consumers get 33% more hot dogs.  Eventually the economy has 40 million workers making rolls, and 80 million making sausages.
The problem, however, is this: Substitute roll makers and sausage makers with low-skilled workers and high-skilled workers. Suppose the economy starts at 4 billion low-skilled workers and 400 million high-skilled workers, and produces $80 trillion/year in goods and services.

Now suppose that advances in AI and robotics result in there being, for the purposes of producing pecuniary goods and services, 12 billion low-skilled workers, but only 500 million high-skilled workers. With the old production processes, you had a ratio of 1 high-skilled worker to 10 low-skilled workers. Keeping these processes, you would need just 5 billion low-skilled workers, not the 12 billion you now have, with the influx from Robotia and the AI Republic. So what happens to the other 7 billion low-skilled workers, machine and human?

Well, you could go to other production processes that use less high-skilled workers to low-skilled workers, again, where low-skilled workers now include the machine kind. But the problem may be, and I think is, in the real world, that production processes that have a low proportion of high-skilled workers produce a lot less per worker. And if they produce a lot less per worker then it does not make sense in the market to do them, unless they cost a lot less per worker. Thus, real cost per worker must drop.

Now, the high-skilled workers can be utilized for the old high-skilled production process, so the market must pay them at least that old wage. But now to get businesses in the free market to employ a very heavy low-skilled production process, they will only do it if the wage of the low-skilled workers drops, and maybe very dramatically, perhaps to poverty level – or below. And a human subsistence wage need not be a floor, as the subsistence wage for a machine may be well below that, with the cheap solar power of the future. And, with how smart and advanced these machines may become, they may have very low maintenance costs. They may mostly maintain themselves, and each other.

Essentially, the problem is, what if the roll makers don't have the skills to make the sausages. Then, you can't just shift to this new higher production economy with more hot dogs produced, but with a lower proportion of roll workers and a higher proportion of sausage workers. So what do you do? You train roll makers to now make sausages? What if sausage making requires far more education and skill? This may be very costly, and the benefit may be mostly hard to recoup for the payer of this education and training. Meanwhile, governments may be unwilling or unable to pay, especially with the horrifying power of the billionaire funded right, and its government always bad, always a waste, propaganda machine.

And aside from that, many workers may be too old to practically learn advanced new skills. And if even a fifth of the population do not have the cognitive and other abilities necessary to learn high-skilled sausage making, then do you have a fifth of the population permanently unemployed if the new robots can do any and all of the roll making at less than a human subsistence wage?  

So, what then? If you can't just shift enough workers into the high-skilled sausage making, what do you do?

You use a different production process? This may be a lot less productive. You end up with three rolls per sausage. It generates a lot less GDP per worker. It won't be done unless the roll workers' wages go down.

But the sausage workers' wages won't go down; if they did, they would be hired away into old style 1-1 facilities, but even moreso, with rolls very cheap now, sausages will command relatively more money (the price of their complement, some would say necessary complement, has gone down). And, if sausages command more money, then so also will the relatively rare sausage makers, all other things equal.

So, the sausage makers' wages go up, but the roll workers' wages will have to go down – and as far as it takes, to employ even the least productive of the roll workers, if they aren't to be unemployed. And this is just the strong trend we've seen over the last two generations for low-skilled workers.

Now, the B of E blog post author Lewis does concede, "In the interim, the transition might lead to unemployment, particularly if skills are very specific to the baking industry. But in the long run, a change in relative productivity reallocates rather than destroys employment"

But think about what that could mean here if robots become able to do almost anything that a low-skilled human could do, only at a cost below human subsistence. You would have to "in the long run" give almost every low-skilled human a college education, and not a Potemkin college education, but the academic and cognitive skills of the typical graduate of a well-respected major university, like my employer, the University of Arizona.

This may be a very, very long run, with massive, or catastrophic, poverty, unemployment, and homelessness in the interim. And the public will have to dramatically change their attitude about the size and value of government, because the private sector won't come close to funding this, given the severe free market problems with education. There's good reason government funds the vast majority of education in every first world country.

The key intuition here is if you just add a ton of low-skilled workers, including low-skilled workers from the countries of Robotia and the AI Republic, without high-skilled workers, or with proportionally way less high-skilled workers, then you're going to lower the marginal product and average product of low-skilled workers greatly, and thus their market wage.

You could say, like Clouseau, problem sol-ved, just have low-skilled workers become high-skilled workers, like the roll makers in Krugman's model just becoming sausage makers. But that is one incredible endeavor to suddenly massively increase the world's, or any country's, education level. I would love to do so, and would certainly vote to invest in it, but as I said in a recent post:
How are we supposed to get the vast majority of men, and women, up to this level of skill and education?
To do so would take a regime shift in our politics, and in public understanding of economics. By and large, one of our two major parties not only does not believe in global warming, or evolution for that matter, they don't believe in externalities, asymmetric information, natural monopoly, contracting limitations and costs, and basically anything that says the pure free market is imperfect (except in cases where it benefits the rich). But providing a massive increase in the education, skills, and general capabilities for most of the population is something that free market companies could only extract a small fraction of the benefits from in profits. And therefore they alone would grossly underprovide this. 
The externalities, contracting and enforcement problems and costs, adverse selection and other asymmetric information, and so on, are profound and enormous. This is why general education has historically been predominantly publicly funded. To say that now, so that most of the population won't go the way of horses, we have to enormously increase our investment in Heckman-style early human development, education, public nutrition, healthcare, and more, from prenatal until at least well into a person's 20's, is to say that we should have an unprecedented increase in governments' size and roles. 
Right now, this is impossible, as the Republican party is dogmatically against any government, except for a small number of areas; mainly military, police, courts, prisons, and perhaps minimal public infrastructure and education.
A recent OECD paper put it dryly, but seriously, "If the tasks that complement machines become increasingly complex and demanding, the employment prospects for workers lacking certain skills may deteriorate." (page 23)

Are robots and AI like shipping containerization?

Lewis gives the example of the revolution in shipping containerization, which plummeted the workers needed per ton to transport goods, yet workers were redeployed, and the amount of shipping increased dramatically to counter:
Take the humble shipping container.  Transporting goods in pre-packed locked containers, which can be lifted straight onto a lorry or train, yielded enormous savings relative to having cargo transported in crates which needed loading and packing individually at each port.   Their inventor estimated that the combined savings on labour costs, time at the dockside and insurance for breakage and theft reduced the price of a tonne of cargo 39-fold.  Bernhofen et al calculate this led to an eight fold increase in bilateral trade between countries with container ports. Whilst employment fell, productivity of labour increased nearly 20 fold. For the shipping industry this wasn’t a massively disruptive technology- though trade patterns changed, the industry became moreconcentrated and ironically less profitable. 
But by reducing the cost of trading, containerisation opened up the possibility of new supply chains and trading arrangements that were previously too expensive to undertake. And, inso doing, the resultant trade flows led to a substantial spatial reallocation of economic activity.
A point I'd like to make here is that with the kinds of robots, machines, and AI's we may see in the future, it won't be just a clever idea that eliminates many specific jobs in a specific business, so demand increases in other businesses and workers move there, or to different jobs in the same business. It will instead be whole classes of work eliminated. A whole class of work, or a whole class of skill or ability, say dexterous movement and sorting with good visual recognition, will be eliminated from pretty much every business, every industry, in the entire economy – permanently – as happened to horses.

It's whole skills that will be eliminated from employment by these new robots and AI's, across every business, not some specific jobs that will be eliminated in a specific business, so I'll take my skillset elsewhere. Your skillset may no longer be needed anywhere. It may be replaced everywhere, or replaced in 90% of businesses.

And again, there are problems with, well, then production will just increase 10-fold to sop up all those low-skilled workers. There are serious bottlenecks in high-skilled workers and raw materials, and there are inelasticities of demand, at least for certain types of products.

Is increasing GDP share of capital the only distributional concern, or even the biggest?

This is the issue you always hear, and the one Lewis discusses (and downplays). But you rarely hear a similar issue that's perhaps more important, and I think is probably far more important in the short and medium run: It’s not just that robots and other AI's may increase the share of the pie going to capital owners. It's that they could cause massive increases in inequality in how the labor share is distributed among laborers.

These technologies can send the superstar, or winner-take-all, phenomena to the moon. Moreover, an increasing share of workers, due to revolutionary advance in these technologies, may find that the wage the market will pay for their education, skills and other characteristics drops below minimum wage. Or well below, for those who think cutting the minimum wage is the answer.

What happens if these robots and AI's make it so that 10% of the population is basically unemployable at a wage above minimum? then 20%, 30%,… Suppose at a grocery store cameras watch everything shoppers put in their carts, and know what it is; the cart is mechanized and follows you, the cameras also recognize your face and have your payment info on file, so no need for any workers at checkout other than a security guard. Dexterous robots can do the vast majority of stocking and unloading,… We are not far from this now, and going the rest of the way looks not that hard in the next 30 years, from what I've learned of this technology.

Then, about 90% of the grocery store jobs are gone. Where are those 90% going to be redeployed? They're low-skilled laborers, where they can be redeployed are similar places where robots can also do those kinds of manual jobs; fast food, manufacturing, waiting tables,… And, as we've seen, no, people are not willing to pay much more, in money and time, for the human touch, to be able to chat with the checker, or teller, or waiter. They'd rather have more badly needed time and money to spend with their own families and friends.

You could say, ok, the economy would expand to have just 10 times the production then, but you hit the bottleneck of lack of high-skilled laborers to do this that I talked about earlier. In addition, you hit a lot of inelasticities of demand; people aren't going to just buy 10 times as many groceries, so we need 10 times as many grocery stores. Those who do still have jobs and money can only eat so much (the wealthy with money, I would think, would tend to buy high prestige items that require a high proportion of highly skilled labor to produce). And costly raw materials can also become bottlenecks.

So, this is not so easy to dismiss with, in the past,… We actually did have to increase educational levels and skills to prevent mass unemployment with past technological advance. But, (1) Government rose to the challenge. We didn't have such a dominant and billionaire powered, government always bad, pure free market always good, right wing. And, (2) The societal level of education and skill necessary with the kinds of robots and AI's we're probably going to see will be very high indeed. It will take an incredible increase in human capital investment, from prenatal to college and beyond.

A simple test of the veracity, or completeness, of normal-employment robot/AI arguments

Finally, I'd like to note a key problem with Lewis's post. His argument applies to any technology. There's no discussion of the specific technology here, AI and robotics, at least as far as what it's capable of. What the technology is, and how capable it is, or may become, is irrelevant to his arguments. These arguments are supposed to work for any technology, so no need to consider how good this technology might realistically get, what it might be capable of doing. That doesn't matter; his arguments will always apply. It wouldn't matter how good engine and motor technology got, we would always find alternative uses for horses, product prices would drop, production would expand,... Except these arguments didn't work for horses.

And with humans, and specifically low-skilled humans, you have the same technology irrelevance in Lewis's arguments. Even if robots and AI become capable, over the next generation, of doing any pecuniary work at all that a low-skilled human can do, at less than a human subsistence wage, this will still not be a problem for low-skilled humans "over the long run", where presumably "the long run" will not be long enough to ruin, or end, their lives.

At least explicitly and clearly, Lewis does not discuss how the long run could be generations, and it may be extremely hard to reach this long run. Nobel Prize winning economist Jan Tinbergen talked about "a race between education and technology" to prevent massive unemployment and/or income inequality. It is possible, depending on the technological advance, and the resources put into education, that technology can run far ahead for a very long time, even that education could never catch up for a potential super-technology like AI. I discuss this in a guest post at the blog of Haverford College economist and Roosevelt Institute fellow Carola Binder.

So, I'd like to offer a rule. Any time someone offers an argument that robots and AI cannot cause a massive unemployment/poverty problem, if those arguments do not consider how good the technology may, with significant probability, get, then those arguments have a fatal flaw, or are at least significantly incomplete.

Sunday, April 3, 2016

AI Veracity Programs, and My Dream for the 2020's and 2030's Trumps


The Trump of the 2020's in a CNN interview (adapted from interviews of the current Trump. All facts noted are for today):


Trump: NATO was set up at a different time. NATO was set up when we were a richer country. We’re not a rich country. We’re borrowing, we’re borrowing all of this money.

Interviewer: [Picks up cell phone/supercomputer] Siri, how does the US's wealth per capita rank? Siri: The United States ranks number two in the world in per capita net financial assets. Number one is Switzerland, but this is a country with less than 10 million in population. Source: The OECD. Interviewer: Mr. Trump, how can you say then that the US is no longer a rich country?

Trump: That’s [South Korea] a wealthy country. They make the ships, they make the televisions, they make the air conditioning. They make tremendous amounts of products.... I think that we are not in the position that we used to be. I think we were a very powerful, very wealthy country. And we’re a poor country now. We’re a debtor nation.

Interviewer: [turns to his cell phone] Siri, how does the US compare to South Korea in wealth and GDP per capita? Siri: The United States has 5.74 times the per capita net financial assets of South Korea. It has 2.03 times the GDP per capita. Sources: The OECD and The World Bank. Interviewer: How can you say, then, Mr. Trump, that the US is a poor country and South Korea is a wealthy one?

I've said before journalists should work in pairs in interviews, debates, etc., with an interviewer and a data person with a computer. The interviewer asks questions, and the data person, hopefully someone very expert, checks any facts and information in real time, and if there's a discrepancy he immediately brings this up in the interview. The reply can be, this is expensive and cumbersome, (although ridiculously worth it to society). But as Siri and Watson advance, this will be no excuse at all. How much do journalists, and the organizations they work for, really care about doing their jobs?


The 2030's Trump

In the 2030's, AI may advance to the point where people will commonly have very good, as I will call them, veracity apps, installed on their computing devices. So, when the 2030's Trump is interviewed, or in a debate, and he says something like, "South Korea is a rich country. We're a poor country now.", you will see red bars on your screen indicating the level of untruth, and scrolling across the bottom of the screen will be a comparison of the net worth's and GDP's per capita of both countries, and the sources of those figures.

Moreover, with a stream, as opposed to an old fashioned airwaves TV presentation, you can pause it anytime. So you can click to read, or hear, or view, the explanation for why the veracity AI just gave the politician four red bars. And then you can click, or say, continue, when you're done, and keep going with the interview. At the end, if you'd like, you can read, hear, view, a fact and source filled report from the veracity AI on all of its claimed untruths in that event.

And the journalist doing the questioning may be wearing glasses, or contact lenses, with a projected, or "heads up", view of information coming from the veracity app, so he can follow-up question on any untruths or misleading right away, in real time, and get a response.

If you follow my blog, you'll see that I have been studying AI extensively, reading a great number of books and articles, some very technical, from a wide variety of sources. I would say from this study that in the 2030's there is a very substantial chance that veracity AI's will be quite good, and quite common. Just look at how good Watson and Siri are already, and how fast they're improving.

When in real time people see the lies, or misleading, of politicians in questioning, interviews, debates, their TV commercials, anywhere, with exact contradicting facts and figures from standard respected sources, this will revolutionize politics. The kinds and amounts of propaganda we see today will be considered from a past dark age. It will be an amazing leap forward.

And there will be, surely, a variety of these veracity AI programs from a number of respected sources, like the google of the day, the Apple of the day, etc., with reputations worth many billions of dollars to protect, for accuracy, objectivity, competence, and trustworthiness. And there will also be open source versions. And meta versions, where the meta veracity AI checks a number of respected veracity AI's and gives a composite of them, and notes if any of those veracity AI's give a very different answer, as a check for one of the veracity AI's becoming biased or compromised.

And these veracity AI's will not be just for politics. Many, if not the great majority of people, won't choose a dentist, or doctor, or mechanic, or plumber unless his equipment is compatible with their veracity AI, sending all of the information from the equipment's readings; the dental x-rays, the blood test results, the video images from the plumber's endoscope, and so on, to your veracity AI service in the cloud.

If the dentist says you need major dental work that it looks like you clearly don't, the red bars will go up. If he says you need all of your silver fillings replaced because of a mercury risk, the red bars will go up, and your veracity AI will show you top scientific sources explaining how this is unscientific and well proven to be untrue, and how this is often used as a way for dentists to profit from extensive unnecessary work. And so on. And when the dentist gives the price estimate for his work, the veracity AI can tell you how this compares to the average price for such work in your area, and give a whole distribution, or histogram, if you'd like.

This could make scams in general far more difficult, perhaps only very possible with the most tribal, and otherwise non-analytical.

Veracity AIs can absolutely revolutionize markets and society, and make the worlds markets far more efficient, and its societies much smarter, richer, and better. But there's no reason to wait. Journalism easily can, and absolutely should, do so much more today.