Active Learning for AI: How Machines Learn to Learn

AI for healthcare
Reading Time: 10 minutes

*I frequently get asked questions about Data Science, so in the interest of helping as many people as possible, I’ve started this blog to answer those questions as simply as possible. This is a robust topic, and if you want a more in-depth discussion, please revisit my blog, where we will be going into greater depth at another time. 

Active learning is an innovative practice in the world of data that allows machines to learn on their own. It’s a different path from traditional, supervised machine learning algorithms that learn passively. Active learning is still a novel concept, but when implemented efficiently, it can transform the way you work with data. This blog will give you an overview to get started.

Active learning (AL) is a subset of machine learning that can iteratively build training sets and models in the realm of data. AL works to create informative examples for labeling data and then can learn and expand on that information on its own.

The program can then attempt to make predictions on the rest of the unlabeled data it’s presented with based on what it has previously learned. Then data science professionals, like machine learning engineers, evaluate the accuracy of the AL predictions and insights.

One of the big goals of using AL processes is to speed up a machine’s learning process. Active learning is still in its early stages, but there can be a great benefit to exploring how your AI machines learn to optimize their performance.

 

Table of Contents

What is Active Learning?

#1. Query-By-Committee

#2. Uncertainty Sampling

#3. Stream-Based Active Learning

How Does Active Learning Work?

Benefits of Active Learning in AI

#1. Improved Efficiency

#2. Reduced Data Requirements

#3. Reduced Costs

#4. Increased Accuracy

How Active Learning Can Be Used

#1. Image Classification

#2. Natural Language Processing

#3. Document Classification

#4. Computer Vision

Challenges of Active Learning

#1. Selecting the Right Data

#2. Biased Labeling

#3. Doesn’t Work in All Settings

Future of Active Learning in AI

Conclusion

 

What is Active Learning?

Active learning is a type of machine learning where the algorithm is trained on the most relevant data in a dataset. The intention is that by doing this, the program will be better equipped to handle data than other, more traditional machine learning methods.

Traditional methods typically involve gathering massive amounts of data and then training the machine to sort and make predictions based on that large dataset. This more time-consuming process is known as passive learning.

By definition, active learning is the exact opposite of passive learning. With active learning, the machine is participating in its learning process, making decisions on what data is useful all on its own and making predictions that can be evaluated by data scientists. Active learning also eliminates the need for thousands of person-hours — which can be expensive — sifting through large complex datasets. Instead, it’s all done by machine.

The machine can also ask for more examples of specific types of data to further enhance its training and knowledge base. Active learning methods essentially create a sort of feedback loop, allowing the learning process to be more cyclical rather than the stagnant, linear nature of more traditional methods.

Active learning is a broad concept, though, and there are several different types of active learning algorithms, each with its own functions and features, including:

  • Query-by-Committee
  • Uncertainty Sampling
  • Stream-Based Active Learning

#1. Query-By-Committee

With the query-by-committee approach, you maintain a committee of active learning models — like a committee of people — that are all trained on the labeled dataset. Each model has a competing hypothesis, and when a new query comes in looking to be labeled, each model gives a vote on how to label each query.

#2. Uncertainty Sampling

On a base level, with uncertainty sampling, the algorithm randomly selects a small number of instances from the provided dataset and labels them. Once labeled, the algorithm uses those instances to train the model to make better predictions with confidence.

If a model is uncertain — or has low confidence — human feedback can help get the model back on track. There are several different approaches to querying instances, but uncertainty sampling is one of the most popular query strategy approaches in active learning.

#3. Stream-Based Active Learning

With stream-based sampling, each unlabeled data point is examined individually based on the set query parameters. The model — or learner – then decides for itself whether to assign a label or not. This type of sampling could prove to be a disadvantage, though, as its performance isn’t as streamlined as others.

How Does Active Learning Work?

Active learning can work in different ways depending on the type used, like stream-based sampling, for example. But in general, labeled data is acquired and used to train the model to identify and label data on its own.

After some time, you will revisit the model for insights to see if there are any other labeled data pieces that may be useful to its learning process. The need for extra examples comes about when the model expresses uncertainty in the predictions it makes.

This is where the “human-in-the-loop” feature comes into play because a human will label those extra data examples. The newly labeled examples are then sent back to the model to continue its training. Examples can come from processes like De Novo Generation or stream and pool sampling, depending on method preference and the type of data you’re working with.

There are also different techniques a data science professional can use when implementing AL practices.

For example, there’s Bayesian optimization which is used for the hyperparameter tuning process common in the machine learning field. Hyperparameters are values that are chosen before a learning algorithm is trained. These values are very important because they impact how well the learning model will perform. Bayesian optimization is most used when objectives are expensive to evaluate, like with hyperparameter tuning.

Another AL technique is reinforcement learning, which is one of the three basic machine learning approaches, along with supervised and unsupervised learning. Reinforcement learning allows the model to learn more interactively through trial and error. There is both passive and active reinforcement learning. With passive, the model operates on a fixed policy and is told what to do, while active models must decide on their own, forcing it to learn, with the good outputs being rewarded or reinforced.

Regardless of the AL technique you choose to work with, active learning algorithms are designed to improve and evolve over time. When the model identifies uncertainties when labeling raw data, a human steps in to correct errors and provide new learning examples to continue training the model, and this is repeated over and over until the model reaches peak accuracy.

Benefits of Active Learning in AI

There are several benefits to implementing active learning strategies in your machine learning practices, some of which include:

  • Improved Efficiency
  • Reduced Data Requirements
  • Reduced Costs
  • Increased Accuracy

#1. Improved Efficiency

One of the biggest advantages of AL is increased efficiency. With traditional, passive learning models, data scientists must manually label each example in the dataset. This can be very time-consuming, especially when working with large datasets.

AL streamlines this process by solely focusing on data points that will yield the best outputs. At the same time, the data scientists who are providing the model with examples to label have less to label themselves. Using active learning can not only reduce workload and improve efficiency but can also shorten project timelines, allowing data scientists to spend time on other projects.

#2. Reduced Data Requirements

Active learning also has minimal data requirements, reducing the high amounts of data typically needed when building machine learning models. AL models need fewer training examples and less organization when it comes to larger datasets, meaning it’s fine to use unstructured, unlabeled data to train an AI system.

These reduced data requirements can be especially useful in fields like medicine, where datasets are often fragmented. With active learning models, fragmented data isn’t an issue because the model won’t be using all the data in each dataset. Instead, it focuses on the higher-quality points.

#3. Reduced Costs

Active learning’s increased efficiency goes hand-in-hand with reducing costs. Simply put, because active learning models greatly reduce the workload required with data labeling, there are lower employee-related costs, namely payroll.

#4. Increased Accuracy

Active learning models can also be beneficial in increasing accuracy, in a lot of cases being more accurate than traditional, passive models. Commonly in the data science field, people are told that the more data you have, the better. While that holds in a lot of cases, it can be easy to forget about the quality of your data when you’re hung up on the quantity.

Because AL models have minimal data requirements and focus more on quality data points, they generate more accurate insights. Plus, AL models can learn and evolve quickly, adapting to new information and situations over time.

How Active Learning Can Be Used

Understanding how active learning works and what benefits it could have on your operations is valuable information, but it could be even more beneficial to see some of the real-world applications of active learning like:

  • Image Classification
  • Natural Language Processing
  • Document Classification
  • Computer Vision

#1. Image Classification

Active learning can be trained to recognize, identify and then classify or label photos. Training is similar to that of labeling data, where you provide the model with image examples, and it learns from them. This can be a useful tool when searching for images in a library, like on your phone or computer. In fact, Google released an image classification function years ago, proving that AI and machine learning can classify information up to the level of a human.

#2. Natural Language Processing

Natural language processing (NLP) is one of the most common use cases for active learning. NLP is a branch of AI that can comprehend human language — in text and spoken word — like the way humans can. You can train AL models to recognize language and complete tasks like text completion, voice-to-text, and voice-controlled AI like Siri and Alexa.

#3. Document Classification

Much like classifying images, active learning can also be used to classify documents. You can train a model to assign classes based on predefined labels. The model is taught to sort documents depending on what they are, like marketing documents, legal documents, tax documents, and so on.

#4. Computer Vision

Computer vision is a field of AI that allows computers to pull meaningful information from visual inputs like images and videos and then make recommendations based on the information the system gathers. It’s essentially a computer’s ability to observe and understand information.

You can think of computer vision like human vision, except that these machines are trained to complete these tasks and that training is all active learning. As a field, computer vision encompasses uses like image and document classification and NLP, as well as other methods like object detection and image restoration.

Challenges of Active Learning

Active learning can be a very valuable data science tool to implement that can have numerous benefits on your operations. However, AL is still somewhat of a novel concept and can present several challenges:

  • Selecting the Right Data
  • Biased Labeling
  • Doesn’t Work in All Settings

#1. Selecting the Right Data

Generally, when it comes to training an active learning model, the data you present should be focused more on quality rather than quantity. Before you even start training the model, you need to do some data preparation.

Active learning — and machine learning in general — relies heavily on data, and no dataset is perfect. That’s why it’s important to have a skilled data scientist on hand to prep the data before it’s presented to the model for training. This can be a difficult, time-consuming process — especially if you don’t have a data scientist for the job — but without this step and the right data, you won’t be setting your model up to succeed.

#2. Biased Labeling

If it’s your first time implementing an active learning strategy and you’re worried about generating biases, you’re not alone. At the start of the training process — and even in the middle, when the human-in-the-loop function provides more labeled examples for the model — there could be room for bias to trickle into the datasets.

Random sampling is one of the best ways to remedy this. With random sampling, the queried data is chosen at random with zero human influence, thus presenting a true representation of the data and eliminating biases. Generally, AL can be used to make the most effective use of data and avoid bias, but it’s important to be aware of the potential for biases at any point that humans are involved.

#3. Doesn’t Work in All Settings

There are a lot of instances where active learning works and offers a lot of value, but there are also a lot of instances where that isn’t the case. For example, if your data doesn’t hold the information your AL model needs to provide accurate insights, it won’t work. Implementing an AL strategy isn’t a magical fix for bad data.

That said, if the data you present in the AL model is either too small or lacks important information for its training, the model can let you know when you review its learning curve. This allows you to make changes to your data and try again, but it can also let you know whether active learning applies to your organization or not.

Future of Active Learning in AI

Deep learning methods, like active learning, can offer several benefits to the future of AI, though it’s still being researched and tried in various settings to see exactly how beneficial it can be, as well as what it’s capable of.

The lack of quality, labeled data is what causes most bottleneck effects and restrictions in the deep learning field, and AL is presented as the solution to that problem.  By combining other machine learning algorithms with the human-in-the-loop approach, AL is already positioning itself as a viable alternative to fully supervised machine learning, especially when dealing with large datasets.

Though it’s still early, AL could be a vital piece of the future of AI. There are already researchers and data professionals working on designing active learning methods that build upon their predecessors in hopes of creating widely applicable models.

Conclusion

Active learning is a subset of machine learning that provides a framework for iteratively building both training sets and models in the realm of data. AL works to create examples for labeling data and can learn and expand on that information by itself. AL is an innovative deviation from the traditional, passive machine learning methods we’re most familiar with.

Active learning is still in its early stages, but when implemented efficiently, it could help to speed up a machine’s learning process and optimize its performance, reimagining the way we work with both data and the evolving digital world.

 

Tiffany Perkins-Munn

About the Author

Tiffany Perkins-Munn orchestrates aggressive strategies to identify objectives, expose patterns, and implement game-changing solutions with agility that transcends traditional marketing. As the Head of Data and Analytics for the innovative CDAO organization at J.P. Morgan Chase, her knack involves unraveling complex business problems through operational enhancements, augmented financials, and intuitive recruiting. After over two decades in the industry, she consistently forges robust relationships across the corporate spectrum, becoming one of the Top 10 Finalists in the Merrill Lynch Global Markets Innovation Program.

Dr. Perkins-Munn earned her Ph.D. in Social-Personality Psychology with an interdisciplinary focus on Advanced Quantitative Methods. Her insights are the subject of countless lectures on psychology, statistics, and real-world applications. As a published author, coursework developer, and Dissertation Committee Chair, Tiffany still finds time for family and hobbies. Her non-linear career path has given her an exclusive skill set that is virtually impossible to reproduce in another individual.

Leave a Reply

Your email address will not be published. Required fields are marked *