Neural Factorization Machines for Sparse Predictive Analytics

Xiangnan He, Tat-Seng Chua

Introduction

Predictive tasks involving sparse categorical data—such as ad click-through rate (CTR) prediction and recommendation systems—rely heavily on capturing complex feature interactions. While traditional Factorization Machines (FMs) effectively model pairwise interactions linearly, they struggle with the non-linear patterns prevalent in real-world data. Conversely, standard Deep Neural Networks (DNNs) often fail to optimize on sparse data due to their reliance on simple embedding concatenation, which provides a weak interaction signal to the network's initial layers.

Neural Factorization Machines (NFM) bridge this gap by introducing a novel Bi-Interaction pooling layer. This architecture allows the model to explicitly capture second-order feature interactions before passing them to deeper layers, enabling the learning of higher-order patterns with greater efficiency and fewer parameters than existing deep models.

The NFM Architecture

The core innovation of NFM is the Bi-Interaction Pooling Layer, which serves as a bridge between the sparse embedding space and the non-linear hidden layers.

The NFM architecture featuring the Bi-Interaction Pooling layer which captures second-order feature interactions.

The model follows a structured pipeline:

  1. Embedding Layer: Sparse input features are mapped into dense embedding vectors.
  2. Bi-Interaction Layer: Instead of concatenating vectors, this layer computes the element-wise product of every pair of feature embeddings and sums them into a single vector. This operation explicitly encodes all second-order interactions into a representation of the same size as a single embedding, effectively generalizing the FM model.
  3. Hidden Layers: The resulting interaction vector is fed into a stack of fully connected non-linear layers (MLP). Because the input is already rich with interaction information, the network can easily learn complex, higher-order non-linear interactions (e.g., 3rd or 4th order).

Optimization and Regularization

To ensure robust training on sparse data, the authors utilize Batch Normalization and a novel application of Dropout on the Bi-Interaction layer. This regularization strategy is particularly effective for FM-like structures, preventing overfitting as model complexity increases.

RMSE performance on Frappe and MovieLens datasets comparing Dropout and L2 regularization (weight decay) on the NFM-0 model.

As illustrated in the evaluation of the NFM-0 (the base model without hidden layers), dropout significantly improves validation RMSE compared to standard weight decay, especially in the context of the Frappe and MovieLens datasets.

Experimental Evaluation

The authors evaluated NFM on two public benchmarks:

  • Frappe: A context-aware app discovery dataset (~96,000 logs) featuring user IDs, app IDs, and context variables like weather and city.
  • MovieLens: A dataset used for personalized tag recommendation, modeling the ternary relationship between users, movies, and tags (over 90,000 features).

Key Results

  • Superior Accuracy: On the Frappe dataset, a 1-layer NFM outperformed the standard LibFM implementation by 7.3% in terms of RMSE.
  • Parameter Efficiency: NFM consistently outperformed models like Google's Wide&Deep and Microsoft's DeepCross while using significantly fewer parameters. For example, on Frappe, NFM achieved better accuracy with 0.71M parameters compared to Wide&Deep's 2.66M.
  • Robust Initialization: Unlike other deep models that often require FM-based pre-training to perform well on sparse data, NFM is robust enough to be trained from scratch with random initialization.
  • The Power of Non-Linearity: The inclusion of non-linear activation functions (e.g., ReLU) in the hidden layers provided a significant performance boost over purely linear versions, validating the need for modeling higher-order interactions non-linearly.

Conclusion and Future Work

Neural Factorization Machines provide a compelling "neural" evolution of the Factorization Machine, offering a more powerful yet efficient approach to sparse predictive analytics. By addressing the "concatenation bottleneck" of standard DNNs, NFM achieves state-of-the-art results with shallower architectures.

Future research directions include improving scalability for massive-scale applications through hashing techniques and adapting the Bi-Interaction pooling mechanism for sequential data modeling using Recurrent Neural Networks (RNNs). Additionally, further testing on classification and ranking-specific objective functions will broaden the model's applicability across diverse predictive tasks.

Summary updated

BibTeX
@inproceedings{he2017neural,
  author = {Xiangnan He and Tat-Seng Chua},
  title = {{Neural Factorization Machines for Sparse Predictive Analytics}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2017},
  doi = {10.1145/3077136.3080777},
}
Figure