Skip to main content
QUICK REVIEW

[Paper Review] modAL: A modular active learning framework for Python

Tivadar Danka, Péter Horváth|arXiv (Cornell University)|May 2, 2018
Machine Learning and AlgorithmsComputer Science26 citations
TL;DR

modAL is a modular, scikit-learn-compatible active learning framework for Python that enables rapid prototyping and extensibility of active learning pipelines. It supports diverse active learning strategies—including uncertainty sampling, query by committee, Bayesian optimization, and multilabel methods—through a clean, object-oriented design with full compatibility to scikit-learn APIs and extensive documentation.

ABSTRACT

modAL is a modular active learning framework for Python, aimed to make active learning research and practice simpler. Its distinguishing features are (i) clear and modular object oriented design (ii) full compatibility with scikit-learn models and workflows. These features make fast prototyping and easy extensibility possible, aiding the development of real-life active learning pipelines and novel algorithms as well. modAL is fully open source, hosted on GitHub at https://github.com/cosmic-cortex/modAL. To assure code quality, extensive unit tests are provided and continuous integration is applied. In addition, a detailed documentation with several tutorials are also available for ease of use. The framework is available in PyPI and distributed under the MIT license.

Motivation & Objective

  • To simplify the implementation and prototyping of active learning workflows in Python.
  • To ensure full compatibility with scikit-learn’s estimator API for seamless integration into existing ML pipelines.
  • To enable researchers to easily implement and test novel active learning strategies with minimal code and no deep framework dependency.
  • To provide a highly extensible and modular architecture that supports both pool-based and stream-based active learning.
  • To offer comprehensive documentation, tutorials, and high test coverage to support both beginners and advanced users.

Proposed method

  • modAL uses the ActiveLearner class to encapsulate a scikit-learn estimator and a query strategy function, enabling modular combination of learning algorithms and query strategies.
  • Query strategies are implemented as standalone functions, allowing easy customization and extension without modifying internal class structures.
  • The framework supports multiple active learning paradigms, including uncertainty sampling (e.g., least confident, max margin), committee-based methods (e.g., query by committee, disagreement), and batch-mode sampling.
  • It includes specialized implementations for multilabel classification (e.g., MinConfidence, AvgConfidence), regression, and Bayesian optimization with probability of improvement, expected improvement, and upper confidence bound.
  • The framework leverages scikit-learn’s base estimator interface, ensuring compatibility with existing scikit-learn workflows and tools.
  • modAL provides the Committee and CommitteeRegressor classes for ensemble-based active learning, and BayesianOptimizer for hyperparameter tuning via Bayesian optimization.

Experimental results

Research questions

  • RQ1How can active learning workflows be designed to be modular, extensible, and compatible with the scikit-learn ecosystem?
  • RQ2What is the performance overhead of implementing novel query strategies in a modular framework compared to existing libraries?
  • RQ3To what extent can a unified, scikit-learn-compliant API simplify the development and comparison of active learning algorithms?
  • RQ4How does modAL’s modularity and extensibility compare to other active learning libraries in terms of usability and maintainability?
  • RQ5Can a well-documented, open-source framework with high test coverage accelerate research and practice in active learning?

Key findings

  • modAL achieves a runtime of 0.0087 seconds for least confident sampling and 0.0465 seconds for query by committee (QBC), outperforming acton and alp in these benchmarks.
  • modAL’s expected error reduction (EER) strategy takes 2.1255 seconds per 10 queries, which is comparable to libact’s 2.8436 seconds, indicating strong performance in complex query strategies.
  • The framework supports 14 active learning algorithms across classification, regression, and Bayesian optimization, with full compatibility to scikit-learn estimators.
  • modAL provides 98% code coverage with continuous integration and extensive unit testing, ensuring high code quality and reliability.
  • The framework is actively maintained, with detailed documentation and Jupyter notebook tutorials available on its official website.
  • modAL enables seamless integration into existing scikit-learn workflows, as all classes inherit from sklearn.base.BaseEstimator and follow the scikit-learn API.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.