DeepFM: A Factorization-Machine based Neural Network for CTR Prediction
阿新 • • 發佈:2022-05-24
目錄
概
作者認為特徵的low-order交叉和high-order交叉對於預測都是同等重要的, 但是之前的工作要麼偏向low-order, 要麼偏向high-order, 要麼依賴特徵工程. 本文就提出一種能夠自動學習的DeepFM.
主要內容
資料
假設資料形為 \((x, y)\), 其中 \(x\) 包含 \(m\)-fields:
\[x = [x_{field_1}, x_{field_2}, \cdots, x_{field_m}]. \]每一個field就是某一種特徵屬性, 對於類別型的field, \(x_{field}\)是 one-hot 向量 (如性別等屬性), 而對於連續型的 field \(x_{field}\)就是值本身 (比如年齡等屬性). 通常 \(x\) 是一個非常稀疏的向量.
標籤 \(y \in \{0, 1\}\) 則表示該 item 是否被點選了.
FM 部分
FM 部分實際上就是:
- Addition 模組:
- 交叉模組 (內積):
其中 \(V_i \in \mathbb{R}^k\) 為 \(x_i\) 所對應的 embedding.
- 最後
問: 為什麼不 field-aware ?
Deep 部分
- 通過 embedding layer 為每個 field 提取 embedding \(e\), 最後得到:
- 通過 MLP 獲得 high-order 的資訊:
這裡 \(\sigma(\cdot)\) 僅僅代表啟用函式.
Joint
最後通過
\[\hat{y} = sigmoid(y_{FM} + y_{DNN}) \]進行預測.
其它細節
- FM, Deep 部分共享 \(V\);
- dropout: 0.5;
- MLP: 400-400-400;
- optimizer: Adam;
- Actication: ReLU
程式碼
[official]
[PyTorch]
[TensorFlow]