Practical Interpretability
Model Cards
Read aloud is unavailable in this browser.
Standardizing Model Transparency
When you purchase a food product, you expect a nutrition label. When you buy electronics, you expect safety certifications and specifications. But when organizations deploy machine learning models—systems that may affect millions of lives—no standardized documentation format has historically existed. Users, auditors, and even the deploying organizations themselves often lack crucial information about what models do, how they perform across different populations, and what their limitations are.
Model Cards address this gap. Introduced by Mitchell et al. at Google in 2019, Model Cards provide a standardized framework for documenting machine learning models. They serve as the "nutrition labels" of ML—concise, accessible summaries that communicate essential information about trained models to diverse stakeholders.
This page examines Model Cards comprehensively: their purpose and structure, how to create effective model cards, real-world examples, tooling for automation, and emerging extensions of the concept.
By the end of this page, you will understand the purpose and structure of Model Cards, how to create comprehensive and effective model cards for your own systems, available tooling and automation, and how Model Cards integrate with broader documentation practices and regulatory requirements.
The Case for Model Cards
Before diving into structure and implementation, let's understand why Model Cards emerged and what problems they solve.
The Documentation Crisis:
Machine learning models have historically been documented inconsistently, if at all. Common patterns include:
- No documentation: Model exists as a serialized file with no accompanying information
- Code-only documentation: README files that explain how to run the model but not its behavior
- Research paper documentation: Academic papers describing methodology but not deployment considerations
- Scattered documentation: Information spread across wikis, tickets, and tribal knowledge
This creates serious problems across the ML lifecycle:
- •Inappropriate Use: Models deployed for purposes they weren't designed or validated for
- •Hidden Biases: Performance disparities across demographic groups unknown and unaddressed
- •Reproducibility Failures: Inability to recreate results or understand model provenance
- •Knowledge Loss: When creators leave, understanding of models degrades
- •Compliance Gaps: Regulators cannot assess what they cannot see
- •Trust Deficit: Stakeholders cannot evaluate systems they don't understand
- •Incident Response Failure: When problems occur, debugging without documentation is severely impaired
What Model Cards Provide:
Model Cards are not comprehensive technical documentation—they're accessible summaries designed for multiple audiences:
| Stakeholder | What Model Cards Provide |
|---|---|
| ML Practitioners | Quick understanding of model purpose, performance, and limitations |
| Product Teams | Clarity on intended use cases and known constraints |
| Risk/Compliance | Standardized format for review and audit |
| External Auditors | Transparent disclosure for assessment |
| Affected Individuals | Understandable explanation of systems affecting them |
| Researchers | Reproducibility information and baselines for comparison |
The Standardization Benefit:
By using a common format, Model Cards enable:
- Comparison: Evaluate alternative models using consistent criteria
- Efficiency: Reviewers know where to find information without searching
- Completeness: Standardized sections ensure critical information isn't forgotten
- Interoperability: Tools can parse and aggregate information across models
- Accountability: Clear expectations for what documentation should include
Model Cards are designed for accessibility, not exhaustiveness. They summarize essential information for decision-making. They should link to more detailed documentation for those who need it, but the Model Card itself should be readable in minutes, not hours.
Model Card Structure
The original Model Card framework proposed by Mitchell et al. includes several core sections. While organizations adapt this structure to their needs, the fundamental components remain consistent.
Core Model Card Sections:
| Section | Purpose | Key Contents |
|---|---|---|
| Model Details | Identify the model and its creators | Name, version, date, developers, type, license, contact information |
| Intended Use | Define appropriate applications | Primary intended uses, primary intended users, out-of-scope uses |
| Factors | Describe relevant characteristics | Relevant factors (demographic, environmental), evaluation factors |
| Metrics | Specify performance measures | Model performance measures, decision thresholds, variation approaches |
| Evaluation Data | Describe test data | Datasets used, motivation for choice, preprocessing |
| Training Data | Describe training data | Dataset description, motivation, preprocessing (may be less detailed for proprietary) |
| Quantitative Analyses | Report disaggregated results | Unitary results, intersectional results, performance across factors |
| Ethical Considerations | Address ethical issues | Risks, use cases with ethical concerns, mitigation strategies |
| Caveats and Recommendations | Advise on limitations | Known limitations, appropriate/inappropriate uses, recommendations |
Section Deep Dives:
1. Model Details
This section provides the "metadata" of the model—who built it, what it is, and how to learn more:
- Person or Organization Developing the Model: Clear accountability
- Model Date: When the model was created and last updated
- Model Version: Unique identifier for this version
- Model Type: Architecture (e.g., "XGBoost classifier," "BERT-base transformer")
- Paper or Resource: Link to research paper, blog post, or detailed documentation
- Citation: How to cite this model in publications
- License: Terms for using the model
- Contact: Where to send questions or report issues
2. Intended Use
Critically important—this section prevents misuse by explicitly defining appropriate use:
- Primary Intended Uses: What the model was designed and validated for
- Primary Intended Users: Who should be using this model
- Out-of-Scope Uses: Explicit examples of what the model should NOT be used for
- Additional Use Cases: Secondary uses that may be appropriate with care
Example:
Primary Intended Use: Toxicity classification for content moderation in English-language social media comments
Out-of-Scope Uses: Legal evidence for defamation cases, classification of non-English content, classification of long-form articles (trained on short-form only)
3. Factors
This section specifies what factors are relevant to model performance:
- Relevant Factors: Demographic groups, instruments, environments where performance may vary
- Evaluation Factors: Which factors performance was actually disaggregated across
The distinction matters: some relevant factors may not have been evaluated due to data limitations, and the card should acknowledge this gap.
If a factor is relevant but wasn't evaluated (e.g., performance by disability status in a hiring model), the Model Card should explicitly acknowledge this gap—not simply omit mention. Silence is not transparency.
4. Metrics
Specify how performance is measured:
- Performance Measures: What metrics quantify performance (accuracy, AUC, F1, MAE, etc.)
- Decision Thresholds: If the model outputs probabilities, what thresholds define decisions
- Variation Approaches: How uncertainty is estimated (confidence intervals, cross-validation, etc.)
Example:
Primary Metrics: AUC-ROC (overall discrimination), Precision@90%Recall (operational threshold)
Decision Threshold: 0.72 probability triggers positive classification, optimized for equal error rate
Uncertainty: 95% confidence intervals via bootstrap (n=1000)
5. Evaluation Data & Training Data
Describe what data the model was tested on and trained on:
- Dataset Description: What data was used, how much, when collected
- Motivation: Why this data was chosen
- Preprocessing: What transformations were applied
- Limitations: Known gaps or biases in the data
Note: Training data may be less detailed for proprietary models, but evaluation data should be transparent.
6. Quantitative Analyses
The heart of disaggregated evaluation:
- Unitary Results: Overall performance metrics
- Intersectional Results: Performance broken down by relevant factors and their intersections
This section enables detection of performance disparities that aggregate metrics hide.
7. Ethical Considerations
Explicit discussion of ethical dimensions:
- Potential Risks: What could go wrong if the model is misused or performs poorly
- Sensitive Use Cases: Applications that require additional scrutiny
- Mitigation Strategies: What has been done to address identified ethical concerns
- Human Oversight: Recommended human involvement in model use
8. Caveats and Recommendations
Practical advice for users:
- Known Limitations: Where the model is known to underperform
- Recommendations for Use: Best practices for deployment
- Recommendations Against Use: When NOT to use this model
Complete Model Card Example
Let's examine a complete Model Card example to see how the sections come together. This example is for a hypothetical customer churn prediction model.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
# Model Card: Customer Churn Prediction Model v2.1 ## Model Details - **Developer:** Acme Analytics, Customer Intelligence Team- **Model Date:** January 2024- **Model Version:** 2.1.0- **Model Type:** Gradient Boosted Decision Tree Ensemble (LightGBM)- **License:** Internal use only (proprietary)- **Contact:** ml-team@acme.com- **Documentation:** [Internal Wiki Link] ### Model Architecture- LightGBM classifier with 500 trees- Max depth: 8- Learning rate: 0.05- 47 features from behavioral and account data --- ## Intended Use ### Primary Intended Uses- Identifying customers at risk of churning in the next 90 days- Prioritizing customer success outreach- Informing retention campaign targeting ### Primary Intended Users- Customer Success team- Marketing analytics team- Retention campaign managers ### Out-of-Scope Uses- **NOT for:** Individual pricing decisions (may create disparate impact)- **NOT for:** Credit or lending decisions (not validated for this purpose)- **NOT for:** Customers with <30 days account history (insufficient data)- **NOT for:** Enterprise accounts (trained on SMB segment only) --- ## Factors ### Relevant FactorsPerformance may vary across:- **Customer tenure:** New (<6 months) vs established (>6 months)- **Plan type:** Free, Basic, Premium- **Industry vertical:** Technology, Healthcare, Retail, Other- **Account size:** Usage volume tiers- **Acquisition channel:** Organic, Paid, Referral, Sales ### Evaluation FactorsQuantitative analysis conducted for:- Customer tenure (3 buckets)- Plan type (3 categories)- Industry vertical (4 categories)- Account size quartiles **Gap:** Performance not evaluated by customer geography or company size (employee count) due to data limitations. --- ## Metrics ### Performance Measures- **Primary:** AUC-ROC (discrimination ability)- **Secondary:** Precision at 20% threshold (actionability)- **Secondary:** Recall at 20% threshold (coverage)- **Calibration:** Reliability diagram ### Decision Threshold- Default threshold: 0.65 probability → "At Risk"- Threshold selected to achieve ~80% precision at ~40% recall ### Uncertainty Quantification- 95% confidence intervals via 5-fold cross-validation- Bootstrap confidence intervals for subgroup analyses (n=1000) --- ## Training Data - **Source:** Internal customer data warehouse- **Time Period:** January 2022 - December 2023- **Volume:** 247,000 customer-months- **Churn Rate:** 4.7% (actual churns in window)- **Features:** 47 behavioral and account features- **Exclusions:** Enterprise accounts, accounts <30 days old- **Preprocessing:** Missing value imputation (median), categorical encoding (target encoding with smoothing) ### Known Data Limitations- Healthcare industry underrepresented (<5% of training data)- Q4 2022 had data quality issues (flagged in preprocessing)- Referral customers underrepresented --- ## Evaluation Data - **Source:** Holdout sample from same data warehouse- **Time Period:** January 2024 (true 90-day forward labels)- **Volume:** 12,500 customers- **Selection:** Random stratified sample by plan type- **Churn Rate:** 4.3% --- ## Quantitative Analyses ### Overall Performance | Metric | Value | 95% CI ||--------|-------|--------|| AUC-ROC | 0.847 | [0.831, 0.863] || Precision@20% | 0.312 | [0.287, 0.337] || Recall@20% | 0.764 | [0.721, 0.807] | ### Performance by Tenure | Tenure Bucket | n | AUC | Precision@20% | Flag ||--------------|---|-----|---------------|------|| 0-6 months | 3,200 | 0.789 | 0.251 | ⚠️ Lower || 6-18 months | 5,100 | 0.862 | 0.334 | ✓ || >18 months | 4,200 | 0.871 | 0.345 | ✓ | **Note:** Model underperforms for new customers (0-6 months).Consider separate model or increased human review for this segment. ### Performance by Plan Type | Plan Type | n | AUC | Precision@20% | Flag ||-----------|---|-----|---------------|------|| Free | 4,100 | 0.824 | 0.289 | ✓ || Basic | 5,800 | 0.851 | 0.318 | ✓ || Premium | 2,600 | 0.873 | 0.341 | ✓ | ### Performance by Industry | Industry | n | AUC | Flag ||----------|---|-----|------|| Technology | 5,400 | 0.859 | ✓ || Retail | 3,900 | 0.842 | ✓ || Healthcare | 580 | 0.791 | ⚠️ Lower (small n) || Other | 2,620 | 0.838 | ✓ | **Note:** Healthcare industry shows lower performance and small sample size. Use with caution for this segment. --- ## Ethical Considerations ### Identified Risks1. **Retention actions may be biased:** If model underperforms for certain segments, those customers may receive less outreach2. **Self-fulfilling prophecy:** If high-risk labels lead to reduced investment, churn becomes more likely3. **Feedback loop:** Training on historical data may perpetuate past outreach biases ### Mitigations Implemented- Disaggregated analysis (above) to identify performance gaps- Human review required before major account actions- Quarterly monitoring for prediction drift and outcome disparities- Random outreach component (20%) independent of model scores ### Recommended Human Oversight- Model scores inform but do not determine outreach decisions- Customer success representatives make final decisions- Escalation path for customers who dispute being labeled "at risk" --- ## Caveats and Recommendations ### Known Limitations1. Lower performance for customers <6 months tenure2. May underperform for Healthcare industry (limited training data)3. Not validated for Enterprise segment4. Predictions become less reliable >60 days forward ### Recommendations- **DO:** Use as one input among many for outreach prioritization- **DO:** Review disaggregated performance quarterly- **DO:** Combine with product usage signals for new customers- **DON'T:** Use as sole criterion for reducing investment in a customer- **DON'T:** Apply to Enterprise accounts without validation- **DON'T:** Use for any purpose beyond retention outreach targeting ### Update Schedule- Quarterly retraining on rolling 24-month window- Annual validation study with fresh holdout- Immediate review if outcome rates shift >10% --- ## Version History | Version | Date | Changes ||---------|------|---------|| 2.1.0 | Jan 2024 | Quarterly retrain; added industry analysis || 2.0.0 | Oct 2023 | Major revision: new feature set, LightGBM || 1.2.0 | Jul 2023 | Threshold optimization || 1.0.0 | Jan 2023 | Initial production release |This example is comprehensive but still readable in ~10 minutes. Avoid both extremes: cards so brief they provide no value, and documents so long they become technical specifications. Link to detailed documentation for those who need depth.
Creating Effective Model Cards
Creating a useful Model Card requires more than filling in a template—it requires understanding your audience, being honest about limitations, and providing actionable information.
The Model Card Creation Process:
- •Define Intended Audience: Who will read this card? What decisions will they make? What do they need to know?
- •Gather Information: Collect training details, evaluation results, decision rationale from development process
- •Conduct Disaggregated Evaluation: Analyze performance across relevant subgroups—this is often the most work-intensive step
- •Identify Limitations Honestly: What doesn't work? What wasn't tested? What assumptions might fail?
- •Draft Content: Write each section with your audience in mind
- •Review with Stakeholders: Get feedback from intended users—do they understand? Is anything missing?
- •Establish Update Process: How will the card be maintained as the model evolves?
Best Practices:
1. Write for Multiple Audiences Simultaneously
The same card will be read by technical and non-technical stakeholders. Use layering:
- Headlines and summaries for quick scanning
- Tables for structured comparison
- Detailed text for those who need depth
- Links to full documentation for technical details
2. Be Specific, Not Vague
❌ "The model may have some biases" ✓ "The model shows 8% lower precision for customers in the Healthcare industry (AUC 0.79 vs 0.85 overall)"
Vague warnings provide no actionable information. Specific findings enable informed decisions.
3. Explain What's Missing
A Model Card's value includes what it reveals about gaps:
- "Performance not evaluated by disability status due to data unavailability"
- "Geographic analysis limited to country level; regional variation not assessed"
4. Connect Metrics to Impact
Raw metrics are insufficient. Explain implications:
- "At the default threshold, expect approximately 1 in 3 'high-risk' predictions to actually churn"
- "False positive rate of 12% means ~1,200 customers per month contacted unnecessarily"
5. Include Visual Summaries Where Helpful
Confusion matrices, reliability diagrams, and subgroup comparison charts can communicate patterns faster than tables of numbers.
6. Link Limitations to Recommendations
Every documented limitation should connect to guidance:
- Limitation: "Lower performance for new customers"
- Recommendation: "Supplement model scores with product usage signals for customers under 6 months"
If you wouldn't want a regulator, journalist, or affected individual to read something in your Model Card, either the card is hiding important information or the model shouldn't be deployed. Model Cards enforce healthy transparency discipline.
Model Card Tooling and Automation
Several tools exist to streamline Model Card creation, from templates to automated generators that extract information from training pipelines.
| Tool | Provider | Key Features | Use Case |
|---|---|---|---|
| Model Card Toolkit | Google/TensorFlow | Python library; generates HTML/Markdown; integrates with TFMA | TensorFlow-based workflows; programmatic generation |
| Hugging Face Model Cards | Hugging Face | Built into Hub; YAML metadata; community templates | Open-source model sharing; Hugging Face ecosystem |
| ML Metadata (MLMD) | TensorFlow/Google | Artifact tracking; lineage; integrates with TFX | Pipeline-based card generation; provenance tracking |
| ClearML | ClearML | Experiment tracking; model documentation; versioning | End-to-end ML experiment management |
| Weights & Biases | Weights & Biases | Model registry; rich documentation; versioning | Experiment tracking with documentation layer |
| Custom Templates | Internal | Organization-specific format; domain adaptation | Tailored requirements; regulatory compliance |
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
import model_card_toolkit as mct # Initialize the Model Card Toolkittoolkit = mct.ModelCardToolkit() # Get model card from toolkitmodel_card = toolkit.scaffold_assets() # Populate model detailsmodel_card.model_details.name = "Customer Churn Predictor"model_card.model_details.version.name = "2.1.0"model_card.model_details.version.date = "2024-01-15"model_card.model_details.owners = [ mct.Owner(name="ML Team", contact="ml-team@acme.com")]model_card.model_details.references = [ mct.Reference(reference="internal-wiki.acme.com/churn-model")] # Define intended usemodel_card.model_parameters.model_architecture = "LightGBM Classifier"model_card.model_parameters.data.train.name = "Customer churn dataset 2022-2023"model_card.model_parameters.data.train.link = "data-catalog/churn-training" # Add quantitative analysisoverall_perf = mct.PerformanceMetric( type="AUC-ROC", value="0.847", confidence_interval=mct.ConfidenceInterval( lower_bound="0.831", upper_bound="0.863" ))model_card.quantitative_analysis.performance_metrics.append(overall_perf) # Add subgroup analysistenure_slice = mct.PerformanceMetric( type="AUC-ROC", value="0.789", slice_name="Tenure: 0-6 months")model_card.quantitative_analysis.performance_metrics.append(tenure_slice) # Add ethical considerationsconsideration = mct.Risk( name="Underperformance for new customers", mitigation_strategy="Supplement with product usage signals for <6 month accounts")model_card.considerations.ethical_considerations.append(consideration) # Add limitationslimitation = mct.Limitation( description="Not validated for Enterprise segment customers")model_card.considerations.limitations.append(limitation) # Generate the model cardtoolkit.update_model_card(model_card)html_content = toolkit.export_format( model_card, output_format=mct.ModelCardExportFormat.HTML) # Save the generated model cardwith open("model_card.html", "w") as f: f.write(html_content) print("Model Card generated successfully!")Automation Strategies:
1. Pipeline Integration
Integrate Model Card generation into your ML pipeline:
- Training pipeline captures training data statistics, hyperparameters
- Evaluation pipeline computes and stores disaggregated metrics
- Card generation extracts information automatically
- Human review adds context like intended use and ethical considerations
2. Version Control
Store Model Cards alongside models in version control:
- Model artifacts and Model Cards versioned together
- Changes to models trigger Card updates
- History of documentation available for audit
3. Validation Checks
Automate Model Card quality checks:
- All required sections populated?
- Subgroup analyses for mandated factors complete?
- Performance thresholds met?
- Recent update date?
- Links valid?
4. Registry Integration
Model registries should require Model Cards:
- No model deployment without compliant Card
- Cards discoverable from registry
- Cards attached to versions, not just model names
Automate the collection of metrics, metadata, and statistics. But reserve human judgment for sections like intended use, ethical considerations, and limitations. Automated tools can remind you to consider these—they can't substitute for thoughtful analysis.
Model Card Extensions and Variations
The original Model Card concept has spawned numerous extensions addressing specific needs and domains.
Data Cards: Documenting Datasets
Parallel to Model Cards, Data Cards document datasets used for ML:
Key Sections:
- Dataset Overview: Name, providers, size, format
- Intended Use: What ML tasks this data supports
- Collection Context: How, when, where data was collected
- Composition: What's in the dataset, structure, coverage
- Preprocessing: Cleaning, transformation, labeling process
- Distribution & Maintenance: Access, updates, versioning
- Legal & Ethical: Privacy, consent, usage restrictions
- Known Issues: Quality problems, biases, gaps
Why Data Cards Matter:
Model behavior is fundamentally shaped by training data. Documenting data:
- Enables assessment of model applicability to different contexts
- Reveals potential sources of bias
- Clarifies limitations derived from data collection
- Supports reproducibility and benchmarking
Relationship to Model Cards:
Model Cards should reference Data Cards for training and evaluation data. The full documentation includes both.
Tools:
- Google Data Cards Playbook
- Datasheets for Datasets (Gebru et al.)
Model Cards and Regulatory Compliance
Model Cards directly support regulatory compliance by providing standardized documentation that addresses many legal requirements.
| Regulatory Requirement | Applicable Regulation(s) | Model Card Section(s) |
|---|---|---|
| Purpose and intended use transparency | EU AI Act Art. 13 | Intended Use, Out-of-Scope Uses |
| Performance and accuracy disclosure | EU AI Act Art. 13, GDPR | Metrics, Quantitative Analyses |
| Limitations and failure modes | EU AI Act Art. 13, FDA | Caveats, Known Limitations |
| Disaggregated performance | NYC LL144, Fair Lending | Quantitative Analyses, Factors |
| Bias and fairness assessment | ECOA, Title VII, AI Act | Ethical Considerations, Quantitative Analyses |
| Training data description | EU AI Act Art. 10-11 | Training Data |
| Version and update information | FDA, Model Risk Mgmt | Model Details, Version History |
| Contact and accountability | EU AI Act | Model Details (Contact, Owner) |
Model Cards as Compliance Evidence:
Model Cards can serve as evidence of compliance efforts:
- Documentation of Due Diligence: Shows that relevant factors were considered
- Contemporaneous Records: Created alongside development, not reconstructed later
- Transparency Commitment: Public or regulator-accessible cards demonstrate openness
- Standardized Format: Regulators can compare across organizations
- Update History: Demonstrates ongoing monitoring and improvement
Limitations as Compliance Documentation:
However, Model Cards alone may not satisfy all requirements:
- They're summaries, not complete technical specifications
- They don't replace formal risk management documentation
- Regulatory requirements may mandate specific formats
- Some requirements need supporting evidence beyond what Cards contain
- Model Cards don't automatically prove the claims they make
Best Practice:
Use Model Cards as the accessible layer of a documentation hierarchy:
Model Card (Public/Accessible Summary)
├── Technical Specification (Detailed architecture, parameters)
├── Validation Report (Complete evaluation methodology and results)
├── Risk Assessment (Formal risk management documentation)
├── Data Documentation (Data Cards, data lineage)
└── Operational Runbook (Deployment, monitoring, incident response)
Model Cards provide navigation and summary; supporting documents provide depth.
Model Cards are increasingly referenced in regulatory guidance and industry standards. Organizations adopting Model Cards now are building documentation practices that will likely align with future requirements. Starting early creates organizational capability before compliance becomes mandatory.
KEEP LEARNING
Keep learning for free.
Read the complete lesson, save your notes and pick up where you left off with a free account. No card needed.