Youtube Ads..

So after thinking about it for a while, and probably even more later, I think I might have to stop producing content for Youtube all together. I know I don’t have a huge audience like a lot of other…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




AI and Red Cars

Speed is not just related to colour

A little while ago this question dropped into my Twitter feed:

My first thought was “OK, regression with regularisation will sort that if you have more features”. A long car journey gave me a bit of space to reflect and consider how I might approach this problem: if I was teaching an AI to predict how fast a car might be driven, given properties of the car, how would I do it and what would the AI “know”?

Of course, that Tweet poses a question about cause-and-effect. Machine Learning and AI can tease out unexpected information from massive data sets, but that’s a purely statistical and data-led processing, seeking correlation rather than causation directly.

Just for clarity, I think of an “AI” as some form of decision making or prediction system (takes inputs, produces some outputs), whilst “Machine Learning” is the underlying technology — the algorithms which enable that AI to function.

If we consider the simplest set of data that we might use to address the problem: car colour and average speed driven. Car colour might be represented as RGB values, speed in MPH.

If we take the assumption that drivers who buy red cars do indeed drive a bit faster than the average and that this is reflected in the data, the AI would associate the higher speed with red shades in the colour spectrum. So from the perspective of the AI, red really does appear to make cars faster. (Presumably brown or champagne-gold would make cars slower, on the assumption that those are perhaps the colour choices of more sensible elderly drivers.)

This is because colour and speed are literally all that the AI knows about it’s world. It’s not considering anything but correlation and only with two variables, so it’s making an assumption that speed is indeed dependent on colour.

The machine learning algorithms behind AI systems thrive on data. Just providing colour and average car speed (as above) isn’t going to give any algorithm a lot of info. What’s required is to give the system lots of different pieces of data, or “features” as they’re commonly called.

There are lots of obvious features which would be useful here, such as engine size, engine output, car body shape (think SUV vs coupe/sports). As a human, we know that a van with a small engine is likely to be a slower vehicle than a Ferrari, even if the van is red and the Ferrari owner has chosen silver instead of default “Rosso”. But the AI doesn’t have the benefit of that background and will have to work it out from the data.

Applying machine learning techniques, a regression algorithm could be used to predict average car speed, using the wider set of features. A gradient descent type algorithm could be used to assign a weighting to each feature, by iteration, which determines the contribution that feature (engine output, colour etc) makes to the AI’s expectation of the average speed of the vehicle. At the end of this process, the AI can predict the average speed of a given vehicle, based on what it has learned from examples.

So how does the AI learn that colour maybe isn’t so important? This is where the machine learning algorithm can implement regularisation. What regularisation does is to apply a penalty to overly complicated models (those with lots of features), in order to weed out the features which aren’t delivering much value. Those features which remain are the key determinants of the AI output, it’s view of the world. This might sound odd, as we’ve asked for more data then are deciding not to use all of it. But the process has been able to pick which features in the data are most useful for the task at hand.

Regularisation involves choice of a “magic parameter” — a common activity in building and tuning AI performance. The choice of this parameter (lambda in the diagram below) leads to the weights associated with some features becoming zero i.e. that feature no longer contributes to the model. I’ve borrowed an example from a different scenario, just to show how this would work (and I don’t have a data set of average car speeds…). The feature shown in green is dominant, whilst the coefficients of several other features drop to zero as the lambda value is increased. Those features stop contributing to the system output.

In the case of our car speed scenario, tuning the lambda value would tease out which of the features are most indicative of the likely average speed of the car.

My expectation is that colour would drop out fairly soon, whilst engine output would have a non-zero coefficient for even very high lambda values.

A couple of people in the Twitter conversation suggested that AI wouldn’t be able to represent the human factors such as driver attitude. I’m fairly confident that it wouldn’t be possible to get an accurate data set which included a feature of “I generally drive faster than other drivers”. However, it would be possible to include features which are proxies for driver behaviour. We’re all individuals, but (in general) younger male drivers might be likely to drive a bit faster than average. Drivers from more affluent backgrounds might tend to own higher powered vehicles (and use that performance).

These features could be included in the data set and would be subject to the regularisation work as per the example above. So if the human factor proxy feature is relevant, it will be identified and retained in the model.

The discussion above considers how a general gradient descent algorithm could be used to create an AI which takes data about a car as input and outputs the likely average speed at which the car will be driven as an output. Of course, there are many alternative approaches and an equally valid approach would be to use a neural network, which takes those same inputs and produces the single value output.

So, given a decent set of data, the neural network approach will also determine that the colour of the car doesn’t cause it to be faster.

Machine learning algorithms which under-pin AI systems are limited to detecting and determining correlation. Whilst this can be incredibly enlightening and it can be so complex that it’s hard to understand what’s really going on, the AI doesn’t consider factors outside of the data set.

Just like a human, an AI can’t use what it doesn’t know. Unlike a human, an AI won’t go looking and asking more questions (at least, none that I’ve heard of so far!). It’s the human user of the model who makes the jump to causation (sometimes correctly, sometimes not) and it’s also up to the human to decide if the resulting model is useful.

However, I’ve convinced myself that a well built AI will know that red paint alone doesn’t make a car go faster.

Neil.

Add a comment

Related posts:

The Journey

I could not always say that. In the past I have kicked and screamed inside to be past whatever circumstance I was going through. I am finally starting to embrace the sacredness of the present moment…

Mobile App Services

We provide a range of digital services, thriving on high levels of technical complexity or advanced business processes, reporting and software engineering challenges. Including strategy, design…

Quem responde pelas redes sociais de sua marca?

Para crescer no mercado e ganhar reconhecimento sua marca precisa ser vista. Para isso, é preciso valorizar e saber mostrá-la para os clientes em potencial. Diversas são as maneiras de divulgar…