What's the best Vertex AI explanation method for XGBoost online predictions with low latency?

You have trained an XGBoost model that you plan to deploy on Vertex AI for online prediction. You are now uploading your model to Vertex AI Model Registry, and you need to configure the explanation method that will serve online prediction requests to be returned with minimal latency. You also want to be alerted when feature attributions of the model meaningfully change over time. What should you do?

  1. 1. Specify sampled Shapley as the explanation method with a path count of 5. Source Reference Answer
  2. 1. Specify Integrated Gradients as the explanation method with a path count of 5.
  3. 1. Specify sampled Shapley as the explanation method with a path count of 50.
  4. 1. Specify Integrated Gradients as the explanation method with a path count of 50.

Community Votes

A
100%

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

Community Insight

The exam tests whether you know that sampled Shapley is the compatible representation method for XGBoost models, with lower path count (5) favored for online prediction latency; the trap is assuming Integrated Gradients works for all model frameworks.

When deploying an XGBoost model on Vertex AI for online prediction, choose sampled Shapley with a path count of 5 to ensure low-latency feature attributions. Community consensus confirms that Integrated Gradients is not suitable for XGBoost and that lower path counts reduce latency.

Choosing Integrated Gradients with a path count (Option B or D) because it appears more accurate, but Integrated Gradients is only supported for TensorFlow and AutoML image models on Vertex AI, not XGBoost. Additionally, a path count of 50 (Option C) would add latency due to more sampling steps.

Community Discussion (4 comments)

daidai75 👍 3 Selected: A
Sampled Shapley is a method suitable for XGBoost models. A lower path count (like 5) would indeed ensure lower latency in explanations, but might compromise on the precision of the explanations.Model Monitoring - Prediction Drift: This monitors the change in model predictions over time, which can indirectly indicate a change in feature attributions, but it's not directly monitoring the attributions themselves.
shadz10 👍 3 Selected: A
not B as integrated gradients is only for Custom-trained TensorFlow models that use a TensorFlow prebuilt container to serve predictions and AutoML image models
36bdc1e 👍 4
A Sampled Shapley is a fast and scalable approximation of the Shapley value, which is a game-theoretic concept that measures the contribution of each feature to the model prediction. Sampled Shapley is suitable for online prediction requests, as it can return feature attributions with minimal latency. The path count parameter controls the number of samples used to estimate the Shapley value, and a lower value means faster computation. Integrated Gradients is another explanation method that computes the average gradient along the path from a baseline input to the actual input. Integrated Gradients is more accurate than Sampled Shapley, but also more computationally intensive
pikachu007 👍 4 Selected: A
Explanation Method: Sampled Shapley: This method provides high-fidelity feature attributions while being computationally efficient, making it ideal for low-latency online predictions. Integrated Gradients: While also accurate, it's generally more computationally intensive than sampled Shapley, potentially introducing latency. Path Count: Lower Path Count (5): Reducing path count further decreases computation time, optimizing for faster prediction responses. Monitoring Objective: Prediction Drift: This type of monitoring detects changes in feature importance over time, aligning with the goal of tracking feature attribution shifts. Training-Serving Skew: This monitors discrepancies between training and serving data distributions, which isn't directly related to feature attributions.

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

Sampled Shapley is the appropriate explanation method for XGBoost models on Vertex AI because it provides feature attributions efficiently and is designed for models other than TensorFlow/AutoML. A path count of 5 reduces the number of sampled feature subsets, which directly minimizes latency for online predictions. This aligns with the requirement for minimal latency while still offering meaningful attributions. Community comments highlight that Sampled Shapley is "fast and scalable" and ideal for low-latency online predictions.

Why the Other Options Are Wrong

Integrated Gradients (options B and D) is not a valid choice for XGBoost models—Vertex AI only supports Integrated Gradients for custom-trained TensorFlow models using prebuilt containers and AutoML image models. Additionally, the parameter for Integrated Gradients is "step count," not "path count," making B and D technically incorrect. Option C uses a path count of 50, which increases the number of sampling steps and introduces higher latency, contradicting the requirement of minimal latency. Thus A is the only option that satisfies both compatibility and performance constraints.

Community Comment Notes

Community members strongly favor A, with one commenter noting that Integrated Gradients is "generally more computationally intensive than sampled Shapley, potentially introducing latency." Another commenter explicitly states that Integrated Gradients is "only for Custom-trained TensorFlow models ... and AutoML image models," reinforcing why B and D are invalid. A third comment mentions that lower path count "ensures lower latency" but may compromise precision, which is an acceptable trade-off when latency is the stated priority. These insights align with the official Vertex AI documentation.

Official Reference

Exam Strategy

Memorize the compatibility chart for Vertex AI explanation methods: Sampled Shapley supports XGBoost, while Integrated Gradients is limited to TensorFlow and AutoML image models. On exam day, when you see 'minimal latency,' immediately think 'low path count'—and never pair Integrated Gradients with XGBoost or path count.

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