Nowadays you can’t turn on the news without hearing talk of artificial intelligence (AI) and machine learning (ML) – they’re the buzzwords that just won’t die. And with good reason: they’re already transforming our lives in areas as disparate as finance, healthcare, logistics and water monitoring… not to mention the perfect selfie.
Since the terms are often used almost interchangeably, particularly in the mass media, you could be forgiven for thinking that they’re one and the same thing. However, in the field of data science, the terms are quite distinct.
Artificial Intelligence In the most basic terms, AI is any instance of machines imitating cognitive functions typically associated with human beings, such as learning or problem solving. For the aforementioned data scientists, it’s an umbrella term for any hardware or software that enables a machine to mimic human intelligence. Machine Learning ML, meanwhile, is a subset of AI; just one of a range of techniques used to deliver that intelligence – a type of data analysis that allows systems to ‘learn’ from large quantities of data, identifying patterns and making decisions with a minimum of human intervention.
Artificial Intelligence
In the most basic terms, AI is any instance of machines imitating cognitive functions typically associated with human beings, such as learning or problem solving. For the aforementioned data scientists, it’s an umbrella term for any hardware or software that enables a machine to mimic human intelligence.
Machine Learning
ML, meanwhile, is a subset of AI; just one of a range of techniques used to deliver that intelligence – a type of data analysis that allows systems to ‘learn’ from large quantities of data, identifying patterns and making decisions with a minimum of human intervention.
So how does it work?
Well, ML relies on large amounts of data. ML-based systems process training data to progressively improve performance on a task, providing results that get better with experience. Essentially, you take large datasets and feed them through a neural network – a brain-inspired framework for processing complex data – to produce a model that represents the parameters of the training data.
The classic example is Google’s eureka moment with cats.
Now, as a casual observer, you may not have considered the complexity of the cat world, but it’s notoriously difficult to define a cat’s characteristics, since they come in all shapes, sizes and colours: long-haired, short-haired, black, white, tabby, tortoiseshell … Thus, it follows that producing a model that represents the parameters of a feline data set isn’t exactly a walk in the park.
But in 2012, Google famously connected 16,000 processors to form one of the most gigantic neural networks the world has ever seen and let it chew its way through the internet, looking for cats. (No cats were harmed in the execution of this project.)
Until that point, the majority of ML training was supervised – that is, humans supervised the learning process, labelling specific features to help the machines along – and that’s largely still the case. (In the future, as ML technology advances, the need to develop and manage these costly datasets will surely evaporate, but for now … watch this space.) In this instance, however, Google’s neural network was given no pointers, yet still managed to kick out a cat-defining algorithm, achieving a level of accuracy that had never been seen before. If you’re a technical sort, you can read the results of their work on Arxiv.
Machine learning: training
So, your ML system has identified the elements that constitute a cat. Now what? Well, once an ML system is trained, it can analyze new data and categorize it in the context of the training data. This is known as inference – essentially, when you put your model to work.
What this means is that you can now show a new image to your system, and it will be able to use its skill and judgement – or rather, the model – to decide if the new image is a cat, or not.
Machine learning: inference
And if that brings to mind the Not Hotdog app – a flight of fantasy featured in US tech-based TV comedy Silicon Valley and subsequently made available for iOS and Android – you’d be absolutely right. The app, which has no discernible purpose beyond confirming that the object you’re pointing your smartphone camera at is either a hotdog or not, it a perfect example of inference in action.
ML tends to be performed in one of two locations: the cloud, and the edge – where ‘edge’ refers to the edge of the network. ML training takes a heck of a lot of juice, so it’s typically performed in the cloud, on remote, power-intensive, and compute-intensive server systems. Inference can be done wherever the data is, including right on the device ‘at the edge’ – whether that’s an IoT device or edge server.
When your smartphone auto-suggests responses to your emails, or optimizes your selfie before you’ve taken it (the aforementioned perfect selfie), that’s ML inference in action at the edge. But edge ML is also being used for less frivolous purposes, such as monitoring water quality in real time or checking whether asthma patients are taking their medication correctly, via smart inhaler add-ons.
More and more ML inference is moving to the edge, simply because it uses less power and bandwidth, and tends to be more private and secure, since data stays on the device, rather than being shipped backwards and forwards to the cloud. This is great news for the consumer (Hands up who’d prefer to keep their personal info safely on their smartphone? Who’d rather it was paraded around the ether? Thought so...) but also for businesses, particularly because keeping things on-device also reduces latency – the pesky ‘lag’ – and ensures more responsive performance that doesn’t rely on an internet connection.
When Arm launched the Project Trillium ML platform, one of the main goals was to provide a range of options for efficient and performant ML at the edge. Since ML can mean everything from computationally lightweight tasks, such as keyword-spotting, to intensive, heavyweight server-based workloads, a heterogeneous platform, such as Project Trillium, gives developers the flexibility to select the right solution for the application: from small, low-power microcontroller units (MCUs) for cost- and power-constrained systems to central processors (CPUs) for greater performance and general-purpose programmability; graphics processors (GPUs) for faster performance with graphics-intensive applications; and neural processors (NPUs) for the most intensive and efficient ML processing.
But whether it’s safeguarding your water supply or just adding bunny ears to your selfie, ML is simply a technique for realizing AI – a ‘toolkit’ for achieving AI’s smarts. It’s no more complex than that. Of course, as the best disclaimers are quick to mention, other toolkits are available, such as computer vision and natural language processing … but that’s a story for another post.
[CTAToken URL = "https://www.arm.com/ai" target="_blank" text="Machine Learning on Arm" class ="green"]