By clicking "Accept", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. See our Privacy Policy for more information
Glossary
Online Learning
AI DEFINITION

Online Learning

Online learning is a machine learning technique where a model is updated continuously as new data arrives, instead of being retrained from scratch on the entire dataset.

Background
This approach is ideal for streaming data or rapidly changing environments. It contrasts with batch learning, where updates are performed after processing large chunks of data. Online learning algorithms include stochastic gradient descent (SGD) and adaptive filtering methods.

Examples

  • Fraud detection: updating models after each transaction.
  • Recommendation systems: adapting content based on recent user interactions.
  • Cybersecurity: evolving detection models to counter new threats in real time.

Strengths and challenges

  • ✅ Enables real-time adaptation.
  • ✅ Memory-efficient, since not all past data must be stored.
  • ❌ Sensitive to noisy data, leading to unstable updates.
  • ❌ More difficult to benchmark than static models.

A central concept in online learning is the trade-off between stability and plasticity. Stability ensures that the model retains useful knowledge from past data, while plasticity allows it to quickly adapt to new patterns. Achieving the right balance is crucial: a model that adapts too quickly may forget valuable long-term information (catastrophic forgetting), whereas a model that adapts too slowly may fail to respond to sudden changes.

Several algorithms have been designed specifically for online learning. Stochastic Gradient Descent (SGD) in its incremental form is a common approach, where model weights are updated with each incoming sample. More advanced methods, such as Online Passive-Aggressive algorithms or Adaptive Windowing techniques, dynamically adjust their learning strategies based on the data stream, ensuring both responsiveness and robustness.

Online learning also raises unique challenges in evaluation. Unlike batch learning, where metrics can be computed on a fixed test set, models trained online must often be assessed in a prequential (predictive sequential) manner: each new data point is first predicted, then used to update the model. This makes validation more complex but also more reflective of real-world conditions.

Finally, the use of online learning is expanding across domains. In autonomous driving, it enables vehicles to adapt to changing traffic conditions in real time. In personalized healthcare, wearable devices can feed continuous streams of patient data, allowing models to adapt recommendations instantly. These applications illustrate how online learning transforms machine learning from a static process into a dynamic, adaptive paradigm.

📚 Further Reading

  • Shalev-Shwartz, S. (2012). Online Learning and Online Convex Optimization.