What is machine learning and how does it work?

Machine learning has been behind many of the recent advances in the development of artificial intelligence. It underpins many of the applications of AI that people encounter each day, from image and voice recognition to online recommendation tools. Here we answer some of the questions about what this technology actually is and how it works.

What is machine learning?

Machine learning is one of the leading approaches used in the development of artificial intelligence (AI). Rather than using pre-programmed instructions to process data, machine learning uses algorithms that can be trained to identify and adapt to statistical patterns. They can learn from large datasets of numbers such as bank transactions or information from sensors, text from books or the internet, images or audio, depending on the intended purpose of the algorithm. Once trained, the algorithm can then apply what it has learned to new sources of information. While humans can pick up new skills with just a few examples, machine learning algorithms need to be trained on vast amounts of data before they can detect patterns in new information. Their ability to comb through large datasets, however, also means they can pick out patterns that might not be obvious to humans. You can find out more about machine learning and its capabilities through our interactive infographic.

Machine learning algorithms are designed to work with minimal involvement from humans, but still require some parameters to get them started. Programmers create a machine learning model that will best suit the task and data required. For example, the model needed to recognise faces in images might be different from one predicting fluctuations in weather data. This base model algorithm is then trained by feeding it sets of pre-prepared data that will allow it identify patterns and improve over time.

Among the recent developments that has greatly enhanced the capacity and capability of machine learning algorithms has been the use of artificial neural networks. These are computer networks built in a way that mimics neurons in the brain, linking layers of tiny, interconnected processing units, or nodes, together. These structures bring enormous gains in efficiency and have enabled machine learning approaches such as “deep learning”. Deep learning makes use of multi-layered neural networks that can discover patterns in complex data such as images and speech.

There are four main categories of machine learning that are used to train these systems.

  • Supervised machine learning – These programs are trained using labeled data. For example, images of animals that have already been classified or retinal scans that have had potential indicators of eye conditions circled. In some cases this will also involve feedback to help refine its performance.
  • Unsupervised machine learning – In this case the machine learning models are given raw, unlabelled data. Here the algorithms look for similarities within the data and categorise it. This is particularly useful for finding patterns that people haven’t previously identified or are not easily spotted by humans. 
  • Semi-supervised machine learning – Here models are given a mix of labelled and unlabelled data. It is typically used in situations where labelling is particularly labour intensive or requires a high level of expertise. One area where semi-supervised machine learning has been particularly productive is in protein sequence and structure prediction.
  • Reinforcement machine learning – This is where the program learns through trial and error, receiving “rewards” or “punishments” for its interpretation of data. It can be used to help autonomous vehicles, for example, to learn the rules of the road. set, usually through a system of rewards and punishment.

The areas where machine learning is being applied are growing all the time

  • Disease prediction – Machine learning algorithms have been shown to be effective at spotting signs of a variety of cancers and eye diseases from medical scans. Their ability to detect hidden patterns in a range of medical data such as diagnostic images, gene activity, pathology slides and healthcare records could assist in the early detection of diseases.
  • Drug safety - The French National Agency for the Safety of Medicines and Health Products has been using machine learning to identify trends in adverse drug reactions from its national prescribing databases, helping it to identify potentially harmful medications earlier.
  • Online content recommendations - By rating movies or social media posts with a thumbs up or down, internet users are providing data that can be used in a form of supervised learning to identify other movies or posts they might like based on the preferences of other users with similar tastes.
  • Image recognition - Neural networks training on millions of online images have proved to be particularly adept at learning to categorise animals, objects and even facial features when presented with new images. This allows our phones to identify a “cat” or a “dog” in images within the galleries on our mobile phones even if we haven’t labelled them.
  • Chatbots – Trained on vast amounts of written text, tools like OpenAI’s ChatGPT, Google’s Gemini and Microsoft’s Copilot work are able to generate answers to users’ questions and simulate conversations. They combine machine learning systems known as Large Language Models (LLMs) with generative AI, which are capable of producing text, images or videos in response to prompts.
  • Video and image generation – AI-powered video and image generators can create high-quality videos and imagery using just a few written prompts. While this has offered the potential for new forms of creative outlet, it has also raised concerns among artists, musicians, actors and others in the creative industries.
  • Autonomous vehicles – Navigating along busy roads, through traffic, past pedestrians and around cyclists is a complex task. Machine learning allows self-driving vehicles to analyse data from cameras and other sensors while combining it with the predictive power of AI so the onboard computer can make decisions and adapt to road conditions. This technology has the potential to make road transport safer and more efficient, but there are also important regulatory and societal changes that need to be considered.

Advanced machine learning systems require far more energy and processing power than conventional computer programmes. The International Energy Agency predicts the electricity consumption from data centres and artificial intelligence could reach more than 1,000TWh by 2026. Improving the efficiency of machine learning tools so they can run locally on individual devices or networks rather than requiring large data centres will be one important direction of travel in the future. 

As AI is inserted into decision making processes and used in scientific research, it will also require machine learning algorithms that are more explainable. This means overcoming the “black box” problem that many machine learning systems have – where it is not clear how or why they arrive at the answers they do. Using such a system in the legal system or in healthcare means users need to understand why an algorithm makes the prediction it does. Similarly, for any scientific research using an AI, it will be essential that an experiment is reproducible, which requires an understanding of how the AI arrives at its answers.

There is now also growing research in developing AI’s that work as an extension of human capabilities rather than a replacement. These would enable human-AI hybrid systems to solve problems that would otherwise be beyond both individually.