Learning the Experts for Online Sequence Prediction

Elad Eban, Aharon Birnbaum, Shai Shalev-Shwartz, Amir GlobersonICML 2012

Predicting the next item in a sequence—such as a stock price movement or a user's next web click—is a classic machine learning challenge. Traditionally, this problem is tackled using one of two approaches:

  1. Universal Predictors: These models start with no prior knowledge and learn the structure of a sequence as it unfolds. While powerful, they are "slow starters" that require very long sequences to achieve high accuracy.
  2. Expert Advice Models: These rely on a pre-defined pool of "experts" and quickly learn which one to trust. They adapt fast but require a hand-crafted library of good experts, which is rarely available in real-world scenarios.

This creates a significant "short sequence" gap. In many applications, like web browsing, user sessions are too short for universal predictors to learn effectively, yet we lack the domain knowledge to pre-define expert models. To bridge this gap, researchers introduce LEX (Learning Experts), an algorithm designed to learn a diverse pool of experts from historical data to improve online sequence prediction.

The LEX Algorithm: Collaborative Sequence Prediction

The core insight behind LEX is that sequences from different users or sessions often share underlying behavioral "types." By learning a pool of experts, the algorithm essentially performs clustering in the space of temporal dynamics.

Instead of optimizing for a single "average" model, LEX seeks to find a set of $r$ experts that minimize "hindsight loss." It looks for a small team of experts such that, for any given sequence in the training set, at least one member of the team would have predicted it well.

To achieve this, LEX employs:

  • Bounded Norm Context Trees: The experts are built using a sophisticated version of a Prediction Suffix Tree (PST). To prevent overfitting on long, rare histories, a "bounded norm" constraint mathematically penalizes deeper nodes in the tree. This forces the model to prefer shorter, more reliable patterns unless there is overwhelming evidence for a long-range dependency.
  • Alternating Optimization: The model is trained by alternating between two steps: first, assigning each training sequence to the current expert that performs best on it; second, using Stochastic Gradient Descent (SGD) to update the parameters of each expert based on its assigned sequences.

Experimental Results

The researchers evaluated LEX on both synthetic and real-world datasets, focusing on how quickly the models could achieve high accuracy with limited training data.

Rapid Adaptation on Synthetic Data

In a controlled environment where sequences were generated from two distinct temporal patterns, LEX successfully discovered and specialized its experts.

Accuracy on synthetic data showing LEX reaching peak performance rapidly.

As shown above, LEX reached its peak accuracy (approximately 0.5) after seeing only 50 sequences. In stark contrast, a single-expert model (1-LEX) and a Latent Markov Model (LMM) required significantly more data to approach similar performance levels, while a standard Online PST failed to adapt.

Superiority in Real-World Click Prediction

The algorithm was also tested on real-world browsing logs from an intranet site, featuring 2,000 sequences of URLs in a challenging, high-sparsity environment.

Accuracy on real-world web click data demonstrating LEX's sample efficiency.

LEX consistently outperformed all baselines on the web click task. The performance gap is particularly dramatic when the training set is small (e.g., under 100 samples). This sample efficiency suggests that LEX is highly effective at extracting prior knowledge from limited historical data to jump-start predictions on new, short sequences.

Limitations and Future Directions

While LEX offers a robust solution for short sequence prediction, the authors note a few areas for future improvement:

  • Unstructured State Space: The current model treats every item (e.g., every URL) as an independent entity. Incorporating structural metadata, such as item categories, could further enhance performance.
  • Task Variety: Currently focused on multiclass prediction (predicting the exact next item), the framework could be extended to binary classification or ranking tasks.
  • Computational Scaling: Although SGD makes individual expert updates efficient, the alternating optimization approach may face scaling challenges as the number of experts and the size of the training set grow to massive proportions.

Summary updated

BibTeX
@inproceedings{eban2012learning,
  author = {Elad Eban and Aharon Birnbaum and Shai Shalev-Shwartz and Amir Globerson},
  title = {{Learning the Experts for Online Sequence Prediction}},
  booktitle = {International Conference on Machine Learning},
  year = {2012},
  url = {https://openreview.net/forum?id=S1NxE3WO-S},
}
Figure