ML Systems Lab Open interactive version →
Advanced 20 min read feature importanceSHAP driftmodel interpretationmonitoring

Feature Importance Drift

SHAP drift, permutation importance over time, what it reveals

A fraud model went live six months ago. On day one its top features were `transaction_velocity` (0.32), `device_age` (0.21), `ip_reputation` (0.18). Six months later the order has flipped: `ip_reputation` (0.38), `transaction_velocity` (0.12), `device_age` (0.09). IP reputation has quietly become the model's dominant signal. Why?


The cause is the model's own side of the world

The fraud team spent those six months aggressively blocking high-risk IPs. So the fraud that *survived* now comes from addresses that were never flagged — the leftover fraud has low-risk IP reputation. The model dutifully learned that "low-reputation IP" is now the reliable tell, because that's what surviving fraud looks like. The catch: it's now leaning on a signal that its own upstream actions made gameable, which makes it far more exposed to IP spoofing. The model adapted to a world that its own team reshaped.


Why this is worth monitoring at all

Feature importance drift isn't just "what the model is doing" — it's a read on *how the world moved relative to the model's assumptions.* Four things drive it: a feature's distribution narrows, shrinking its discriminative power; the target population shifts (from the model's own actions or outside forces), changing which examples remain; a feature's quality degrades from a pipeline bug, going noisy or partly null; or a brand-new correlation appears as behavior changes.

To watch it, compute SHAP or permutation importance on a rolling sample of ~1,000 production predictions per week, track the top-K over time, and alert when a feature's rank moves more than 3 places or its importance changes by more than 20%.


The mental correction: importance is *not* a fixed property of the model. It's a joint property of the model and the input distribution — the same weights yield different importances when the inputs shift. That's what makes it such a sensitive probe: a pipeline bug that corrupts one feature shows up in importance drift within days, well before it has piled up enough label evidence to move the accuracy metric.

Key points

Takeaway

Feature importance drift reveals how the world changed relative to the model's assumptions — a rank drop before accuracy moves means you have a week to fix a pipeline bug instead of a week after the damage is done.

Recap

Check your understanding

Q1. SHAP drift analysis shows that "device_type" has gone from importance rank 2 to rank 19 over the past month. What does this mean and what do you investigate?

Q2. `ip_reputation` climbs from rank 3 to rank 1 over three months while its own input distribution stays stable. What does the stable distribution most directly imply?

Q3. Which two statements correctly explain why production feature importance must be baselined against the deployment-day reference rather than training-time importance?

Try it interactively

ML Systems Lab is a free interview-prep platform for ML engineers — work through the full interactive module, quizzes, and drills.

Open ML Systems Lab →