Online Learning
Learn how online learning enables incremental model updates, adapts to concept drift, and supports safer computer vision workflows with Ultralytics YOLO26.
Online learning is a machine learning approach in which a model updates incrementally as new examples arrive, rather than training once on a fixed dataset. The term refers to streaming or sequential model updates—not internet-based education. An online learner can predict, receive feedback, and update after each sample or small batch, as described by the scikit-learn online learning definition. This makes it useful when data is continuous, too large for memory, or changes over time. (scikit-learn.org)
Link to this sectionHow Online Learning Works#
A typical cycle is:
- The model receives new input and makes a prediction.
- A label or feedback signal becomes available.
- The loss is calculated and the model parameters are updated.
- Performance is measured before processing the next example.
Libraries such as River for streaming machine learning implement this predict-then-learn workflow with methods such as predict_one() and learn_one(). Neural networks can use the same principle through repeated PyTorch optimizer steps, although deep models commonly update on small batches for computational efficiency. (docs.pytorch.org)
Online learning is especially valuable under concept drift, where the relationship between inputs and outputs changes. Examples include seasonal traffic patterns, changing customer behavior, new manufacturing defects, or cameras installed under different lighting. A 2024 survey of recurrent concept drift highlights that recurring conditions, such as weather and time of day, require systems to recognize and adapt to previously encountered distributions. (ijcai.org)
Link to this sectionOnline Learning in Computer Vision#
Ultralytics YOLO does not perform uncontrolled per-frame weight updates during inference. Instead, teams can approximate safe online learning through periodic micro-batch fine-tuning on recent labeled data mixed with older examples:
from ultralytics import YOLO
model = YOLO("yolo26n.pt")
model.train(data="coco8.yaml", epochs=3, imgsz=640, lr0=0.001)This runnable example uses Ultralytics YOLO26 and the documented YOLO train mode to make a small, low-learning-rate update. In production, coco8.yaml would be replaced with a versioned dataset containing recent and replayed samples.
Concrete applications include:
- Manufacturing visual inspection: Models are updated when new products, materials, or defect types appear.
- Autonomous vehicle perception: Detection systems adapt to changing roads, weather, camera conditions, and object distributions.
- Retail inventory management: Models learn new packaging and seasonal products without requiring complete retraining.
Link to this sectionRelated Concepts And Key Differences#
Continual learning is broader: it aims to learn across tasks or domains while retaining earlier knowledge. Online learning describes when and how frequently updates occur. Active learning instead selects the most informative examples for human labeling, while transfer learning adapts pretrained knowledge to a target task.
A major shared challenge is catastrophic forgetting. Recent research includes 2024’s BECoTTA continual test-time adaptation, 2025’s Ranked Entropy Minimization, and 2026’s PLASTIC stability-plasticity method, which explore efficient adaptation without model collapse or loss of earlier capabilities. (proceedings.mlr.press)
Link to this sectionCurrent Best Practices#
- Monitor data drift: Track input distributions, confidence, accuracy, and class frequency.
- Preserve replay data: Mix representative historical samples with new data to reduce forgetting.
- Validate before deployment: Compare updated models against stable holdout and recent-data test sets.
- Version the complete workflow: Use Ultralytics Platform to manage annotation, datasets, training, deployment, and monitoring.
- Detect unlabeled drift: When labels arrive late, monitor feature distributions and prediction behavior rather than waiting for accuracy measurements. (dfki.de)






