Abstract
Large-scale web applications often face a trade-off between the high accuracy of Deep Neural Networks (DNNs) and the low-latency serving requirements of production environments. This paper introduces the Deep Embedding Forest (DEF), a hybrid architecture that bridges this gap. DEF utilizes neural embedding layers to automatically learn dense features from high-dimensional sparse data, which are then processed by a forest-based model for final prediction. Experimental results on real-world sponsored search data demonstrate that DEF achieves comparable or superior accuracy to state-of-the-art DNNs while providing over a 10x speedup in serving time on standard CPU hardware.
Introduction
In domains such as sponsored search and recommendation systems, models must process heterogeneous data comprising text, categorical IDs, and numerical features. While DNNs excel at "automatic feature engineering" through multiple layers of non-linear transformations, their serving cost is high due to dense matrix multiplications, often requiring specialized hardware like GPUs. Conversely, tree-based models like Gradient Boosted Decision Trees (GBDTs) offer exceptional inference speed on CPUs but struggle with raw, high-dimensional sparse inputs, typically requiring extensive manual feature engineering.
The Deep Embedding Forest (DEF) addresses this by using a DNN as a "translator" to compress sparse data into dense embeddings, which are then efficiently served via a forest model.
Methodology
The DEF architecture consists of two primary components: an embedding stage and a forest stage.
Architecture Stages
- Embedding Layers: These layers map high-dimensional features (e.g., query tri-letter grams) into a lower-dimensional, dense "stacking vector."
- Forest Layer: A forest model (e.g., XGBoost or LightGBM) consumes the stacking vector to produce the final output.
Training Strategies
The authors propose two training paradigms:
- Two-Step DEF: A DNN (such as Deep Crossing) is pre-trained to learn embeddings. These fixed embeddings are then used to train a standalone forest model.
- Three-Step DEF (Joint Optimization): This approach uses "Partial Fuzzification" to make the decision trees differentiable. By replacing hard splits with sigmoidal functions, the entire pipeline can be fine-tuned using backpropagation.
Experimental Setup
The model was evaluated using a massive dataset from the Bing sponsored search engine, ranging from 3 million to 1 billion samples. Input features included text (Query, Keyword, Title), categorical data (Match Type), and numerical statistics, totaling approximately 150,000 raw dimensions.
Results and Discussion
The primary advantage of DEF is its ability to maintain high accuracy while drastically reducing inference latency.
As shown in the results, the Two-Step DEF achieved a serving time as low as 0.168ms per sample, representing a 13.5x speedup over the baseline Deep Crossing DNN (2.272ms). Remarkably, the DEF variants also improved accuracy, yielding lower relative log loss than the standalone DNN, with the jointly optimized Three-Step DEF achieving the best overall performance.
Key insights include:
- Efficiency via Sparsity: Forest models only evaluate a subset of embedding dimensions at each node, making prediction time largely independent of the total embedding vector size.
- Hardware Accessibility: DEF enables high-performance model serving on standard CPU clusters, eliminating the need for expensive GPU infrastructure in production.
Conclusion
The Deep Embedding Forest provides a practical solution for deploying deep learning capabilities in latency-sensitive environments. By combining the representational power of neural embeddings with the computational efficiency of forest models, DEF achieves a superior balance of accuracy and speed. Future work may explore integrating more complex embedding architectures, such as LSTMs or CNNs, into the DEF framework.
Summary updated