If you like what we're working on, please  star us on GitHub. This enables us to continue to give back to the community.
DEEPCHECKS GLOSSARY

Training-Serving Skew

What is Training-Serving Skew?

When there is a discrepancy between the training data and the serving data, a typical issue in machine learning is called training-serving skew. Even if the model achieved great accuracy during training, it may struggle to generalize to new situations due to this mismatch.

  • Training-serving skew is the difference in distribution, size, or properties between the training data and the serving data.

This may occur if the training data does not accurately reflect the real-world data or if the real-world data evolves over time.

Let’s say, for the sake of argument, that a model is trained using solely cat photographs. In this scenario, the model may do well with cat photos during training but struggle when presented with a dog or other animal images in the serving phase. This is due to the fact that the model has only been trained to detect cats.

To fix Training-Serving Skew, make sure your model is tested on a wide range of data and that your training data accurately reflects the data you’ll be working on within the real world.

Importance of Training-Serving Skew

Skewness in machine learning has a substantial effect on model correctness and performance in the wild. Poor performance, inaccurate predictions, and even potential harm to individuals or organizations relying on the model’s outputs can result if the model is trained on data that is not representative of real-world data or if the model is not evaluated on a diverse set of data during the serving phase.

Here are a few of the most compelling arguments in favor of Training-Serving Skew:

  • Scenarios in the real world are complex– Data from the real world is often more complicated and varied than training data. Models may lack the ability to generalize to novel events or settings if they are not trained on a broad range of data.
  • Decision-making– Machine learning models are often employed to make judgments that have far-reaching consequences for people and businesses. A failure to test the model on a representative sample of the population raises the risk that it would produce discriminatory or harmful outcomes.
  • Data distribution– Adjustments may occur for a number of reasons, including changes in user behavior, variations in market circumstances, and the introduction of new rules. During the serving phase, the model’s performance might suffer if it was not trained using fresh data or re-evaluated using a variety of datasets.

Skew transformation

As a kind of data preparation, skew transformation corrects data distributions that are asymmetrical. When data is not normally distributed around the mean, it is said to be skewed. This kind of distribution may have very long tails on one side or the other. Since many machine learning models are built on the assumption that the data is regularly distributed, this might provide a challenge.

ML in production may benefit from skew transformation since it lessens the weight that skewed data has on their predictions. There should be no additional biases in the data once the transformation has been applied.

Avoid Training-serving Skew

In machine learning models, training-serving skew may be avoided or its effects reduced in numerous ways:

  • To guarantee the model’s ability to generalize successfully to new circumstances, it is crucial to use a varied and representative collection of data during the training phase.
  • Keep an eye on how well the model is doing, both while it’s being trained and when it’s being put to use in production.
  • To keep the model accurate and efficient in the face of shifting data distributions, it should be retrained regularly.
  • Make use of data augmentation to lessen the effect of training-serving skew and improve the model’s generalizability to new settings.

Utilize transfer learning to increase the model’s performance in novel settings while also reducing the quantity of data needed for training.

Testing. CI/CD. Monitoring.

Because ML systems are more fragile than you think. All based on our open-source core.

Deepchecks HubOur GithubOpen Source