tensorturnBETA
Home › Data Cleaning & Analytics

Data Drift Detection: How the Population Stability Index (PSI) Works

Data drift is a change in the distribution of a model's input data over time, and the population stability index (PSI) is one of the most widely used ways to measure it: values below 0.1 indicate a stable feature, 0.1 to 0.25 moderate drift and above 0.25 a major shift. TensorTurn detects date columns on upload and computes PSI between the first and second chronological half of your dataset, so you know whether your own history has drifted before you trust a model trained on it.

What data drift is

A machine learning model learns patterns from a fixed snapshot of the past and is then asked to predict on data that keeps changing. When the incoming data no longer looks like the training data, performance degrades, often silently. Three kinds of change are worth separating:

PSI and most distribution tests measure the first two. Concept drift can only be confirmed by comparing predictions to actual outcomes once labels arrive.

Why drift matters for deployed models

A model's validation score describes performance on data that resembles the training set. Drift breaks that assumption. A credit model trained before an interest-rate change, a demand model trained before a new store format or a churn model trained before a pricing overhaul can all keep returning confident predictions that are steadily wrong. Because the model does not error, nobody notices until a business metric moves. Measuring drift gives you an early, label-free warning to retrain, recalibrate or investigate.

The population stability index in plain words

PSI compares two distributions of the same variable: a reference (expected) distribution, usually the training data, and a current (actual) distribution. The steps are simple:

Each term is always zero or positive, so PSI only grows as the distributions diverge, and bins where a large share of rows moved contribute the most. Empty bins would make the log undefined, so implementations add a tiny constant to every share. PSI is closely related to a symmetric form of the Kullback-Leibler divergence, which is why it behaves sensibly as a distance between distributions.

PSI valueInterpretationTypical action
Below 0.1Stable, no meaningful shiftNo action needed
0.1 to 0.25Moderate driftInvestigate the feature and monitor closely
Above 0.25Major driftFind the cause; consider retraining or excluding the feature

These thresholds are industry rules of thumb that originated in credit scoring, not statistical tests. Small samples produce noisy PSI values, and the number of bins changes the result, so compare PSI values computed the same way.

Temporal drift inside your training data

Drift is not only a production problem. If your dataset spans months or years, it may already contain drift. TensorTurn splits the data at the midpoint of the detected date range and computes PSI between the first and second chronological half for each feature. If important features drift between halves, two things follow. First, a random shuffled train/test split will overstate real-world performance, because the model is tested on rows from the same periods it trained on. Use a time-based split instead, training on older data and testing on newer. Second, the most recent data is the best guide to the future, so consider weighting it more or dropping a stale early period.

Other ways to detect drift

MethodColumn typeNotes
PSINumeric (binned) or categoricalEasy to explain, widely used thresholds
Kolmogorov-Smirnov testNumericGives a p-value; with large samples almost any tiny shift becomes significant
Chi-square testCategoricalTests whether category frequencies changed
Jensen-Shannon distanceNumeric or categoricalSymmetric and bounded between 0 and 1
Wasserstein distanceNumericMeasured in the units of the feature, intuitive for magnitude of shift

Common drift mistakes

How to check drift on TensorTurn

Note that TensorTurn measures drift in the data you upload; it does not run continuous drift monitoring on live prediction traffic. Deployed endpoints log every call with latency and status.

Start building free

Frequently asked questions

What is the population stability index?

PSI is a measure of how much a variable's distribution has shifted between a reference dataset and a current one. It bins the variable, compares the share of rows in each bin and sums the difference in shares multiplied by the log of their ratio.

What is a good PSI value?

Below 0.1 is generally considered stable, 0.1 to 0.25 indicates moderate drift worth investigating and above 0.25 indicates a major shift. These are rules of thumb from credit risk modeling rather than formal significance tests.

What is the difference between data drift and concept drift?

Data drift is a change in the input distribution, which you can measure without labels. Concept drift is a change in the relationship between inputs and the target, which you can only confirm by comparing predictions with actual outcomes.

How do I detect drift without labels?

Compare the distribution of each input feature in new data against the training data using PSI, a KS test, Jensen-Shannon distance or similar measures. Large shifts in important features are an early warning even before outcomes are known.

Does TensorTurn monitor drift on deployed models?

No. TensorTurn measures temporal drift with PSI inside the datasets you upload, between the first and second chronological half. Deployed endpoints log calls with latency and status, but continuous production drift monitoring is not a feature.