Active Learning Decision Tree

Machine Learning
Introduced by
Settles, B. (active learning framework); Breiman et al. (decision tree base)
Year
1984–2010
Type
Active learning with decision tree base learner
Family
Machine learning

What does it do?

Active learning with a decision tree pairs a tree classifier, typically a CART-style model, with a query strategy that selects the unlabeled instance the current tree is least certain about and asks an oracle for its label.

The tree is retrained after each new label and the cycle repeats. The method targets tabular classification problems in which labels, rather than unlabeled data, are the scarce resource.

The intuition behind the method

Labeling every training example can be expensive. Active learning addresses this by asking which unlabeled example, if labeled, would most improve the model. The decision tree supplies the uncertainty estimates used to answer that question: it outputs class probabilities for each unlabeled instance, and the instance with the most uncertain prediction is queried first. After each new label, the tree is refitted and the cycle repeats. The aim is to reach a given level of accuracy with fewer labels than random selection would need, although the size of the gain depends on how informative the uncertainty scores are for the data at hand. Because the base learner is a single tree, the final model remains readable as a set of splitting rules.

History

Decision tree induction is associated with Breiman et al.'s CART (1984). Quinlan's C4.5 is a widely used alternative that chooses splits by information gain ratio. The active learning framework was reviewed by Settles (2010), whose survey covers uncertainty sampling, query-by-committee and expected model change. The survey reviews existing query strategies rather than introducing query-based learning.

When to use it

Choose this approach when labeled data are scarce or costly to obtain, a large pool of unlabeled instances is available, the data are tabular, and an interpretable final classifier is wanted. Examples include medical record annotation, document classification and sensor-fault detection. Do not use it when all instances can be labeled cheaply, since passive learning is then simpler; when the labeled set is already large (hundreds or thousands of instances); or when retraining the tree after every query is too slow for the dataset size. When the feature space is very high-dimensional, a single tree may be a weak base learner, and other base models should be compared empirically rather than assumed to be better or worse.

Limitations and considerations

  • Each iteration refits the tree on the labeled set and rescores the whole unlabeled pool, so the cost grows with pool size and with the number of iterations.
  • Decision trees have high variance: with very few labels, the tree can change substantially when a single label is added, so early queries may be driven by an unstable model.
  • The accuracy ceiling may be lower than that of ensemble learners such as random forest or gradient boosting for the same label budget.
  • The method assumes the oracle is accurate; noisy labels feed back into later queries and can degrade the loop more than they would degrade a passive fit.
  • Uncertainty-driven queries can concentrate on outliers or a narrow region near the decision boundary, so early in the loop the method may perform worse than random selection. Queried training sets are also not random samples, so the learning curve should be compared with a random-sampling baseline under the same label budget rather than read in isolation.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Can reach a target accuracy with fewer labels than random selection when the uncertainty scores point to informative instances.
  • The base model is a tree, so the final classifier can be read as a set of splitting rules, which suits settings that require explanation.
  • Tree splits are threshold comparisons, so the base learner needs no feature scaling.
  • Entropy-based query scores are simple to compute from the class probabilities the tree already produces.
  • Validation accuracy recorded after each query gives a learning curve plotted against the number of labels used.

Applications

  • Medical image or record annotation where expert labeling time is limited.
  • Text classification with scarce labeled documents and a large unlabeled corpus.
  • Sensor and industrial fault detection with high annotation costs.
  • Ecological or remote-sensing datasets where field verification is expensive.
  • Fraud detection pipelines where only a small fraction of transactions can be manually reviewed.

How it works

How it works

1

A small set of labeled instances is drawn to seed the process, and the remaining instances form the unlabeled pool. The seed is usually chosen randomly or by stratified sampling, so that each expected class appears at least once before the active loop begins. Because the early tree is fitted to this seed alone, its composition strongly affects the first queries.

2

A decision tree is fitted to the current labeled set. CART chooses each split to minimise Gini impurity, with entropy as a common alternative criterion. C4.5 instead chooses splits by information gain ratio, an entropy-based measure, so Gini does not describe it. The fitted tree gives class-probability estimates for any unlabeled instance, typically from the class frequencies in the leaf that the instance reaches.

3

Each unlabeled instance is scored by an informativeness measure. The formula shown uses prediction entropy H(y-hat | x), the most common uncertainty score, and the instance with the largest entropy is queried. Margin sampling is a related alternative that uses the difference between the two largest class probabilities and queries the instance where that difference is smallest, so the argmax formula above does not describe it directly.

Formula
x^* = \arg\max_{x \in U} H(\hat{y} \mid x)
4

The selected instance is sent to an oracle, such as a human annotator or an automated labeling process, and its label is added to the labeled set. The unlabeled pool loses that instance. Because each queried label changes the next query, an incorrect label affects which instances are chosen afterwards, not only the final fit. The reliability of the oracle should therefore be checked, for example by re-annotating a sample.

5

The tree is refitted from scratch on the enlarged labeled set, and the query, score and label cycle repeats. Common stopping rules are a labeling budget, a minimum validation accuracy, or a maximum number of iterations. The stopping decision should rely on a validation set separate from the test set, and final performance should be reported on an independent test set.

Common pitfalls

  • Using the test set to guide query selection or stopping, which leaks information and inflates reported accuracy.
  • Not fixing the random seed, so the labeling order and results vary between runs and cannot be reproduced.
  • Using a seed set without class coverage: if the majority class dominates the seed, the tree may query mostly from that class.
  • Stopping the loop based on training accuracy, which a deep tree can drive upward by fitting the labeled set, instead of on an independent validation set.
  • Comparing the final active-learning accuracy with a fully supervised baseline without reporting how many labels the active loop used.

Frequently asked questions

Why use a decision tree instead of a more powerful model as the base learner?

Decision trees are fast to retrain at each iteration and produce probability estimates needed for uncertainty scoring. Their interpretability also matters in domains requiring explanation of the final model. For maximum accuracy, a random forest or gradient boosting active learner may be preferred at the cost of interpretability.

How many initial labeled examples do I need to start?

There is no standard minimum. Small seeds are common in practice. The seed should cover every class and be checked against validation data, because a seed that misses a class, or that leaves the tree with almost no splits, gives uninformative uncertainty scores.

Does the order of queries matter?

Yes. The query sequence is path-dependent: early queries shape what the tree learns and thus which subsequent examples look most uncertain. Different random seeds or initial labeled sets can lead to substantially different learning curves, so replicate experiments across seeds when comparing strategies.

When should I stop querying?

Define a labeling budget in advance, or monitor validation accuracy and stop when improvement per new label falls below a threshold. Never use the test set as the stopping criterion, as this constitutes data leakage.

Can I use this approach with multi-class problems?

Yes. Entropy-based uncertainty sampling generalises naturally to multiple classes. For heavily imbalanced multi-class settings, consider cost-sensitive or class-weighted decision trees and ensure the initial seed set covers all classes.

Related methods

Sources

  1. Settles, B. (2010). Active Learning Literature Survey. Computer Sciences Technical Report 1648, University of Wisconsin-Madison.

    Open publication reference
  2. Breiman, L., Friedman, J., Olshen, R., & Stone, C. (1984). Classification and Regression Trees. Wadsworth & Brooks.

    ISBN: 978-0-412-04841-8