Saturday, July 16, 2011

Efficiency of Automation

I normally think of the impact of the current wave of automation in terms of the level of skill/knowledge it takes to have a job that can't be automated. This article here pointed me toward a different approach.

http://techcrunch.com/2011/07/16/tale-of-two-countries-silicon-valley-unemployed/

Instead of simply thinking of the level of non-automated jobs, just think of the efficiency benefit you get from a skilled/trained person using a certain tool (including computers and robots) versus someone who isn't skilled or trained using older technology.  That ratio of efficiency basically sets pay scales.  So instead of looking at the capabilities of non-automated jobs, we simply look at the skills required to do jobs after they have been highly automated and whether it even makes sense to have anyone do anything the old way.

In one of the comments on the article someone argues that the same type of article could have been written about plows, sewing machines, or other historical advances. I think this comment is a little oversimplified.  One of the responses to it brings this out by asking how much more efficient is a person who has mastered the plow compared to someone who hasn't mastered it and uses it poorly. Compare that to how much a programming guru can accomplish relative to a complete novice. That ratio is very significant and we'll come back to it later.

I think we can dig deeper still into this analogy. (Pun intended.) How long does someone have to work with a plow to get within a certain fraction (say 25%) of a master? How much more efficient is the master with the plow compared to a person with just a spade? Now go to the modern equivalent. How long do you have to work with a computer to be able to be 25% as efficient as a master coder?  How efficient would a non-coder be using older technology (not a computer) for various tasks?

I have to admit I don't have much experience with plows, but I'm guessing I could get to 25% of the best in under a year.  Actually, my gut tells me a week, but it is quite possible that I'm missing something. As for the plow compared to the spade, it is probably at least a factor of 10 and probably closer to 100. But what about the modern equivalent?  Most people who have gone through 4 years of academic study and a few years of professional practice probably still won't get to 25% of a coding guru. As for the efficiency ratio of a skilled computer user on a modern computer compared to any previous technology (like paper pushing), the programmer and computer have to be at least several thousand times faster for the majority of tasks these companies work with.

How does this ratio impact employability and wages? Well, because it is a nice round numbers, let's assume that a skilled person makes $100/hour. An unskilled person is economically if their salary is reduced by the efficiency percentage. So once if they can get to 25% of the efficiency of the skilled person in a reasonably short period of time, they are probably a good bargain for an employer as long as they make under $25/hour.  (Ignoring all types of things like taxes, benefits, and cost of infrastructure/equipment to keep things simple.)  However, if the unskilled person has an efficiency that is more than 100x lower and it will take them a long time to improve that significantly, they are basically unemployable.  For it to be a bargain for the employer they would have to make pennies per hour and would be better of begging or resorting to petty crime.

The argument that previous advances in technology have increased overall productivity and led to new job creation are perfectly accurate and I guess in theory they apply today as well.  There is just one problem.  I'm pretty sure the efficiency ratio grows exponentially just like technological advancement.  It certainly has for decades, if not centuries, of recent time and I fully expect that to hold out another decade or two.  This exponential growth isn't slow either.  That means that once it starts to break away, it just soars off.  Taken to the extreme you can imagine a world where any particular job can be accomplished by a single, skilled person.  You don't hire a second one because there isn't a need to.  The first one can do it all.  That is the extreme, and that might not be realistic, but you don't have to go to that point before many things start to break down.

One of the links in the above article goes to this.

http://techcrunch.com/2010/06/03/soap-com/

Simply watch the movie and you see a company that has huge volume and very few employees.  It doesn't take much imagination to see how you could get rid of most of the people you see doing unskilled work and replace them with different types of robots that are managed by a much smaller number of people.  The way this scales you have a company that can handle a huge fraction of the non-perishable goods purchases in the country with very few employees.  Such, they buy a bunch of robots, but those robots were built in dark factories.  Only the designers and programmers are humans, not the builders.  Now introduce self-driving delivery vehicles and things get even more interesting.

Of course, the normal economic model is that this all creates new jobs.  Costs go down and people can buy more.  How much training/skill do you need for the jobs it created though?  How much stuff do we really need to buy?  There is a point of diminishing returns.  We might well have already passed it.  The normal model of growth has been fueled by growing populations and growing wealth.  I see that breaking down.  No exponential can go forever, even at low rates.  (To see this, simply calculate what happens with 1% growth per year for a few thousand years.)  So we have a race of exponential growths here.  Which one crashes out first and to what end?

Tuesday, July 12, 2011

Drugs, Crime, and Automation

I should be planning some stuff for a conference right now, but an idea hit me that I just had to write about. I have long been a supporter of the idea that drugs should be legalized. Prohibition failed once. Why are we trying so hard to make it work this time? It is more than that though. There are basic economic reasons why it would be a huge benefit to legalize and tax drugs. It would take a lot of financial pressure off states for things like prisons and instead give them an alternate source of revenue. I also expect ti would lower crime rates for things like theft because the legal drugs would be legal and cost less. What is more, instead of having the profits of drugs go into crime cartels, they would go to legitimate companies.

This is where the thought for this post comes in. My basic assertion is that criminals don't use automation. That had never occurred to me before, but it probably should have. Criminal activities stay human intensive. They don't set up giant corporate farms for growing drugs. They don't set up online sales or have computer controlled routing. These things don't work when your whole operation is based on flying under the radar and not getting busted by law enforcement.

Now, automation does allow things to be cheaper. So does not having to avoid cops. Passing federal regulations will make things more expensive, but I'm guessing the net impact on product cost is still a drop. However, the question I have to wonder about it what this does to employment rates. How many people are there who are generally non-employable in modern society who are currently employed in drugs? Maybe this isn't a large number of people. I haven't given it that much thought. However, I think what I'm coming to see here is that because of the automation it allows, legalizing drugs would change the employment profile of the industry. The total job count likely goes down (though initially a lot of the jobs lost could well be in other countries). However, it would produce a set of higher paying jobs for the people who oversee that automation. Basically, it would work just like everything else in this regard.

Wednesday, May 25, 2011

Computer Performance Future

The topics of automation, AI, and the impact these will have on society have been big on this blog. This is because they are things that I think about a fair bit. I'm not in AI, my interest are numerical work and programming languages, but I live in the world and I train the people who will be writing tomorrows computing software so these things interest me. I've been saying that things get interesting around 2020. I think the social changes become more visible around 2015 as automation begins to soak up more jobs and by 2025 we are in a very odd place where a lot of people simply aren't employable unless we find ways to augment humans in dramatic ways.

Cray just announced a new supercomputer line that they say will scale to 50 petaflops.  No one has bought one yet so there isn't one in existence, but they will be selling them by the end of the year and I'm guessing by next year someone builds one that goes over 10 petaflops.  That's on the high end for most estimates I've seen of the computing power of the human brain so this is significant.

Thinking of the Cray announcement it hit me that I can put my predicted dates to the test a bit to see how much I really believe them, and as a way to help others decide if they agree or not. We'll start with the following plot from top500.org. This shows computing power of the top 500 computers in the world since 1993.
What we see is a really nice exponential growth that grows by an order of magnitude every 4 years. I couldn't find exact numbers for the Flops of the Watson BlueGene computer, but what I found tells me it would probably come in between 100 and 800 TFlops though that might be too high.

The thing is, that the processing power of the top 500 machines in the world isn't really going to change the world.  MacDonald's isn't going to replace the human employees if it costs several million to buy the machine that can do the AI.  However, smaller machines are doing about the same thing as these big machines.  Right now if you can get a machine that does ~1 TFlops for about $1k assuming you put in a good graphics card and utilize it through OpenCL or CUDA based programs.  So workstation machines are less then 2 orders of magnitude behind the bottom of the Top500 list.  That means in 8 years a workstation class machine should have roughly the power of today's low end supercomputer.  To be specific, in 2021 for under $10000 you will probably be able to buy a machine that can pull 100 TFlops. So you can have roughly a Watson for a fraction of a humans annual salary, especially if you include employer contributions to taxes and such.  I'm guessing that running a McDonald's doesn't require a Watson worth of computer power.  So if the reliability is good, by 2021 fast food companies would be stupid to employ humans.  The same will be true of lots of other businesses that currently don't pay well.

Comparing to Watson might not be the ideal comparison though.  What about the Google self-driving car or the Microsoft virtual receptionist?  In the latter case I know that it was a 2P machine with 8 cores and something like 16GB of RAM.  That machine probably didn't do more than 100 GFlops max.  Google wasn't as forthcoming about their car, but it wasn't a supercomputer so I'm guessing it was probably a current workstation class machine.

What about the next step down in the processor/computer hierarchy?  The newest tablets and cell phones run dual core ARM processors that only run about 100 MFlops.  That's the bottom of the chart so they are 3.5-4 orders of magnitude down from the workstation class machines.  Keep in mind though that given the exponential growth rate, the low power machines that you carry around will hit 1 TFlops in 16 years, by 2027.  That means they can run their own virtual receptionist.

Networking and the cloud make this even more interesting because the small device can simply collect data and send it to bigger computers that crunch the data and send back information on what to do.  What is significant is that the chips required to do significant AI will extremely cheap within 8-16 years.  Cheap enough that as long as the robots side can make devices that are durable and dependable, it will be very inexpensive to have machines performing basic tasks all over the place.

So back to my timeline, a standard workstation type machine should be able to pull 10 TFlops by 2015, four years from today. I think thins like the virtual receptionist and the Google cars demonstrate that that will be sufficient power to take over a lot of easy tasks and as prices come down, the automation will move in.  By 2020 the cost of machines to perform basic tasks will be negligible (though I can't be as certain about the robots parts) and the machines you can put in a closet/office will be getting closer to 100 TFlops, enough to do Watson-like work, displacing quite a few jobs that require a fair knowledge base.  By 2025 You are looking at petaflop desktops and virtual assistants that have processing power similar to your own brain.

So I think the timeline is sound from the processing side.  I also have the feeling it will work on the software side.  The robots are less clear to me and they might depend on some developments in materials.  However, graphene really appears to have some potential as a game changer and if that pans out I don't see the material side being a problem at all.

Sunday, May 15, 2011

Scala 2.9 and Typesafe

It is remarkable how far Scala has come in the 18 months or so since I first started learning it. The final release of Scala 2.9 just came out and Odersky has started a company called Typesafe that is intended to get more companies on line with Scala. These things excite me because I see them being very beneficial for both my personal programming and what I do in the classroom.

Having Typesafe should make it easier for companies to use Scala more and right now that is one of the very valid points against Scala, it simply isn't used as much out in the market place as other options. I truly expect that to change with time and I see this being a step in that direction. It will also make it easier for our sys-admins to get everything set up nicely and that is a big plus.

The number of additions in Scala 2.9 is significant. You can read all about them on the Scala site, but I want to highlight the ones that I think will be good for my teaching. The first one is the additions to the REPL. The REPL is a great teaching tool. It truly allows the student to get started typing in single statements and then to keep playing around with things later on to see how they work. Through 2.8 the REPL in Scala had some rough spots. The list of fixes for 2.9 seems to cover most of the problems I've run into so I'm very hopeful that the students next semester will have a much better experience with it.

The key addition for most developers in 2.9 is parallel collections. These will impact the second semester and beyond because I introduce parallelism in the second semester. Early on, this makes it easier to to parallel loops in Scala than it would be with even OpenMP. Consider this code that calculates and prints Fibonacci numbers.

for(i <- 0 to 15 par) println(fib(30-i))

When you run this using the slower, recursive version of fib, you get the numbers back out of order with the biggest values near the end. Just adding the call to par is all it takes. Of course, the for loop and collections can do a whole lot more than this and they will also do their tasks with the simple addition of a call to the par method.

Not only did the collections get parallel, they got a new set of methods that come standard: collectFirst, maxBy, minBy, span, inits, tails, permutations, combinations, subsets. These just make the already rich set of methods on collections a bit richer. The last three, in particular, strike me as easily enabling some interesting problems.

The last addition I want to highlight is one that I really don't know all that much about and as such I'm not certain how much it will impact my teaching. However, I'm optimistic about it. This is the addition of the scala.sys and scala.sys.process packages. I use the scripting environment of Scala in the first semester. I love how this lets us write programs with a low overhead. Up to now though, Scala hasn't really been good for scripting in the sense of launching lots of processes and dealing with the OS. These packages look like they will help to bridge that so that I can use Scala for those types of things instead of having to move to the ugliness that is Perl.

Sunday, May 1, 2011

Real Implications of Automated Cars

In case anyone had forgotten, I really want a car that drives itself. I don't like to drive. I find it to be a waste of time. I liked buses in the Denver-Boulder area, but the system in SA, especially where I live, isn't up to the same level and my life here doesn't support that. Just the ability to read during commutes was great for me. I would get through a lot more of my intended readings if I could sit back and read during my morning and evening commutes.

The ability to do other things while the car drives is only a first-order effect though. It is using the car like we do now, but just more automated. Where things get interesting is when you look at the higher-order effects. The examples that come to my mind are uses of the car that occur without having a licensed driver present. It might take a while longer for these to take effect because people/society will have to truly trust the automated driving mechanism before it will be legal to have the cars really drive themselves without a person who is responsible for them being present. However, I think that point will be reached and that is when the full impact of this change will become apparent.

There are two main categories that jump out
  • No humans in the car at all.
  • Non-licensed drivers in the car.
The first thought I had related to the initial item was because I see automated cars as needing to have a high level of safety maintenance. Things like cleaning sensors and doing regular checks that they work will be required for legal reasons and for insurance. The work itself will be largely automated and it won't take long before people want to just send their car out to do it while they are at home or at work.

Ever had one of those late night cravings for some type of food that you don't have in the house? Maybe a fast-food pick-up. You don't really need to be there for that. You place the order online (possible on a phone or tablet) then send the car to pick it up. A little extra automation will be needed, but nothing too difficult.

Remember in the dotcom bubble there were companies that wanted to deliver groceries with online orders? It didn't scale well because of the cost of delivery. If people can simply send their car to pick it up that problem is solved.

This also leads to a new specialized product: mini-cars that don't carry humans, only other stuff. The vehicle that goes to get your combo meal doesn't need to be big enough to carry a human or have the nice seats. Same for all these other tasks. You can have a much smaller device that exists just to transport goods to end users.

The second bullet was normal cars driving without a licensed driver. Driving the kids to school in the morning? Why does a parent have to be there physically? I can see all types of bad social implications of this with parents sending their kids out all the time and never seeing them. Then again, how different is it to do that with your self-driving car versus their bike? Less exercise for the kid, but not less contact with the parent. In fact, with video call capabilities the parent could be interacting with the kid while they are being transported.

Of course, automation is going to alter all types of other things in the world in the coming years. This was just a few thoughts on some of the less obvious implications of cars that drive themselves.

Sunday, March 20, 2011

My Automated Greenhouse

In EPCOT we want on the “Living with the Land” ride. I love that ride. It brought to mind a dream that I have of putting a solar power, automated greenhouse in my backyard. More generally, it makes me think that structures like that should be commonplace in suburbia. On “Living with the Land” you get to go through sections where they are growing all types of plants in greenhouse structures using interesting techniques. Since the last time I went on that ride, students at MIT did a class project where they had robots growing and picking tomatoes. Given the strides in automation, I see no reason why all the things they are doing at EPCOT couldn't be automated as well.

What I'm not certain of is how much food one could produce in the area of a normal suburban yard, or a reasonable fraction of it. I'd be happy to give 50% or more of my yard over to an automated greenhouse. Whoever makes it can not only charge me for software upgrades and possible hardware upgrades, but also for seed packets that I would add every so often. Just hook up electricity and water and pour in seeds then every so often you get fresh fruits and vegetables. At EPCOT they also raise fish because the two can work well together. I'm not certain how viable that is for this application, but it could certainly be a consideration.

Combine this with serious solar panel coverage on every house and you have a situation that is probably fairly sustainable. It would turn the wasteful suburban lifestyle into something much better for the planet. Indeed, for the purposes of energy and food production the suburbs probably come a lot closer to being able to sustain themselves than dense cities can. The primary problem of the suburbs is transit and sprawl. These might not be such a big deal in a future world where more work is done remotely and energy requirements for transport are reduced thanks to lighter weight autonomous vehicles. Indeed, the possibility of growing more food close to where people live might go a fair way to offsetting other elements of transit. I'd have to do some calculations to get a decent estimate of how well this works on the whole. Perhaps that can remain as an exercise for a future blog post.

Automation and Jobs

This is following on my previous blog entry about automation and social impacts. The whole NY Times series on Smarter than you think is very relevant to the topic. The most recent article is about lawyers being displaced by e-Discovery systems. Those are truly high paying position being eaten up there. Another significant article is this one about automated cars. Note that they forecast a 10-year window for full automation. Don't go into truck driving at this point. I'd also expect loading equipment like forklifts to be automated on a slightly shorter timescale.

What I wanted to write this blog on is a thought that occurred to me while checking into the Disney cruise. In the last blog post I had a link to the Microsoft virtual receptionist. My thoughts combine that with this clip put out by Corning called “A Day Made of Glass”. There are a large number of jobs that I can think of that could easily be replaced by a reasonable quality virtual receptionist with large touch sensitive electronic displays. In fact, probably 90% or more of the Disney park employees and people at the cruise registration could be replaced that way. Airline counters too. Throw in a little robotics and the flight attendants either go away or get their numbers cut way down. With that little bit of robotics this hits a whole other set of jobs. Move more documents onto those touch surfaces and the paperless office might become more of a reality. That removes the need for a lot of people as well.

Apparently there are a number of restaurants that are working on the idea of using iPads for customers to order. Some are giving those iPads to waiters, but others put them right in the hands of customers. Corning would love tables that have Microsoft Surface capabilities for this purpose in the not too distant future. I have to admit though, I don't see Microsoft being the driving force behind this in the end. For food chains where the food is fairly routine, robots will quickly come into play for food preparation and even serving.

Watson beat the top Jeopardy! champs and while it certainly isn't infallible, it ranks above most all humans in that game. IBM is aiming it squarely at the medical field for diagnosis. Throw in this work with automatic processing of medical images and work various people are doing on having robots care for the elderly, and I'm not even certain that the medical field is all that safe an employment option. This is contrary to the predictions that the medical field will see huge job growth. There will be a surge in the amount of medical work done, but that actually provides a driving force to automate as much of it as possible.

This leads to a question that I find rather interesting. What fields are safe for young people to go into? As one would expect, I think that CS and software development are pretty good. However, even there it might only apply to higher end work. Law and medical practice could easily stagnate with automation. Engineering? That isn't a given either. The article that mentions Lawyers being replaced also mentions that Computer Engineering positions are stagnating because software is so good at helping make people more efficient at designing chips. What about other fields of Engineering? I expect that software is pretty good at bridges and mechanical work too. It doesn't have to do the job. It just has to make one human doing the job more efficient to prevent additional hires.

So what won't computers move into? If I only project until 2030 I see two areas. They are things that have a noticeably human touch, and those that require work that borders on non-computable. The former might not even be all that safe as people get more comfortable interacting with computers and the computers get more human. The latter is where the field of programming lies. Thanks to the non-computability of the halting problem, writing software is, in general, non-computable. Granted, humans make mistakes when programming so I see no reason to believe computers will never get as good or better than humans. I just see this being one of the later problems they get to. What else is provably non-computable? I don't know exactly. I don't know if people have really asked what tasks are and aren't computable. I have a theory that things which we consider to be “art” are non-computable while things we consider to be “science” are computable. Does that mean arts are safe and sciences aren't? Not really. It means fields where practitioners follow specific algorithms and there are known recipes for success are risky. Fields where people develop a sense for what is good through practice are safer. Since the value of a job is determined by demand regardless of automatability, artistic fields that no one wants to pay you for doing aren't going to make good career paths even if they can't be easily automated. For this reason, I'd add research scientists to my list of safe job paths. New science will always be needed to drive the next round of technology and research is much more of an art than a science. Creative jobs that involve some form of content creation can also work, but one has to be careful because they are only as valuable as their products are in demand. However, I also expect the wave of automation to open up whole new possibilities for creative jobs.

So how different is this from having a sewing machine make seamstresses more efficient? For me, the difference is that the jobs being replaced now are often the ones at the top end of the spectrum. It will also hit those at the very bottom end of the spectrum as well. The sewing machine made products cheaper and increased wealth so the people trained up into a whole new level of jobs. This round of automation will also improve efficiency and increase general wealth. It will make products cheaper and make it easier for everyone to enjoy a higher standard of living. Unfortunately, unless you can augment human capabilities with wetware it isn't at all clear to me that this round will make new jobs that humans can train into. Why not? First, the jobs you are eliminating here are at the top of the spectrum of what humans do. Where do you train up to when you already have a doctorate level degree in medicine, law, or engineering? Second, the timescale of training for jobs at that level is really long. If it takes a human 4 years to train for something that hasn't been automated when the start the training, what are the odds it won't be automated before they finish. Even if it isn't, how many years until it is? Train 4 years then work 2? That's not exactly a good approach to making a living.

So where does this leave us? Well, if wetware develops quickly and we start augmenting humans at or before 2020, then maybe we get Kurzweil's singularity. Barring that (and only looking forward to 2030 right now), we have a need for dramatic social change as total wealth grows dramatically, but the number of humans who are able to hold down jobs for extended periods of time drops dramatically.