How to Add Accurate Predictive Explanations to an Existing Custom ML Model?

You work for a bank. You have created a custom model to predict whether a loan application should be flagged for human review. The input features are stored in a BigQuery table. The model is performing well, and you plan to deploy it to production. Due to compliance requirements the model must provide explanations for each prediction. You want to add this functionality to your model code with minimal effort and provide explanations that are as accurate as possible. What should you do?

  1. Create an AutoML tabular model by using the BigQuery data with integrated Vertex Explainable AI.
  2. Create a BigQuery ML deep neural network model and use the ML.EXPLAIN_PREDICT method with the num_integral_steps parameter.
  3. Upload the custom model to Vertex AI Model Registry and configure feature-based attribution by using sampled Shapley with input baselines. Source Reference Answer
  4. Update the custom serving container to include sampled Shapley-based explanations in the prediction outputs.

Community Votes

C
84%
D
16%

84% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

Tests understanding of Vertex Explainable AI integration patterns, with the common trap being manually embedding explanation logic in the serving container instead of using platform-native configuration.

To add compliant, per-prediction explanations to an existing custom model with minimal effort, leverage Vertex AI's native Explainable AI service. The community consensus strongly favors configuring feature-based attribution via Sampled Shapley over modifying serving containers or rebuilding the model.

Option D is frequently chosen because it seems like direct code control, but updating the custom serving container requires significant development effort and maintenance, violating the "minimal effort" requirement.

Community Discussion (8 comments)

fitri001 👍 2 Selected: C
Existing Custom Model: This approach leverages your already-developed, well-performing model. There's no need to rebuild it using AutoML or BigQuery ML, which might require significant code changes. Vertex Explainable AI (XAI): Vertex AI offers XAI integration with custom models through feature-based attribution methods like sampled Shapley. This provides explanations for each prediction without requiring major modifications to your model code. Sampled Shapley with Baselines: Sampled Shapley is a robust attribution method for explaining model predictions. Using input baselines (like zero values) helps improve the interpretability of explanations, especially for features with large ranges.
guilhermebutzke 👍 3 Selected: C
According to the documentation at https://cloud.google.com/vertex-ai/docs/explainable-ai/overview, we can utilize both feature-based attribution and sampled Shapley-based explanations. Therefore, for providing explanations for each prediction in a loan classification problem, I believe that feature-based attribution is the optimal approach. Furthermore, updating the custom serving container to include sampled Shapley-based explanations, as suggested in option D, might require more effort, considering that the custom model deployed on Vertex AI already provides this option for explanations.
sonicclasps 👍 2 Selected: C
"minimal effort and provide explanations that are as accurate as possible" this makes the answer C, based on this: https://cloud.google.com/vertex-ai/docs/explainable-ai/improving-explanations
daidai75 👍 3 Selected: C
Feature attribution is supported for all types of models (both AutoML and custom-trained), frameworks (TensorFlow, scikit, XGBoost), BigQuery ML models, and modalities (images, text, tabular, video). https://cloud.google.com/vertex-ai/docs/explainable-ai/overview
36bdc1e 👍 2
C you find the answer here https://cloud.google.com/vertex-ai/docs/explainable-ai/overview
b1a8fae 👍 1 Selected: D
pikachu007 answer made me reconsider
b1a8fae 👍 1 Selected: A
Not a deep neural network for sure (B). Out of the remaining 3, A is the simplest approach.
pikachu007 👍 1 Selected: D
A and B is out because you already have a model, C does not provide an explanation for each prediction. Therefore D meets all the criteria.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option C correctly utilizes Vertex Explainable AI’s feature-based attribution capabilities. By registering the existing custom model in Vertex AI Model Registry and enabling explainability configurations, you get per-prediction attributions without altering the model code. This approach natively supports methods like Sampled Shapley, which provides highly accurate, mathematically rigorous explanations that meet strict compliance standards. It aligns perfectly with the requirement for minimal engineering overhead while maximizing explanation quality.

Why the Other Options Are Wrong

Options A and B require rebuilding the model from scratch, directly contradicting the premise that the current custom model is already performing well. Option D suggests hardcoding explanation logic into the serving container, which increases deployment complexity and testing burden. Platform-native XAI configurations are explicitly designed to decouple explanation generation from model inference code.

Community Comment Notes

Multiple top-voted comments highlight that Vertex Explainable AI supports feature attribution across all model types without code modification [1][2]. Users emphasize that the phrase “minimal effort” combined with “accurate as possible” points directly to cloud-native configuration rather than custom implementation [4][5]. Several candidates initially considered option D but switched to C after reviewing official documentation confirming native attribution support for custom models [6][8].

Official Reference

Exam Strategy

Focus on keywords like "minimal effort" and "existing model" to eliminate rebuild options. When a question emphasizes compliance and accuracy without code changes, prioritize managed platform services like Vertex Explainable AI over custom container modifications.

Related Analysis

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide