From 7c196a9fd040013a65aecbb2b40a992ea992804f Mon Sep 17 00:00:00 2001 From: xpai Date: Sun, 6 Mar 2022 10:37:28 +0800 Subject: [PATCH] Add tests and update docs --- README.md | 78 +++++++++++++++++----------------- UPDATES.md | 28 ++++++++---- config/model_config/tests.yaml | 59 ++++++++++++++++++++++++- setup.py | 2 +- tests/test_all.sh | 64 ++++++++++++++-------------- tests/test_all_gpu.sh | 18 ++++---- tutorials/README_CN.md | 4 +- 7 files changed, 161 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index 2b72d26..216b209 100644 --- a/README.md +++ b/README.md @@ -1,49 +1,49 @@ # FuxiCTR -Click-through rate (CTR) prediction is an critical task for many industrial applications such as online advertising, recommender systems, and sponsored search. FuxiCTR provides an open-source library for CTR prediction, with key features in configurability, tunability, and reproducibility. We hope this project could benefit both researchers and practitioners with the goal of [open benchmarking for CTR prediction](https://openbenchmark.github.io/ctr-prediction). +Click-through rate (CTR) prediction is a critical task for many industrial applications such as online advertising, recommender systems, and sponsored search. FuxiCTR provides an open-source library for CTR prediction, with key features in configurability, tunability, and reproducibility. We hope this project could benefit both researchers and practitioners with the goal of [open benchmarking for CTR prediction](https://openbenchmark.github.io/ctr-prediction). This repo is the community dev version of the official release at [huawei-noah/benchmark/FuxiCTR](https://github.com/huawei-noah/benchmark/tree/main/FuxiCTR). -:bell: If you find our code or benchmarks helpful in your research, please kindly cite the following paper. +*:bell: If you find our code or benchmarks helpful in your research, please kindly cite the following paper.* -> Jieming Zhu, Jinyang Liu, Shuai Yang, Qi Zhang, Xiuqiang He. [Open Benchmarking for Click-Through Rate Prediction](https://arxiv.org/abs/2009.05794). *The 30th ACM International Conference on Information and Knowledge Management (CIKM)*, 2021. +> Jieming Zhu, Jinyang Liu, Shuai Yang, Qi Zhang, Xiuqiang He. [Open Benchmarking for Click-Through Rate Prediction](https://arxiv.org/abs/2009.05794). *The 30th ACM International Conference on Information and Knowledge Management (CIKM)*, 2021. [[Bibtex](https://dblp.org/rec/conf/cikm/ZhuLYZH21.html?view=bibtex)] ## Model List -| Publication| Model | Paper | Benchmark | -| :-----: | :-------: |:------------|:----------:| -| WWW'07| [LR](./fuxictr/pytorch/models/LR.py) |[Predicting Clicks: Estimating the Click-Through Rate for New Ads](https://dl.acm.org/citation.cfm?id=1242643) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/LR) | -|ICDM'10 | [FM](./fuxictr/pytorch/models/FM.py) | [Factorization Machines](https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf)| [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FM) | -|CIKM'15| [CCPM](./fuxictr/pytorch/models/CCPM.py) | [A Convolutional Click Prediction Model](http://www.escience.cn/system/download/73676) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/CCPM) | -| RecSys'16 | [FFM](./fuxictr/pytorch/models/FFM.py) | [Field-aware Factorization Machines for CTR Prediction](https://dl.acm.org/citation.cfm?id=2959134) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FFM) | -| RecSys'16 | [YoutubeDNN](./fuxictr/pytorch/models/DNN.py) | [Deep Neural Networks for YouTube Recommendations](http://art.yale.edu/file_columns/0001/1132/covington.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/YoutubeDNN) | -| DLRS'16 | [Wide&Deep](./fuxictr/pytorch/models/WideDeep.py) | [Wide & Deep Learning for Recommender Systems](https://arxiv.org/pdf/1606.07792.pdf) |[:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/WideDeep) | -| ICDM'16 | [IPNN](./fuxictr/pytorch/models/PNN.py) | [Product-based Neural Networks for User Response Prediction](https://arxiv.org/pdf/1611.00144.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/IPNN) | -| KDD'16 | [DeepCross](./fuxictr/pytorch/models/DeepCrossing.py) | [Deep Crossing: Web-Scale Modeling without Manually Crafted Combinatorial Features](https://www.kdd.org/kdd2016/papers/files/adf0975-shanA.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DeepCrossing) | -| NIPS'16 | [HOFM](./fuxictr/pytorch/models/HOFM.py) | [Higher-Order Factorization Machines](https://papers.nips.cc/paper/6144-higher-order-factorization-machines.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/HOFM) | -| IJCAI'17 | [DeepFM](./fuxictr/pytorch/models/DeepFM.py) | [DeepFM: A Factorization-Machine based Neural Network for CTR Prediction](https://arxiv.org/abs/1703.04247) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DeepFM) | -|SIGIR'17 | [NFM](./fuxictr/pytorch/models/NFM.py) | [Neural Factorization Machines for Sparse Predictive Analytics](https://dl.acm.org/citation.cfm?id=3080777) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/NFM) | -|IJCAI'17 | [AFM](./fuxictr/pytorch/models/AFM.py) | [Attentional Factorization Machines: Learning the Weight of Feature Interactions via Attention Networks](http://www.ijcai.org/proceedings/2017/0435.pdf) |[:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/AFM)| -| ADKDD'17 | [DCN](./fuxictr/pytorch/models/DCN.py) | [Deep & Cross Network for Ad Click Predictions](https://arxiv.org/abs/1708.05123) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DCN)| -| WWW'18 | [FwFM](./fuxictr/pytorch/models/FwFM.py) | [Field-weighted Factorization Machines for Click-Through Rate Prediction in Display Advertising](https://arxiv.org/pdf/1806.03514.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FwFM) | -|KDD'18 | [xDeepFM](./fuxictr/pytorch/models/xDeepFM.py) | [xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems](https://arxiv.org/pdf/1803.05170.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/xDeepFM) | -|KDD'18 | [DIN](./fuxictr/pytorch/models/DIN.py) | [Deep Interest Network for Click-Through Rate Prediction](https://www.kdd.org/kdd2018/accepted-papers/view/deep-interest-network-for-click-through-rate-prediction) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DIN) | -|CIKM'19 | [FiGNN](./fuxictr/pytorch/models/FiGNN.py) | [FiGNN: Modeling Feature Interactions via Graph Neural Networks for CTR Prediction](https://arxiv.org/abs/1910.05552) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FiGNN) | -|CIKM'19 | [AutoInt/AutoInt+](./fuxictr/pytorch/models/AutoInt.py) | [AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks](https://arxiv.org/abs/1810.11921) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/AutoInt) | -|RecSys'19 | [FiBiNET](./fuxictr/pytorch/models/FiBiNET.py) | [FiBiNET: Combining Feature Importance and Bilinear feature Interaction for Click-Through Rate Prediction](https://arxiv.org/abs/1905.09433) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FiBiNET) | -|WWW'19 | [FGCNN](./fuxictr/pytorch/models/FGCNN.py) | [Feature Generation by Convolutional Neural Network for Click-Through Rate Prediction](https://arxiv.org/abs/1904.04447) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FGCNN) | -| AAAI'19| [HFM/HFM+](./fuxictr/pytorch/models/HFM.py) | [Holographic Factorization Machines for Recommendation](https://ojs.aaai.org//index.php/AAAI/article/view/4448) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/HFM) | -| NeuralNetworks'20 | [ONN](./fuxictr/pytorch/models/ONN.py) | [Operation-aware Neural Networks for User Response Prediction](https://arxiv.org/pdf/1904.12579) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/ONN) | -| AAAI'20 | [AFN/AFN+](./fuxictr/pytorch/models/AFN.py) | [Adaptive Factorization Network: Learning Adaptive-Order Feature Interactions](https://ojs.aaai.org/index.php/AAAI/article/view/5768) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/AFN) | -| AAAI'20 | [LorentzFM](./fuxictr/pytorch/models/LorentzFM.py) | [Learning Feature Interactions with Lorentzian Factorization](https://arxiv.org/abs/1911.09821) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/LorentzFM) | -| WSDM'20 | [InterHAt](./fuxictr/pytorch/models/InterHAt.py) | [Interpretable Click-through Rate Prediction through Hierarchical Attention](https://dl.acm.org/doi/10.1145/3336191.3371785) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/InterHAt) | -| DLP-KDD'20 | [FLEN](./fuxictr/pytorch/models/FLEN.py) | [FLEN: Leveraging Field for Scalable CTR Prediction](https://arxiv.org/abs/1911.04690) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FLEN) | -| CIKM'20 | [DeepIM](./fuxictr/pytorch/models/DeepIM.py) | [Deep Interaction Machine: A Simple but Effective Model for High-order Feature Interactions](https://dl.acm.org/doi/abs/10.1145/3340531.3412077) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DeepIM) | -| WWW'21 | [FmFM](./fuxictr/pytorch/models/FmFM.py) | [FM^2: Field-matrixed Factorization Machines for Recommender Systems](https://arxiv.org/abs/2102.12994) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FmFM) | -| WWW'21 | [DCN-V2](./fuxictr/pytorch/models/DCNv2.py) | [DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems](https://arxiv.org/abs/2008.13535) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DCNv2) | -| CIKM'21 | [DESTINE](./fuxictr/pytorch/models/DESTINE.py) | [Disentangled Self-Attentive Neural Networks for Click-Through Rate Prediction](https://arxiv.org/abs/2101.03654) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DESTINE) | -| DLP-KDD'21 | [MaskNet](./fuxictr/pytorch/models/MaskNet.py) | [MaskNet: Introducing Feature-Wise Multiplication to CTR Ranking Models by Instance-Guided Mask](https://arxiv.org/abs/2102.07619) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/MaskNet) | +| No | Publication| Model | Paper | Benchmark | +| :-----: | :-----: | :-------: |:------------|:----------:| +| 1 | WWW'07| [LR](./fuxictr/pytorch/models/LR.py) |[Predicting Clicks: Estimating the Click-Through Rate for New Ads](https://dl.acm.org/citation.cfm?id=1242643) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/LR) | +| 2 |ICDM'10 | [FM](./fuxictr/pytorch/models/FM.py) | [Factorization Machines](https://www.csie.ntu.edu.tw/~b97053/paper/Rendle2010FM.pdf)| [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FM) | +| 3 |CIKM'15| [CCPM](./fuxictr/pytorch/models/CCPM.py) | [A Convolutional Click Prediction Model](http://www.escience.cn/system/download/73676) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/CCPM) | +| 4 | RecSys'16 | [FFM](./fuxictr/pytorch/models/FFM.py) | [Field-aware Factorization Machines for CTR Prediction](https://dl.acm.org/citation.cfm?id=2959134) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FFM) | +| 5 | RecSys'16 | [YoutubeDNN](./fuxictr/pytorch/models/DNN.py) | [Deep Neural Networks for YouTube Recommendations](http://art.yale.edu/file_columns/0001/1132/covington.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/YoutubeDNN) | +| 6 | DLRS'16 | [Wide&Deep](./fuxictr/pytorch/models/WideDeep.py) | [Wide & Deep Learning for Recommender Systems](https://arxiv.org/pdf/1606.07792.pdf) |[:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/WideDeep) | +| 7 | ICDM'16 | [IPNN](./fuxictr/pytorch/models/PNN.py) | [Product-based Neural Networks for User Response Prediction](https://arxiv.org/pdf/1611.00144.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/IPNN) | +| 8 | KDD'16 | [DeepCross](./fuxictr/pytorch/models/DeepCrossing.py) | [Deep Crossing: Web-Scale Modeling without Manually Crafted Combinatorial Features](https://www.kdd.org/kdd2016/papers/files/adf0975-shanA.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DeepCrossing) | +| 9 | NIPS'16 | [HOFM](./fuxictr/pytorch/models/HOFM.py) | [Higher-Order Factorization Machines](https://papers.nips.cc/paper/6144-higher-order-factorization-machines.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/HOFM) | +| 10 | IJCAI'17 | [DeepFM](./fuxictr/pytorch/models/DeepFM.py) | [DeepFM: A Factorization-Machine based Neural Network for CTR Prediction](https://arxiv.org/abs/1703.04247) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DeepFM) | +| 11 |SIGIR'17 | [NFM](./fuxictr/pytorch/models/NFM.py) | [Neural Factorization Machines for Sparse Predictive Analytics](https://dl.acm.org/citation.cfm?id=3080777) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/NFM) | +| 12 |IJCAI'17 | [AFM](./fuxictr/pytorch/models/AFM.py) | [Attentional Factorization Machines: Learning the Weight of Feature Interactions via Attention Networks](http://www.ijcai.org/proceedings/2017/0435.pdf) |[:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/AFM)| +| 13 | ADKDD'17 | [DCN](./fuxictr/pytorch/models/DCN.py) | [Deep & Cross Network for Ad Click Predictions](https://arxiv.org/abs/1708.05123) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DCN)| +| 14 | WWW'18 | [FwFM](./fuxictr/pytorch/models/FwFM.py) | [Field-weighted Factorization Machines for Click-Through Rate Prediction in Display Advertising](https://arxiv.org/pdf/1806.03514.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FwFM) | +| 15 |KDD'18 | [xDeepFM](./fuxictr/pytorch/models/xDeepFM.py) | [xDeepFM: Combining Explicit and Implicit Feature Interactions for Recommender Systems](https://arxiv.org/pdf/1803.05170.pdf) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/xDeepFM) | +| 16 |KDD'18 | [DIN](./fuxictr/pytorch/models/DIN.py) | [Deep Interest Network for Click-Through Rate Prediction](https://www.kdd.org/kdd2018/accepted-papers/view/deep-interest-network-for-click-through-rate-prediction) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DIN) | +| 17 |CIKM'19 | [FiGNN](./fuxictr/pytorch/models/FiGNN.py) | [FiGNN: Modeling Feature Interactions via Graph Neural Networks for CTR Prediction](https://arxiv.org/abs/1910.05552) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FiGNN) | +| 18 |CIKM'19 | [AutoInt/AutoInt+](./fuxictr/pytorch/models/AutoInt.py) | [AutoInt: Automatic Feature Interaction Learning via Self-Attentive Neural Networks](https://arxiv.org/abs/1810.11921) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/AutoInt) | +| 19 |RecSys'19 | [FiBiNET](./fuxictr/pytorch/models/FiBiNET.py) | [FiBiNET: Combining Feature Importance and Bilinear feature Interaction for Click-Through Rate Prediction](https://arxiv.org/abs/1905.09433) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FiBiNET) | +| 20 |WWW'19 | [FGCNN](./fuxictr/pytorch/models/FGCNN.py) | [Feature Generation by Convolutional Neural Network for Click-Through Rate Prediction](https://arxiv.org/abs/1904.04447) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FGCNN) | +| 21 | AAAI'19| [HFM/HFM+](./fuxictr/pytorch/models/HFM.py) | [Holographic Factorization Machines for Recommendation](https://ojs.aaai.org//index.php/AAAI/article/view/4448) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/HFM) | +| 22 | NeuralNetworks'20 | [ONN](./fuxictr/pytorch/models/ONN.py) | [Operation-aware Neural Networks for User Response Prediction](https://arxiv.org/pdf/1904.12579) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/ONN) | +| 23 | AAAI'20 | [AFN/AFN+](./fuxictr/pytorch/models/AFN.py) | [Adaptive Factorization Network: Learning Adaptive-Order Feature Interactions](https://ojs.aaai.org/index.php/AAAI/article/view/5768) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/AFN) | +| 24 | AAAI'20 | [LorentzFM](./fuxictr/pytorch/models/LorentzFM.py) | [Learning Feature Interactions with Lorentzian Factorization](https://arxiv.org/abs/1911.09821) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/LorentzFM) | +| 25 | WSDM'20 | [InterHAt](./fuxictr/pytorch/models/InterHAt.py) | [Interpretable Click-through Rate Prediction through Hierarchical Attention](https://dl.acm.org/doi/10.1145/3336191.3371785) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/InterHAt) | +| 26 | DLP-KDD'20 | [FLEN](./fuxictr/pytorch/models/FLEN.py) | [FLEN: Leveraging Field for Scalable CTR Prediction](https://arxiv.org/abs/1911.04690) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FLEN) | +| 27 | CIKM'20 | [DeepIM](./fuxictr/pytorch/models/DeepIM.py) | [Deep Interaction Machine: A Simple but Effective Model for High-order Feature Interactions](https://dl.acm.org/doi/abs/10.1145/3340531.3412077) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DeepIM) | +| 28 | WWW'21 | [FmFM](./fuxictr/pytorch/models/FmFM.py) | [FM^2: Field-matrixed Factorization Machines for Recommender Systems](https://arxiv.org/abs/2102.12994) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/FmFM) | +| 29 | WWW'21 | [DCN-V2](./fuxictr/pytorch/models/DCNv2.py) | [DCN V2: Improved Deep & Cross Network and Practical Lessons for Web-scale Learning to Rank Systems](https://arxiv.org/abs/2008.13535) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DCNv2) | +| 30 | CIKM'21 | [DESTINE](./fuxictr/pytorch/models/DESTINE.py) | [Disentangled Self-Attentive Neural Networks for Click-Through Rate Prediction](https://arxiv.org/abs/2101.03654) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/DESTINE) | +| 31 | DLP-KDD'21 | [MaskNet](./fuxictr/pytorch/models/MaskNet.py) | [MaskNet: Introducing Feature-Wise Multiplication to CTR Ranking Models by Instance-Guided Mask](https://arxiv.org/abs/2102.07619) | [:arrow_upper_right:](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks/MaskNet) | + :point_right: Check [available dataset splits for CTR prediction](https://github.com/openbenchmark/BARS/blob/master/ctr_prediction/datasets). @@ -81,11 +81,11 @@ Please follow [the guide for installation](./tutorials/v1.1/install_fuxictr.ipyn 6. [How to use sequence features](./demo/DeepFM_with_sequence_feature.py) -7. [How to use pretrained embeddings](./demo/DeepFM_with_pretrained_emb.py) +7. [How to load pretrained embeddings as features](./demo/DeepFM_with_pretrained_emb.py) -## FuxiCTR APIs -[Check an overview of code structure](./docs/FuxiCTR_overview.jpg) for more details on API design. More are comming. +## API Documentation +[Check an overview of code structure](./docs/FuxiCTR_overview.jpg) for details on API design. ## Discussion diff --git a/UPDATES.md b/UPDATES.md index d1de78c..57e3ad5 100644 --- a/UPDATES.md +++ b/UPDATES.md @@ -1,22 +1,32 @@ -## FuxiCTR's Milestones +## FuxiCTR Milestones -### FuxiCTR v2.0, Doing. +## FuxiCTR v2.0, Doing. + Add more models of year 2021. + Add support for saving pb file, exporting embeddings, exporting feature vocab -### FuxiCTR v1.1, 2021-12-12. +## FuxiCTR v1.1 + +### FuxiCTR v1.1.1, 2022-03-01 ++ Add DESTINE/MaskNet models + +### FuxiCTR v1.1.0, 2021-12-12. + Refactor the code of layers.EmbeddingLayer -+ Fix the defect in padding_idx -+ Fix the defect in loading pretrain embeddings + Add support for loading blocks of h5 data + Add tests for DIN, FmFM -+ Refine the DIN model -+ Add tutorials on how to use sequence features and pretrain embeddings ++ Refine the DIN model to support feature concatenation ++ Add tutorials on how to use sequence features and pretrained embeddings ++ Fix the defect in using padding_idx (no impact on Criteo/Avazu results) ++ Fix the defect in loading pretrain embeddings (no impact on Criteo/Avazu results) + +## FuxiCTR v1.0 + +### FuxiCTR v1.0.2, 2021-12-01 +Refactor the code and documentation to support reproducing steps on [the BARS benchmark](https://github.com/openbenchmark/BARS/tree/master/ctr_prediction/benchmarks). -### FuxiCTR v1.0, 2021-10-01 -This is the first release of FuxiCTR, including 28 models: LR, FM, CCPM, FFM, DNN, Wide&Deep, FNN, IPNN, DeepCross, HOFM, DeepFM, NFM, AFM, DCN, FwFM, xDeepFM, DIN, FiGNN, AutoInt+, FiBiNET, FGCNN, HFM+, ONN, AFN+, LorentzFM, InterHAt, FLEN, FmFM. Especially, this version corresponds to the original implementations used for reproducing the experiments in the following paper: Jieming Zhu, Jinyang Liu, Shuai Yang, Qi Zhang, Xiuqiang He. Open Benchmarking for CTR Prediction, CIKM 2021. +### FuxiCTR v1.0.1, 2021-10-01 +This is the first release of FuxiCTR, including 28 models: LR, FM, CCPM, FFM, DNN, Wide&Deep, FNN, IPNN, DeepCross, HOFM, DeepFM, NFM, AFM, DCN, FwFM, xDeepFM, DIN, FiGNN, AutoInt+, FiBiNET, FGCNN, HFM+, ONN, AFN+, LorentzFM, InterHAt, FLEN, FmFM. Especially, this version corresponds to the original implementations used for reproducing the experiments in the following paper: *Jieming Zhu, Jinyang Liu, Shuai Yang, Qi Zhang, Xiuqiang He, Open Benchmarking for CTR Prediction, CIKM 2021*. diff --git a/config/model_config/tests.yaml b/config/model_config/tests.yaml index 413a318..8f4f930 100644 --- a/config/model_config/tests.yaml +++ b/config/model_config/tests.yaml @@ -756,4 +756,61 @@ DIN_test: shuffle: True seed: 2019 monitor: 'AUC' - monitor_mode: 'max' \ No newline at end of file + monitor_mode: 'max' + +DESTINE_test: + model: DESTINE + dataset_id: taobao_tiny + loss: 'binary_crossentropy' + metrics: ['logloss', 'AUC'] + task: binary_classification + optimizer: adam + learning_rate: 1.e-3 + embedding_regularizer: 0 + net_regularizer: 0 + batch_size: 128 + embedding_dim: 4 + attention_dim: 4 + num_heads: 2 + attention_layers: 2 + dnn_hidden_units: [64, 32] + dnn_activations: relu + att_dropout: 0 + net_dropout: 0 + relu_before_att: False + use_scale: True + use_wide: False + residual_mode: "each_layer" + batch_norm: True + epochs: 1 + shuffle: True + seed: 2021 + monitor: 'AUC' + monitor_mode: 'max' + +MaskNet_test: + model: MaskNet + dataset_id: taobao_tiny + loss: 'binary_crossentropy' + metrics: ['logloss', 'AUC'] + task: binary_classification + optimizer: adam + learning_rate: 1.e-3 + embedding_regularizer: 0 + net_regularizer: 0 + batch_size: 128 + embedding_dim: 4 + dnn_hidden_units: [64, 32] + dnn_hidden_activations: relu + model_type: SerialMaskNet + parallel_num_blocks: 1 + parallel_block_dim: 64 + reduction_ratio: 1 + emb_layernorm: True + net_layernorm: True + net_dropout: 0 + epochs: 1 + shuffle: True + seed: 2021 + monitor: 'AUC' + monitor_mode: 'max' diff --git a/setup.py b/setup.py index 6a49500..276204e 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="fuxictr", - version="1.1.0", + version="1.1.1", author="zhujiem", author_email="zhujiem@users.noreply.github.com", description="A configurable, tunable, and reproducible library for CTR prediction", diff --git a/tests/test_all.sh b/tests/test_all.sh index e58c42c..47d6707 100644 --- a/tests/test_all.sh +++ b/tests/test_all.sh @@ -2,37 +2,39 @@ cd ../benchmarks -# python run_expid.py --expid AFM_test && \ +python run_expid.py --expid AFM_test && \ python run_expid.py --expid AFN_test && \ -# python run_expid.py --expid AutoInt_test && \ -# python run_expid.py --expid CCPM_test && \ -# python run_expid.py --expid DCN_test && \ -# python run_expid.py --expid DeepCrossing_test && \ -# python run_expid.py --expid DeepFM_test && \ -# python run_expid.py --expid DNN_test && \ -# python run_expid.py --expid FFM_test && \ -# python run_expid.py --expid FGCNN_test && \ -# python run_expid.py --expid FiBiNET_test && \ -# python run_expid.py --expid FiGNN_test && \ -# python run_expid.py --expid FM_test && \ -# python run_expid.py --expid FNN_test && \ -# python run_expid.py --expid FwFM_test && \ -# python run_expid.py --expid HFM_test && \ -# python run_expid.py --expid HOFM_test && \ -# python run_expid.py --expid InterHAt_test && \ -# python run_expid.py --expid LorentzFM_test && \ -# python run_expid.py --expid LR_test && \ -# python run_expid.py --expid NFM_test && \ -# python run_expid.py --expid ONN_test && \ -# python run_expid.py --expid PNN_test && \ -# python run_expid.py --expid WideDeep_test && \ -# python run_expid.py --expid xDeepFM_test && \ -# python run_expid.py --expid FmFM_test && \ -# python run_expid.py --expid DCNv2_test && \ -# python run_expid.py --expid ONNv2_test && \ -# python run_expid.py --expid FFMv2_test && \ -# python run_expid.py --expid DeepIM_test && \ -# python run_expid.py --expid FLEN_test && \ -# python run_expid.py --expid DIN_test +python run_expid.py --expid AutoInt_test && \ +python run_expid.py --expid CCPM_test && \ +python run_expid.py --expid DCN_test && \ +python run_expid.py --expid DeepCrossing_test && \ +python run_expid.py --expid DeepFM_test && \ +python run_expid.py --expid DNN_test && \ +python run_expid.py --expid FFM_test && \ +python run_expid.py --expid FGCNN_test && \ +python run_expid.py --expid FiBiNET_test && \ +python run_expid.py --expid FiGNN_test && \ +python run_expid.py --expid FM_test && \ +python run_expid.py --expid FNN_test && \ +python run_expid.py --expid FwFM_test && \ +python run_expid.py --expid HFM_test && \ +python run_expid.py --expid HOFM_test && \ +python run_expid.py --expid InterHAt_test && \ +python run_expid.py --expid LorentzFM_test && \ +python run_expid.py --expid LR_test && \ +python run_expid.py --expid NFM_test && \ +python run_expid.py --expid ONN_test && \ +python run_expid.py --expid PNN_test && \ +python run_expid.py --expid WideDeep_test && \ +python run_expid.py --expid xDeepFM_test && \ +python run_expid.py --expid FmFM_test && \ +python run_expid.py --expid DCNv2_test && \ +python run_expid.py --expid ONNv2_test && \ +python run_expid.py --expid FFMv2_test && \ +python run_expid.py --expid DeepIM_test && \ +python run_expid.py --expid FLEN_test && \ +python run_expid.py --expid DIN_test && \ +python run_expid.py --expid DESTINE_test && \ +python run_expid.py --expid MaskNet_test echo "All tests done." diff --git a/tests/test_all_gpu.sh b/tests/test_all_gpu.sh index 73a65bd..2885a1d 100644 --- a/tests/test_all_gpu.sh +++ b/tests/test_all_gpu.sh @@ -1,14 +1,5 @@ #! /bin/sh -# Copyright (C) 2021. Huawei Technologies Co., Ltd. All rights reserved. - -# This program is free software; you can redistribute it and/or modify it under -# the terms of the MIT license. - -# This program is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. See the MIT License for more details. - cd ../benchmarks python run_expid.py --expid AFM_test --gpu 0 && \ @@ -36,5 +27,14 @@ python run_expid.py --expid ONN_test --gpu 0 && \ python run_expid.py --expid PNN_test --gpu 0 && \ python run_expid.py --expid WideDeep_test --gpu 0 && \ python run_expid.py --expid xDeepFM_test --gpu 0 +python run_expid.py --expid FmFM_test --gpu 0 && \ +python run_expid.py --expid DCNv2_test --gpu 0 && \ +python run_expid.py --expid ONNv2_test --gpu 0 && \ +python run_expid.py --expid FFMv2_test --gpu 0 && \ +python run_expid.py --expid DeepIM_test --gpu 0 && \ +python run_expid.py --expid FLEN_test --gpu 0 && \ +python run_expid.py --expid DIN_test --gpu 0 && \ +python run_expid.py --expid DESTINE_test --gpu 0 && \ +python run_expid.py --expid MaskNet_test --gpu 0 echo "All tests done." diff --git a/tutorials/README_CN.md b/tutorials/README_CN.md index c2c7235..f3eef1e 100644 --- a/tutorials/README_CN.md +++ b/tutorials/README_CN.md @@ -2,7 +2,7 @@ + [FuXiCTR的安装和使用](https://zhuanlan.zhihu.com/p/456280709), by oldsummer. -+ [[FuxiCTR] CTR模型的高效、高性能实现(一)](https://zhuanlan.zhihu.com/p/437373335), by苏良才 ++ [[FuxiCTR] CTR模型的高效、高性能实现(一)](https://zhuanlan.zhihu.com/p/437373335), by 苏良才 -+ [[FuxiCTR] CTR预估模型的高效、高性能实现(二)](https://zhuanlan.zhihu.com/p/453385054), by苏良才 ++ [[FuxiCTR] CTR预估模型的高效、高性能实现(二)](https://zhuanlan.zhihu.com/p/453385054), by 苏良才