Decision Tree Model Optimization via Machine Code Compilation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Evaluating decision tree models, such as GBDT models, is hindered by memory inefficiencies like cache misses and page faults due to large feature vectors and tree structures, leading to slower processing times.

Innovation Solution

Converting decision tree models into optimized machine code using nested if/then statements to minimize memory inefficiencies, with a model optimization system determining if the conversion cost is justified by expected savings in processing power over the model's lifetime.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If decision tree models are evaluated using standard interpretation methods, then the models maintain high interpretability and flexibility, but processing speed decreases due to cache misses and page faults when handling large feature vectors and tree structures

Engineering Contradiction:
Improveprocessing speedVSAvoidmemory access complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent segments the decision tree model into multiple smaller decision stumps, where each stump evaluates a single tree. This segmentation allows the system to process smaller data portions in parallel, reducing cache miss rates and improving memory access efficiency while maintaining the overall predictive power of the full model

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent evaluates only the necessary portion of the decision tree model by processing individual decision stumps separately rather than loading and evaluating the entire tree structure. This partial action approach reduces memory access complexity and improves processing speed by avoiding unnecessary memory operations

Inventive Principle:
Principle #16Partial or excessive action

2Productivity

If the decision tree model is converted to optimized machine code, then processing efficiency improves by reducing cache misses and page faults, but the complexity of the evaluation system increases due to code generation requirements

Engineering Contradiction:
Improveevaluation efficiencyVSAvoidsystem complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent replaces the mechanical interpretation of decision tree models with optimized machine code execution. By compiling the model into native machine code, the system eliminates the overhead of interpreter execution and memory access patterns that cause cache misses and page faults, achieving significant productivity improvements

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

Solution Approach 2:

The patent performs preliminary code generation and optimization before actual model evaluation. The model is compiled into optimized machine code in advance, allowing the evaluation phase to execute efficiently without runtime compilation overhead. This preliminary action shifts complexity from the evaluation phase to the model preparation phase

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11281991B2Efficient decision tree evaluation
Publication Date: 2022.03.22 MIDJOURNEY INC
  • US11281991B2 patent drawing
  • US11281991B2 patent drawing
  • US11281991B2 patent drawing

AI summary

A model optimization system can reduce the delays caused by cache misses and page faults by converting a model of one or more decision trees into machine code that is optimized to avoid these memory faults. The model optimization system can convert a model into machine code by converting each tree of the model into a series of nested if/then statements and converting each series of nested if/then statements into optimized machine code. In some implementations, the model can be converted into optimized machine code only when an amount of processing required to convert the model into the optimized machine code is less than the expected cost savings of using the optimized machine code, instead of an unmodified version of the model, over the life of the model.