| | Input: : auxiliary dataset |
| | Input: : warm-start dataset |
| | Input: : cold-start dataset |
| | Input: : a testing example |
| | Output: : the predicted label of |
| 1 | repeat |
| 2 | the first stage, pretrain the model using auxiliary data |
| 3 | Randomly sample a batch of data from |
| 4 | Calculate the predicted label by equation (1) |
| 5 | Update , , by gradient descent |
| 6 | until Converge |
| 7 | Fix , , to , , |
| 8 | repeat |
| 9 | the second stage, train DisNet using warm-start data |
| 10 | Randomly sample a batch of data from |
| 11 | Calculate , using , |
| 12 | Compute the shifted interest vector by equation (6) |
| 13 | Calculate the predicted label using by equation (7) |
| 14 | Update , by gradient descent |
| 15 | until Converge |
| 16 | Fix all the trainable parameters except the item id embeddings |
| 17 | repeat |
| 18 | the third stage, train RM-IdEG using cold-start data |
| 19 | Randomly sample an item and get its support/query sets from |
| 20 | Aggregate embeddings of relational items of by equation (11) |
| 21 | Generate an id embedding for using RM-IdEG |
| 22 | Compute the cold-start loss on by equation (2) |
| 23 | Update the id embedding of to by equation (3) |
| 24 | Compute the warmed loss on by equation (4) |
| 25 | Update RM-IdEG by gradient descent |
| 26 | until Converge |
| 27 | if is a cold-start item then |
| 28 | Generate an id embedding for using RM-IdEG |
| 29 | else |
| 30: | Get the id embedding of from the embedding layer |
| 31: | end if |
| 32: | Return a label for by equation (7) using DisNet |