ML Model Data Dependency Extraction Using AST-Based Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems struggle to efficiently manage and track data dependencies of machine learning (ML) models, leading to performance degradation due to outdated data sources and complex, nebulous dependencies that are difficult to identify and resolve.

Innovation Solution

A method and system that utilize lexical analysis to generate tokens from a textual representation of an ML model, construct an abstract syntax tree (AST), and identify data dependencies through AST nodes, enabling detection of potential issues and alert notifications.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional methods are used to manage data dependencies in ML models, then system complexity is reduced, but the ability to detect and respond to data source changes deteriorates

Engineering Contradiction:
Improveability to detect data source changesVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system segments the ML model representation into discrete tokens through lexical analysis, then organizes these tokens into a hierarchical abstract syntax tree structure. This segmentation enables granular tracking of data dependencies by associating metadata with individual AST nodes, thereby improving detection capability without overwhelming system complexity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary processing layer that generates AST representations from ML model code. This intermediary structure serves as a bridge between the raw model code and the dependency detection mechanism, enabling reliable tracking of data sources while maintaining manageable system complexity through structured intermediate representation.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If AST-based analysis is implemented to track data dependencies, then detection precision improves, but processing time increases

Engineering Contradiction:
Improvedata dependency detection precisionVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system performs preliminary lexical analysis and AST generation during model development or deployment phases, creating a reusable dependency map before actual inference occurs. This preliminary action enables rapid dependency queries during runtime without repeatedly parsing the entire model code, thereby reducing processing time while maintaining high detection precision.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent applies local quality by generating metadata and dependency information only for specific AST nodes that are relevant to data sources, rather than processing the entire AST uniformly. This selective approach improves detection precision for critical data dependencies while minimizing unnecessary processing time for unrelated model components.

Inventive Principle:
Principle #3Local quality

3Reliability

If comprehensive data dependency tracking is implemented, then model performance reliability improves, but system resource consumption increases

Engineering Contradiction:
Improvemodel performance reliabilityVSAvoidsystem resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The system extracts only the essential data dependency information from the ML model by identifying and tracking specific AST nodes that correspond to data source references. This extraction approach maintains model performance reliability by monitoring critical data dependencies while avoiding the resource consumption associated with tracking all model components comprehensively.

Inventive Principle:
Principle #2Taking out (Extraction)

4Adaptability or versatility

If language-agnostic dependency detection is implemented, then system versatility improves, but implementation complexity increases

Engineering Contradiction:
Improvelanguage agnosticismVSAvoidimplementation complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal AST-based representation that can accommodate multiple programming languages and ML frameworks through a common structural framework. This universal approach enables language-agnostic dependency detection by translating diverse ML model syntaxes into a standardized AST format, thereby improving versatility while managing implementation complexity through a unified processing pipeline.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentEP4519762B1Method and system to extract data dependencies for machine learning models
Publication Date: 2025.12.10 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP4519762B1 patent drawingFigure 1
  • EP4519762B1 patent drawingFigure 2
  • EP4519762B1 patent drawingFigure 3

AI summary

Example aspects include techniques for anomaly detection via sparse judgmental samples. These techniques may include generating, via lexical analysis, a plurality of tokens from a textual representation of a machine learning (ML) model and generating, via a parser, based on the plurality of tokens, an abstract syntax tree (AST) corresponding to the ML model. In addition, the techniques may include identifying a data dependency of the ML model based on an AST node within the AST, the AST node corresponding to a data source and the data dependency indicating the ML model depends on the data source. Further, the techniques may include detecting a potential issue associated with the data source, and transmitting, based on the data dependency, an alert notification in response to the potential issue.