Architectures and methods for classification of decision tree ensembles
The novel decision tree ensemble classification architecture addresses speed, energy, and area inefficiencies by employing threshold grouping and pre-sorting with binary search and lookup tables, enhancing performance and efficiency.
Patent Information
- Application Number
- JP2022577210
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-06-19
- Filing Date
- 2021-06-17
- Publication Date
- 2024-10-10
- Estimated Expiration
- 2041-06-17
AI Technical Summary
Existing architectures for decision tree ensemble classification, both serial and parallel, face challenges in terms of speed, energy consumption, and area efficiency.
A novel architecture for decision tree ensemble classification that involves threshold grouping and pre-sorting, utilizing a rank computing block with computational units and memory to perform binary search or in-memory search, and incorporating lookup tables for precomputed entries to speed up classification.
The proposed architecture achieves improved performance in terms of speed, energy efficiency, and reduced hardware area by minimizing memory usage and reducing the number of comparisons required, outperforming both serial and parallel architectures.
Smart Images

Figure 00000017_0000 
Figure 00000017_0001 
Figure 00000017_0002
Abstract
Description
[Technical field]
[0001] The present disclosure relates to architectures and methods for decision tree ensemble classification. [Background technology]
[0002] Random forests, RFs, or decision tree ensembles, or DTEs for short, are used for a variety of classification tasks in both hardware and software. DTEs are intuitively evaluated by sequentially traversing each tree individually and then aggregating each tree output by averaging or majority voting. Another approach is to compute all node comparisons in parallel and convert the trees into a Boolean function that either computes the tree output for aggregation or computes the aggregated output directly.
[0003] The DTE can be trained by machine learning algorithms such as random forest, AdaBoost, or gradient boosted trees. The architecture for classification of decision tree ensembles can be built as a hardware architecture for inferring the DTE in FPGA or ASIC technologies. Such architectures can be integrated into various applications in the field of edge machine learning, including but not limited to smart sensors, wireless sensor networks, structural health monitoring, predictive maintenance, and healthcare.
[0004] An architecture for decision tree ensemble classification, or DTE hardware accelerator, typically consists of one tree processing unit for each decision tree in the ensemble, and an aggregation unit to compute the ensemble votes, as shown in Figure 13. Such a tree processing unit can also be used alone as a hardware accelerator for a single decision tree.
[0005] FIG. 14A shows an example of a single classification tree. To predict the class of a set of new feature inputs, each node of the tree is assigned a feature f i One of these is the threshold value t jStarting from the root node, the results of the comparisons at successive nodes define a path through the tree, ending at a leaf node. The tree is then divided into classes C x The votes of all trees in the ensemble are then aggregated by majority vote to obtain the final votes of the tree ensemble. The index of the feature f compared by the node, the threshold t, the class label C at the leaf node, and the structure of the tree are parameters defined by training.
[0006] Two types of architectures are widely used to implement decision trees. Essentially, serial architectures store all the parameters of the decision tree in memory and evaluate them from the root to the leaves. Parallel architectures have one comparator for each node and evaluate the entire tree at once. More specifically, serial architectures traverse the decision tree of the trained model from the root node to the leaf nodes as shown in Figure 14B. At each node, it fetches the feature inputs and thresholds of the given node from memory or from an input multiplexer. It then compares the two and selects the left or right child address as the next node to visit. It does this until it reaches a leaf node and outputs the corresponding class vote. Parallel architectures compute all the node comparisons of the tree at once as shown in Figure 14C. Each comparator corresponds to one tree node. The thresholds are stored in registers along with the comparators, which are wired to the feature inputs according to their corresponding nodes. The tree votes are computed from the outputs of the comparators by a Boolean function that represents the tree structure. The Boolean function is specific to the trained model and can be derived from the tree as follows:
[0007] A classification tree from DTE can be mathematically represented as a rooted, directed acyclic graph DT = (V, D, E, C) using the following notation: V is the set of vertices, V = N ∪ L, where L is the set of leaf nodes and N is the set of features f i The threshold value corresponds to one of
number
number
[0008] In the parallel architecture of Fig. 14C, each node is implemented as a fixed comparator. The tree structure is constructed by a Boolean function F that computes a tree token for class c from the comparator outputs. DT,c :D→{0,1} Boolean functions can be expressed as:
number
number
number
number
[0009] The objective of the presented disclosure is to provide an architecture for classification of decision tree ensembles and a method for classification of decision tree ensembles that improves decision tree ensemble classification architectures, e.g. in terms of speed, energy consumption and / or area.
[0010] These objects are achieved by the subject matter of the independent claims. Further developments and embodiments are set forth in the dependent claims. Summary of the Invention
[0011] It should be understood that any feature described with respect to any one embodiment may be used alone or in combination with other features described herein, and may also be used in combination with one or more features of any other embodiment, or any combination of any other embodiment, unless otherwise stated.Furthermore, equivalents and modifications not described below may also be used without departing from the scope of the architecture for classification of decision tree ensembles and the method for classification of decision tree ensembles, as defined in the appended claims.
[0012] The following relates to an improved concept in the field of classification of decision tree ensembles. The proposed concept proposes an architecture and a method for solving inference of classification and regression trees and decision tree ensembles (DTE for short). The proposed concept can be implemented based on hardware architectures, for example FPGA or ASIC technologies. However, the method can also be implemented in software.
[0013] The proposed concept proposes grouping and pre-sorting the thresholds of all comparisons of a given decision tree ensemble in order to quickly compute all nodes using logic such as binary search or in-memory search. Furthermore, this architecture can be complemented with a lookup table holding the pre-computed entries to further speed up the classification.
[0014] In at least one embodiment, an architecture for classification of decision tree ensembles includes a rank computing block and a tree processing block. The rank computing block includes one computing unit per feature from a set of features to be classified. Each computing unit includes memory and logic. The memory is configured to store thresholds for trees in the decision tree ensemble. The memory is configured to store thresholds in one group per feature. Furthermore, the thresholds in the group are pre-sorted according to a threshold index to enable efficient search algorithms such as binary search. The threshold index allows for specifying search criteria such as "<" or ">".
[0015] The logic is arranged to perform a threshold comparison of the corresponding group of thresholds and output a rank of the evaluated feature value. The rank corresponds to an encoded address representing the threshold value. The tree processing block is configured to determine a class of the set of features to be classified as a function of the rank. For example, in some embodiments the tree processing block includes one tree processing unit for each tree in the decision tree ensemble. Each processing unit is configured to determine a class of the set of features to be classified as a function of the rank. In other embodiments there may be only one tree processing unit including several lookup tables and combiners, as described in more detail below.
[0016] Preliminary results show that this new architecture can match the hardware cost and energy efficiency of both serial and parallel architectures, outperforming only one of the two performance indices, respectively. Ranks hold the same information as the calculated comparisons of all nodes, and can therefore be used for further processing by the tree processing block.
[0017] In at least one embodiment, features from a set of features to be classified are denoted by f with feature index i ∈ [1;I]. i where I denotes the number of features to be classified. The threshold represents the nodes of the trees in the decision tree ensemble.
[0018] The logic is to classify the features f i and is arranged to perform a search that returns a rank for each feature dividing a threshold into values less than and greater than the feature. The ranks are output, for example, to a corresponding tree processing unit. Finally, the tree processing unit is arranged to determine the class by evaluating a Boolean function, each Boolean function representing the structure of a decision tree in the decision tree ensemble as a function of the received rank. Alternatively, the ranks are output to a corresponding look-up table.
[0019] In at least one embodiment, the tree processing block includes an aggregation unit arranged to receive the determined classes from the tree processing unit and to form an ensemble vote as a function of the determined classes.
[0020] In at least one memory embodiment, the memory includes a group of memory cells, one for each feature from a set of features to be sorted, the memory cells within a group being addressable according to a threshold index.
[0021] In at least one embodiment, the logic comprises a comparator further including a first input operable to receive the feature and a second input operable to receive the threshold value from the memory.
[0022] In at least one embodiment, the tree processing unit includes one or more comparators arranged to perform address decoding of the received ranks to evaluate a Boolean function based on the address decoded ranks. The comparators are operable to perform a comparison based on a rank that is a representation of a node comparison of a threshold value of a corresponding threshold group. In a sense, the ranks are decoded to perform the address comparison.
[0023] In at least one embodiment, each of the computation units from the rank computing block is connected to a respective dedicated lookup table. The lookup table includes an input operable to receive a dedicated rank from the computation unit connected to the lookup table. Furthermore, the lookup table is operable to output an intermediate value, such as a function of the input rank.
[0024] In at least one embodiment, each of the tree processing units can be connected to a dedicated look-up table, the look-up table including an output arranged to provide an intermediate value to the tree processing unit connected to the look-up table, the tree processing unit operable to determine a class of the set of features to be classified as a function of the received intermediate value.
[0025] In other embodiments, there may be no longer a dedicated lookup table for each tree processing unit. Instead, the lookup tables can be considered as part of the tree processing block and can be complemented by combiners. The content corresponding to the tree structure is stored for all combined trees in one lookup table per feature. The lookup table entries correspond to the possible configurations and together with the combiners form the tree processing block. However, multiple trees can also be combined internally into "sub-ensembles".
[0026] In at least one embodiment, the architecture further includes a combiner having a computation unit operable to receive the intermediate values, combine and / or weight the intermediate values, and output a class of the feature to be classified. The combiner may be implemented as a common unit for all trees or subensembles.
[0027] In at least one embodiment, the lookup table is implemented based on an associative memory that includes one or more comparators operable to perform a "less than" or "greater than" comparison.
[0028] In at least one embodiment, a method for classification of a decision tree ensemble includes the following steps: First, the thresholds of the decision trees in the decision tree ensemble are stored in one group per feature to be classified; The thresholds of the groups are sorted according to a threshold index; A node comparison of the thresholds of the corresponding threshold groups is performed; A rank is output as a result of the node comparison, which corresponds to an encoded address for evaluating said thresholds; Finally, a class of the set of features to be classified is determined as a function of the rank.
[0029] In at least one embodiment, features from a set of features to be classified are denoted by f with feature index i ∈ [1;I]. i where I denotes the number of features to be classified. The threshold represents the nodes of the trees in the decision tree ensemble. The method includes the further step of receiving the features to be classified by a logic and performing a search using the logic to return a rank for each feature that divides the threshold into values below and above the feature value. The ranks are output to respective tree processing units. The class of the feature to be classified is determined by evaluating Boolean functions, each Boolean function representing a tree in the decision tree ensemble as a function of the received rank.
[0030] In at least one embodiment, the rank is determined from a binary search using logic. Alternatively, the rank is determined from an in-memory search.
[0031] In at least one embodiment, evaluation of a decision tree requires a lookup table filled with pre-computed values that are stored as lookup table entries, and the class is determined depending on the lookup table entries.
[0032] In at least one embodiment, the lookup table entries are determined by the training software, which determines the allocation of lookup table entries such that the mathematical descriptions of both the classification architecture and the DTE are equivalent.
[0033] The following description of the exemplary embodiment figures may further illustrate and explain aspects of the improved concept. Components and parts of the same structure and effect are respectively labeled with the same reference symbols. Insofar as the components and parts of different figures correspond to each other in terms of their functionality, their description is not necessarily repeated for each of the following figures.
[0034] Further aspects, features, and advantages will become readily apparent from the following detailed description, the accompanying drawings, and the claims. [Brief description of the drawings]
[0035] [Figure 1] 1 shows an example top-level diagram of an architecture for decision tree ensemble classification. [Diagram 2] 1 illustrates an exemplary embodiment of a computing unit. [Diagram 3] We present an example of a decision tree ensemble to illustrate the grouping and pre-sorting scheme. [Figure 4] 1 illustrates an exemplary embodiment of a computing unit. [Diagram 5] We show the size FOM of several example model architectures trained on different datasets using different training algorithms. [Figure 6] We present an energy comparison of example model architectures trained on different datasets using different training algorithms. [Figure 7] 4 illustrates another exemplary embodiment of a computing unit. [Figure 8] We show how to calculate classification results from ranks using the LUT. [Figure 9] 1 illustrates an exemplary embodiment of a combined in-memory rank calculation and LUT lookup. [Figure 10] Indicates that the classification result is to be calculated from the LUT entries. [Figure 11] 13 shows further details of an exemplary embodiment of a combiner characteristic of I=7. [Figure 12] 13 shows further details of an exemplary embodiment of a combiner. [Figure 13] 1 shows a prior art architecture for decision tree ensemble classification. [Figure 14A] Here is an example of the classification concept: [Figure 14B] Here is an example of the classification concept: [Figure 14C] Here is an example of the classification concept: DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0036] Figure 1 shows an example of a top-level view of an architecture for classification of decision tree ensembles. This architecture comprises a rank computing block 1 and a tree processing block 2. The rank computing block 1 comprises several computation units 10. In practice, the features to be classified f i (The index i or feature index represents an integer number of I features to be classified.) Each calculation unit further includes a memory 11 and logic 12.
[0037] The memory 11 includes a number of memory cells and is configured to store a number of thresholds according to decision trees from the decision tree ensemble. In other words, the memory stores the thresholds of trees that are characteristic of the decision tree ensemble. As will be explained in more detail below, the thresholds are grouped into feature groups. Essentially, the memory includes one threshold group for each feature to be classified. The thresholds within a group are sorted according to a threshold index. The logic 12 allows accessing the thresholds of the corresponding threshold group. According to a process that will be explained further below, the logic outputs a rank of the accessed threshold. The rank corresponds to an encoded address for accessing said threshold and thus represents the threshold.
[0038] The tree processing block 2 comprises one tree processing unit 20 for each tree in the decision tree ensemble. The tree processing units are arranged to perform classification or tree voting. In practice, each processing unit is arranged to evaluate a Boolean function representing a tree in the decision tree ensemble as a function of its rank.
[0039] The Boolean functions can be realized in soft logic in an FPGA or hardwired logic in an ASIC, or using the schemes described further below. The ranks are received from the rank computing block and the corresponding computation units. The tree processing block further comprises an aggregation unit 21 (or tree combiner), which receives the votes (or classifications) from the tree processing units and forms an ensemble vote thereof. That is, the aggregation unit performs a majority vote.
[0040] FIG. 2 shows an exemplary embodiment of the computation unit in more detail. The memory 11 includes several memory cells, each with a unique address. The drawing shows that the memory holds thresholds, which are sorted according to a threshold index. The thresholds stored in the memory belong to a dedicated group and are correlated with a corresponding feature (in this example, f1). This feature can be input via an input 13 of a comparator 14 (indicated by "<" in the drawing). Another input 15 is arranged to access and thereby receive the threshold from the memory. In this way, the comparator can perform a comparison of the features associated with the dedicated group according to the tree definition (in this example, f1). Furthermore, the logic 12 is arranged to access the comparator 14 via another input 16. As a result of this control, the comparator compares the input feature with the threshold. The memory outputs corresponding encoded addresses. These addresses indicate the threshold / feature comparisons (or tree nodes). The rank holds the same information as the calculated comparisons of all the nodes, and can therefore be used for further processing by the tree processing block.
[0041] In conclusion, similar to the serial architecture, the computation unit includes a comparator and a memory. However, the memory contains one threshold group instead of one complete decision tree. The comparator 14 is connected only to the corresponding features, thus eliminating the complexity of input multiplexers typically required in other architectures. Furthermore, the memory only contains thresholds and does not contain tree structure information such as feature indexes or child addresses, thus significantly reducing memory size. For example, the search logic performs a binary search to quickly compare the input features to the thresholds.
[0042] Fig. 3 shows an example of a decision tree ensemble to illustrate the grouping and pre-sorting scheme. The proposed concept is based on pre-sorting the thresholds, e.g. to speed up the comparison. The figure shows an example of how to group and sort the thresholds. The figure shows three example decision trees with features f1, f2, and f3, and two examples of classes C1 and C2. The tree nodes are the thresholds of threshold index j.
number
number
number
number
[0043] The complete architecture includes one computation unit per feature, one tree voting function per tree, and optionally an aggregation unit to form an ensemble as shown in FIG. 1. The tree voting function is similar to the parallel architecture, except that the input is an encoded address, whereas in the parallel architecture each comparison is encoded with one bit. In this way, the tree voting function of the parallel architecture is extended to different Boolean functions. Using the nomenclature introduced above in the introduction of this disclosure, the tree structure is a Boolean function that computes the tree vote for a class c from the comparator output or rank R.
number
number
[0044] Fig. 4 shows an exemplary embodiment of the computation unit. The rank computing block provides several corresponding ranks that are input to the tree processing block 2, i.e. the computation unit, to vote for the corresponding class. One implementation of the computation unit is similar to the parallel architecture shown in Fig. 14. The computation unit comprises one comparator 22 for each tree node. However, the comparators of the proposed concept decode the rank addresses and do not perform the actual node comparison. In fact, the addresses correspond to the comparison and can instead be used directly in the calculation of the Boolean function. The address decoding can be minimized when mapped to FPGA or ASIC technology, for example by using a tree voting function by a synthesis tool.
[0045] Some advantages of the proposed concept are: The memory only needs to contain the corresponding feature thresholds. There is no need to store the feature indexes and child addresses of the nodes, which greatly reduces memory usage. · Grouped threshold overlaps do not bring additional information to the memory access and can therefore be removed, for example by binary search, which allows for further reduction in memory size and memory access energy. Compared to serial architectures, there is no need to fetch feature inputs from memory or input multiplexers, which reduces circuit complexity and energy consumption. Decision trees are generally not balanced, which can lead to different execution times for different decisions. This makes parallelization between trees more difficult and requires synchronization. The proposed concept proposes to search for the threshold in a balanced way, for example using a binary search, thus reducing the circuit complexity and execution time. The execution time may vary from tree to tree, but can be adjusted by introducing parallelism in the search comparison, so that it can be kept constant across all decisions. Binary searches perform many fewer comparisons than parallel architectures that compute all of the comparisons. In some cases, binary searches even compute fewer comparisons than serial architectures, especially when long branches occur in the tree. This reduces execution time and energy or circuit size depending on the amount of parallelization.
[0046] The above advantages can also be confirmed by experimental results. To compare the number of comparisons for serial and parallel architectures, two models are trained on different datasets and statistically analyzed using the corresponding test datasets. For the parallel architecture, the number of comparisons is simply the number of nodes in all trees. For the serial architecture, tree iterations are performed on the actual test data to statistically estimate the number of comparisons per inference. Similarly, a binary search is performed on the test data to obtain the numerical value for the proposed architecture.
[0047] Table 1 shows the statistical or exact comparison numbers of two models trained on different datasets. The execution time of the serial architecture is irregular due to the unbalanced trees, so the table includes (min, average, max) tuples. [Table 3] To compare the hardware area and energy consumption of the architectures, the three architectures are implemented in SystemVerilog and synthesized for a commercial FPGA. The hardware area figure of merit (FOM) is based on the post-synthesis flip-flop (FF) and look-up table (LUT) resources, specified as FF+2·LUT. The energy consumption is estimated based on the switching activity simulated with real test data classification using a power estimation tool provided by the FPGA vendor.
[0048] Figures 5 and 6 show the size FOM and energy comparison of all three architectures for several models trained on different datasets. The results clearly show that the new architecture performs well on both figures of merit and outperforms the serial architecture in size FOM for most datasets. Meanwhile, in size FOM, the serial architecture shows the least energy efficient and the parallel architecture shows the worst performance. This proves that the architecture can be widely used and is the best candidate for tuning the size vs. energy tradeoff by introducing parallelization.
[0049] FIG. 7 shows another exemplary embodiment of the computation unit. As mentioned above, the rank computing block 1 provides ranks that are input to the tree processing block 2, i.e. the computation unit 10, to evaluate or vote for a class. The use of the ranks allows to reduce the amount of computation required to perform the evaluation of the decision tree by the feature values compared to processing the feature values directly. In practice, the computation steps can be performed to pre-calculate and keep available in a look-up table 17 (or LUT). Since a single LUT (whose input includes all features) can be very large, one LUT 17 is used per feature. As shown in the figure, the LUT receives the ranks from the rank computing block and outputs an intermediate result tmp_result. The intermediate result can be processed by an operation (or "combiner" 18) of relatively simple structure to process the final result of the classification.
[0050] This gives it decisive advantages compared to more naive implementations, e.g. being faster with fairly low energy requirements. The classification consists of several parallel and independent memory accesses and small, energy-efficient parallel operations. The use of LUTs allows high flexibility, since the content of the LUTs can be freely selected after fabrication even in ASIC technologies. Furthermore, the structure of the hardware can be very uniform, allowing full reconfiguration of the combiner. This allows any DTE model to be mapped.
[0051] 8 shows an exemplary embodiment of a combiner for calculating a classification result from a LUT. This figure can be used to illustrate the principles of the LUT in a simplified or high level. A more detailed exemplary implementation is described further below.
[0052] The combiner 18 comprises several lookup tables. In fact, there is one dedicated LUT to receive the corresponding rank, denoted as rank[i] in the drawing. That is, there is one dedicated LUT[i] for each feature i. The LUT is the result of a training procedure and has a trained entry for each value of the corresponding rank, representing the structure and nodes of the respective decision tree. The LUT outputs an intermediate result tmp_result[i]. The intermediate result can be further processed to combine several features into tree votes and / or votes of subensembles of trees. The votes are further processed, for example weighted by a multiplier with respective weights denoted w[m], where m∈[1;M] and M is the total number of trees and / or subensembles. An adder can combine the intermediate results (weighted or not) into a summed intermediate result. This result can be input to a comparator to perform a comparison with a threshold c_thr, thereby determining the classification result. The latter part, starting from the weighting, may already be part of the aggregation unit.
[0053] In contrast to the exemplary embodiment that does not include an additional LUT, the content of the LUT needs to be determined further. The content is determined according to a predefined criterion. For example, the content (or LUT entries) shall represent an equivalent description of the hardware architecture. In this way, the LUT entries can describe the hardware, which is usually implemented as an ASIC, or a set of features. The LUT entries are highly configurable and can be found by training based on a training model, for example using solver software such as the open source software Z3 Theorem Prover. For example, a description of the hardware structure on the one hand and a description of the DTE on the other hand are input to the solver. The solver then finds an assignment for the entry LUT[i] in the LUT, where both descriptions are equivalent for all possible input assignments, i.e. ranks or feature values.
[0054] The use of solvers, such as SMT / SAT solvers, supports that the hardware implementation conforms and matches the specified model. The use of solvers for the calculation of LUT entries has already been described in the technically distinct field of logic synthesis for FPGAs. However, due to its complexity, it is not used in practice. The proposed concept includes the use of solver software in the fields of AI (Artificial Intelligence) and ML (Machine Learning).
[0055] By decoupling from the explicit coding of the LUT contents, the DTE model can be significantly compressed. Compression ratios of up to 400% have been achieved so far compared to the explicit assignment of every tree leaf node to one output bit per LUT. Moreover, the proposed architecture does not directly use the actual values of the features, but their ranks as addresses of the LUT. In the DTE tree at each node, starting from the root, the feature value is compared to trained thresholds. For each feature, there are several thresholds that delimit intervals. The final important information of a value is in which interval it is. If implemented in a rank computing block, with the thresholds arranged in ascending or descending order according to a sorting criterion, the index of the interval in which the feature value falls corresponds to its rank. The number of intervals is obviously less than all possible values that the characteristic can assume. Therefore, the number of bits required to encode it is also less. The bit width of the feature or feature rank corresponds to the bit width of the LUT address input. For example, if a 16-bit feature can be represented by a 4-bit rank, the LUT must consist of only 16 entries, not 16384 entries. This reduction to feature ranks is made possible by the use of pre-sorting.
[0056] The described concept of classifier hardware (combiner computing classification results from LUT intermediates) can further improve the proposed concept. Computing the LUT content in advance, using a solver for training, e.g. an SMT / SAT solver, gives improved results in terms of memory as well as circuit size. Using ranks instead of the actual values of the features allows to minimize memory size. Furthermore, the combiner logic can be small and energy efficient, despite being fully reconfigurable. In this way, there are no restrictions on the grouping of the LUT outputs, i.e. the generation of the content. A simple comparison of the sum of groups of variable bit widths with a threshold is of particular interest.
[0057] FIG. 9 shows an exemplary embodiment of in-memory rank calculation. While the near-memory rank calculation described above (i.e., based on a binary search operation) is already very efficient and fast, there may be applications where the performance of the classifier hardware may be bottlenecked. An estimate of the log2 of a threshold number of features (or the corresponding bit width of the rank) per clock cycle may be required. For all other steps of classification, pipelining typically results in a throughput of one classification per clock cycle. An additional concept built on the comparator logic allows feature rank to be calculated in memory itself.
[0058] The figure shows a calculation unit 10 for the features to be classified. This unit comprises a memory 11 for the given features and grouped pre-sorted thresholds. Furthermore, the unit comprises a logic 12 that performs a comparison with the thresholds. Based on the comparison, the logic outputs a rank in one-hot encoding rather than binary, which is then entered into the corresponding lookup table. Instead of a binary coding, there may be one row for each possible state value. Only one line corresponding to the current rank is active ("hot"). Depending on the entries of the lookup table LUT entries, an intermediate result tmp_result is output by the calculation unit.
[0059] Its structure is similar to that of content addressable memories (CAMs for short), which complement the look-up table approach. However, in contrast to a normal CAM, the computation unit performs a comparison with "<" (or ">") instead of "=". This means that the match line of all threshold memory cells with a value smaller (or larger) than the applied feature value is asserted. This implements a thermometer encoding of the rank. The next larger (or smaller) threshold limit can be determined from the thermometer encoding and converted to a 1-hot encoding with inverters and gates per memory row. This result can be used directly as the word lines of a LUT, for example.
[0060] Most of the peripherals (e.g. external search logic, address decoders for LUT memories) are no longer needed in this exemplary embodiment. Since the memory is also used for read-only, the memory cells can be optimized for leakage current (e.g. by using Schmitt trigger structures or ULP diodes) and read performance. Write operations are only needed to initialize the contents. This also allows for the use of NVRAM or ROM for improved power and area efficiency. Not only does rank calculation per clock improve performance, but additional power and area can be saved. Instead of a logarithmic number of memory accesses for binary search, only one access is needed. Again, no address decoders etc. are needed, but with the added energy consumption of the match line. It is estimated to be in a similar area as the periphery, so ultimately a similar energy consumption occurs per access.
[0061] Fig. 10 shows another exemplary embodiment of a combiner for calculating a classification result from the LUT. The simplified structure of the combiner shown in Fig. 8 is explained in more detail with respect to one possible implementation. As can be seen, although the complexity is somewhat higher, the structure is still very regular and fully reconfigurable.
[0062] Depicted is one LUT[i] dedicated to rank[i]. The individual bits of the intermediate LUT result are named tmp_result[i][x] using x ∈ [1;X], where X is the total bit width of the LUT. These individual bits tmp_result[i][x] are successively concatenated into Q non-overlapping binary values c[i][q] of configurable bit width p[q], where q ∈ [1;Q] is the index of the Q individual values. These binary values c[i][q] are summed over all features, i.e., f i over all i ∈ [1;I] to give a sum
Number
Number
Number
[0063] FIG. 11 shows further details of an exemplary embodiment of a combiner. For the embodiments of the individual parts, 7 features, i.e., an example with I = 7 (and LUT), will be used to explain below. The first step (selection / combination and addition of individual bits with index x of the binary c[i][q]) is performed by a multiplexer and an adder. Here, first the LUT output is converted and added column-wise, i.e., the 7 LSBs of all LUTs (index i) are added to form a 3-bit value. The result is added to the 3-bit value of the next column (after the latter is substantially doubled, i.e., shifted 1 bit to the left). Thus, the p[1] column corresponding to the bit width of the value c[i][1] is the sum of s[1], i.e., the sum of 7 p[1]-bit values. In the next column with index x + 1 = p[1]+1 contributing to the next sum s[2], instead of the 3 bits of the sum of tmp_result[i][p[1]] and the previous value, the constant "0" is selected by the multiplexer, and as a result, the adder chain is interrupted. For each column or each bit x of the word width X of the LUT, there is a configuration bit cfg_mux[x] including the corresponding multiplexer setting. Thus, the bit widths of all c[i][q] can be freely set. By restricting the threshold to 2^(p[q]-2), the comparison of s[q]<st[q](=2^(p[q]-2)) is also simplified. Only the two most significant bits (MSBs) from s[q] are checked for the value "00", and the least significant bit (LSB) is irrelevant. If neither bit is set, v[q]=1. To achieve full reconfigurability of the classifier, each column can be evenly implemented to include, for example, a 3-bit adder, a 3-bit multiplexer with configuration bits, and 2-bit comparator logic, but only the result of the next multiplexer (index x + 1) being set to interrupt the adder chain is relevant and corresponding to the values shown in FIG. 10. The remaining results s[x], v[x] are ignored.
[0064] FIG. 12 shows further details of an exemplary embodiment of the combiner. This figure shows the AND-OR chain of the combiner. As one of the next steps, the result of the comparator logic v[q] is AND-reduced to a value g[m]. This is done by the depicted AND-OR chain across all comparison results. The configuration bit cfg_mux[x+1] can mask irrelevant values v[x] to consider only relevant values. Furthermore, a further set of configuration bits cfg_and[x] can be used to interrupt the AND-OR chain at the boundaries between groups and determine the relevant values g[x] (where cfg_and[x]=1) corresponding to the values g[m] shown in FIG. 10.
[0065] The votes (or classifications) from the combiner units may be evaluated by a separate aggregation unit that performs majority voting. Optionally, the 1-bit values g[m] can be multiplied by weights w[m]. This operation can be performed by a set of multiplexers or AND gates that mute weights for g[m]=0, but may not be necessary for the application described here. Columns x with values that are not considered are configured with a weight "0". The weighting results are summed up in an adder tree to a sum c_sum. A comparator with an adjustable threshold c_thr finally outputs which class the features at the input of the classifier correspond to.
[0066] So far we have considered the AND / OR arrays, the XOR circuits, and the above operations used to compute the overall result from the LUT values. Although the proposed implementation already works well, it cannot be ruled out that there may be more compact and efficient structures to solve this task and further increase the compression ratio.
[0067] Although the description of this improved concept contains many details, these should not be interpreted as limitations on the scope of the concept or on what is or can be claimed, but rather as descriptions of features specific to certain embodiments of the invention. Certain features described in this disclosure in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in several embodiments separately or in any suitable subcombination. Furthermore, although features are described above as acting in a particular combination, and may even be claimed as such, in some cases, one or more features may be deleted from the claimed combination, and the claimed combination may be directed to a subcombination or a variation of the subcombination.
[0068] Thus, although acts in a figure may be shown in a particular order, this should not be understood to imply that these acts must be performed in the order shown or in the sequence shown, or that all of the acts shown must be performed to achieve desired results. In certain situations, multitasking and parallel processing may be advantageous.
[0069] Although several embodiments have been described, it will be understood that various modifications can be made without departing from the spirit and scope of the invention. Accordingly, other embodiments are within the scope of the following claims. [Explanation of symbols]
[0070] 1-Rank Calculation Block 2 Wood Processing Blocks 10 Computational Units 11 Threshold Memory 12. Logic 13 Input Comparator 14 Comparator 15 Comparator Input 16 Comparator Output 17 Lookup Tables 18 Combiner 20 Wood Processing Unit 21 Aggregation Unit
Claims
1. An architecture for classification of decision tree ensembles, comprising a rank computing block (1) and a tree processing block (2), said rank computing block (1) comprising one computing unit (10) for each feature of a set of features to be classified, each computing unit (10) comprising a memory (11) and logic (12); the memory (11) is configured to store thresholds of the decision trees in the ensemble of decision trees, the memory being arranged to store the thresholds in one group per feature, the thresholds in a group being sorted according to a threshold index; the logic (12) is arranged to perform a node comparison of the thresholds of a corresponding group of thresholds and to output a rank as a result of the comparison, the rank corresponding to an encoded address representing the threshold; the tree processing block (2) of trees in the decision tree ensemble is configured to determine the class of the feature to be classified as a function of its rank, The features are denoted as f i with feature index i ∈ [1;I], where I denotes the number of features to be classified, and the thresholds represent tree nodes in the decision tree ensemble; the logic (12) is arranged to receive features to be classified and perform a search to return the rank for each feature that divides the threshold into values less than and greater than a value of the feature; The ranks are output to the corresponding tree processing units (20), the tree processing unit (20) is configured to determine the class by evaluating Boolean functions, each Boolean function representing a decision tree in the ensemble of decision trees as a function of the received rank; Said architecture.
2. 2. The architecture of claim 1, wherein the tree processing block (2) comprises an aggregation unit (21) arranged to receive the determined classes from the tree processing unit (20) and to form an ensemble vote as a function of the determined classes.
3. The memory (11) a group of memory cells for each feature from the set of features to be classified; The architecture of claim 1, wherein the memory cells within a group are addressable according to the threshold index.
4. The logic (12) comprises a comparator (14) including a first input (13) operable to receive a feature and a second input (15) operable to receive a threshold value from the memory (11); The architecture of claim 1, wherein the comparator (14) is operable to perform the node comparison of the thresholds of a corresponding threshold group.
5. 5. The architecture of claim 4, wherein the tree processing unit (20) includes one or more comparators (22) arranged to perform address decoding of the received ranks to evaluate the Boolean function based on an address decoded rank.
6. Each of said calculation units (10) is connected to a respective dedicated look-up table (17); the lookup table (17) includes an input operable to receive a dedicated rank from the computation unit (10) connected to the lookup table; The architecture according to one of the preceding claims, wherein the look-up table (17) is operable to output an intermediate value as a function of the rank received at the input.
7. Each of said rank computing blocks (1) is connected to a respective dedicated look-up table (17); the look-up table (17) comprises an output operable to provide the intermediate value to the tree processing unit (20) connected to the look-up table; The architecture of claim 6 , wherein the tree processing unit (20) is operable to determine the class of the feature to be classified as a function of the received intermediate value.
8. 7. The architecture of claim 6, further comprising a combiner (18) having a computation unit, the combiner (18) operable to receive the intermediate values, combine and / or weight the intermediate values, and output the class of the feature to be classified.
9. The processing block (2) includes one or more lookup tables; The architecture according to claim 6, wherein the look-up table is implemented based on an associative memory including one or more comparators operable to perform a "less than" or "greater than" comparison.
10. A computer-implemented method of decision tree ensemble classification, comprising: storing thresholds representing the decision trees in the ensemble of decision trees, one group for each feature to be classified; sorting the thresholds of a group according to a threshold index; performing a node comparison of said thresholds of a corresponding threshold group; outputting a rank as a result of the node comparison, the rank corresponding to an encoded address representing the threshold; determining a class of said features to be classified as a function of rank; The method includes the steps of: The features to be classified are denoted as f i with feature index i ∈ [1;I], where I denotes the number of features to be classified, the threshold represents a node of a tree in the decision tree ensemble, and the method comprises: receiving features to be classified by logic (12) and performing a search using said logic to return said rank for each feature that divides said threshold into values less than and greater than the value of said feature; outputting said ranks to respective corresponding tree processing units (20); determining the class of the feature to be classified by evaluating Boolean functions, each of the Boolean functions representing a tree in the ensemble of decision trees as a function of the received rank; including the further step of The method.
11. the rank is determined from a binary search using the logic (10); or The method of claim 10 , wherein the rank is determined from an in-memory lookup.
12. The method according to one of claims 10 to 11, wherein the evaluation of the decision tree requires a lookup table (17) with pre-computed values stored as lookup table entries, and the class is determined depending on the lookup table entries.
13. 13. The method of claim 12, wherein the lookup table entries are determined by training software, the training software determining an assignment of lookup table entries such that the mathematical descriptions of the decision tree ensemble and the classification architecture are equivalent.
Citation Information
Patent Citations
Technique for classifying data
JP2009122851A
parallel decision tree processor architecture
JP2017517082A
A method to rank documents by a computer, using additive ensembles of regression trees and cache optimisation, and search engine using such a method
US20180217991A1
