Concept guide
Feature Importance vs Correlation
Correlation measures association between variables. Feature importance measures how a model uses variables. They often overlap, but they are not the same thing, and confusing them leads to bad explanations.
The difference
Correlation
A property of the data. It describes how two variables move together, usually without reference to a predictive model.
Feature importance
A property of a fitted model and an importance method. It describes model reliance, split behavior, coefficients, or prediction impact.
The practical rule is simple: use correlation to understand the raw data and possible redundancy between columns. Use feature importance to understand a fitted model's dependence on columns under a specific importance method.
Correlation vs model reliance
Correlation is usually computed before modeling. It asks whether two variables move together in the observed data. Feature importance is computed after modeling. It asks what the trained model relied on, or what would damage predictions if the feature were removed, shuffled, or changed.
| Question | Correlation answers | Feature importance answers |
|---|---|---|
| What is it attached to? | A pair of variables in a dataset | A fitted model, dataset, metric, and method |
| When is it measured? | Before or outside model training | After a model has been trained |
| What can it miss? | Nonlinear effects, thresholds, interactions | Causal meaning, unstable features, leakage context |
| What can it overstate? | A noisy association that the model does not use | A model shortcut that should not be trusted |
Interpretation guardrail
A high importance score means the model used information from the feature. It does not automatically mean the feature is strongly correlated with the target, safe to act on, stable in production, or causal.
Low correlation, high importance
A feature can have near-zero linear correlation with the target and still be highly important to a model. This often happens when the useful pattern is not a straight line.
Example: risk is highest in the middle
Suppose a lending model uses debt_to_income. Very low
values and very high values may both behave differently from the
middle, or the model may learn a sharp threshold around a policy
boundary. A simple Pearson correlation can look weak because positive
and negative parts of the relationship cancel out.
A tree model may still split on that feature repeatedly, and permutation importance may show a large validation-score drop when the column is shuffled. The explanation is not "correlation was wrong." The explanation is that linear correlation summarized the wrong shape.
Example: seasonality and thresholds
A churn model might use days_since_last_login. The
difference between 3 and 7 days may be small, while the difference
between 28 and 35 days may be decisive. Correlation compresses that
into one linear summary. A model with splits, bins, splines, or
nonlinear terms can use the threshold directly.
High correlation, low importance
A strongly correlated feature can receive a low importance score when the model does not need it, cannot use it well, or has a better version of the same signal.
Example: duplicate or cleaner signal
In a house-price model, bedrooms may correlate with sale
price because larger houses tend to have more bedrooms. But if the
model also has living_area_sqft, that column may carry
the size signal more directly. The model can rely on square footage
and give bedrooms little additional importance.
Example: correlation does not survive validation
A marketing feature may correlate with conversion in the training period because one campaign ran during a seasonal spike. If that pattern does not hold out of sample, a regularized model may downweight it, or permutation importance on validation data may show little benefit.
- Another correlated feature carries the same signal more cleanly.
- Regularization or feature selection suppresses the feature.
- The model class cannot use the relationship well.
- The correlation appears in training data but not validation data.
Nonlinear relationships and interactions
Correlation is weakest when the true predictive pattern depends on shape, context, or combinations of features.
Nonlinear shape
Risk may rise after a threshold, follow a U-shape, plateau, or vary cyclically. A single linear correlation can hide that structure.
Interactions
A feature may matter only for one segment. For example, account age might predict churn differently for monthly and annual plans.
Categorical targets
Linear correlation is often a poor summary for classification targets, rare events, and encoded categories.
When you suspect these patterns, inspect partial dependence, accumulated local effects, SHAP dependence plots, binned target rates, or segmented validation metrics. The goal is to understand the shape behind the importance score, not just the rank.
Leakage, proxies, and causal claims
The most dangerous mistakes happen when a feature is both important and untrustworthy. Correlation checks can help spot suspicious columns, but they do not solve the interpretation problem by themselves.
Leakage
Leakage occurs when a feature contains information that would not be available at prediction time, or that was created after the outcome. A leaked feature can be highly correlated and highly important while making the model unusable in the real workflow.
Proxies
A feature can stand in for another variable that is absent, restricted, sensitive, or hard to measure. ZIP code, device type, tenure, language, and transaction history can sometimes proxy for geography, income, operational treatment, or user segment. A high importance score should trigger a proxy review when decisions affect people, pricing, access, risk, or compliance.
Causal claims
Neither correlation nor standard feature importance proves that changing a feature will change the outcome. Importance says the model found predictive information. Causality requires a design that supports intervention claims, such as experiments, natural experiments, careful causal modeling, or strong domain assumptions.
A useful workflow
Treat correlation and feature importance as complementary diagnostics. A practical workflow is to start broad, validate model behavior, then investigate disagreements.
- Inspect correlations and missingness before modeling.
- Look for groups of highly correlated features that may share signal.
- Train and validate a model with the right metric.
- Compute permutation importance on held-out data.
- Compare importance with correlations and investigate disagreements.
- Check whether top features are proxies, leakage, or unstable shortcuts.
- Use domain knowledge or experiments before making causal claims.
Small Python pattern
One simple comparison is to place a target-correlation column next to a model-importance column, then sort by the biggest disagreements.
corr = X_train.corrwith(y_train).abs()
importance = pd.Series(
result.importances_mean,
index=X_train.columns,
)
comparison = pd.concat(
[corr.rename("target_correlation"), importance.rename("importance")],
axis=1,
)
comparison["gap"] = (
comparison["importance"].rank(pct=True)
- comparison["target_correlation"].rank(pct=True)
).abs()
print(comparison.sort_values("gap", ascending=False).head(10)) This does not decide which signal is real. It gives you a review queue: nonlinear effects, redundant features, leakage candidates, proxies, and unstable training-period relationships.
Checklist before reporting
- State the importance method, model type, validation split, and metric.
- Separate raw data association from fitted-model reliance.
- Check whether important features were available at prediction time.
- Review highly important features for leakage and proxy behavior.
- Inspect nonlinear shapes instead of relying only on linear correlation.
- Identify correlated feature groups where importance may be split or hidden.
- Avoid causal language unless the study design supports it.
A good final explanation might say: "This feature has weak linear correlation with the target, but the model relies on it because the effect is thresholded and appears consistently in validation." A weak explanation says: "The feature is important, so it causes the outcome."
Related guides
Permutation Importance
Measure model reliance by shuffling features on held-out data.
Model Interpretability
Place feature importance inside a broader explanation workflow.
SHAP vs Feature Importance
Compare global rankings with local feature contribution methods.
Random Forest Feature Importance
Understand tree importance, correlated predictors, and split bias.