A Closer Look at How AI Works

This post will provide an over view of how AI works. Before you click away, this is neither as complicated nor mathematical as you might fear.  While having a sophisticated understanding of mathematics is needed to be able to prove that the algorithms used in AI actually do something useful the basic principles are really quite simple and are readily understood with mathematical analysis.  Referring back to my first post, we can use the example of a graph to provide deeper insight into data as a clue to how typical AI functions.

Fitting Data to Curves

Consider a collection of data, such as the weight of people and their height, then by fitting a curve or line to this data we are using a mathematical algorithm to provide insight into the relationship between weight and height. We can then use this relationship to predict the weight of someone given their height. Of course the relationship between height and weight varies with age and sex, social-economic status, health and many other factors, so given the height of someone we can predict their weight, with some degree of error. This is commonly known as line (or curve) fitting.

hw

We can increase the accuracy of the prediction by adding further characteristics to our data. For example, if we add age ranges as a criteria then we actually add a 3rd dimension and we are now fitting a plane (or surface) to the data which we can use to predict one of the characteristics when we are given the other two.

hws

So far we are just using simple visualisation and the incredible power of the graph so where is the AI in this? What happens when we add a fourth, fifth or tenth extra dimension to the data. Well for a start we can no longer visual this easily as space only has 3 dimensions (at a stretch the fourth dimension, time, can be used if we animate the graph but lets ignore that for now as we end upwith the same problem when we get to the 5th dimension).

What we can do is use a mathematical representation of a graph and we can fit a special type of surface to the data using the same mathematical techniques as for 2 and 3 dimensional data.  This surface is called a “hyper-surface” which simply means a surface in a dimension higher than 3.

One of the simplest of these fitting algorithms is linear regression which is the equivalent of drawing a line through some data points that is the best approximation to the data according to a measure that minimises the total error.

li

There are a host of more sophisticated curves, surfaces and hyper-surfaces and error measures we can use to fit multi-dimensional data ( cubic-splines, least squares, etc) and there is a wealth of knowledge, know-how and software tools to do this but what does this have to do with AI?  If we can model a phenomena or process well, meaning that, given some characteristic data we can infer other characteristics accurately, then that means we understand how the measurements we have relate to reality and understanding how reality works is undoubtedly intelligence!

Is Intelligence Understanding How Things Work?

I would argue that part of the answer to this question is yes but unfortunately this definition is so high level that it only begins to give us clues as to what intelligence is; rather than a fully useful answer.  When we use the phrase “how things work” we are using extremely high level language that is applicable to everything from a natural phenomena, to a social situation, to a cultural or business process. Thus knowing that a given action in a specific situation will result in a particular outcome is smart and further, knowing whether the outcome is right or wrong, is a sense of morality. Endowing a machine with the ability to act and react with morality in a real environment populated with humans is surely a goal of AI and is highly useful it is not a definition of intelligence.

People normally value the ability to inter-relate with them through emotional, empathetic, relevant, interesting conversation and not just the ability to know stuff. In fact we have a less than flattering name for people who interact with us primarily through a demonstration of their knowledge; the “know-it-all”.  We may consider them smart,  but people need the full spectrum of knowledge, emotion, empathy, humility and a host of other “human” characteristics to be considered “people”.

Artificial People need not Apply

We can build a smart machine to have a measure of morality, for example it could be programmed to only take actions (or inactions) that result in good out comes, but this is not emotions. In fact, it is often emotions that lead to actions which are not moral. However, we are not necessarily interested in building “artificial people” so for the time being we can move on from the problem of artificial emotion as what we need at a minimum is artificial morality.

In the case of a machine faced with a situation where there is no good outcome, only a least bad outcome, then harm may come to pass but this is not because the machine is evil, it is just that it is constrained by the laws of physics.  For example a robot is in a building with a mother and a child during an earthquake.  The robot has the ability to carry only one of the two out of the building before it collapses killing and destroying them all.  It would hardly be rational for the robot to deemed to have done harm if it saved itself and the child but left the woman behind. In fact if a human did the same they would be considered a hero. We now are on the precipice of the philosophical questions of the morality of power.  Fiction often explores the conundrum of power and responsibility, consider the latest rash of Marvel movies featuring beings with extraordinary powers (they may as well be robots with AI which is far less far fetched that most of these characters) that agonise over their responsibility to sacrifice themselves for humanity against equally powerful villains. Invariably its the bit of them that is “human” that gives them the edge.  The point here is that the question of whether an AI could do right or wrong is no different to the question of whether one human with power over one or more other humans chooses to act for the good of everyone, a few or only themselves. Quite frankly the world is awash with real-life super villains failing to understand (or choosing) their actions will have bad outcomes.

Issac Asimov examined this from an artificial intelligence perspective and used fiction to construct some dramatic situations that tested the boundaries of cause and action and even formulated the famous (in some circles) 3 Laws of Robotics which his stories used as a foundation to extrapolate interesting and sometimes non-intuitive outcomes.

Whilst Asimov’s laws seem to provide some kind of moral framework for robots and AIs as subservient to human- and AI- kind this approach needs to be tested and refined through a more rigorous scientific process then story telling. However, it does bode well that the Faustian bargain leading to our downfall by creating AIs does not necessarily need to result in catastrophe, in the world of fiction at least, and if we are honest with ourselves fiction is entirely where such fear comes from in the first place.

Comments are closed.