EasyDeepLearn

How do you compute SHAP at production scale?

hard

Answer

  • SHAP is expensive (2N  feature  subsets)(2^{N}\;\mathrm{feature}\;\mathrm{subsets}).
  • Optimizations: (1) TreeSHAP: exact  +  O(TLD2)\mathrm{exact}\; + \;O(\mathrm{TLD}^{2}) for tree ensembles.
  • (2) DeepSHAP: gradient-based for NNs.
  • (3) KernelSHAP with sampling for model-agnostic.
  • (4) Precompute + cache global feature importance.
  • (5) Compute per-prediction only when requested (customer-facing explanation) or async.
  • (6) Sample requests + summary dashboard.
  • Alternative: SAGE for global, faster than SHAP.
Check yourself — multiple choice
  • Random
  • TreeSHAP exact fast trees + DeepSHAP gradient NN + KernelSHAP sampling model-agnostic + precompute global + on-request only for individual + sample summary; SAGE faster global alternative
  • Not possible
  • Not real

SHAP at scale: TreeSHAP / DeepSHAP / sample + async / SAGE.

#infrastructure#monitoring

Practise MLOps & Data Quality

215 interview questions in this topic.

Related questions