ML Model Code Generation for Deployment

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deploying trained machine learning models in production environments is complex due to large amounts of code and dependencies, leading to increased build time, memory usage, and difficulty in updating or maintaining the models.

Innovation Solution

A system generates automatic code for deploying trained models by producing feature, model, and exception handling files, which are used to create a core model assembly within a container, reducing code and dependencies, and enabling easier updates.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional deployment methods are used for machine learning models, then the model can be deployed with full functionality, but the code size and dependency requirements increase significantly

Engineering Contradiction:
Improvemodel deployment functionalityVSAvoidcode size and dependencies
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the core model assembly from the complete model, separating essential components (model parameters, feature definitions, prediction logic) from non-essential dependencies. This extraction allows deployment with minimal code while maintaining full prediction functionality, directly resolving the contradiction between functionality and complexity.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent segments the model deployment into distinct components: a core model assembly containing essential parameters and logic, and optional extensions for additional functionality. This segmentation enables selective deployment of only necessary elements, reducing overall code size while preserving core model capabilities.

Inventive Principle:
Principle #1Segmentation

2Reliability

If comprehensive code and dependencies are included for model deployment, then the model functions correctly in production, but build time increases

Engineering Contradiction:
Improvemodel production functionalityVSAvoidbuild time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary actions during model training by pre-defining the core model assembly structure, feature specifications, and parameter configurations. This preliminary preparation enables rapid deployment later, as the essential components are already organized and ready, significantly reducing build time while ensuring production readiness.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If complete model code is deployed, then the model operates reliably, but memory consumption increases

Engineering Contradiction:
Improvemodel operation stabilityVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential model parameters and prediction logic from the complete model code, storing these in a compact core model assembly. This extraction eliminates redundant code and dependencies that consume memory, while preserving the exact functionality needed for reliable model operation.

Inventive Principle:
Principle #2Taking out (Extraction)

4Adaptability or versatility

If traditional deployment approaches are used, then the model can be updated, but the process becomes complex and difficult to maintain

Engineering Contradiction:
Improvemodel update capabilityVSAvoidmaintenance difficulty
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent segments the model into a modular core model assembly that can be independently updated. This modular structure allows model parameters and logic to be refreshed without affecting the surrounding deployment infrastructure, simplifying the update process and reducing maintenance complexity while maintaining adaptability.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12131234B2Code generation for deployment of a machine learning model
Publication Date: 2024.10.29 CAPITAL ONE SERVICES LLC
  • US12131234B2 patent drawing
  • US12131234B2 patent drawing
  • US12131234B2 patent drawing

AI summary

In some implementations, a system may receive a first set of files output based on a machine learning model that is trained using training data that includes a set of values, for each of multiple observations, that corresponds to a set of features. The system may receive a second set of files that includes information that identifies a set of valid values corresponding to the set of features. The system may generate, based on the first set of files and the second set of files, code for generating the output score from the trained model based on a set of input values that are input to the trained model. The system may deploy the code for execution in a computing environment.