Introduction
In the digital advertising ecosystem, Click-Through Rate (CTR) prediction is a critical task. Accurate predictions allow platforms to rank ads effectively, maximizing both user experience and revenue. The core challenge in CTR prediction is capturing complex feature interactions. For instance, a user might be more likely to click on a "meal delivery" app during "lunchtime" (a 2nd-order interaction). Higher-order interactions, such as "teenagers" playing "RPG games" on "weekends," are equally important but significantly harder to model.
Traditionally, capturing these interactions required extensive manual feature engineering, where domain experts would create "cross-features." This process is not only labor-intensive but also prone to missing non-obvious patterns. DeepFM was proposed to solve this by automating the discovery of both low- and high-order feature interactions in an end-to-end learning framework.
The DeepFM Architecture
DeepFM integrates the strengths of Factorization Machines (FM) and Deep Neural Networks (DNN). Unlike previous models that required manual feature engineering or complex pre-training, DeepFM is a seamless architecture where both components share the same input and embedding layer.
As illustrated in the architecture diagram, the model takes sparse, high-dimensional features as input. These features are grouped into "fields" (e.g., Gender, Location, App Category). The model then branches into two parallel components:
- FM Component: This part acts as a traditional Factorization Machine. It models the linear (1st-order) importance of features and the pairwise (2nd-order) interactions. The 2nd-order interactions are calculated as the inner product of latent vectors associated with each feature.
- Deep Component: This is a standard feed-forward neural network (MLP) designed to learn high-order feature interactions. It takes the concatenated embeddings as input and passes them through multiple hidden layers with non-linear activation functions.
The final prediction is a combination of the outputs from both the FM and Deep components, passed through a sigmoid function to produce a probability between 0 and 1.
Shared Embedding Layer: The Core Innovation
A key innovation of DeepFM is its shared embedding layer. In traditional hybrid models like Google's Wide & Deep, the "wide" and "deep" parts often require different input formats. The "wide" part usually requires manually crafted cross-features, while the "deep" part learns from raw feature embeddings. DeepFM eliminates this discrepancy by using a latent vector-based embedding layer that serves both components simultaneously.
As shown in the embedding layer detail, sparse features from different fields are mapped into dense, low-dimensional vectors. These vectors ($V_{ij}$) serve a dual purpose:
- In the FM component, they are used to calculate the inner products that represent 2nd-order interactions.
- In the Deep component, they are concatenated to form the input vector for the first hidden layer.
This design ensures that the model learns a single, consistent representation of the data. By training the entire network back-to-back, the embeddings are optimized to capture signals relevant for both simple pairwise interactions and complex high-order patterns. This strategy not only removes the need for manual feature engineering but also reduces the number of parameters compared to models that use separate embeddings.
Experimental Evaluation
The authors evaluated DeepFM against several state-of-the-art models, including Logistic Regression (LR), FM, PNN (Product-based Neural Network), and Wide & Deep. The evaluation used two massive datasets:
- Criteo Dataset: A benchmark dataset containing 45 million users' click records, consisting of 13 continuous and 26 categorical features.
- Company Dataset: A private dataset from a major App Store (Huawei) containing over 1 billion records, including user demographics, app features, and context (like time and location).
Key Results
DeepFM consistently outperformed all baselines in terms of AUC (Area Under the ROC Curve) and LogLoss on both datasets. On the Criteo dataset, it achieved an AUC of 0.8016, outperforming the second-best models.
The researchers also conducted hyperparameter studies, finding that ReLU and Tanh outperformed Sigmoid in the deep component, and a "constant" network shape (where each hidden layer has the same number of neurons) generally performed best.
Conclusion
DeepFM represents a significant advancement in CTR prediction by providing a unified framework that captures feature interactions of all orders without requiring manual feature engineering. Its shared embedding architecture makes it computationally efficient and highly effective for large-scale industrial applications. By successfully combining the interpretability of FM with the representational power of DNNs, DeepFM has become a foundational model in the field of recommendation systems.
Summary updated