Professional Machine Learning Engineer
Model degradation occurs when a deployed machine learning model experiences a decrease in prediction accuracy over time due to changes in real-world environments. Training-serving skew arises when the data used to train a model differs from the live data it encounters during production inference. This discrepancy typically happens because of inconsistent data preprocessing pipelines, differences in feature generation code, or time delays between feature capture and prediction. In contrast, data drift represents a statistical shift in input feature distributions over time, while concept drift occurs when the relationship between input features and the target label changes. Left unmanaged, both drift and skew cause the model to make inaccurate inferences without throwing explicit software runtime errors.
Production AI solutions face operational, ethical, and adversarial risks that threaten system reliability and integrity. Adversarial attacks introduce subtly modified inputs designed to mislead a model into producing incorrect high-confidence predictions. Data poisoning risks occur during retraining cycles when unverified or malicious data enters the training pipeline. Fairness risks involve unintentional demographic bias, where model performance varies across sensitive groups. Teams evaluate feature attributions using Vertex Explainable AI to identify whether models rely on inappropriate feature correlations, utilizing methods such as Shapley values for tabular models or Integrated Gradients for deep neural networks.
Vertex AI Model Monitoring is a managed service that automatically detects feature skew and feature drift for models deployed to Vertex AI endpoints. For skew detection, the service compares incoming production request payloads against the original baseline training data stored in Cloud Storage or BigQuery. For drift detection, the service samples production traffic over consecutive rolling time windows and compares the current distribution against a baseline of historical serving data. Vertex AI Model Monitoring calculates statistical distance metricsâsuch as the Jensen-Shannon divergence or L-infinity distanceâfor each feature and emits an alert through Cloud Monitoring when a metric exceeds a user-configured threshold.
+-------------------------------------------------------------+
| Vertex AI Endpoint |
| [ Live Serving Requests ] ----> [ Vertex AI Model ] |
+------------------------------------+------------------------+
| (Request-Response Logs)
v
+--------------------------------------+
| Vertex AI Model Monitoring |
+--------------------------------------+
| |
(Compare vs. Baseline) (Compare Rolling Windows)
v v
[ Skew Detection ] [ Drift Detection ]
| |
+----------+-----------+
| (Distance > Threshold)
v
[ Cloud Monitoring Alert ]
|
v
[ Vertex AI Retraining ]
Infrastructure observability and model logging provide the diagnostic data necessary to isolate errors across the machine learning serving lifecycle. An endpoint writes operational metricsâincluding CPU utilization, GPU memory consumption, request latency, and HTTP error codesâdirectly to Cloud Monitoring. Enabling request-response payload logging exports raw prediction inputs and outputs to BigQuery tables for offline analysis, auditing, and continuous evaluation against delayed ground-truth labels. When feature drift or accuracy loss is detected, automated workflows triggered through Vertex AI Pipelines run data validation checks, trigger retraining jobs on updated datasets, and deploy the resulting candidate model using a canary traffic split to verify stability before full rollout.
Feature skew measures the statistical difference between the original training dataset and the live production inference requests. Feature drift measures the statistical change in live production inference data over time by comparing current time windows against historical serving traffic.
When Cloud Monitoring triggers an alert from drift detection, it initiates a Vertex AI Pipelines workflow that extracts new data, executes preprocessing and training, and validates performance against a holdout dataset. Once validated, the new model is deployed to an existing endpoint with a canary traffic split to safely replace the degraded model.
When request-response logging is enabled on a Vertex AI endpoint, raw prediction payloads and model outputs are automatically streamed to BigQuery tables or Cloud Storage buckets for long-term storage and analytical querying.
Prepare and test your skills
Prepare and test your skills