ML Code Provenance Tracking via Workflow Intermediate Representation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Machine learning models deployed in regulated environments face challenges in tracking data provenance end-to-end, which is crucial for maintaining compliance with regulations like HIPAA and GDPR, and for debugging and optimizing models due to data staleness and potential errors in model construction.
Innovation Solution
A system and method that parse machine learning model code into a workflow intermediate representation (WIR), generate provenance relationships, and semantically annotate these relationships using a knowledge base to identify data sources used for training, enabling tracking of data provenance from data sources to model predictions.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If ML models are deployed in regulated environments to improve model performance and reliability, then model accuracy and business value increase, but tracking data provenance becomes complex and difficult to maintain
Solution Approach 1:
The system performs preliminary actions by instrumenting data science scripts during the development phase to automatically capture provenance information. This includes inserting tracking code that records data transformations, feature engineering steps, and model training parameters before the models are deployed, thereby establishing provenance tracking infrastructure in advance rather than attempting to reconstruct it after deployment
Solution Approach 2:
The system introduces an intermediary provenance tracking layer that sits between the data science scripts and the ML model deployment pipeline. This intermediary automatically captures and stores provenance information in a structured format, mediating between the complex script execution and the compliance requirements without requiring direct intervention in either domain
2Reliability
If comprehensive data provenance tracking is implemented to ensure compliance with regulations like HIPAA and GDPR, then regulatory compliance improves, but the system complexity and implementation overhead increase
Solution Approach 1:
The system enables self-service by automatically generating compliance artifacts and provenance records without requiring manual intervention from data scientists or compliance officers. The instrumentation embedded in the scripts autonomously captures all necessary provenance information and formats it for regulatory compliance, making the compliance process self-executing rather than externally managed
Solution Approach 2:
The system implements feedback mechanisms that continuously monitor and record provenance information throughout the ML pipeline execution. This feedback loop captures data transformations, feature engineering operations, and model training parameters in real-time, providing ongoing verification of compliance rather than relying on periodic manual audits
3Manufacturing precision
If data transformations and feature engineering operations are performed to optimize model performance, then model accuracy improves, but tracking the origin and transformations of data becomes more difficult
Solution Approach 1:
The system applies segmentation by breaking down the ML pipeline into discrete, instrumented operations. Each data transformation and feature engineering step is captured as a separate provenance record with unique identifiers, allowing the system to track the origin and transformations of individual data elements through multiple processing stages without losing traceability
Solution Approach 2:
The system creates copies of provenance information at each transformation step rather than attempting to modify the original data structures. This copying approach preserves the complete lineage of data elements while allowing transformations to proceed, ensuring that origin information is replicated and maintained throughout the processing pipeline
Data Source
AI summary
Embodiments described herein enable tracking machine learning (“ML”) model data provenance. In particular, a computing device is configured to accept ML model code that, when executed, instantiates and trains an ML model, to parse the ML model code into a workflow intermediate representation (WIR), to semantically annotate the WIR to provide an annotated WIR, and to identify, based on the annotated WIR and ML API corresponding to the ML model code, data from at least one data source that is relied upon by the ML model code when training the ML model. A WIR may be generated from an abstract syntax tree (AST) based on the ML model code, generating provenance relationships (PRs) based at least in part on relationships between nodes of the AST, wherein a PR comprises one or more input variables, an operation, a caller, and one or more output variables.


