
recbole.NFM
Tabular and recommender99 ops23.5K params
NFM stacks a neural network on a factorization machine to learn non-linear feature interactions from sparse inputs.
Tabular and recommender · 211 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
About this model's family
NFM, the Neural Factorization Machine, is a model for prediction under sparse settings, the kind of input you get when user IDs and demographic fields are one-hot encoded. Those categorical predictors are converted to binary features via one-hot encoding, which leaves the feature vector highly sparse, and the paper's premise is that learning from such data well means accounting for interactions between features. Factorization Machines handle second-order interactions efficiently, but they model those interactions in a linear way, which the authors argue can be insufficient for the non-linear structure of real-world data.
The idea is to keep the FM's linear second-order interactions and add a neural network on top to model higher-order interactions non-linearly. Conceptually FM is a special case of NFM with no hidden layers. On two regression tasks a single hidden layer was enough for NFM to beat FM by a 7.3% relative improvement. Against Wide&Deep and DeepCross, the paper claims a shallower structure that performs better and is easier to train and tune. The three traced members are all the DeepCTR-Torch implementation, a package of deep-learning based CTR models that lists the Neural Factorization Machine among its models. The authors' own code supports two tasks, regression optimising RMSE and binary classification optimising Log Loss.
Key idea. NFM combines the linearity of FM in modelling second-order feature interactions with the non-linearity of a neural network for higher-order interactions, so that FM becomes the special case with no hidden layers.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{he2017neuralfactorizationmachinessparse,
title={Neural Factorization Machines for Sparse Predictive Analytics},
author={Xiangnan He and Tat-Seng Chua},
year={2017},
eprint={1708.05027},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1708.05027},
}