Estimating Hand-Coded Function Replacement With Machine Learning
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
2Reliability
If hand-coded software functions are used, then functional equivalence is maintained, but code complexity increases and reliability decreases
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.
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.
3Productivity
If automated means are used to estimate replacement potential, then productivity and objectivity improve, but measurement precision of error estimation may be compromised
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.
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.
Data Source
Figure 1
Figure 2
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).