Lesson 1 of 4 Model Monitoring in Azure Machine Learning

Understanding Model Monitoring

This lesson explains why models degrade in production, how model monitoring compares production and reference data, which signals exist, and how production data is collected.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish data drift, concept drift and data quality problems.
  • Describe how a model monitor runs.
  • Identify the monitoring signals.
  • Explain the role of the data collector.

Why models degrade

A model is trained on a snapshot of the past. After deployment, the data it receives can change in ways that make its predictions less accurate: customers behave differently, a new product changes purchase patterns, an upstream system changes how a field is recorded, or a sensor is replaced. The model's code is unchanged, so nothing fails visibly; predictions simply get worse.

  • Data drift: the distribution of input features changes, for example the share of customers on a new plan.
  • Concept drift: the relationship between inputs and the target changes, so the same inputs now lead to different outcomes.
  • Data quality problems: missing values, wrong types or out-of-range values caused by upstream changes.

Monitoring detects these problems early, often before the business notices, and starts the investigation or retraining that fixes them.

How model monitoring works

Azure Machine Learning model monitoring runs as a scheduled job. Each run takes a window of production data, such as the last day's inputs and outputs of a deployment, and a window of reference data, such as the training data or an earlier production period. It computes the metrics of each configured signal, compares them with thresholds, records the results in the studio, and sends notifications when thresholds are breached.

  1. Collect production data

    The data collector on a managed online deployment logs inputs and outputs; batch outputs or other data can be supplied as data assets.

  2. Choose reference data

    Training data, validation data, or a recent period of production data.

  3. Configure signals

    Data drift, prediction drift, data quality, feature attribution drift and model performance, with metrics and thresholds.

  4. Schedule the monitor

    A recurrence or cron schedule runs the monitoring job, for example daily.

  5. Act on results

    Email notifications, the studio monitoring overview, and events that start retraining.

Monitoring signals

Each signal measures one kind of change. The following table lists the built-in signals for tabular classification and regression models, with their reference data options.

SignalMeasuresReference data
Data driftChanges in input feature distributionsTraining data or recent past production data
Prediction driftChanges in the distribution of model outputsValidation data or recent past production data
Data qualityNull value rate, data type error rate, out-of-bounds rateTraining data or recent past production data
Feature attribution drift (preview)Changes in feature importance, measured with normalized discounted cumulative gainTraining data (required)
Model performance (preview)Accuracy, precision and recall, or MAE, MSE and RMSEGround truth data (required)

A generation safety and quality signal (preview) also exists for generative AI question-and-answer applications, with groundedness, relevance, fluency, similarity and coherence; Microsoft Foundry's own monitoring, covered in the generative AI modules, is the main tool for those applications.

Collecting production data

For a managed online deployment, the data collector is enabled in the deployment definition with model_inputs and model_outputs collections, and logs them to Blob Storage. For MLflow models with no-code deployment, payloads are logged automatically; custom scoring scripts call the collector from the azureml-ai-monitoring package to log DataFrames. Each record carries a correlation ID, which later joins predictions to their ground truth.

Models served elsewhere, such as batch endpoints or applications outside Azure Machine Learning, can still be monitored by writing their inputs and outputs to storage and registering them as data assets that the monitor reads. Monitoring authenticates with the workspace's identity or a user-assigned identity, which needs read access to that data. Monitoring does not support workspaces that use the Allow only approved outbound managed network mode.

Worked example

A silent decline

A retailer's demand forecasting model has been in production for eight months. Forecast errors reported by the planning team have doubled, but the endpoint shows no errors and normal latency. The deployment does not collect data, and nobody has looked at the model since release.

The symptoms fit drift: the service works, but the model no longer fits the data. Enable the data collector on the deployment, create a model monitor with data drift, prediction drift and data quality signals using the training data as reference, and add model performance monitoring by joining actual demand, as ground truth, to the predictions by correlation ID. The monitor shows which features drifted and confirms the accuracy loss, which justifies retraining on recent data.

Scaling the deployment would not change the predictions. Retraining immediately on the same historical data would reproduce the problem. Endpoint metrics in Azure Monitor show service health, not model quality.

Check yourself

Which production data must be collected for a model monitor to detect data drift and prediction drift?

Show answer

model_inputs for data drift and model_outputs for prediction drift, collected by the data collector on the online deployment.

Exam Tips

Remember for the exam

  • Models degrade through data drift, concept drift and data quality problems.
  • A monitor compares production data with reference data on a schedule, against thresholds.
  • Signals: data drift, prediction drift, data quality, feature attribution drift (preview), model performance (preview).
  • The data collector logs model_inputs and model_outputs with correlation IDs.