AI/ML-Based Medical Device Software (GMLP, Data, Change Control)
Purpose
Address machine learning inside the regulated product (not LLM coding assistants): Good Machine Learning Practice (GMLP), training/validation data integrity, Predetermined Change Control Plans (PCCP) where applicable, drift monitoring, and linking models to ISO 14971 and software lifecycle controls.
When to Apply
- Trainable or locked models affecting diagnosis, triage, segmentation, prediction, or control.
- Changes to training data, architecture, retraining cadence, or performance thresholds.
- Preparing FDA AI/ML-enabled SaMD submissions or EU technical documentation with ML components.
Requirements (testable)
- GMLP Principles: Apply lifecycle practices across data management, model development, evaluation, deployment, monitoring per FDA GMLP-aligned expectations; document roles and controls. Rationale: trustworthy ML development.
- Data Governance: Define data provenance, labeling quality, representativeness, bias controls, and train/val/test splits; version datasets with immutable references (hash, storage location). Rationale: reproducible evidence.
- Model Documentation: Record architecture, hyperparameters, training environment, random seeds (where deterministic), and evaluation metrics with acceptance thresholds tied to risk controls. Rationale: verification baseline.
- Verification & Validation: Map software unit/integration tests to non-ML components; use locked test sets and clinical validation (see
REG-SAMD-CLIN) for performance claims; document failure modes (edge cases, adversarial inputs) where risks warrant. Rationale: layered evidence.
- Explainability & Labeling: Provide clinician-facing description of outputs, limitations, and known failure modes in IFU/on-screen; align with risk communication. Rationale: safe decision support.
- Predetermined Change Control (when used): If pursuing PCCP (FDA), pre-specify modifications (e.g., retraining bounds, data refresh rules), verification activities, and reporting; maintain traceability to releases. Rationale: controlled post-market learning within bounds.
- Monitoring & Drift: Define real-world performance monitoring, trigger thresholds for investigation, and risk management updates when drift detected. Rationale: sustained safety/performance.
- SOUP / Tooling: Treat ML frameworks and pretrained weights as SOUP where applicable (IEC 62304); record versions, known defects, and supply-chain risks. Rationale: provenance.
Recommended Practices
- Freeze model cards per release (
MODELCARD-vX.Y.Z.md) with metrics and datasets.
- Separate development experiments from locked validation runs (different data locks).
Patterns
Model release record (YAML):
model:
id: "cxr-pneumo-v1.4.0"
weights_sha256: "b3e9…c2"
train_data: "ds-cxr-2025Q4@sha256:…"
val_auc: 0.91
val_threshold: 0.42
known_limits: ["pediatric not validated", "AP only"]
risk_links: ["RISK-CTRL-ML-02", "HZ-ML-01"]
Drift monitor hook (pseudo):
# REQ-ML-MON-01: log inference score distribution for drift review (RISK-CTRL-ML-07)
def log_batch_scores(scores: list[float], model_id: str, build: str) -> None:
telemetry.emit_histogram("model_scores", scores, tags={"model": model_id, "build": build})
Anti-Patterns (risks)
- Retraining in production without change control — risk: unvalidated performance shift.
- Using test set for hyperparameter tuning — risk: optimistic bias; audit failure.
- Omitting subpopulation analysis when health equity risks exist — risk: harm in underserved groups.
Verification Checklist
Traceability
- IDs:
DATASET-*, MODEL-*, ML-TEST-*, RISK-CTRL-ML-*; link commits/releases to model artifacts.
References
- FDA “Artificial Intelligence/Machine Learning (AI/ML)-Based Software as a Medical Device (SaMD) Action Plan” and related guidance (check current editions).
- FDA discussion paper / guidance on Predetermined Change Control Plan (verify latest titles).
- IMDRF “Machine Learning-enabled medical devices” work items (verify current).
- ISO/IEC 24028 (AI trustworthiness concepts) — supporting context, not a medical device standard alone.
Changelog
- 1.0.0 (2026-03-20): Initial skill for GMLP, data governance, PCCP, drift monitoring, SOUP linkage.
1---2name: ai-ml-medical-device-software3description: AI/ML-Based Medical Device Software (GMLP, Data, Change Control)4---56# AI/ML-Based Medical Device Software (GMLP, Data, Change Control)78## Purpose9Address **machine learning inside the regulated product** (not LLM coding assistants): **Good Machine Learning Practice (GMLP)**, training/validation data integrity, **Predetermined Change Control Plans (PCCP)** where applicable, drift monitoring, and linking models to ISO 14971 and software lifecycle controls.1011## When to Apply12- Trainable or locked models affecting diagnosis, triage, segmentation, prediction, or control.13- Changes to **training data**, **architecture**, **retraining cadence**, or **performance thresholds**.14- Preparing FDA AI/ML-enabled SaMD submissions or EU technical documentation with ML components.1516## Requirements (testable)171. GMLP Principles: Apply lifecycle practices across **data management, model development, evaluation, deployment, monitoring** per FDA GMLP-aligned expectations; document roles and controls. Rationale: trustworthy ML development.182. Data Governance: Define **data provenance**, labeling quality, **representativeness**, bias controls, and train/val/test splits; version datasets with immutable references (hash, storage location). Rationale: reproducible evidence.193. Model Documentation: Record **architecture**, hyperparameters, training environment, random seeds (where deterministic), and **evaluation metrics** with acceptance thresholds tied to risk controls. Rationale: verification baseline.204. Verification & Validation: Map **software unit/integration tests** to non-ML components; use **locked test sets** and **clinical validation** (see `REG-SAMD-CLIN`) for performance claims; document **failure modes** (edge cases, adversarial inputs) where risks warrant. Rationale: layered evidence.215. Explainability & Labeling: Provide **clinician-facing** description of outputs, limitations, and known failure modes in IFU/on-screen; align with risk communication. Rationale: safe decision support.226. Predetermined Change Control (when used): If pursuing **PCCP** (FDA), pre-specify **modifications** (e.g., retraining bounds, data refresh rules), **verification** activities, and **reporting**; maintain traceability to releases. Rationale: controlled post-market learning within bounds.237. Monitoring & Drift: Define **real-world performance monitoring**, **trigger thresholds** for investigation, and **risk management** updates when drift detected. Rationale: sustained safety/performance.248. SOUP / Tooling: Treat ML frameworks and pretrained weights as **SOUP** where applicable (IEC 62304); record versions, known defects, and supply-chain risks. Rationale: provenance.2526## Recommended Practices27- Freeze **model cards** per release (`MODELCARD-vX.Y.Z.md`) with metrics and datasets.28- Separate **development** experiments from **locked** validation runs (different data locks).2930## Patterns31Model release record (YAML):32```yaml33model:34 id: "cxr-pneumo-v1.4.0"35 weights_sha256: "b3e9…c2"36 train_data: "ds-cxr-2025Q4@sha256:…"37 val_auc: 0.9138 val_threshold: 0.4239 known_limits: ["pediatric not validated", "AP only"]40 risk_links: ["RISK-CTRL-ML-02", "HZ-ML-01"]41```4243Drift monitor hook (pseudo):44```python45# REQ-ML-MON-01: log inference score distribution for drift review (RISK-CTRL-ML-07)46def log_batch_scores(scores: list[float], model_id: str, build: str) -> None:47 telemetry.emit_histogram("model_scores", scores, tags={"model": model_id, "build": build})48```4950## Anti-Patterns (risks)51- **Retraining in production** without change control — risk: unvalidated performance shift.52- Using **test set** for hyperparameter tuning — risk: optimistic bias; audit failure.53- Omitting **subpopulation** analysis when health equity risks exist — risk: harm in underserved groups.5455## Verification Checklist56- [ ] Dataset versions hashed and referenced in DHF/technical file.57- [ ] Metrics and thresholds meet predefined acceptance; linked to risks.58- [ ] Model SOUP and training stack versions recorded.59- [ ] IFU limitations match validated use cases.60- [ ] PCCP or change control path defined for model updates.61- [ ] Monitoring thresholds and escalation paths documented.6263## Traceability64- IDs: `DATASET-*`, `MODEL-*`, `ML-TEST-*`, `RISK-CTRL-ML-*`; link commits/releases to model artifacts.6566## References67- FDA “Artificial Intelligence/Machine Learning (AI/ML)-Based Software as a Medical Device (SaMD) Action Plan” and related guidance (check current editions).68- FDA discussion paper / guidance on **Predetermined Change Control Plan** (verify latest titles).69- IMDRF “Machine Learning-enabled medical devices” work items (verify current).70- ISO/IEC 24028 (AI trustworthiness concepts) — supporting context, not a medical device standard alone.7172## Changelog73- 1.0.0 (2026-03-20): Initial skill for GMLP, data governance, PCCP, drift monitoring, SOUP linkage.