Introduction
While deep learning has revolutionized fields like computer vision and natural language processing, tree-based ensemble models—such as Random Forests and XGBoost—remain the gold standard for tabular data analysis. However, executing these models on conventional CPU/GPU architectures is often inefficient due to irregular memory access patterns and complex branching logic.
In-memory computing using Ternary Content-Addressable Memory (TCAM) offers a promising alternative by enabling parallel search across all possible tree paths. Yet, naive mapping of decision trees to TCAM is notoriously resource-intensive, often wasting over 96% of memory cells on "don't care" (X) states. This paper introduces RETENTION, an end-to-end framework designed to overcome these inefficiencies through novel pruning and data placement strategies, achieving up to a 207x reduction in memory requirements with minimal accuracy loss.
Methodology: The RETENTION Framework
RETENTION addresses redundancy in CAM-based tree acceleration through a two-pronged approach:
1. Purity Threshold Pruning
Traditional pruning methods often evaluate individual trees in isolation, which can degrade the collective performance of an ensemble. RETENTION employs an iterative "purity-based" pruning algorithm that utilizes Out-of-Bag (OOB) estimation. By converting nodes into leaves based on a purity threshold—the proportion of the majority class—only when ensemble-wide accuracy remains within a specified tolerance, the framework reduces the total number of paths and unique conditions without sacrificing robustness.
2. Innovative Tree Mapping
Once pruned, the model is mapped into the TCAM using one of two specialized strategies:
- Occurrence-Based Double Reordering (ODR): This strategy prioritizes energy efficiency by sorting conditions by frequency. This clustering of "don't care" states allows entire TCAM blocks to be powered down when not in use.
- Similarity-Based Path Clustering (SPC): Focused on space optimization, SPC uses a greedy heuristic to group paths with common conditions into the same TCAM blocks, significantly minimizing the total memory footprint.
Experimental Evaluation
The framework was evaluated on five diverse tabular datasets from the UCI Machine Learning Repository, including Adult (income prediction), CreditApproval (financial risk), and Letter (character recognition). These datasets provided a rigorous testbed for both binary and multi-class classification tasks.
Key Results
- Massive Compression: RETENTION achieved a reduction in CAM capacity requirements ranging from 4.35× to 207.12× across the tested datasets.
- Accuracy Preservation: Even at peak compression levels, the drop in testing accuracy was consistently kept under 3%.
- Mapping Efficiency: The proposed SPC mapping scheme alone reduced memory demand by up to 21.3× compared to prior state-of-the-art methods, even without pruning.
- Hardware Performance: Simulations indicate that TCAM search operations can be completed in less than 1 nanosecond, demonstrating the extreme speed potential of solved-footprint CAM acceleration.
Discussion and Future Directions
The primary insight of RETENTION is that the bottleneck in CAM-based acceleration is not the model logic itself, but the formatting of that logic for hardware. By leveraging the collective behavior of the ensemble during pruning, RETENTION preserves the diversity essential for robust bagging models.
However, challenges remain. The "query packing" process—preparing input data for the TCAM—currently resides on a traditional controller and may become a bottleneck for exceptionally large models. Future work will explore more efficient query preparation and the physical implementation of these strategies on non-volatile TCAM (nvTCAM) chips to assess real-world thermal and noise characteristics.
Summary updated