The Impossible Artificial Intelligence Problems of the Cold War

Burke Holland

·

April 08, 2019

·
Guest Post

Artificial Intelligence: A buzzword that rolls off the tongue like an olympic skater nailing a triple axel while Celine Dion’s “My Heart Will Go On” crests in the background….

🎶 You’re hereeeeeee, there’s NOTHING I FEAR…. 🎶

While almost all of us will use that word at the drop of a “well, actually”, many of us don’t really know what it means. Including me. And I would prefer to be well-versed in more subjects besides just, “beer”.

I recently had the chance to work on an AI presentation that was originally created by my colleague, Damian Brady. The way that Damian explains AI is so brilliant, even I can understand it. In the process of learning what Damian knew and how to explain it in my own words, I found myself knee deep in a story that dates back to the Cold War and involves the US Navy, ship radar and a statistician named Leo Breiman.

In order to get to all of that, we have to start with what AI is. Damian does an excellent job of explaining that, so I’ll do my best to regurgitate it here.

AI According To Damian

Part of the reason that Artificial Intelligence (AI) is so hard to define is that it can mean almost anything you want it to mean. It’s just an enormous sphere of information that encompasses chat bots, facial recognition, home assistants, cars, vacuum cleaners, paperclips and, of course, the end of humanity. Sci-fi movies and consulting firms have brutally murdered the true definition of the word, so Damian just uses enormous sphere to represent “AI”, and you can chuck anything you think might be AI right in there.

Now inside this enormous and relatively meaningless blue blob, there is a subset of technology called “Machine Learning” (ML). This is another term you have likely heard before and then smiled and nodded because that’s what you do when you just want a conversation to end. ML is a subset of AI.

Those circles are drawn to scale. ML is probably the largest subset of AI. If you are doing ML, then you are definitely doing AI. If you are doing AI, then you are most probably doing ML. Seth Juarez who works with AI/ML at Microsoft puts it this way…

“Artificial Intelligence is what you call it when you’re selling it. Machine Learning is what you call it when you’re doing it.” -Seth Juarez

For the rest of this article, we’re going to look at ML as the primary concept to represent AI.

Computer programming cannot solve some problems

The best way to understand how ML works is to consider how traditional programming works, and then look at why it stops working at some point.

We generally start with a problem that we want to solve. Because my brain is small and slow, let’s look at an overly simple example.

What is the sum of two numbers?

To solve this problem with a computer, we need to give the computer an algorithm that tells it how to find the sum of two numbers. In this case, our algorithm is quite simple…

a + b = c

We then implement that in code and pass in our data. The computer spits out an answer.

This is how we have been doing programming since the beginning of programming. Everything we do is some permutation of the above scenario.

But what happens when you don’t know the algorithm? What if the problem is entirely too complex, or the data is just too massive for you to write the code that spits out the answer?

This is the exact problem that brings us to the US Navy during the Cold War.

The “Radar Problem”

War Ship

The Cold War was a nuclear standoff between the United States and the USSR that lasted from the end of World War II through the 1980’s. During that period, defense was a major focus for both countries.

It was during this period that the US Navy became interested in solving a problem called “Radar Range SIP Recognition”.

Radar had been adapted for use on ships during World War II. Radar signals (electromagnetic waves) go out, bounce off of an object and then are received back. These received signals can tell you how far away an object is, how fast that object is moving, and even the direction it is moving.

But radar can not tell you what an object is. And this was not good enough for the US Navy.

During the 80’s, the Navy hired a statistician named Leo Breiman as a consultant to help them solve what seemed like an impossible problem - how could they use radar to determine exactly what a detected object was. If it was a ship, they wanted to know exactly what kind. Was it a destroyer? If so, what model? How many guns? How fast is its top speed?

Radar signals are just a bunch of peaks. Those peaks represent some sort of surface that the radar has bounced off of. These surfaces could be the side of the boat, a turret on the boat, a smokestack or what have you.

The problem with using these signals to figure out exactly what object had been detected was that the object could be in any position when the radar hit it. It could be straight on or slightly angled or even fully sideways. There were so many combinations that it was impossible to program a statement that would parse through all of the images that could represent just one kind of ship. The sheer volume and complexity of all the data makes this a problem that is virtually impossible to solve. We simply can’t see the algorithm through the data.

This is exactly the kind of problem that Machine Learning is really, really good at.

Machine Learning flips the script

Machine Learning takes the traditional concept of computer programming and turns it on its head. Instead of providing the algorithm to solve the problem, we provide the data and the answers to the problem. The computer output then becomes the algorithm that is required to arrive at those answers.

You may have heard the term “model” before. As in a “Machine Learning Model”. That algorithm that the computer generates? That’s the model.

You can think of the model as a .exe or a .jar file. It is executed by a runner process. The computer then gives us back a “predication” of what the answer might be.

It cannot give us an answer because we can never be 100% sure that any answer is correct. There is always some statistical probability that it will be wrong. Just as if your brain were to provide an answer to any question. There is always some chance that you are wrong. If you’re me, then there is a really good chance that you are wrong. A lot.

This brings us back to Leo Breiman, who did not have the option of using Machine Learning. He was out to sea (so to speak) and alone on this one.

Solving the radar problem

The US Navy had provided Leo with a data set that they created by flying planes around 5 ship types in San Diego and recording the radar signals that bounced off of the ships.

Leo has plastered the walls of his office with these generated radar images. He spends weeks pouring over them, trying to figure out how to solve this problem. Until he has a realization.

It is possible to ask simple yes or no questions about each of the radar images. For instance, does the image have a bump in a specified area? Yes? What about a bump in this area? No? Each image would just have a yes or no answer for each question it was asked. If the answer was yes, the image would be processed one way with more questions. If it was no, it would be processed another with other questions. And this was repeated over and over until Leo defined a point at which he could be confident what type of ship the image represented based on how many yes/no answers it gave. Kind of like a big “if” statement, except that it’s just the same “if” statement executing over and over again with a different set of conditions.

This is called a “decision tree”. It took Leo Breiman weeks to solve this problem, and he is one of the most brilliant statisticians to have ever lived. He is also one of the creators of the “Random Forest” tree algorithm which is used in ML today.

Machine Learning IS Leo Breiman. Machine Learning comes up with the algorithm so that you don’t need weeks of consulting with the foremost mind in statistics to solve a problem.

Today we could solve the radar problem with ML. If we plug it into our over-simplified diagram, it might look something like this…

We provide the computer with an answer and a radar image, and the computer will give us a model that can then classify other radar images that we don’t have the answer to.

Using pre-built models

So now you know how ML works. The question for the rest of us then becomes, “how do I get ML for my data”?

That depends largely on the problem you want to solve. The good news is that for a lot of scenarios, there are already pre-built models that you can use. Azure Cognitive Services is built on this principal. Below you can see all of the different types of models that are ready for use without any work on your part.

To use these models, you pass your data to a URL in JSON format and it returns a JSON document with the result. Here is an example of running a sentiment analysis on “Hello World” in two different languages.

Request

{
  "documents": [
    { "id": "1",
      "text": "Hello World!"
    },
    {
      "id": "2",
      "text": "Bonjour tout le monde",
      "en": "fr"
    }
  ]
}

That would then be passed as data to a url that looks something like this…

https://westus.api.cognitive.microsoft.com

And that endpoint would return this document…

{
  "documents": [
    {
      "score": 0.77,
      "id": "1",
    },
    {
      "score": 0.85,
      "id": "2",
    }
  ],
  "errors": null
}

The “score” indicates how positive the sentiment is. The higher the score, the more positive the sentiment. Note that “Hello World” in English gets a lower sentiment score than “Hello World” in French. Which might be because the French translation is actually “Hello Everyone”. If you run “Hello Everyone” through, you get a sentiment score of 99%. 🤷‍♀️

This concludes our history lesson

How Machine Learning works isn’t nearly as complex as it’s made out to be. All you need is a good Cold War story and a colleague like Damian to explain it to you. Slowly. Without big words.

If your interest in AI/ML has been piqued here are some additional resources for working with Azure Cognitive Services to use pre-built models, as well as how you can create models of your own.

https://azure.microsoft.com/en-us/services/cognitive-services/?WT.mc_id=codebeast-blog-buhollan

https://docs.microsoft.com/en-us/learn/modules/create-computer-vision-service-to-classify-images/?WT.mc_id=codebeast-blog-buhollan

https://docs.microsoft.com/en-us/learn/modules/replace-faces-with-emojis-matching-emotion/?WT.mc_id=codebeast-blog-buhollan

And if you’re up for it, listen to Leo Breiman tell the radar story in his own words. I’m sure I didn’t even come close to doing it justice.


Burke Holland

Written by Burke Holland.
Follow on Twitter

© 2019, Codebeast.dev