AWS Marketplace

Use active learning to build a usable machine learning model faster

Many businesses are now adopting machine learning (ML) as a mainstream method of augmenting processes and building efficient systems. You can use active learning to get to an acceptable and working version of your ML model much faster. This post is a summary of the joint webinar with Mphasis and AWS Marketplace, Want to build a usable Machine Learning model faster? Use Active Learning!

Benefits and drawbacks of supervised machine learning models

There are three main types of machine learning methods, namely supervised, unsupervised, and reinforcement learning. Among the three types of machine learning, supervised methods have found the maximum amount of enterprise adoption. The main reason behind this fact is that supervised methods embed human knowledge in the form of training data, which is used to guide or supervise the algorithm to learn the actions taken or decisions made by humans. Supervised methods are closest to replicating human intelligence.

However, supervised models have a longer development lifecycle due to heavy dependency on annotated or tagged data availability. Data tagging or annotation is an exercise that requires a human being to label various data points in a dataset. Consider the scenario of sentiment analysis where the sentiment of a sentence must be analyzed.  Take the example, “I was extremely happy with the arrangements for the party.” As a human, we know that this sentence contains a positive sentiment and would be given a positive tag. In order to train an ML model to identify such sentiments, you must supply it with historical data of such input sentences with their respective output tags, that is, positive, negative, mixed, or neutral. By nature, tagging is a mundane, time-consuming, and effort-intensive exercise, and like any manual task, it is prone to human errors. Also, you need a large dataset of tagged data to get a high-performing ML model. Because of this, collecting such tagged data that can be used to train ML models becomes a roadblock for many organizations seeking to adopt ML and in deciding where to get started.

In this post, I will explain how to use active learning methods to address this data concern of collecting annotated and tagged data for supervised learning. The end result is to more quickly adopt ML methods to solve mainstream business problems. Active learning in the context of machine learning means that an ML model acts as the “learner” and actively engages and interacts with the human, who is the “teacher,” with the objective of learning faster and better.

How active learning works

In the following diagram, you start with a corpus of unlabeled data points and pass them as input to an active learning module. Consider the active learning module as an opaque box that helps you select and prioritize data points from a pool of unlabeled data points. These shortlisted data points are prioritized to be sent to a human annotator for labeling with their respective output tags. Once labeled, these datapoints act as the first sample of data used to train an ML algorithm. The output of an ML algorithm built this way is evaluated for its performance.

For example, if you are building a classifier model, you can measure the confidence level of the predictions by the algorithm and collect the data points where your model is uncertain and gives a low confidence score. Such data points, where the model is uncertain of its predictions, are proactively sampled by the algorithm and iteratively sent to the annotator to label next. Therefore, active learning is an iterative process where the algorithm actively engages and provides the annotator with the next sample it wants to learn from. Refer to the following diagram.

Three sampling techniques for active learning

Active learning methods can be bucketed into three main categories of sampling techniques: diversity sampling, uncertainty sampling, and transfer learning. It is interesting to note that these methods can be adopted at various stages of your ML lifecycle. If you are starting to build an ML model and have massive amounts of unlabeled data that you don’t know how to start labeling, you can start with diversity sampling to shortlist a diverse and representative sample to be labeled first. However, if you already have a working model but intend to improve it further, it is preferred to start with uncertainty sampling techniques. Depending on where you are in your model development lifecycle and the use case, choose the method that is best for you.

While you can achieve similar model performance even without using active learning methods, it is important to note that active learning accelerates your ML model development lifecycle by:

  1. Helping to get to a working version of your ML model much faster.
  2. Tagging a lower amount of data using targeted sampling techniques.
  3. Saving a significant amount of staffing, effort, and time.
  4. Getting started in your ML journey even if you have a small sample dataset to start with and your business collects more data over time, due to its iterative nature.

Next steps

To try out active learning in practice, you can subscribe to Mphasis’ Active Learning for Text Classification listing in AWS Marketplace for machine learning. The listing will help you identify the best sample from a set of unlabeled data points that can be provided to a human annotator first. Also, if you want to get deeper into the topic, please refer to the Mphasis white paper Active Learning for Building and Maintaining High Performing Machine Learning Models.

Disclaimer

The content and opinions in this post are those of the third-party author and AWS is not responsible for the content or accuracy of this post.

About the Author

Vibha Bhagchandani is Associate Vice President for AI & Cognitive Solutions at Mphasis NEXT Labs. Vibha is responsible for solution design and implementation of client-focused cognitive projects. She leads data science teams that deliver cognitive solutions built on cloud platforms and enable clients in their AI journey. She has been actively involved in the research, development, and delivery of product development initiatives focused on natural language processing (NLP) for some of Mphasis’s premier clients. She is an enthusiastic salsa dancer and a foodie who loves trying world cuisine and experimenting with recipes in her spare time.