Abstract
Traditional Factorization Machines (FM) rely on inner products to model feature interactions, which often fails to capture complex, high-order correlations in sparse context-aware data. This paper introduces Convolutional Factorization Machines (CFM), a novel architecture that represents pairwise feature interactions as a 3D "interaction cube" via outer products. By applying 3D Convolutional Neural Networks (CNNs) to this cube, CFM explicitly learns hierarchical feature relationships. Coupled with a self-attention pooling layer for multi-hot features, CFM achieves superior performance and training efficiency compared to existing state-of-the-art models.
Introduction
In Context-Aware Recommender Systems (CARS), the objective is to predict user preferences by incorporating auxiliary variables such as time, location, or device type. This data is typically categorical and highly sparse. For years, the Factorization Machine (FM) has been the standard approach, modeling feature interactions through vector inner products. However, FM suffers from two primary limitations:
- Independence Assumption: It assumes that embedding dimensions are independent, neglecting rich intra-vector correlations.
- Shallow Interactions: It primarily captures second-order interactions. While "Deep" FM variants exist, they often rely on standard Multi-Layer Perceptrons (MLPs) to model interactions implicitly, which can be inefficient and lack structural inductive bias.
Methodology
CFM addresses these issues through three architectural innovations:
1. Self-Attention Pooling Layer
Real-world datasets often contain "multi-hot" features, such as a user's recent browsing history. Rather than simple averaging, CFM employs a self-attention mechanism to dynamically weight historical items based on their relevance to the current context. This reduces noise and improves computational efficiency.
2. The Interaction Cube
The core of CFM is the transition from inner products to outer products. For every pair of feature fields, CFM computes an outer product, resulting in a $d \times d$ interaction matrix (or "image"). These matrices capture all pairwise correlations between embedding dimensions. Stacking these matrices forms a 3D Interaction Cube.
3. 3D Convolutional Neural Network (3D CNN)
To extract high-order patterns from the Interaction Cube, CFM utilizes a 3D CNN. Unlike 2D CNNs, the 3D kernels convolve across the "depth" of the cube, allowing the model to explicitly "interact the interactions" in a spatially structured manner.
Experimental Setup
The model was evaluated on three diverse datasets:
- Frappe: App usage logs with 10 contextual fields (e.g., weather, city).
- Last.fm: Music history where context is derived from the user's most recent track.
- MovieLens: A standard movie dataset enriched with genre and history, binarized for implicit feedback.
Key Results and Insights
CFM consistently outperformed state-of-the-art baselines, including FM, DeepFM, and NFM. On the Frappe dataset, CFM achieved a Hit Ratio (HR@10) of 0.6720, surpassing the previous outer-product-based model, ONCF (0.6531).
Ablation Study: The Power of 3D Convolutions
A key finding was the superiority of 3D convolutions over 2D alternatives. By convolving across the depth of the interaction cube, the model effectively captures the order and relationship between different feature pairs. As shown in the ablation results, both the interaction cube structure and the 3D CNN layers are critical for maximizing recommendation accuracy (NDCG@10).
Efficiency Gains
The self-attention pooling layer significantly optimized training. On the MovieLens dataset, it reduced the time per iteration from approximately 50 minutes to just 4.6 minutes, while simultaneously improving the quality of recommendations.
Conclusion
CFM represents a shift from implicit to explicit high-order feature interaction modeling. By leveraging the spatial properties of outer products and 3D convolutions, it provides a more expressive and structured framework for context-aware recommendation. Future work may explore deeper architectures using Residual Learning or more advanced adaptive sampling strategies to further refine performance.
Summary updated