Responsible AI, security and governance · 13 min
Transparency, explainability and Amazon SageMaker Model Cards
In this lesson you will learn to tell transparency from explainability, which models can be explained and which can't, what is documented in Amazon SageMaker Model Cards and what other transparency tools the exam guide asks about.
Transparency and explainability are the two topics of task 4.2 of the AWS Certified AI Practitioner exam guide, and they answer different questions about a model. For example, when a bank rejects a loan with a model, someone at the bank has to be able to say why that decision was made, and that is explainability. Before that, someone decided that the model was suitable for approving loans, chose what data it was trained on and rated how risky it was, and communicating all of that is transparency.
What are transparency and explainability?
Transparency is what is communicated about a system: what it is for, what its limits are, what data it was built with and how it was evaluated. AWS defines it as enabling people to make an informed decision about whether or not to use the system. For example, the bank is transparent when it publishes that its credit model is only used for personal loans, that it was trained on applications from the bank's own customers and that a person reviews every rejection.

Explainability, on the other hand, is being able to understand how the model arrived at a response. AWS defines explainable AI (XAI) as the methods and technologies that allow people to understand a model's behavior and decisions and to influence them. This explanation has three scopes, which go from the whole model to a single case, and each one talks about the variables the model uses:
- The global scope, which tells which variables weigh most across the whole model. For example, that salary is what counts most in all credit decisions.
- The cohort scope, which tells why the model behaves a certain way with a group, such as when it rejects most people in their twenties. For example, that with that group having a short payment history weighs heavily.
- The local scope, which tells why the model decided something in a specific case. For example, that Ana was denied the loan because her debts were high for her salary.
These two properties don't always go together. A model can have everything transparency asks for documented and, even so, nobody can say why it rejected a particular application. For example, the bank can publish what data it trained its model on and still not know how to explain to Ana why it rejected her.
Which models can be explained?
ML models can be placed on a spectrum according to how easy they are to explain, from linear regression, which is a simple formula, to the foundation model.

At the easiest end to explain are the interpretable models, which are the ones a person can read and understand from the inside. In a linear regression, each coefficient tells how much a variable weighs, and a decision tree is a set of rules you can read. For example, a decision tree at the bank could have the rule "if debts are greater than half of the salary, reject", and any employee can read it and explain it to the customer. AWS recommends these models when you have to be able to say exactly how something was decided.
At the opposite end is the black box, which is a model whose inner workings nobody can read. That is what the deep neural network, which has many hidden layers, and the foundation model, which is even larger, are called. To explain these models, methods applied after the prediction are used, such as SHAP and LIME, which estimate which variables influenced it. For example, if a neural network rejects Ana, SHAP can estimate that her level of debt was what pushed most toward the rejection, even though nobody sees the exact rule.
Accuracy versus explainability
The guide asks you to recognize the tradeoff between the two ends of the spectrum, because the most accurate model is often the least explainable. That is why the AWS Machine Learning Lens asks you to agree with the business, from the start, on how much explainability is needed. In healthcare and finance, the law may also require it. For example, an app that recommends songs can use the most accurate model even if nobody can explain it, while a bank that must justify every rejection may prefer a slightly less accurate decision tree.
Which model is the better fit?
An insurance company has to explain to each customer why it rejected their application, and a simple model reaches the accuracy it needs. What does it choose?
What is Amazon SageMaker Model Cards?
Amazon SageMaker Model Cards is the AWS tool for documenting an ML model in a single place, for governance and reporting purposes. It lets anyone who reviews the model, such as an auditor, find on a single card what it does, what risk it carries and how it was tested, instead of searching through emails and scattered documents. In the SageMaker AI console, which is the AWS website where you manage the service, it is under Governance, Model cards, and a card is filled in four steps. For example, the bank creates a card for its credit model and fills it in before putting it to work.

The five parts of the card
The card has five parts:
- The details and intended uses, where you write the general purpose, the cases the model was designed for and the ones it wasn't, and the assumptions. For example, "for personal loans; not for business loans".
- The risk rating, which can be unknown, low, medium or high. In the AWS example, a model that approves loans has more risk than one that classifies emails, because an error in a loan affects a person's life more.
- The training, where the data, the hyperparameters, the objective function and the observations are described. For example, that the model was trained on the bank's applications from recent years.
- The evaluation, which gathers metrics and results in reports in JSON format. For example, the model's percentage of correct answers on applications it didn't see during training.
- The additional details, which hold considerations, recommendations and custom fields, such as the line of business. For example, that the model belongs to the personal loans area.
Exporting and versioning the card
Once filled in, the card is exported to PDF to share it with the risk, compliance or audit teams. Every edit, except a change of approval status, creates a new version, so a record that can't be altered remains. For example, if someone changes the intended use of the credit model, the previous version is kept, and an auditor can see what the card said before the change. You can also create a card for a model that isn't on AWS, or without associating it with any model.
True or false?
0 of 4Model Cards blocks the responses of a model that goes outside its intended use.
Changing the intended use in a model card creates a new version.
You can only create a model card for a model trained in SageMaker AI.
The risk rating can be unknown, low, medium or high.
What other transparency tools are there?
Along with Model Cards, the exam guide gives other examples of transparency tools:
- Amazon Bedrock Model Evaluation, which compares models with metrics such as accuracy, robustness and toxicity, using people from your team or a model that grades another one. With those results you can show in numbers how the model you chose behaves. For example, the bank compares two models for its chat and chooses the one that gives fewer toxic responses.
- AWS AI Service Cards, which are cards AWS publishes about its own AI services and models, with the intended use cases, the limitations and the responsible design decisions. For example, before using an AWS service to recognize faces, the bank reads its card to know in which cases it works worse.
- Open source models, their data and their licenses, which also count because an open model can be reviewed in more depth and the license, which is the author's written permission, says what you are allowed to do with it. For example, an open model's license can say whether the bank can use it in a product it charges for.
All this documentation is published so that other people can read it. However, publishing also has a limit, and that is why the Responsible AI Lens recommends reviewing it before making it public, so as not to expose sensitive design information. For example, the bank can publish what its model is for, but not the exact rules a scammer could use to fool it.
Match each need with its tool
0 of 4 pairsTap a need and then the tool that covers it.
0 of 4 pairs.
How do you design so that people understand AI?
The guide also asks about principles of human-centered design, so that whoever uses a system understands what the AI does and knows when to trust it. The Responsible AI Lens recommends showing confidence scores, which say how sure the model is of its response, citing the sources of each response, adding human review where an error has consequences and measuring whether people know when to trust the system. To that, the Generative AI Lens adds asking for user feedback, even if it is just a thumbs up or down. For example, the bank's chat can answer about fees with a link to the document it took the information from and a button to say whether the response helped.
Model Cards in both accounts
Amazon SageMaker AI is available on the free plan of the new experience and in the full account. Creating a model card doesn't launch any compute resource, and the SageMaker AI pricing page doesn't give a price for Model Cards. For example, you can practice by filling in a card for an imaginary online store model without turning on any server.
On the exam
Questions on this topic usually ask for the tool that covers a need, and these words in the question point to the answer:
- "Document the intended use and risk" or "for an audit", which point to Model Cards.
- "Explain why it decided", which points to an interpretable model or to SHAP and LIME.
- "Limitations of an AWS AI service", which points to AI Service Cards.
- "Compare models with metrics", which points to Bedrock Model Evaluation.
For example, if the question says a hospital needs to know in which cases an AWS AI service fails before signing up for it, the answer is AI Service Cards.
Review question
A bank's risk team asks for a document with the intended use, the risk rating and the evaluation results of a credit model. It also wants to see how that document changed over time. What should they use?
Next
- Amazon SageMaker Model Cards, in the Amazon SageMaker AI Developer Guide.
- Take an AI Practitioner practice exam at /examenes and review your result in domain 4.