Online Voting Ensemble

Machine Learning
Introduced by
Oza, N. C. & Russell, S.; extended by Bifet et al.
Year
2001–2009
Type
Online ensemble (incremental majority vote)
Family
Machine learning

What does it do?

Online Voting Ensemble is an incremental ensemble for data streams.

It keeps a fixed pool of base classifiers, each updated as labelled observations arrive, and predicts by a weighted vote whose weights track recent member performance. Because past data is not stored, it suits sequential classification in which the data distribution may change over time.

The intuition behind the method

Think of a panel of advisers who each learn from the same stream of observations, but who may start from different initial conditions and see the data in different orders. Each adviser updates as new labelled cases arrive, and the panel's answer is the weighted vote of its members, with more weight given to advisers who have recently been accurate. When the underlying process changes, advisers whose accuracy falls lose influence, and a drift detector can replace the weakest one with a freshly initialised learner. Errors that are specific to individual members tend to cancel in the vote, which is the main reason to use a pool rather than a single model.

History

The incremental bagging idea on which this approach builds is Oza and Russell's online bagging and boosting (2001), which uses Poisson-weighted resampling of arriving observations to approximate batch bootstrapping. Bifet et al. (2009) proposed ADWIN Bagging and Adaptive-Size Hoeffding Tree (ASHT) Bagging for evolving data streams and evaluated them on synthetic and real-world datasets of up to ten million examples. The name 'Online Voting Ensemble' is a descriptive label for incremental majority-vote ensembles of this kind and does not refer to a single originating method.

When to use it

Choose this method when observations arrive as a continuous, ordered stream and storing the full dataset or retraining in batch is impractical. It is a reasonable choice when the data-generating process may change over time and labels become available soon after prediction, because weight adaptation depends on that feedback. The approach works best when three conditions hold: labels arrive promptly or with a known delay; the members are sufficiently diverse that their errors do not coincide; and any change in the stream is gradual enough for the weights and any drift detector to track it. If labels are delayed by an unknown amount, the weights may lag behind the current regime; if members are near-identical, the vote behaves like a single model; if change is abrupt, the weights may take some time to reflect it. If the complete dataset is already available and the distribution is stationary, a batch ensemble is a natural baseline to compare against, and the relative accuracy should be checked empirically on the data at hand. Also avoid the method when labels are long-delayed or absent, as the weights then cannot be updated, or when individual decisions must be explained, because a vote over many evolving members is hard to inspect.

Limitations and considerations

  • Depends on timely labels: weights are computed from feedback, so long label latency delays adaptation and can leave the weights reflecting an outdated regime.
  • Pool size, weighting window, decay rate and drift-detector sensitivity all affect results and usually have to be tuned on earlier portions of the stream.
  • When the distribution is stable and the full dataset is available, a batch ensemble trained on that dataset is a natural baseline; the relative accuracy depends on the data and should be checked empirically.
  • Drift detectors add computational overhead and may raise false alarms on noisy segments, causing unnecessary member resets.

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

Strengths

  • Single-pass processing: each observation is used for updating and then discarded, so memory does not grow with the length of the stream.
  • Adapts to change through weight updates and optional member replacement, without retraining the whole pool.
  • Averaging over members reduces the influence of errors specific to any one learner, as in other voting ensembles.
  • Any base learner that supports incremental updates can be used, such as decision trees, perceptrons or Naive Bayes classifiers.
  • Predictions are available at every step, so the model can be queried while the stream continues.

Applications

  • Illustrative: real-time fraud detection on transactional data streams where patterns evolve over time.
  • Illustrative: network intrusion detection in high-throughput environments requiring low-latency decisions.
  • Illustrative: predictive maintenance using sensor streams from industrial equipment subject to gradual degradation.
  • Illustrative: click-through rate prediction in advertising where user behaviour drifts seasonally.
  • Illustrative: medical alert systems processing continuous patient monitoring signals.
  • Illustrative: text stream classification where language use and topic distributions shift over months.

How it works

How it works

1

A pool of K base classifiers is created at the start. Members need to differ from one another to be useful: diversity can come from different random initialisations, random feature subsets, or training each member on a different initial part of the stream. If the members make nearly identical predictions, the vote adds little beyond a single model.

2

Each arriving observation (or mini-batch) is passed to every member, which updates its parameters or statistics without access to earlier data. Examples mentioned for this step are online gradient steps for neural models and Poisson-weighted resampling for tree-based members, as in online bagging. Because past observations are discarded, memory use does not grow with the length of the stream.

3

For a new instance x, each member h_k proposes a class, and the ensemble returns the class c with the largest total weight w_k, as in the formula above. With equal weights the rule reduces to an unweighted vote in which the most-predicted class wins. Weights are often derived from recent performance, such as accuracy, kappa or AUC on a sliding window, but the choice of metric is a design decision that the formula does not fix. Normalising the weights (for example, dividing by their sum) does not change the winning class, because the same positive scaling applies to every class. Ties must be resolved by a fixed rule, such as the lowest class index or the member with the highest weight, and that rule should be stated in the implementation being used.

Formula
\hat{y} = \arg\max_c \sum_{k=1}^{K} w_k \, \mathbf{1}[h_k(x)=c]
4

After the true label is revealed, each member's weight is adjusted according to whether it was correct, so that recent accuracy has more influence. One common design is an exponentially decayed accuracy: the weight is updated as a blend of its previous value and a 0/1 indicator of whether the member's latest prediction was correct, with a decay factor between 0 and 1 controlling how quickly older evidence is forgotten. Other designs use a fixed sliding window, or prune members whose performance falls behind the rest of the ensemble, as in the ADWIN Bagging variant of Bifet et al. (2009). The update rule, decay factor and window length are design choices to be set and checked in the implementation being used.

5

An optional detector such as ADWIN, DDM or EDDM monitors error signals from the ensemble or its members. When it signals change, the weakest member can be reset or replaced by a freshly initialised learner, so the ensemble can recover without retraining every member. Detectors can also fire on noisy segments, so their sensitivity needs to be checked on the data at hand.

Common pitfalls

  • Evaluating with batch cross-validation, which assumes independent samples and ignores stream order; prequential (test-then-train) evaluation is the usual alternative.
  • Keeping weights fixed after deployment, so the vote continues to favour members that were accurate before a change.
  • Using near-identical members (same data order, same seed, same features), so the vote behaves like a single model.
  • Updating weights without accounting for label delay, which can make the estimated accuracy look better than it is.
  • Reporting overall accuracy only, which can hide poor recall on rare classes or on classes affected by drift.

Frequently asked questions

How should I evaluate an online voting ensemble?

Use prequential (interleaved test-then-train) evaluation: for each arriving instance, predict first, then update the members and record the error. This follows the temporal order of the stream and gives a more realistic picture than batch methods. Batch k-fold cross-validation assumes independent samples and ignores that order, so it can give misleading estimates here.

How many base classifiers should I use?

There is no fixed answer; choose the pool size by comparing prequential accuracy and prediction cost on an early part of the stream. Each member must predict for every query, so adding members increases prediction time, and the gain from extra members should be weighed against that cost.

What base classifiers work best?

One option is incremental decision trees such as Hoeffding-tree variants, which are designed for streams; Naive Bayes and online perceptrons are other options. Mixing learner types can add diversity, but it makes weights harder to compare, because members with different inductive biases may respond to drift in different ways.

When should I enable drift detection?

Enable it when the data-generating process is known or suspected to change over time, such as user behaviour or sensor readings from ageing equipment. If the stream is believed to be stationary, detection adds overhead and may reset members because of noise.

How does this differ from a standard (batch) Voting Ensemble?

A batch Voting Ensemble is trained once on a fixed dataset and makes static predictions. An Online Voting Ensemble updates each member as new data arrives, adapts weights based on recent performance, and can respond to concept drift. These capabilities depend on prequential evaluation and drift-aware weighting.

Related methods

Sources

  1. Oza, N. C., & Russell, S. (2001). Online bagging and boosting. In Proceedings of the Eighth International Workshop on Artificial Intelligence and Statistics (AISTATS 2001), pp. 229–236.

    Open publication reference
  2. Bifet, A., Holmes, G., Pfahringer, B., Kirkby, R., & Gavaldà, R. (2009). New ensemble methods for evolving data streams. In Proceedings of the 15th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 139–148.

    Open DOI reference