An Input-aware Factorization Machine for Sparse Prediction

Yantao Yu, Zhen Wang, Bo Yuan

Introduction

In the landscape of recommendation systems and online advertising, data is characterized by extreme sparseness and high-dimensional categorical features. Factorization Machines (FMs) have emerged as a cornerstone for these tasks, effectively modeling second-order feature interactions through low-dimensional latent vectors. However, a significant limitation persists in traditional FMs: they rely on static representations. A feature's embedding and weight remain constant regardless of the context in which it appears.

In real-world scenarios, the predictive importance of a feature is highly contextual. For instance, the feature Gender=Female may be a critical predictor when a user is browsing for apparel but may carry negligible weight when the same user is searching for technical hardware. Existing advancements like DeepFM and Neural Factorization Machines (NFM) have focused on modeling higher-order interactions but continue to utilize these static base representations. This paper introduces the Input-aware Factorization Machine (IFM), which dynamically refines feature representations based on the specific input instance.

The IFM Architecture

The core innovation of IFM is the transition from static to dynamic feature importance. The model achieves this through a four-layered architecture designed to learn context-specific weights and embeddings.

The overall architecture of the Input-aware Factorization Machine (IFM), highlighting the Factor Estimating Network (FEN) and the Reweighting Layer.

1. Embedding Layer

Similar to a standard FM, every feature $i$ is initialized with a global weight $w_i$ and a $k$-dimensional latent embedding vector $v_i$. These serve as the foundational parameters that the model will refine.

2. Factor Estimating Network (FEN)

The FEN is the "intelligence" of the IFM. It is a multi-layer perceptron (MLP) that takes the embeddings of all non-zero features in a specific input instance as its input. By analyzing the combination of features present, the FEN outputs a unique input-aware factor ($m_{x,i}$) for each feature. This factor represents the relative importance of feature $i$ given the current context $x$.

3. Reweighting Layer

This layer applies the factors generated by the FEN to the original parameters. The refined weight and embedding are calculated as:

  • $w_{x,i} = m_{x,i} \cdot w_i$
  • $v_{x,i} = m_{x,i} \cdot v_i$

By scaling both the linear weight and the interaction vector, the model can effectively "amplify" or "silence" features dynamically.

4. FM Prediction Layer

The final prediction is generated by plugging these context-aware parameters into the standard FM equation. Because the inputs to this layer are already refined, the FM can produce a much more accurate estimate of the target variable.

Experimental Evaluation

The authors evaluated IFM against several state-of-the-art baselines, including standard FM, DeepFM, and NFM, across three real-world datasets:

  • Frappe: A context-aware mobile app recommendation dataset.
  • MovieLens: A personalized tag recommendation dataset.
  • Avazu: A large-scale click-through rate (CTR) prediction dataset.

Key Results and Insights

IFM consistently outperformed all baselines across both regression and classification tasks. On the Frappe dataset, IFM achieved a Mean Absolute Error (MAE) of 0.0685, a substantial improvement over DeepFM (0.0891). On the Avazu CTR dataset, IFM reached an AUC of 78.48%, the highest among the tested models.

Training and validation RMSE on the Frappe dataset, comparing the standard FM with the proposed IFM. IFM shows significantly faster convergence and lower error rates.

As shown in the performance curves, IFM not only achieves lower error rates but also converges more rapidly than the standard FM. This suggests that providing the model with input-aware representations simplifies the learning process for the interaction layers.

One of the most critical insights from the study is the effectiveness of the Softmax mechanism within the FEN. By normalizing the input-aware factors such that they sum to the number of non-zero features, the model is forced to perform a "budget allocation" of attention. It must decide which features are most relevant to the current prediction, preventing any single feature from dominating the output across all contexts.

Conclusion

The Input-aware Factorization Machine represents a shift in focus from interaction modeling to representation refining. By demonstrating that a "smart" shallow model can outperform complex deep models, IFM provides a computationally efficient and highly effective alternative for sparse prediction tasks. Future work may involve exploring more complex architectures for the Factor Estimating Network or adapting the reweighting mechanism for even more diverse data types.

Summary updated

BibTeX
@inproceedings{yu2019input,
  author = {Yantao Yu and Zhen Wang and Bo Yuan},
  title = {{An Input-aware Factorization Machine for Sparse Prediction}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/203},
}
Figure