
recbole.PNN
Tabular and recommender60 ops140.1K params
A CTR network that multiplies field embeddings pairwise before its hidden layers, instead of only adding them.
Tabular and recommender · 113 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.
PNN, the Product-based Neural Network, is a click prediction model for multi-field categorical data, the one-hot encoded records behind recommender systems, web search and online advertising. It stacks three stages: an embedding layer that learns a distributed representation of the categorical data, a product layer that captures interactive patterns between fields, and fully connected layers that explore high-order feature interactions.
The motivation is that the "add" operations of a perceptron layer may not be useful for exploring the interactions of categorical data across fields. Earlier work had shown that local dependencies between features from different fields can be explored effectively by feature vector "product" operations instead. Two variants are defined: IPNN, whose product layer uses the inner product of field embeddings, and OPNN, which uses an outer product expression. The captured member comes from DeepCTR-Torch, whose model list files the Product-based Neural Network under its ICDM 2016 paper.
To keep the inner product layer tractable, the paper factorizes the product-layer weights, which reduces the complexity of the first hidden layer from quadratic to linear in the number of fields. For the outer product, the authors use element-wise superposition, summing the field embeddings before taking a single outer product. The first author's own code README later says those complexity tricks restrict model capacity and are unnecessary, and that a recent update removed them for better performance.
On the Criteo and iPinYou ad click datasets, the paper reports that PNNs perform the best on both. Every PNN in those experiments has 1 embedding layer, 1 product layer and 3 hidden layers. The authors frame the product layer as learning rules rather than features: by analogy to an electronic circuit, addition acts like an OR gate while multiplication acts like an AND gate.
Key idea. PNN inserts a product layer between the embedding layer and the fully connected layers so that pairwise inner or outer products of field embeddings, rather than additions, model the inter-field feature interactions.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{qu2016productbasedneuralnetworksuser,
title={Product-based Neural Networks for User Response Prediction},
author={Yanru Qu and Han Cai and Kan Ren and Weinan Zhang and Yong Yu and Ying Wen and Jun Wang},
year={2016},
eprint={1611.00144},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1611.00144},
}