Data Drift
Model performance can be poor if models trained on a specific dataset encounter different data in production. This is called data drift. In the Insights tab for your model, Fiddler gives you a diverse set visuals to explore different metrics.
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F2341805124-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNEyFKGwv2eAllsWbuafo%252Fuploads%252Fgit-blob-751573942c9aab3fb273d8f46d62f34c5352c633%252F007f174-image.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=e1d34c0b&sv=1)
Leverage the data drift chart to identify what data is drifting, when it’s drifting, and how it’s drifting. This is the first step in identifying possible model performance issues.
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F2341805124-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNEyFKGwv2eAllsWbuafo%252Fuploads%252Fgit-blob-982373ef3c6cdfd92ebf8092c377ee25e0056d70%252F8e36336-image.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=2bba8171&sv=1)
You can change the time range using the controls in the upper-left in both charts and dashboards:
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F2341805124-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNEyFKGwv2eAllsWbuafo%252Fuploads%252Fgit-blob-54b74e7320ae0e9e51890737633240ed3e055dc6%252F934b903-image.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=7dfd3dc8&sv=1)
What is being tracked?
Drift Metrics
Jensen–Shannon distance (JSD)
A distance metric calculated between the distribution of a field in the baseline dataset and that same distribution for the time period of interest.
For more information on JSD, click here.
Population Stability Index (PSI)
A drift metric based on the multinomial classification of a variable into bins or categories. The differences in each bin between the baseline and the time period of interest are then utilized to calculate it as follows:
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F2341805124-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNEyFKGwv2eAllsWbuafo%252Fuploads%252Fgit-blob-1c5365fe1ffb9f0745c469ba716fb77170fcee7c%252F0baeb90-psi_calculation.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=acf354d6&sv=1)
Here, B
is the total number of bins, ActualProp(b)
is the proportion of counts within bin b
from the target distribution, and ExpectedProp(b)
is the proportion of counts within bin b
from the reference distribution. Thus, PSI is a number that ranges from zero to infinity and has a value of zero when the two distributions exactly match.
🚧 Note
Since there is a possibility that a particular bin may be empty, PSI can shoot to infinity. To avoid this, PSI calculation in Fiddler is done such that each bin count is incremented with a base_count=1. Thus, there might be a slight difference in the PSI values obtained from manual calculations.
Average Values – The mean of a field (feature or prediction) over time. This can be thought of as an intuitive drift score.
Drift Analytics – You can drill down into the features responsible for the prediction drift using the table at the bottom.
Feature Impact: The contribution of a feature to the model’s predictions, averaged over the baseline dataset. The contribution is calculated using random ablation feature impact.
Feature Drift: Drift of the feature, calculated using the drift metric of choice.
Prediction Drift Impact: A heuristic calculated using the product of the feature impact and the feature drift. The higher the score, the more this feature is likely to have contributed to the prediction drift.
In the Drift Root Cause Analysis table, you can select a feature to see the feature distribution for both the time period under consideration and the baseline dataset.
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F2341805124-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNEyFKGwv2eAllsWbuafo%252Fuploads%252Fgit-blob-fed3ac5d81f08390fcaf511262a3da31ed7a08de%252Ffa3158e-image.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=ab042b01&sv=1)
Why is it being tracked?
Data drift is a great proxy metric for performance decline, especially if there is delay in getting labels for production events. (e.g. In a credit lending use case, an actual default may happen after months or years.)
Monitoring data drift also helps you stay informed about distributional shifts in the data for features of interest, which could have business implications even if there is no decline in model performance.
What do I do next with this information?
High drift can occur as a result of data integrity issues (bugs in the data pipeline), or as a result of an actual change in the distribution of data due to external factors (e.g. a dip in income due to COVID). The former is more in our control to solve directly. The latter may not be solvable directly, but can serve as an indicator that further investigation (and possible retraining) may be needed.
You can drill down deeper into the data by examining it in the Analyze tab.
The image below shows how to open the Analyze view for a specific feature and time range identified in the Data Drift page.
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F2341805124-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNEyFKGwv2eAllsWbuafo%252Fuploads%252Fgit-blob-199dd2ead35cd16715b8db8cbab450c4609429bf%252F36407f8-Screen_Shot_2024-01-17_at_7.15.19_PM.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=88d997ac&sv=1)
This will bring you to the Analyze tab, where you can then use SQL to slice and dice the data. You can then apply visualizations upon these slices to analyze the model’s behavior.
![](https://docs.fiddler.ai/~gitbook/image?url=https%3A%2F%2F2341805124-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FNEyFKGwv2eAllsWbuafo%252Fuploads%252Fgit-blob-676760a06ef0758f4db1d3926c2c68f0a8da13dd%252F25eca03-Monitor_Analyze.png%3Falt%3Dmedia&width=768&dpr=4&quality=100&sign=978d014e&sv=1)
↪ Questions? Join our community Slack to talk to a product expert
Last updated