recbole.NeuMF
Neural collaborative filtering that fuses generalized matrix factorization with an MLP over user and item embeddings.
Tabular and recommender · 18 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.
At a glance
- Parameters
- 361.2K
- Operations
- 18
- Framework
- PyTorch
- Recurrent
- No
- Published
- WWW 2017
- Cited by
- 199 (as of 19 October 2026)
- Authors
- Xiangnan He, Lizi Liao, Hanwang Zhang and others
- Source
- recbole 1.2.1
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
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.
Details
- Stable ID
- m8654
- Graph hash
- d4efa358a950a6a4cab19df41ac93a1e18ddaa9a0340699ca2342a9c0ff358ff
- Skeleton hash
- e6dfb8c9e14ee02b9fa062c9608e5b360078afc2655b7c234f8acc7e35596c0a
- Architecture hash
- 9813a9c79c5f104906974a574b7ea7df510e1e7da4817581366d19f29a00f621
- Diagram SHA-256
- d2cbdb4ef573ec07f5e5871d47cb75958611f257d4d89052399671fe68f8c980
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
NeuMF, short for Neural Matrix Factorization, is the main model of the Neural Collaborative Filtering paper, which replaces the inner product of matrix factorization with a neural network learned from data. The paper's argument is that an inner product combines latent features linearly and may not capture the complex structure of user interaction data. NCF is general enough that matrix factorization falls out as a special case, which the paper calls GMF, Generalized Matrix Factorization.
A second instantiation feeds the concatenated user and item embeddings through a multi-layer perceptron with ReLU layers in a tower pattern, halving the width at each layer. NeuMF fuses the two: GMF and the MLP learn separate embeddings, and their last hidden layers are concatenated before a single output neuron. Training treats implicit feedback as binary classification with a log loss and sampled negatives, four per positive in the experiments. The paper initializes NeuMF from pre-trained GMF and MLP models, then fine-tunes with plain SGD rather than Adam.
On MovieLens and Pinterest, the paper reports NeuMF ahead of eALS and BPR by 4.5% and 4.9% relative on average. Stacking more MLP layers helped even at equal capacity, which the paper reads as evidence for deep models in recommendation. The RecBole implementation keeps GMF and MLP towers over separate user and item embeddings and concatenates them into one prediction layer, with only a rough pretraining function.
Key idea. NCF replaces the inner product of matrix factorization with a learned neural interaction function, and NeuMF fuses a generalized MF branch with an MLP branch.
- neumf
- neural matrix factorization
- ncf
- neural collaborative filtering
- collaborative filtering
- implicit feedback
- matrix factorization
- recommender system
- recbole
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{he2017neuralcollaborativefiltering,
title={Neural Collaborative Filtering},
author={Xiangnan He and Lizi Liao and Hanwang Zhang and Liqiang Nie and Xia Hu and Tat-Seng Chua},
year={2017},
eprint={1708.05031},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/1708.05031},
}