InterviewStack.io LogoInterviewStack.io

Model Interpretability and Explainability Questions

Discuss techniques for understanding what models learn: attention visualization, feature importance methods (SHAP, LIME), saliency maps, concept-based explanations. Understand the difference between post-hoc explainability and inherent interpretability. Discuss trade-offs with model complexity.

MediumTechnical
82 practiced
Compare saliency maps (gradient-based pixel attributions) with Integrated Gradients for explaining image classifiers. For each method explain the algorithmic idea, typical failure modes, sensitivity to noise, and practical validation approaches to confirm the maps highlight meaningful regions. When would you select Integrated Gradients over simple gradient saliency in a production CV pipeline?
MediumTechnical
89 practiced
Implement a Python function partial_dependence_plot(model, X, features, grid_resolution=50, kind='average') that computes values for a Partial Dependence Plot for one or two features for a scikit-learn compatible model. Support both continuous and categorical features (categorical values provided as labels). Return grid values and averaged predictions; do not use sklearn's partial_dependence implementation. Describe runtime complexity and vectorization strategies for speed.
MediumBehavioral
76 practiced
Multiple stakeholders request different types of explanations (compliance wants global audit summaries, customer support wants per-user rationales, data engineering wants feature-drilldowns). How do you prioritize and scope explanation features on a product roadmap? Describe criteria you would use, how to engage stakeholders, how to define an MVP, and metrics to evaluate success.
MediumTechnical
63 practiced
Using Python and the shap library, provide code snippets to: 1) compute SHAP values for a trained tree-based classifier (such as XGBoost or RandomForest) on dataset X_test; 2) generate a summary plot showing global feature importance; and 3) extract the top 5 features contributing to class 1 predictions. Explain necessary preprocessing steps and common pitfalls interpreting the summary plot.
MediumTechnical
122 practiced
A production binary classifier for loan approval shows 'zip_code' among top features via SHAP. Stakeholders worry it proxies for a protected attribute like race. Outline a step-by-step investigation plan to determine if zip_code is acting as a proxy, including statistical tests, visualizations, and causal checks; describe remediation strategies if it is a proxy and considerations for reporting to compliance.

Unlock Full Question Bank

Get access to hundreds of Model Interpretability and Explainability interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.