5 min read

Orca's Retrieval-Augmented Image Classifier Shows Perfect Robustness Against Data Drift

Written by
Stephen Kemmerling
Published on
October 14, 2024

Data drift is an inevitable challenge in machine learning. When the underlying data distribution changes, many models break down, leading to degraded performance and unreliable predictions. In this post, we'll show how data drift affects model accuracy and demonstrate how the Orca Retrieval-Augmented Classifier (RAC) proves significantly more resilient than a conventional deep learning classifier.

Orca RAC, thanks to its retrieval-based augmentation, maintains high accuracy even as data distribution shifts. In essence, this is a form of online learning that keeps the model up-to-date with changing data without the need for additional training.

Benchmark Setup

As a basis for our testing, we used the Imagenette dataset, a subset of the well-known ImageNet benchmark with 10 relatively easy classes instead of the original one thousand. We simulated drift by creating a sequence of datasets, gradually altering the class distributions.

  • Starting Dataset: We focused on 7 classes with 100% sampling probability, effectively excluding the remaining 3 classes.
  • Final Dataset: This is the original Imagenette dataset, with all 10 classes included at 100% sampling probability.
  • Drift Simulation: We gradually introduced the final 3 classes by increasing their sampling probability, simulating a shifting data distribution.

Sampling was applied separately for training and test datasets (ensuring no cross-contamination).

We then compared two models:

  • Conventional Classifier: A simple 2-layer classification head placed on top of a pre-trained embedding model. The model was trained on the Starting Dataset.
  • Orca Retrieval-Augmented Classifier (RAC): This approach combines a pre-trained embedding model with a classification-specific retrieval-augmentation technique to improve model performance. Essentially, this model has a memory of previously seen images (usually with human labels) that it refers back to when classifying new images. The model's memory was pre-populated with the Starting Dataset, and updated with the new distribution as the drift simulation progressed (a computationally very cheap and fast operation)

Drift Simulation Results

We evaluated both models continually as the data distribution shifted from the first to the final dataset.

  • The RAC model maintained nearly 100% accuracy throughout the drift simulation.
  • The conventional classifier started with approximately 95% accuracy on the initial dataset but degraded to around 65% as the drift progressed.

Note that even if the conventional classifier were retrained periodically, the RAC model’s continual adaptation via memory updates would allow it to stay ahead, consistently maintaining superior accuracy.

Why Orca RAC Excels Under Data Drift

The key to Orca RAC's success is its memory-based adaptation. By updating its memory with new, relevant examples, Orca RAC maintains robustness, even when the data distribution changes. This stands in contrast to conventional classifiers, which require additional training (and sometimes full re-training) to adapt effectively.

Additionally, RAC's memory updates are lightweight compared to retraining a deep learning model, resulting in minimal need for training and reduced computational overhead.

Implications for Real-world Applications

  • Less Model Maintenance: The resilience of Orca RAC implies less frequent retraining, leading to significant cost savings and reduced downtime, while continually maintaining high model quality.
  • Broader Use Cases: This capability is valuable in many real-world applications prone to data drift, such as content moderation, recommendation systems, and any other system where data evolves over time.

Conclusion

The Orca RAC model demonstrates exceptional robustness to data drift compared to a conventional classifier. By leveraging retrieval-augmented techniques, RAC can maintain high accuracy without frequent retraining, making it an ideal solution for environments with shifting data distributions.

Data drift is a common challenge that can significantly impact model performance. If your models are struggling with data drift, consider trying Orca RAC as a solution. Its memory-based adaptation can help ensure your models remain effective even as data distributions shift.

Related Posts

Stop Contorting Your AI App into an LLM
4 minutes

Stop Contorting Your AI App into an LLM

Why converting your discriminative model into an LLM for RAG isn't always worth it.
Building Adaptable AI Systems for a Dynamic World
4 min read

Building Adaptable AI Systems for a Dynamic World

Orca's vision for the future of AI is one where models adapt instantly to changing data and objectives—unlocking real-time agility without the burden of retraining.
How Orca Helps You Customize to Different Preferences
1 min read

How Orca Helps You Customize to Different Preferences

When evaluating an ML model's performance, the definition of "correct" can vary greatly across individuals and customers, posing a challenge in managing diverse preferences.
Keep Up With Rapidly-Evolving Data Using Orca
1 min read

Keep Up With Rapidly-Evolving Data Using Orca

Orca can help models adapt to rapid data drift without the need for costly retraining using memory augmentation techniques.
Tackling Toxicity: How Orca’s Retrieval Augmented Classifiers Simplify Content Moderation
10 min read

Tackling Toxicity: How Orca’s Retrieval Augmented Classifiers Simplify Content Moderation

Detecting toxicity is challenging due to data imbalances and the trade-off between false positives and false negatives. Retrieval-Augmented Classifiers provide a robust solution for this complex problem.
How Orca Helps Your AI Adapt to Changing Business Objectives
2 min read

How Orca Helps Your AI Adapt to Changing Business Objectives

ML models must be adaptable to remain effective as business problems shift like targeting new customers, products, or goals. Learn how Orca can help.
How Orca Helps You Instantly Expand to New Use Cases
2 min read

How Orca Helps You Instantly Expand to New Use Cases

ML models in production often face unexpected use cases, and adapting to these can provide significant business value, but the challenge is figuring out how to achieve this flexibility.
Retrieval-Augmented Text Classifiers Adapt to Changing Conditions in Real-Time
6 min read

Retrieval-Augmented Text Classifiers Adapt to Changing Conditions in Real-Time

Orca’s RAC text classifiers adapt in real-time to changing data, maintaining high accuracy comparable to retraining on a sentiment analysis of airline-related tweets.
Survey: Data Quality and Consistency Are Top Issues for ML Engineers
4 min read

Survey: Data Quality and Consistency Are Top Issues for ML Engineers

Orca's survey of 205 engineers revealed that data challenges remain at the forefront of machine learning model development.