Quant Memo
Foundational

Global vs Local Explanations

The difference between describing how a model behaves on average across every input it might see, and describing why it produced one specific prediction for one specific input.

Prerequisites: Interpretability vs Explainability

Two questions sound similar but have different answers and need different tools. "Which features matter to this model, overall?" is a global question — its answer describes the model's behavior averaged across the whole range of inputs it might encounter. "Why did the model produce this prediction, for this input, right now?" is a local question — its answer is specific to a single point and can look nothing like the global answer.

Global explanations include things like overall feature-importance rankings (which inputs move predictions the most, on average), partial-dependence plots (how the predicted output changes as one feature varies, holding others typical), and a model's overall structure if it's simple enough to inspect directly. They tell you what the model has generally learned to rely on. Local explanations — SHAP values or LIME for a single row, a single decision path through a tree — tell you, for one specific case, how much each feature contributed to that prediction relative to what the model would have predicted for a "typical" input. A feature can be globally unimportant on average yet be the dominant driver of one particular prediction, if that one input happens to sit in an unusual region where the feature suddenly matters a lot.

Worked example

A quant's regime-classification model (calm vs stressed market) ranks realized volatility as its single most important feature globally, based on average SHAP magnitude across the entire training set — it's the feature that, on average, moves the prediction the most. But looking at the local explanation for one specific day's prediction, where the model flagged "stressed" with high confidence, the SHAP breakdown shows realized volatility actually contributed very little that day (it was near its typical level) while an unusual spike in overnight funding-rate spread carried almost the entire prediction. Globally, funding-rate spread ranks fifth in importance — it usually doesn't matter much — but for this one day, it was the whole story. Reporting only the global ranking ("volatility drives the model") would completely mislead an analyst asking why the model flagged this particular day as stressed.

global (average over all days) vol spread skew

local (this one day) vol spread skew

Volatility dominates the global ranking, but for one specific day funding-rate spread — a globally minor feature — carries almost the entire local prediction.

What this means in practice

Neither view substitutes for the other. A monitoring dashboard that only shows global feature importance can miss that a specific alarming prediction was driven by an unusual feature the team wasn't watching; investigating an individual flagged trade or model decision needs the local view. Conversely, redesigning a model's feature set or deciding what data to invest in collecting is a global question — one unusual local explanation shouldn't drive that decision on its own. Interrogating a single suspicious prediction and auditing the model's overall behavior are different tasks that call for different tools.

A global explanation summarizes how a model behaves on average across all inputs; a local explanation accounts for one specific prediction, and a feature that barely matters globally can dominate a specific local explanation if that input sits somewhere the feature suddenly becomes relevant.

Assuming a model's global feature-importance ranking applies to any individual prediction is a common and costly mistake — the feature that mattered most for one flagged, unusual case is often not the feature that ranks highest on average, which is exactly why it looked unusual in the first place.

Related concepts

Practice in interviews

Further reading

  • Molnar, Interpretable Machine Learning, ch. 5-6
ShareTwitterLinkedIn