Skip to content

Commit c3f4873

Browse files
authored
Merge pull request #782 from wangzhen38/add_escm
Add escm
2 parents 9c7490c + 02bc4f5 commit c3f4873

File tree

17 files changed

+860
-0
lines changed

17 files changed

+860
-0
lines changed

README_CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ python -u tools/static_trainer.py -m models/rank/dnn/config.yaml # 静态图训
179179
| 多任务 | [ShareBottom](models/multitask/share_bottom/)([文档](https://paddlerec.readthedocs.io/en/latest/models/multitask/share_bottom.html)) | [Python CPU/GPU](https://aistudio.baidu.com/aistudio/projectdetail/3238943) ||| >=2.1.0 | [1998][Multitask learning](http://reports-archive.adm.cs.cmu.edu/anon/1997/CMU-CS-97-203.pdf) |
180180
| 多任务 | [Maml](models/multitask/maml/)([文档](https://paddlerec.readthedocs.io/en/latest/models/multitask/maml.html)) | [Python CPU/GPU](https://aistudio.baidu.com/aistudio/projectdetail/3238412) | x | x | >=2.1.0 | [PMLR 2017][Model-agnostic meta-learning for fast adaptation of deep networks](https://arxiv.org/pdf/1703.03400.pdf) |
181181
| 多任务 | [DSelect_K](models/multitask/dselect_k/)([文档](https://paddlerec.readthedocs.io/en/latest/models/multitask/dselect_k.html)) | - | x | x | >=2.1.0 | [NeurIPS 2021][DSelect-k: Differentiable Selection in the Mixture of Experts with Applications to Multi-Task Learning](https://arxiv.org/pdf/2106.03760v3.pdf) |
182+
| 多任务 | [ESCM2](models/multitask/escm2/) | - | x | x | >=2.1.0 | [SIGIR 2022][ESCM2: Entire Space Counterfactual Multi-Task Model for Post-Click Conversion Rate Estimation](https://arxiv.org/pdf/2204.05125.pdf) |
182183
| 重排序 | [Listwise](https://github.com/PaddlePaddle/PaddleRec/tree/release/1.8.5/models/rerank/listwise/) | - || x | [1.8.5](https://github.com/PaddlePaddle/PaddleRec/tree/release/1.8.5) | [2019][Sequential Evaluation and Generation Framework for Combinatorial Recommender System](https://arxiv.org/pdf/1902.00245.pdf) |
183184

184185

README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ python -u tools/static_trainer.py -m models/rank/dnn/config.yaml # Training wit
170170
| Multi-Task | [ShareBottom](models/multitask/share_bottom/)<br>([doc](https://paddlerec.readthedocs.io/en/latest/models/multitask/share_bottom.html)) | [Python CPU/GPU](https://aistudio.baidu.com/aistudio/projectdetail/3238943) ||| >=2.1.0 | [1998][Multitask learning](http://reports-archive.adm.cs.cmu.edu/anon/1997/CMU-CS-97-203.pdf) |
171171
| Multi-Task | [Maml](models/multitask/maml/)<br>([doc](https://paddlerec.readthedocs.io/en/latest/models/multitask/maml.html)) | [Python CPU/GPU](https://aistudio.baidu.com/aistudio/projectdetail/3238412) | x | x | >=2.1.0 | [PMLR 2017][Model-agnostic meta-learning for fast adaptation of deep networks](https://arxiv.org/pdf/1703.03400.pdf) |
172172
| Multi-Task | [DSelect_K](models/multitask/dselect_k/)<br>([doc](https://paddlerec.readthedocs.io/en/latest/models/multitask/dselect_k.html)) | - | x | x | >=2.1.0 | [NeurIPS 2021][DSelect-k: Differentiable Selection in the Mixture of Experts with Applications to Multi-Task Learning](https://arxiv.org/pdf/2106.03760v3.pdf) |
173+
| Multi-Task | [ESCM2](models/multitask/escm2/) | - | x | x | >=2.1.0 | [SIGIR 2022][ESCM2: Entire Space Counterfactual Multi-Task Model for Post-Click Conversion Rate Estimation](https://arxiv.org/pdf/2204.05125.pdf) |
173174
| Re-Rank | [Listwise](https://github.com/PaddlePaddle/PaddleRec/tree/release/1.8.5/models/rerank/listwise/) | - || x | [1.8.5](https://github.com/PaddlePaddle/PaddleRec/tree/release/1.8.5) | [2019][Sequential Evaluation and Generation Framework for Combinatorial Recommender System](https://arxiv.org/pdf/1902.00245.pdf) |
174175

175176
<h2 align="center">Community</h2>

doc/imgs/escm2.png

399 KB
Loading

doc/imgs/escm2_dr1.png

61.4 KB
Loading

doc/imgs/escm2_dr2.png

53.1 KB
Loading

doc/imgs/escm2_dr3.png

50 KB
Loading

doc/imgs/escm2_ipw.png

77.5 KB
Loading

models/multitask/escm2/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.

models/multitask/escm2/config.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
runner:
17+
train_data_dir: "data/train"
18+
train_reader_path: "escm_reader" # importlib format
19+
use_gpu: False
20+
use_auc: True
21+
auc_num: 2
22+
train_batch_size: 2
23+
epochs: 3
24+
print_interval: 2
25+
#model_init_path: "output_model_escm/2" # init model
26+
model_save_path: "output_model_escm"
27+
test_data_dir: "data/train"
28+
infer_batch_size: 2
29+
infer_reader_path: "escm_reader" # importlib format
30+
infer_load_path: "output_model_escm"
31+
infer_start_epoch: 0
32+
infer_end_epoch: 3
33+
counterfact_mode: "DR"
34+
#use inference save model
35+
use_inference: False
36+
save_inference_feed_varnames: ["field_0", "field_1", "field_2", "field_3", "field_4", "field_5", "field_6", "field_7", "field_8", "field_9", "field_10", "field_11", "field_12", "field_13", "field_14", "field_15", "field_16", "field_17", "field_18", "field_19", "field_20", "field_21", "field_22"]
37+
save_inference_fetch_varnames: ["softmax_0.tmp_0", "concat_1.tmp_0"]
38+
39+
hyper_parameters:
40+
sparse_feature_number: 737946
41+
sparse_feature_dim: 12
42+
num_field: 23
43+
ctr_fc_sizes: [256, 64]
44+
cvr_fc_sizes: [256, 64]
45+
global_w: 1.0
46+
counterfactual_w: 0.01
47+
feature_size: 276
48+
expert_num: 8
49+
gate_num: 3
50+
expert_size: 16
51+
tower_size: 8
52+
53+
optimizer:
54+
class: adam
55+
learning_rate: 0.001
56+
strategy: async
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
runner:
17+
train_data_dir: "../../../datasets/ali-ccp/train_data"
18+
train_reader_path: "escm_reader" # importlib format
19+
use_gpu: True
20+
use_auc: True
21+
auc_num: 2
22+
train_batch_size: 1024
23+
epochs: 10
24+
print_interval: 10
25+
#model_init_path: "output_model/0" # init model
26+
model_save_path: "output_model_escm_all"
27+
test_data_dir: "../../../datasets/ali-ccp/test_data"
28+
infer_batch_size: 1024
29+
infer_reader_path: "escm_reader" # importlib format
30+
infer_load_path: "output_model_escm_all"
31+
infer_start_epoch: 0
32+
infer_end_epoch: 10
33+
counterfact_mode: "DR"
34+
#use inference save model
35+
use_inference: False
36+
save_inference_feed_varnames: ["field_0", "field_1", "field_2", "field_3", "field_4", "field_5", "field_6", "field_7", "field_8", "field_9", "field_10", "field_11", "field_12", "field_13", "field_14", "field_15", "field_16", "field_17", "field_18", "field_19", "field_20", "field_21", "field_22"]
37+
save_inference_fetch_varnames: ["softmax_0.tmp_0", "concat_1.tmp_0"]
38+
39+
40+
hyper_parameters:
41+
sparse_feature_number: 737946
42+
sparse_feature_dim: 12
43+
num_field: 23
44+
ctr_fc_sizes: [256, 64]
45+
cvr_fc_sizes: [256, 64]
46+
global_w: 0.5
47+
counterfactual_w: 0.5
48+
expert_num: 8
49+
gate_num: 2
50+
expert_size: 16
51+
tower_size: 8
52+
feature_size: 276
53+
54+
optimizer:
55+
class: adam
56+
learning_rate: 0.001
57+
strategy: async

0 commit comments

Comments
 (0)