GPU Decision Tree Evaluation via 2D Texture Array Mapping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Evaluating decision trees on GPUs is challenging due to their limitations in handling general computations and parallel processing, leading to inefficiencies in time and computational power, especially in real-time applications.

Innovation Solution

Converting the decision tree structure into a 2D 'tree' array and using a pixel shader to evaluate decision trees in parallel by navigating through the array based on binary tests, allowing for efficient evaluation of input data points and reducing the time required compared to CPU-based methods.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If CPUs are used to evaluate decision trees, then flexibility in processing is maintained, but evaluation time is excessive and computational efficiency is poor

Engineering Contradiction:
Improveevaluation speedVSAvoidprocessing flexibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the decision tree evaluation process into independent parallel operations that can be executed simultaneously on GPU cores. Each thread handles a separate data point, and the tree traversal is broken down into discrete steps that can be computed in parallel, transforming the sequential CPU evaluation into a parallel GPU-friendly operation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent replaces the traditional CPU-based sequential evaluation mechanism with a GPU-based parallel evaluation mechanism. By mapping decision tree nodes to texture memory and using pixel shaders to perform evaluations, the system substitutes the CPU's general-purpose sequential processing with the GPU's specialized parallel processing architecture.

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

2Loss of time

If GPUs are used for parallel computation, then evaluation time is reduced significantly, but the complexity of programming and algorithm design increases

Engineering Contradiction:
Improveevaluation timeVSAvoidprogramming complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent transforms the traditional hierarchical decision tree structure into a 2D texture array format that matches GPU memory organization. By representing nodes as texture pixels and using texture coordinates to navigate the tree, the invention maps the 1D tree structure onto a 2D GPU-friendly format, enabling efficient parallel access and reducing programming complexity.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Solution Approach 2:

The patent introduces texture memory as an intermediary data structure that bridges the decision tree algorithm and GPU hardware. The texture array serves as a mediator that stores node information in a format optimized for GPU access patterns, simplifying the interaction between the evaluation algorithm and the parallel processing architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If decision forests are used to improve accuracy, then prediction quality increases, but computational power requirements and evaluation time increase substantially

Engineering Contradiction:
Improveprediction accuracyVSAvoidcomputational power
Core Design Contradiction:
ReliabilityVSPower

Solution Approach 1:

The patent merges multiple decision trees into a single unified texture array structure, allowing all trees in a forest to be evaluated simultaneously. By organizing the forest as a collection of texture arrays and using parallel shader execution, the system combines the computational power of multiple trees without proportionally increasing evaluation time, as all trees process data points in parallel.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS8290882B2Evaluating decision trees on a GPU
Publication Date: 2012.10.16 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8290882B2 patent drawing
  • US8290882B2 patent drawing
  • US8290882B2 patent drawing

AI summary

Methods and apparatus for evaluating decision trees on a GPU are described. In an embodiment, the structure of a decision tree is converted into a 2D “tree” array with each row representing a node in the tree. Each row comprises details of any child nodes and the parameters which are required to perform the binary test at the node. A pixel shader can then be used to evaluate the decision tree in parallel for each input data point in an input array by navigating through rows in the 2D tree array. For each row, data is read from the input array dependent upon the parameters in the row and the shader moves to another row dependent upon the result of the binary test. On reaching a row which represents a leaf node, the pixel shader outputs evaluation results, such as a leaf node index or a probability distribution over classes.