- Introduced by
- Lewis, D. D. & Gale, W. A.; Settles, B. (survey)
- Year
- 1994–2010
- Type
- Active learning framework with logistic regression base learner
- Family
- Machine learning
What does it do?
Active Learning with Logistic Regression is an iterative, label-efficient framework in which a logistic regression model selects the unlabeled examples it is most uncertain about, an oracle (typically a human annotator) labels them, and the model is retrained.
The loop repeats until the labeling budget is exhausted, the held-out accuracy target is reached, or performance plateaus. Its aim is to reach useful accuracy with fewer labels than would be needed by labeling a random sample.
The intuition behind the method
Labeling data is expensive, and annotating a random sample can spend effort on examples the model already handles well. Instead, the logistic model points to the examples whose predicted probability is closest to 0.5, where it is least able to decide. An expert labels only those cases and the model is retrained, so each new label is chosen to be informative. Logistic regression is a simple linear model with a probabilistic output, so its uncertainty scores are easy to compute and inspect, although they are not guaranteed to be well calibrated.
History
Active learning as a research framework has roots in the 1990s. Lewis and Gale (1994) proposed a sequential algorithm for training text classifiers. Settles (2010) provides a literature survey of active learning and its query strategies. In the pool-based setting described on this page, logistic regression's linear model and probabilistic output make uncertainty scores straightforward to compute.
When to use it
Consider active learning with logistic regression when labels are costly (for example medical records, legal documents or specialist surveys), unlabeled data is plentiful, and the labeling budget is limited. It is a reasonable fit for binary or multi-class text classification and similar tasks where the classes are approximately linearly separable in the chosen features. Avoid it when the decision boundary is strongly nonlinear and feature engineering cannot make it linear, when the oracle is unreliable or costly to query repeatedly, when a fully labeled training set is already available, or when the unlabeled pool is too small for selective querying to matter.
Limitations and considerations
- Performance suffers when the true decision boundary is nonlinear; in such cases a kernel SVM or neural active learner may be preferable.
- Uncertainty sampling can produce a labeled set that over-represents borderline instances and under-represents the bulk of each class.
- Each query needs an oracle response, so the loop adds logistical overhead compared with labeling a single batch.
- The seed set shapes the first queries, so a poorly chosen seed can slow convergence.
- The method assumes the oracle's labels are correct; annotation errors enter every retraining round and can steer later queries.
- Accuracy estimates describe the target population only if the held-out evaluation set is drawn independently and identically distributed from it; the actively queried labels are not a random sample.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Can reduce the number of labels needed to reach a target accuracy compared with random sampling, as judged on a fixed held-out set.
- Outputs probabilities through a logistic link, which provide a convenient basis for uncertainty scores; calibration should still be checked.
- Simple to inspect: the linear weights and the least-confidence criterion can both be examined directly.
- Retraining after each query is computationally cheap, which suits near-real-time annotation workflows.
- Works with the sparse bag-of-words or TF-IDF representations common in text classification.
Applications
- Text classification and sentiment analysis with limited labeled corpora.
- Medical record coding and clinical NLP where expert annotation is expensive.
- Active annotation pipelines for social science surveys and content moderation.
- Information retrieval relevance feedback where users label only uncertain documents.
- Biomedical entity recognition bootstrapping with minimal seed annotations.
How it works
How it works
A small seed set of labeled examples is assembled. It must contain examples of every class, and its class balance should be checked, since an unrepresentative seed gives a poor early boundary. The appropriate seed size depends on the task and the number of classes, and is judged by held-out performance. A logistic regression model is trained on this seed set to establish an initial decision boundary. The remaining unlabeled instances form the pool from which queries will be drawn.
Logistic regression fits a linear decision boundary by maximizing the log-likelihood of the labeled set, and gives P(y=1|x) = sigmoid(w^T x) for each instance. Its predicted probabilities are a natural basis for uncertainty scores, but a logistic link does not guarantee calibration, so the reliability of the scores should be checked on held-out data before they drive queries.
Formula
P(y=1 \mid x) = \sigma(\mathbf{w}^\top x)Each unlabeled instance in the pool is scored by an uncertainty criterion. The most common is least-confidence sampling: the model selects the instance whose maximum class probability is lowest (i.e., the model is least sure). For binary problems this reduces to selecting points nearest the decision boundary (predicted probability closest to 0.5).
Formula
x^* = \arg\min_{x \in U} \max_y P(y \mid x, \hat{\theta})The most uncertain instance (or a batch of the top-k most uncertain instances) is presented to a human annotator or oracle for labeling. The oracle provides the true class label, which is added to the labeled training set. A fixed labeling budget determines how many queries the loop is allowed to make.
The logistic regression model is retrained on the expanded labeled set. Performance is evaluated on a held-out validation set. If the budget is not exhausted, the accuracy target has not been met and performance is still improving, the loop returns to the uncertainty scoring step. The loop stops when the labeling budget is exhausted, or when the held-out accuracy target is reached or performance plateaus.
Common pitfalls
- Evaluating performance only on the actively selected labeled set rather than a separate i.i.d. held-out set, which inflates accuracy estimates.
- An imbalanced seed set can give a poorly estimated early boundary, which then steers the queries that follow; class counts should be tracked across rounds.
- Applying uncertainty sampling to a pool with distributional shift between labeled and unlabeled data without density weighting or representativeness correction.
- Treating the final model as a standard logistic regression without accounting for the biased sampling when reporting confidence intervals or hypothesis tests.
Frequently asked questions
Why use logistic regression instead of a more powerful model?
Logistic regression gives probabilities from a simple linear model, is quick to retrain after each query, and is easy to inspect. These properties matter in loops where the model is updated many times and its uncertainty scores must be checked. Calibration is not guaranteed, so it should be verified. More complex models can be used, but they increase retraining cost and may need separate probability calibration (for example Platt scaling for SVMs).
How many seed labels do I need to start?
There is no universal seed size; it depends on the task and the number of classes. The seed must include examples of every class and should be checked for class balance. Too few seeds produce an unstable initial model whose uncertainty estimates are unreliable; too many reduce the benefit of active learning. Judge the seed size by held-out performance.
What is the difference between uncertainty sampling and query by committee?
Uncertainty sampling uses a single model's prediction confidence to select queries. Query by committee trains a committee of models and selects points where they disagree most. For logistic regression, uncertainty sampling (least confidence or entropy) is more common because it needs only one model.
Can I use batch queries instead of one at a time?
Yes. Batch-mode active learning selects the top-k most uncertain instances per round, which reduces how often the oracle must be consulted. The trade-off is that each batch is chosen with a model that has not yet seen the labels from the same round, so larger batches make each query somewhat less informed. The batch size is chosen per application.
How do I evaluate the active learning curve?
Plot classification accuracy (or F1, AUC) on a fixed held-out test set as a function of the number of labels queried. Compare this curve to a random-sampling baseline. The area under the learning curve relative to random sampling quantifies the labeling efficiency gain.
Related methods
Sources
Settles, B. (2010). Active Learning Literature Survey. Computer Sciences Technical Report 1648, University of Wisconsin–Madison.
Open publication referenceLewis, D. D., & Gale, W. A. (1994). A sequential algorithm for training text classifiers. Proceedings of the 17th Annual International ACM SIGIR Conference on Research and Development in Information Retrieval, 3–12.
Open DOI reference