一些经典的CTR算法的复现; LR, FM, FFM, AFM, DeepFM,xDeepFM, PNN, DCN, DCNv2, DIFM, AutoInt, FiBiNet,AFN,ONN,DIN, DIEN ... (pytorch, tf2.0)

Overview

CTR Algorithm

根据论文, 博客, 知乎等方式学习一些CTR相关的算法
理解原理并自己动手来实现一遍
pytorch & tf2.0
保持一颗学徒的心!

Schedule

Model pytorch tensorflow2.0 paper
LR ✔️ ✔️ \
FM ✔️ ✔️ Factorization Machines, 2010.
FFM ✔️ ✔️ Field-aware Factorization Machines for CTR Prediction, 2015.
AFM ✔️ ✔️ Attentional Factorization Machines: Learning the Weight of Feature Interactions via Attention Networks, 2017.
DeepFM ✔️ ✔️ DeepFM: A Factorization-Machine based Neural Network for CTR Prediction, 2017.
PNN ✔️ ✔️ Product-based Neural Networks for User Response Prediction, 2016.
XDeepFM ✔️ ✔️ xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems, 2018.
DCN ✔️ ✔️ Deep & Cross Network for Ad Click Predictions, 2017.
AutoInt ✔️ ✔️ AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks, 2018.
DIN ✔️ ✔️ Deep Interest Network for Click-Through Rate Prediction,2018
DIEN ✔️ ✔️ Deep Interest Evolution Network for Click-Through Rate Prediction,2019
FiBiNET ✔️ ✔️ FiBiNET: Combining Feature Importance and Bilinear feature Interaction for Click-Through Rate Prediction,2019
DCN-V2 ✔️ ✔️ Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems,2020
DIFM ✔️ ✔️ A Dual Input-aware Factorization Machine for CTR Prediction,2020
AFN ✔️ ✔️ Adaptive Factorization Network: Learning Adaptive-Order Feature Interactions,2020
ONN ✔️ ✔️ Operation-aware Neural Networks for User Response Prediction,2019
You might also like...
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks

Amazon Forest Computer Vision Satellite Image tagging code using PyTorch / Keras Here is a sample of images we had to work with Source: https://www.ka

The Incredible PyTorch: a curated list of tutorials, papers, projects, communities and more relating to PyTorch.
The Incredible PyTorch: a curated list of tutorials, papers, projects, communities and more relating to PyTorch.

This is a curated list of tutorials, projects, libraries, videos, papers, books and anything related to the incredible PyTorch. Feel free to make a pu

A PyTorch implementation of the paper Mixup: Beyond Empirical Risk Minimization in PyTorch
A PyTorch implementation of the paper Mixup: Beyond Empirical Risk Minimization in PyTorch

Mixup: Beyond Empirical Risk Minimization in PyTorch This is an unofficial PyTorch implementation of mixup: Beyond Empirical Risk Minimization. The co

A pytorch implementation of  Pytorch-Sketch-RNN
A pytorch implementation of Pytorch-Sketch-RNN

Pytorch-Sketch-RNN A pytorch implementation of https://arxiv.org/abs/1704.03477 In order to draw other things than cats, you will find more drawing da

PyTorch implementation of Advantage async actor-critic Algorithms (A3C) in PyTorch
PyTorch implementation of Advantage async actor-critic Algorithms (A3C) in PyTorch

Advantage async actor-critic Algorithms (A3C) in PyTorch @inproceedings{mnih2016asynchronous, title={Asynchronous methods for deep reinforcement lea

Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks

Amazon Forest Computer Vision Satellite Image tagging code using PyTorch / Keras Here is a sample of images we had to work with Source: https://www.ka

A bunch of random PyTorch models using PyTorch's C++ frontend
A bunch of random PyTorch models using PyTorch's C++ frontend

PyTorch Deep Learning Models using the C++ frontend Gettting started Clone the repo 1. https://github.com/mrdvince/pytorchcpp 2. cd fashionmnist or

PyTorch Autoencoders - Implementing a Variational Autoencoder (VAE) Series in Pytorch.

PyTorch Autoencoders Implementing a Variational Autoencoder (VAE) Series in Pytorch. Inspired by this repository Model List check model paper conferen

PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices.

PyTorch-LIT PyTorch-LIT is the Lite Inference Toolkit (LIT) for PyTorch which focuses on easy and fast inference of large models on end-devices. With

Comments
  • 关于DIN的疑问

    关于DIN的疑问

    大佬您好,最近看您的DIN代码,有一些地方不太明白,希望得到您的解答! 1、mask = (behaviors_x > 0).float().unsqueeze(-1) 这里的msak的具体作用是啥啊?为什么需要这个mask呢? 这里的 注意力输入部分,原始的好像没有queries - user_behavior吧?为啥有这一项呢 2、attn_input = torch.cat([queries, user_behavior, queries - user_behavior, queries * user_behavior], dim = -1) 3、 output = user_behavior.mul(attns.mul(mask)) # batch * seq_len * embed_dim 这个里面为啥还有mask呢?

    opened by yanduoduan 0
  • 关于DIEN的PyTorch实现

    关于DIEN的PyTorch实现

    你好,我在阅读DIEN的PyTorch代码时发现一个地方可能存在错误 在Interest Extractor Layer中,GRU的隐藏层应该保留前T-1个用于计算辅助loss 但是DIEN代码的152行是 gru_embed=pad_interests[:,1:] 这样是不是取了后T-1个hidden state? 我理解的应该是 gru_embed=pad_interests[:,:-1]

    opened by Q-Qing 1
  • 关于DIN模型的疑惑

    关于DIN模型的疑惑

    大佬您好,最近看您的DIN代码,有一些地方不太明白,希望得到您的解答! 1、mask = (behaviors_x > 0).float().unsqueeze(-1) 这里的msak的具体作用是啥啊?为什么需要这个mask呢? 这里的 注意力输入部分,原始的好像没有queries - user_behavior吧?为啥有这一项呢 2、attn_input = torch.cat([queries, user_behavior, queries - user_behavior, queries * user_behavior], dim = -1) 3、 output = user_behavior.mul(attns.mul(mask)) # batch * seq_len * embed_dim 这个里面为啥还有mask呢?

    opened by yanduoduan 4
  • 模型中关于输入的feature_fields的疑惑

    模型中关于输入的feature_fields的疑惑

    大佬,您好,您写的这个项目是我看到最优美的推荐代码,对于小白的我,非常受益,感谢您把您的工作分享出来,供大家学习。在阅读代码的时候,我一直有一个小小的疑惑,就是,fields = data_x.max().values,这句话的意思是获取到每列特征中最大的索引,比如第一列是0,1两个不同的特征,而这句代码直接就取到了1,然而实际就有两个不同的特征,这样做embedding的时候,每一列的特征都少一个,所以torch.nn.Embedding(sum(feature_fields)+1,1)是不是应该为torch.nn.Embedding(sum(feature_fields+1),1)?还有为什么要在sum(feature_fields)后面加个1呢?还请大佬明示,感谢!

    opened by yanduoduan 6
Owner
luo han
ML & data mining & computational advertising & recommendation & bioinformatics. Now working on advertising and recommendations
luo han
TF2 implementation of knowledge distillation using the "function matching" hypothesis from the paper Knowledge distillation: A good teacher is patient and consistent by Beyer et al.

FunMatch-Distillation TF2 implementation of knowledge distillation using the "function matching" hypothesis from the paper Knowledge distillation: A g

Sayak Paul 67 Dec 20, 2022
Autolfads-tf2 - A TensorFlow 2.0 implementation of Latent Factor Analysis via Dynamical Systems (LFADS) and AutoLFADS

autolfads-tf2 A TensorFlow 2.0 implementation of LFADS and AutoLFADS. Installati

Systems Neural Engineering Lab 11 Oct 29, 2022
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 3k Jan 3, 2023
High performance, easy-to-use, and scalable machine learning (ML) package, including linear model (LR), factorization machines (FM), and field-aware factorization machines (FFM) for Python and CLI interface.

What is xLearn? xLearn is a high performance, easy-to-use, and scalable machine learning package that contains linear model (LR), factorization machin

Chao Ma 2.8k Feb 12, 2021
An essential implementation of BYOL in PyTorch + PyTorch Lightning

Essential BYOL A simple and complete implementation of Bootstrap your own latent: A new approach to self-supervised Learning in PyTorch + PyTorch Ligh

Enrico Fini 48 Sep 27, 2022
RealFormer-Pytorch Implementation of RealFormer using pytorch

RealFormer-Pytorch Implementation of RealFormer using pytorch. Includes comparison with classical Transformer on image classification task (ViT) wrt C

Simo Ryu 90 Dec 8, 2022
Generic template to bootstrap your PyTorch project with PyTorch Lightning, Hydra, W&B, and DVC.

NN Template Generic template to bootstrap your PyTorch project. Click on Use this Template and avoid writing boilerplate code for: PyTorch Lightning,

Luca Moschella 520 Dec 30, 2022
A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch

This repository holds NVIDIA-maintained utilities to streamline mixed precision and distributed training in Pytorch. Some of the code here will be included in upstream Pytorch eventually. The intention of Apex is to make up-to-date utilities available to users as quickly as possible.

NVIDIA Corporation 6.9k Jan 3, 2023
Objective of the repository is to learn and build machine learning models using Pytorch. 30DaysofML Using Pytorch

30 Days Of Machine Learning Using Pytorch Objective of the repository is to learn and build machine learning models using Pytorch. List of Algorithms

Mayur 119 Nov 24, 2022
Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pretrained SOTA Deep Learning models, callbacks and more for research and production with PyTorch Lightning and PyTorch

Pytorch Lightning 1.4k Jan 1, 2023