Study guide
18.4 Model Explainability on Agent Platform
Google Cloud Professional Machine Learning Engineer PMLE
Track your progress as you read
Finished sections get a check mark.
1 Chapter 1: Exam Overview & the Agent Platform Map
1.1 PMLE Exam Facts, Policies & the June 2026 Blueprint 1.2 From Vertex AI to Gemini Enterprise Agent Platform: The Product Name Map
2 Chapter 2: Low-Code ML with BigQuery ML
2.1 Choosing, Training & Predicting with BigQuery ML Models 2.2 Feature Engineering & Feature Selection in BigQuery ML 2.3 Fine-Tuning & Evaluating Gemini Models from BigQuery
3 Chapter 3: AutoML & Google Cloud AI APIs
3.1 Training Models with Agent Platform AutoML 3.2 Building with Document AI, Vision, Translation & Other AI APIs
4 Chapter 4: Foundation Models in Model Garden
4.1 Evaluating & Selecting Models in Model Garden 4.2 Building & Tuning Solutions with Gemini, Imagen, Veo & MaaS 4.3 Optimizing Gemini Applications for Cost, Latency & Availability
5 Chapter 5: Exploring, Preprocessing & Protecting Data
5.1 Organizing & Exploring Tabular, Text & Image Data 5.2 Choosing a Preprocessing Tool: BigQuery, Dataflow, Spark or Python 5.3 Creating & Consolidating Features in Agent Platform Feature Store 5.4 Protecting PII & Sensitive Data in ML Workflows
6 Chapter 6: Notebooks, Prototyping & Experiment Tracking
6.1 Workbench vs. Colab Enterprise: Secure, Collaborative Notebooks 6.2 Prototyping with PyTorch, scikit-learn, JAX & Model Garden in Notebooks 6.3 Experiment Environments, Tracking & Lineage with Experiments and ML Metadata
7 Chapter 7: Evaluating Predictive & Generative AI Solutions
7.1 Evaluation Metrics for Predictive Models 7.2 Evaluating Gen AI: Computation Metrics, Rubrics & LLM-as-a-Judge
8 Chapter 8: Choosing the Modeling Approach
8.1 Choosing the Model Type: ARIMA, Trees, DNNs & LLMs 8.2 Choosing the Product & Deployment Strategy 8.3 Modeling Techniques for Interpretability Requirements
9 Chapter 9: Training Data & Training SDKs
9.1 Organizing & Ingesting Training Data from Cloud Storage & BigQuery 9.2 Custom Training on Agent Platform: Containers, Jobs & Worker Pools 9.3 Kubeflow on GKE, AutoML & Tabular Workflows as Training Choices
10 Chapter 10: Troubleshooting, Hyperparameter Tuning & Fine-Tuning
10.1 Troubleshooting ML Training Failures 10.2 Hyperparameter Tuning on Agent Platform 10.3 Fine-Tuning Foundation Models & When to Tune
11 Chapter 11: Training Hardware & Distributed Training
11.1 Choosing CPUs, GPUs & TPUs for Training 11.2 Distributed Training: Data & Model Parallelism
12 Chapter 12: Deploying Models for Inference
12.1 Batch vs. Online Inference on Agent Platform 12.2 Serving Beyond Agent Platform Endpoints: Model Garden, Cloud Run & GKE 12.3 Prebuilt & Custom Serving Containers
13 Chapter 13: Model Versions, Rollouts & Inference Logic
13.1 Organizing & Versioning Models in Model Registry 13.2 Rollout Strategies: A/B Tests, Canaries & Traffic Splits 13.3 Inference Preprocessing & Postprocessing
14 Chapter 14: Scaling Online Serving
14.1 Serving Features Online with Feature Store 14.2 Public, Dedicated & Private Endpoints 14.3 Serving Hardware & Autoscaling for Throughput 14.4 Tuning Models for Production Training & Serving
15 Chapter 15: End-to-End ML Pipelines
15.1 Validating Data & Models in Pipelines 15.2 Agent Platform Pipelines with KFP: Components, Templates & Caching 15.3 Ensuring Consistent Preprocessing Between Training & Serving
16 Chapter 16: Orchestration with Managed Airflow & Ray
16.1 Orchestrating ML Workflows with Managed Service for Apache Airflow 16.2 Ray on Agent Platform for Distributed ML Workloads
17 Chapter 17: Automating Retraining & CI/CD/CT
17.1 Choosing a Retraining Policy 17.2 CI/CD/CT for ML with Cloud Build
18 Chapter 18: Securing AI Systems, Responsible AI & Explainability
18.1 Protecting AI Systems from Data & Model Exfiltration 18.2 Defending Gen AI Apps: Safety Filters, Model Armor & Regex Guardrails 18.3 Responsible AI: Detecting & Monitoring Bias 18.4 Model Explainability on Agent Platform
19 Chapter 19: Monitoring AI Solutions
19.1 Configuring Model Monitoring on Agent Platform 19.2 Training-Serving Skew, Data Drift, Concept Drift & Attribution Drift 19.3 Monitoring, Testing & Evaluating Gen AI Solutions in Production
18.4 Model Explainability on Agent Platform
Key Takeaways Explain This Topic AI
Feature-based explanations on Agent Platform are configured when a model is uploaded or registered, using sampled Shapley, integrated gradients, or XRAI with an explanation specification and metadata.
Sampled Shapley path count ranges from 1 to 50 (Google suggests 25 if unsure), and integrated gradients step count ranges from 1 to 100 (suggested 50).
Google suggests adjusting the explanation configuration when the returned approximationError exceeds 0.05.
Vertex Explainable AI was deprecated on March 16, 2026 and is scheduled to shut down on March 16, 2027, with SHAP and LIME suggested as open-source alternatives.
Online explanations use the endpoint's explain method, and batch inference can return attributions when generateExplanation is enabled on an explanation-configured model.
Last updated: September 2026
The exam guide lists model explainability on Agent Platform (for example, Agent Platform Inference) . Section 8.3 covered choosing interpretable techniques. This section covers producing explanations from deployed models and doing it reliably.
Lifecycle Status First
Vertex Explainable AI was deprecated on March 16, 2026 . No new features are being added, and the APIs are scheduled to be fully shut down on March 16, 2027 . Google suggests open-source libraries such as SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) as alternatives. Know how the built-in feature works, since it's still documented and may appear in scenarios, and plan migrations for long-lived systems.
Feature-Based Explanations
Feature attributions show how much each input feature moved a prediction relative to a baseline . Methods (all Shapley-based):
Method Use for Key parameter
Sampled Shapley Non-differentiable models such as tree ensembles, AutoML tabular, and custom models in any container Path count 1-50. Google suggests 25 if unsure
Integrated gradients Differentiable models (neural networks), large feature spaces, low-contrast images Step count 1-100. Google suggests 50
- XRAI Region-level saliency for natural images Step count (builds on integrated gradients)
- Configuring explanations
Explanations are configured when you upload or register the model in Model Registry:
ExplanationSpec parameters: the method and its path count or step count.
ExplanationMetadata: the model's input and output names (for TensorFlow models) and optional input baselines . If you don't set baselines, Agent Platform chooses them.
AutoML tabular (classification and regression) and AutoML image classification models have attributions built into the console. BigQuery ML models registered in Model Registry can also be configured for feature-based explanations.
Requesting explanations
- Mode How
- Online Call the endpoint's explain method. It returns predictions plus attributions per instance
Batch Set generateExplanation on a batch inference job for a model configured for explanations, or supply an explanation spec on the job
Explanation requests add compute and latency. Use them for sampled traffic, audits, or user-facing reason codes rather than every high-volume request unless required.
Endpoint note: AutoML models and explainability are supported on shared public endpoints , not dedicated or private endpoint types (Chapter 14).
Making Explanations Reliable
Attribution methods approximate Shapley values, and each attribution returns an approximationError . If it exceeds 0.05 , adjust the configuration:
Increase the path count (sampled Shapley) or step count (integrated gradients, XRAI).
Change baselines. Tabular baselines can be median, minimum, maximum, or random values. Image baselines can be black, white, gray, or random images.
Add baselines. Two baselines (for example, minimum and maximum, or black and white images) often help. Extra baselines add latency for integrated gradients and XRAI, but not for sampled Shapley.
Sanity checks: attributions should roughly sum to the difference between the prediction and the baseline prediction. Top features should make domain sense, and surprising drivers, such as a record ID, point to leakage or bugs.
Example-Based Explanations
Example-based explanations return the most similar training examples by nearest-neighbor search over model embeddings. Uses:
Debug mistakes: a bird misclassified as a plane whose neighbors are all plane silhouettes suggests you need more bird silhouettes.
Detect outliers: inputs far from all training data.
Active learning: pick ambiguous examples for labeling.
They support TensorFlow models that produce embeddings , not tree-based models.
Explanations in Monitoring
Feature attribution drift watches whether the features driving predictions change over time, even when input distributions look stable (Chapter 19). A rising attribution for a feature that shouldn't matter is an early warning of skew, a broken upstream feature, or concept change.
Explainability Without the Deprecated Service
Model Alternative
BigQuery ML models ML.EXPLAIN_PREDICT , ML.GLOBAL_EXPLAIN , ML.FEATURE_IMPORTANCE , ML.EXPLAIN_FORECAST (Chapter 8)
- Tree models (XGBoost, LightGBM) SHAP TreeExplainer (exact, fast) in batch jobs or a CPR postprocess()
- Neural networks SHAP gradient or deep explainers, or integrated gradients implemented in the framework
- Any model, local explanations LIME local surrogate models
Global model understanding SHAP summary plots from batch jobs on validation data, stored with the model version
Design pattern: compute explanations in a batch pipeline for audits and monitoring, and in the serving container only where per-request reason codes are required, caching where possible.
Worked Scenario
A credit card issuer's XGBoost model must return the top three reason codes with each decline. It's currently configured with sampled Shapley on Agent Platform, and the design must last beyond 2027.
Short term: keep sampled Shapley with a path count of about 25. Check approximationError , and raise the path count if it exceeds 0.05.
Migration: add SHAP TreeExplainer to the custom prediction routine's postprocess() to produce reason codes, and compare them with current attributions on a validation set.
Monitoring: compute daily SHAP summaries in a batch pipeline and alert on attribution drift.
Before March 16, 2027: switch production to the SHAP path.