Lesson 3 of 4 Model Registration and Responsible AI

Evaluating Models with Responsible AI

This lesson explains the Responsible AI principles, the components of the Responsible AI dashboard, how a dashboard is created, and what the scorecard provides.

Learning outcomes

After completing this lesson, you will be able to:

  • Identify the Responsible AI principles.
  • Describe what each dashboard component reveals.
  • Identify the models the dashboard supports.
  • Explain the purpose of the Responsible AI scorecard.

Responsible AI principles

Microsoft's responsible AI principles are fairness, reliability and safety, privacy and security, inclusiveness, transparency, and accountability. For a predictive model, they become concrete questions: does the model perform equally well for different groups of people; where does it fail and why; which features drive its predictions; could a different decision have been reached with small changes to the inputs; and can the organization explain and defend each of these answers.

A model with 92 percent overall accuracy may be 98 percent accurate for one group and 70 percent for another. Aggregate metrics hide this, so responsible AI evaluation looks at cohorts, subsets of the data defined by feature values such as region, age band or product.

Dashboard components

The Responsible AI dashboard in Azure Machine Learning combines several open-source tools in one interface. Each component answers a different question, and they are designed to be used together.

ComponentQuestion it answersTypical finding
Error analysisWhere does the model make the most errors?A cohort, such as new customers on monthly plans, with a high error rate
Model overview and fairness assessmentHow do performance and fairness metrics compare across cohorts and sensitive groups?A large gap in recall between two regions
Data analysisHow is the data distributed, and are groups under-represented?Too few examples of one group in the training data
Model interpretabilityWhich features matter globally and for individual predictions?An identifier-like feature with suspicious importance
Counterfactual what-ifWhat minimal changes would flip a prediction?A small change in one feature changes the decision
Causal analysisWhat is the estimated effect of changing a feature on the outcome?The effect of a discount on churn, for decision-making

The dashboard supports regression and binary or multiclass classification on tabular data, for MLflow models with a scikit-learn implementation that provide predict() and, for classification, predict_proba(). It visualizes up to 5,000 rows of test data.

Creating a dashboard

A dashboard is generated by a pipeline built from Responsible AI components that Microsoft publishes in the azureml registry. A constructor component takes the registered model, the training data and the test data (as mltable data assets in Parquet format), the target column and the task type. Tool components add error analysis, explanations, counterfactuals and causal analysis, and a gather component assembles the results into a dashboard attached to the model.

The studio can also create a dashboard from a registered model through a wizard, which builds and runs the same pipeline. Building it in code suits automation: the pipeline can run as part of training, so that every candidate model has a dashboard before anyone decides whether to release it. Automated ML models registered from the studio are not supported by the dashboard, so teams that need it train or re-register a compatible scikit-learn MLflow model.

The Responsible AI scorecard

The dashboard is an interactive tool for data scientists. Business owners, risk officers and regulators need a summary instead. The Responsible AI scorecard is a PDF report generated from the dashboard's results, configured with the metrics and fairness targets that matter, such as a minimum accuracy and a maximum disparity between groups. It records whether each target was met.

The scorecard becomes evidence in the release process: a workflow can generate it for each candidate model and attach it to the approval request, so the approver sees performance and fairness results before deciding.

Evidence, not a verdict

Responsible AI assessment complements, and does not replace, the organization's own review. The dashboard surfaces evidence; people decide whether a gap is acceptable, needs mitigation, or blocks the release.

Worked example

Finding a hidden failure

A lender's credit model has an overall AUC of 0.89, which meets the release criterion. The compliance team must confirm that the model does not perform significantly worse for any age group, and needs a document it can file with the approval. The model is a scikit-learn MLflow model.

Create a Responsible AI dashboard for the model with the test data, use model overview and fairness assessment with age group as the sensitive feature to compare metrics across groups, and use error analysis to find any cohort with a high error rate. Generate the Responsible AI scorecard with a maximum allowed disparity, and attach the PDF to the approval.

Reporting the overall AUC would hide group differences. Interpretability alone shows which features matter, not whether performance differs between groups. Removing the age feature does not guarantee fairness, because other features can act as proxies, and it would remove the ability to measure the gap.

Check yourself

Which Responsible AI dashboard component identifies the groups of data where a model's error rate is highest?

Show answer

Error analysis. Its tree map and heat map split the data by features to find cohorts with error rates well above the average.

Exam Tips

Remember for the exam

  • Principles: fairness, reliability and safety, privacy and security, inclusiveness, transparency, accountability.
  • Dashboard: error analysis, model overview and fairness, data analysis, interpretability, counterfactual what-if, causal analysis.
  • Supports tabular regression and classification with scikit-learn MLflow models.
  • The scorecard is the PDF summary for stakeholders and approvals.