What is a Model Card in Machine Learning?
A model card is a type of documentation that is created for and delivered with a machine learning model. Model cards act as a type of data sheet, similar in principle to consumer safety labels, food nutrition labels, material safety data sheets, and product specifications.
Recent years have seen a dramatic increase in the development and adoption of machine learning (ML) and artificial intelligence (AI). Further advances in generative AI are employing large language models (LLMs) as a core component. However, many models used by these platforms are becoming increasingly complex and difficult to understand. Even model developers sometimes struggle to fully understand and explain the behavior of a given model. This complexity raises serious questions about core business values such as transparency, ethics, and accountability. Common questions include:
- What is a particular ML model used for?
- How does a particular ML model work and how does it perform?
- What training data was used to train the model (and what were the results)?
First proposed by Google in 2018, model cards are a way to document key elements of ML models, making it easier for users, including AI designers, business leaders, and ML end users, to understand the intended use cases, characteristics, behaviors, ethical considerations, and biases and limitations of a particular ML model.
As of 2024, there are no legal or regulatory requirements to create or provide model card documentation with ML models. Similarly, there are no currently established standards for the format or content of model cards. However, leading ML developers are leading the adoption of model card documentation as a way to demonstrate responsible AI development, and adopters can find model cards for major platforms such as Meta Llama, Google Face Detection, and OpenAI GPT-3.
Benefits of using Model Cards for your AI, ML, and LLM projects
The rise of ML and AI is driving the need for transparency and accountable governance: businesses need to understand the purpose of their ML models, how they work, how they compare to competing models, how they were trained, and their suitability for the intended task.
Model cards are a tool that can address concerns that easily impact business governance and regulatory issues. Model cards bring a number of key benefits to your ML and AI projects:
- Select the model. By adopting consistent standards for format and content, model cards help ML and AI developers evaluate and select the best ML models for their projects. Model cards help narrow down the initial list of ML candidates, focus testing and evaluation of the most appropriate models, and accelerate the final selection of the best ML model for the task at hand.
- Model behavior and performance. ML models are not perfect, and limitations in training data sets or biases in training methods can affect how the model behaves when dealing with real-world data. Model cards typically include known limitations of the data and training, and allow users of ML models to review and address such limitations through additional training and data. This helps businesses reduce errors and biases in ML models, improving the performance and outcomes of their AI projects.
- Continuous improvement of AI. The detailed information provided by the ML model cards helps enterprises select the best model and allows ML model developers to compare their models with others to improve the capabilities and competitiveness of the platform, driving innovation and improvement of ML models and the ML and AI platforms that use them.
- Business governance. The old adage “you can't manage what you can't see” applies perfectly to modern ML models. Enterprises that employ opaque or incomprehensible ML models are unable to understand or explain the behavior of the ML or AI projects they are developing, exposing them to serious business continuity, business governance, and regulatory compliance risks. ML model cards are a way for enterprises to demonstrate their understanding of the underlying ML models they select and use.
- Transparency and ethics in business. ML and AI technologies have societal impacts, both in the data that is collected and used, and in how that data is processed for decision-making. The documentation and details provided in the ML model cards help companies manage responsible AI development and address societal concerns around an organization's use of AI and the underlying data.
The 7 main sections of the model card
Labels and other information summaries are generally most effective when they allow side-by-side comparisons of similar products with comparable content and format. However, the information presented on ML model cards may vary. Unlike highly regulated information labels, such as nutrition facts labels on food, there are no current standards governing the information contained or format on ML model cards.
ML models are difficult to regulate because they can vary widely in scope, purpose, and functionality. For example, an ML model developed to assist with medical diagnosis may be distinctly different from an ML model created to perform analytics on retail sales operations, or from a complex LLM used in an AI structure. As a result, ML model developers largely have sole discretion in deciding what information to include and how to present that information. However, as major technology companies develop ML/AI platforms and document their offerings through model cards, some de facto documentation standards are emerging. Model cards should include the following:
1. Basic details
This first section of the model card is typically an introduction to the model and can outline key details of the model, such as the name of the model, the version, a revision list, a brief summary of the model, business or developer details and contact information, and any licensing details or restrictions.
2. Use Case Details
This section describes the intended applications, use cases, and users of the model. For example, the use cases section might describe use in object detection, face detection, or medical diagnosis. This section might also include warnings, usage limitations, or uses that are considered out of scope. For example, a model intended for object detection might detail inputs from photos or videos, outputs that include detection of a specified number of object classes, and other output data such as object bounding box coordinates, knowledge graph ID, object description, confidence score, etc.
3. Architectural details
This section describes the overall design of the model and the underlying hardware backend that runs the model and hosts the associated data. Readers can refer to the model card to understand the design elements and underlying technology that makes the model work. For the object detection model example, the model card might describe an architecture that includes a single image detector model with a Resnet 101 backbone and feature pyramid network feature maps.
4. Training Details
This section provides an overview, description, or summary of the data used to train the model, where and when the data was obtained, and the statistical distribution of key factors in the data that may introduce inadvertent bias. Because the training data may be proprietary to the model developer, the training details may be intentionally limited or protected by separate confidentiality agreements. Training details may also include the training method used by the model.
5. Performance details
This section provides details about the performance of your model measured against a test data set rather than a training data set, as well as details about the test data set itself. For the example object detection model, the performance metrics included on the model card might state that both Google's internal image data set and an open-source image set were used as test data, and how many object classes the model was able to detect on each data set. Additionally, the performance details might include a summary of reported metrics, such as object detection precision and accuracy. More advanced models might use other detailed metrics to measure performance.
6. Details of Restrictions
An important segment of a model card is the section that describes limitations, possible biases, or variables that may affect the model's performance or output. In the object detection model example, known limitations might include factors such as object size, clutter, lighting, blur, resolution, object type, etc., because the model cannot see everything.
7. Business Description
This final segment of the model card is often dedicated to business-related details, such as information about the model's developer, contact details, support and licensing information, fairness/privacy and usage information, suggestions for model oversight, any relevant assessment of personal or societal impact, and any other ethical or potential legal concerns related to the use of the model.
Example of a model card
As major technology companies build out their ML and AI platforms, their work on model cards and other documentation is becoming the standard for other ML companies to follow. Today, there are many examples of ML model cards to explore, including these top examples:
- Google face detection model card.
- Meta Llama model card.
- OpenAI's GPT-3 model card.
There are also more standardized tools for creating model cards, and model card repositories, such as the following example:
Both GitHub and Hugging Face provide repositories of model cards available for review and learning, providing examples of model cards across a range of model types, purposes, and industry segments.
