Estimating Hand-Coded Function Replacement With Machine Learning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for determining which hand-coded software functions are suitable for replacement by machine learning models are subjective and lack efficient, automated means, leading to high maintenance costs and performance issues due to outdated programming languages and complex code.

Innovation Solution

A method that estimates a quantitative score for potential replacement by measuring code complexity, using static code complexity metrics to forecast the error of a machine learning model without actual training, allowing for efficient identification of suitable hand-coded functions for replacement.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Manufacturing precision

If hand-coded software functions are used, then implementation precision and control are maintained, but execution time increases and maintenance costs rise

Engineering Contradiction:
Improveimplementation precisionVSAvoidexecution time
Core Design Contradiction:
Manufacturing precisionVSProductivity

Solution Approach 1:

The patent replaces hand-coded mechanical computation systems with machine learning models that perform the same computational functions. The ML models are trained to replicate the behavior of hand-coded functions, substituting traditional algorithmic execution with learned patterns, thereby improving execution time while maintaining functional equivalence.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent changes the fundamental parameter of computation from deterministic algorithmic execution to probabilistic model inference. By transforming the computational approach from step-by-step hand-coded logic to statistical pattern recognition, the system achieves faster execution times while preserving the essential functional output.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If hand-coded software functions are used, then functional equivalence is maintained, but code complexity increases and reliability decreases

Engineering Contradiction:
Improvesoftware reliabilityVSAvoidcode complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent substitutes complex hand-coded logic with trained machine learning models that encapsulate the computational behavior. The ML models replace intricate control flow and conditional logic with learned representations, reducing code complexity while maintaining the same input-output functional equivalence.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent segments the software system into distinct components: hand-coded functions remain where precision and interpretability are critical, while ML models are introduced for functions where pattern recognition and speed are prioritized. This segmentation allows the system to balance complexity and reliability by deploying ML models selectively.

Inventive Principle:
Principle #1Segmentation

3Productivity

If automated means are used to estimate replacement potential, then productivity and objectivity improve, but measurement precision of error estimation may be compromised

Engineering Contradiction:
Improveestimation efficiencyVSAvoiderror estimation accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent introduces an intermediary automated estimation system that uses static code complexity metrics and ML model performance predictions to assess replacement potential. This intermediary provides objective, scalable evaluation while incorporating uncertainty quantification, balancing automation efficiency with sufficient estimation accuracy for decision-making.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent applies partial automation where ML models are used to estimate replacement potential for candidate functions, but final decisions remain with experts. The automated system performs preliminary filtering and scoring based on complexity metrics and predicted ML performance, providing sufficient precision for screening while allowing human judgment for final selection.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentEP4345610A1A method for estimating a potential replacement of at least one hand-coded function in a program code with a machine learning algorithm, computer program product, computer-readable storage medium as well as an electronic computing device
Publication Date: 2024.04.03 SIEMENS AG
  • EP4345610A1 patent drawingFigure 1
  • EP4345610A1 patent drawingFigure 2
  • EP4345610A1 patent drawing

AI summary

The invention relates to a method for estimating a potential replacement of at least one hand-coded function (12) in a program code (14) with a machine learning algorithm (16) by an electronic computing device (10), comprising the steps of estimating a code complexity (18) of the hand-coded function (12) (S2), estimating a machine learning model error (20) for the potential machine learning algorithm (16) depending on the estimated code complexity (18), S12) and estimating the potential replacement depending on the estimated machine learning model error (20). Furthermore, the invention relates to a computer program product, a computer-readable storage medium as well as to an electronic computing device (10).