阿里1688直播推荐算法实践

{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"近年来,电商呈现内容化的趋势,以直播和短视频为首,内容化提升了用户体验,增加了平台收益。作为电商的重要流量入口,推荐算法除了应用于商品,现在也被应用于直播场景。我们将以阿里的B类电商网站1688为例,分享直播推荐相比于商品推荐所面临的核心问题和难点。今天的分享围绕四个方面:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"核心问题介绍"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"直播排序模型迭代"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"多目标学习"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Debias"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"总结"}]}]}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"核心问题介绍"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"推荐系统从推荐的物料量级来说,分为百万级的召回,万级的粗排和千级的精排,本文主要聚焦于三个精排中的核心问题:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"异构行为的建模。在电商网站中,用户的主要行为是在商品上的行为,直播的内容行为数据比较稀疏,因此商品行为应与直播行为结合来优化直播推荐。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"多目标学习,直播推荐的效能类指标和满意度指标很多,包括用户看到直播间的点击率,进入直播间的停留时长,转化率,关注率,留言率等。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"减少偏差,position bias与selection bias会影响模型的准确性,增强马太效应,损害腰部、尾部主播的利益。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"直播排序模型迭代"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"1688的直播推荐排序模型迭代了三次,共有四个版本。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"V1:基于特征工程与机器学习的排序模型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一版模型是一个基于推荐特征工程和机器学习的排序模型,重点在于实时特征和打点体系的建立。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"① 直播排序特征"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们用到的特征包括了推荐系统中非常经典的三方面的一些特征体系,也就是item侧,用户侧,用户和item侧交叉的特征体系。"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"直播侧"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一是直播的实时和历史的统计特征,包括实时以30分钟,3天,7天,15天为窗口的开播次数,曝光数,点击数,CTR,CVR等特征。第二是内容侧特征,包括封面图和标题的embedding。第三是商家画像特征,静态信息有商家等级和店铺交易数据,B类信息有商家工厂能力。"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用户侧"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用户侧特征里,我们一方面采用了网站的用户画像,包括网站的身份,等级,来访频次等,另一方面采用直播画像,包括偏好,访问天数,下单数,RFM等特征。"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"直播用户交叉"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用户和直播的交叉特征,以非常好地反映用户对直播的偏好程度。我们分别用到了用户在item的序列和用户在live序列在不同的时间和次数窗口上与直播间的商品,以及直播间本身的一些交叉的次数,点击率和转化率的特征。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"② 模型与结果"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一版中,我们采用的模型是一个以CTR为目标的GBDT point-wise模型,因为我们的业务要同时兼顾转化率,停留时长等多目标,我们也基于转化率和停留时长 的样本,对其做了基于样本权重的赋权。模型上线之后,转化率和停留时长分别增长了10%和30%"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"V2:深度模型时代:异构行为序列Attention模型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"① Embedding+MLP深度学习时代的范式"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在第一版模型得到非常好的效果验证之后,也得益于我们在商品推荐上积累的一些深度学习的经验,我们正式进入深度学习模型时代。第二版模型为基于异构行为序列的Attention模型。深度学习做推荐排序的范式为Embedding加MLP。其中Embedding是将用户行为序列的ID特征以及商品的ID特征经过Embedding层变成一个稠密的向量,拼接后基于多层的全连接神经网络做对应的任务,比如CTR任务的预估。在深度学习推荐模型的迭代中,YouTube的DNN和DIN是两个非常经典的工作。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"② 模型启发"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/c5\/c5c3f71fc8aa79d6f009568ab611c7c1.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Youtube DNN(Recsys’ 16)"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"YouTube的DNN为Recsy16年的一篇文章,它首次提出加入用户行为序列的特征。在将用户看过看过的一些视频的ID变为Embedding后,取Average Pooling,即平均池化,将其变为一个固定长度的向量来表征用户行为序列建模的向量,再与一些统计特征包括播放次数等做归一化、log处理,之后与Embedding做拼接,最后加入到MLP中做CTR预估。总之,Youtube的DNN模型首次建模了用户的行为,但方法比较简单粗暴,仅仅使用平均池化,用一个向量来表达用户的一个兴趣。但用户的行为是非常多样性的,仅用一个向量来表示不够准确,在这样的背景下,阿里巴巴在18年提出了DIN深度模型。"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"DIN(Deep Interest Network KDD‘18)"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在对候选品做预估时,我们应该只关注与该候选品相关的用户行为,因此我们引入推荐系统中非常重要的target attention概念。我们以候选打分的产品为Query,去跟用户行为序列的每一个item计算一次Attention的权重。得出的结果再经过该用户多个行为attention的sum pooling,针对不同候选品,我们将得到不同的用户行为序列建模的表征,这样得到的表征与品相关性更强,能预测出更高的点击率。DIN首次引用了Target attention的概念,建模用户对不同品的基于行为的兴趣。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"③ 电商直播场景:异构双序列Attention模型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/53\/533e2248536f8a1b2ca2eb953b939084.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"行为异构性:商品序列、直播序列"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"受DIN的启发,我们迭代了第一版深度学习模型,因为直播推荐模型是异构双序列模型,异构双序列指我们需要建模的用户的行为序列在电商直播里包含两种,一种是用户在商品上的序列,第二种是用户在直播上的序列。因此我们采用了两个Target Attention的结构,分别基于用户在Item上的序列与当前直播正在讲解的商品做一个Attention。也就是说,如果用户的Item序列与当前直播的商品匹配程度比较高,模型即可捕捉对应的兴趣。第二是我们会基于用户历史点过直播的序列与直播间的ID做一个Attention。用户如果历史看的直播与当前直播间比较相似,模型也能捕捉到用户对应的兴趣,来提升预测CTR准确度。"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"直播实时性:大量实时统计特征"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二,直播推荐里面有大量统计特征,在输入进模型前需要繁琐的特征归一化,否则训练的时候梯度就会不太稳定。我们采用了GBDT Embedding的方法。首先基于统计特征和机器学习版的数据去训练一棵GBDT树,然后在线上预测时,将统计特征的样本输入到整个GBDT树里,即可获得每个GBDT树上的叶子节点的ID,再将id经过Dense层或者Max Pooling Dense层,输入到DIN的模型里。这样既实现了统计特征的特征归一化,另一方面也完成了特征交叉的工作,我们也可以利用上机器学习时代所遗留下来的统计征。值得一提的是,如果将全连接层(Dense层)换成单层sigmoid,即退化为GBDT+LR模型。,这样的异构双序列的Attention模型得到了非常好的效果,上线后,UV 点击率(CTR)又提升了5%,这也是我们深度学习时代的第一版模型。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"④ 思考"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一版模型上线后,我们也对其有着一些思考。对于1688电商网站,大量的用户只有关于商品(item)的行为,缺少直播相关的行为。因此用户直播的序列的Attention结构就不会生效,只剩下用户商品行为序列和当前直播间讲解的商品做对应的Attention。而只用直播间当前讲解的一个商品来表征直播的信息是不太准确的,因为直播的商品是很多变的,我们希望用历史的商品和未来商品共同表征直播的信息,于是我们希望可以实现从用户的商品行为序列来直接做到直播(live)的信息的激活,也就是希望能将直播和商品表征到同一向量空间,即可用商品行为序列直接预测对直播的兴趣。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"V3:HIN异构网络建模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们采用的方案为直播异构网络 Heterogeneous Information Network (HIN) ,因为在我们的直播业务中有着“直播-用户-商品”的丰富异构网络。包括用户点击直播,用户点击商品,直播间播放一些商品,商品和商品,直播和直播之间也有一些相关的关系,构建了一个非常丰富的网络,我们可以在这样的网络中学习到每个节点的表征,并把这些表征预训练加入到我们的排序模型里,形成item sequence到live的Attention结构。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"图表征的方法在同构图中有DeepWalk、Line、Node2vec、GCN、GAT,异构图的方法主要为Metapath2vec,也是我们采用的方法。Metapath2vec的主要思想为先指定游走元路径,基于元路径指导图上节点的游走,采样出序列后,经过skip-gran生成Metapath语义下的表征,最后对表征做一个融合,得到节点的最终表征。具体来说,Metapath融合网络建模分为四个步骤。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"① 构建图"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"首先第一步构建电商直播的图。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/2f\/2f959ea6e83615baea2251111f87b06c.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"② Metapath选取"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二部分是Metapath的选取,分为两种方案:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"人工指定语义"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"例如User-Item-User(user CF)或者Item-user-item(item CF),item-user-item相当于一个用户同时点了两个商品,这两个商品就会较为相似。但对于节点类型多,metapath比较长的序列,效果不好,可解释性较差。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"集合中取最优"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二种方案是我们使用的方案,就是在集合中取最优的方法。首先在图中做random walk,采样出不同的序列,再做一些规则筛选,比如要求至少要覆盖两种不同的节点的类型。所以再用打分公式做一个打分,打分公式核心关注该metapath被采样出了多少条不同的ID组合序列,条数越多说明这样的metapath在图中共性越高,同时我们会更关注核心节点,比如直播节点的出现次数,依此制定打分公式来选出对应三到五条metapath做采样学习。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"③ 图游走采样"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/f1\/f13ca99ffe585ae13fadf8e98ff0bc73.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第三部分为基于选出的metapath在图中做游走采样,再用Skip-Gram训练出metapath语义下的Embedding。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"④ Embedding融合"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第四部分是构建融合多个Metapath Embedding的语义网络,具体训练任务为link prediction,采用负采样loss。使用方法上,融合了一些GCN类的想法,加入一些临界节点的信息,分别基于Average Pooling和self attention做最终融合,最后基于负采样loss来训练出整个融合的网络,我们因此可以得到图中每个节点的表征,形成item sequence到live的结构。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"⑤ 结果"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"模型上线后在日常的CVR和停留时长分别提升了2.5%和3.9%,大促的转化率提升了10%,这也是因为在大促中新人用户更多,直播行为缺失。同时异构图上的表征也可以用于直播召回,包括user2live,item2live,live2live,作为副产物提升召回效果。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"V4:直播Transformer异构行为建模"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"V3的模型仍存在一些问题,其一它不是端到端模型,其二,T+1更新无法表征实时商品。于是我们采用的新方案:直播transformer,一方面可以让HIN融合多个商品表征,另一方面可以引入实时直播正在讲解的多个商品的信息。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"① Transformer模型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/37\/37c930b3880b4634ffb4580e2903169a.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Transformer方案中,直播表征为m个历史核心商品加k个实时讲解商品的集合序列,这m个商品是基于历史销售数据得出的核心商品。用户的商品足迹为用户行为序列。三组序列进行拼接输入进Transformer后即可用来对任意用户商品行为足迹到直播间核心品或实时品进行建模。Transformer层包括四部分:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Embedding:输入的Embedding包括Type Embedding和Position Embedding"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Multi head Self Attention:任意用户足迹与直播商品表征的交叉"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Feed Forward Layer:加强模型的非线性能力"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Pooling Layer:直播Item表征为不定长,Average&Max pooling"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"② 输入Embedding"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/88\/88e9017b5f791bb029536b0c317c34b4.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"再Transformer模型中,Embedding的构建十分关键。输入的Embedding不仅包含了商品的ID Embedding,还包含Type和Position Embedding。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Type Embedding"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Type Embedding表征self attention layer中每个token的类型,比如用户序列,直播间历史品,或是实时品。同时用户序列的商品分为点击,加购,下单商品三种类型。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Position Embedding"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Position Embedding用来表征一个序列时间或者空间上的先后顺序,此处我们建模了三种不同的条件:一是用户行为序列长度,时间由近到远,编号由0到n-1;二是直播历史核心商品,重要程度由强到弱,编号由0到m-1;三是直播实时讲解商品,当前商品为0,下一个商品为1,一直到k-1。同时,position embedding都是端到端的学习。重要性强的位置交叉,给予模型更强的信号。例如用户某个最近的历史行为与当前直播的商品有较强的相关性,模型信号将会更强。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"③ 结果"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Transformer方案使线上转化率提升了4.8%,但整体响应时间(RT)较高,相对增加了13毫秒,仍在可接受范围内。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"小结"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/14\/14f20adc66986efd9d9dfd5e2e47583b.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"直播用户行为的建模如图示,分为三部分,首先商品行为到候选直播的异构兴趣,我们将其拆成了商品序列,直播历史核心序列和直播实时商品的序列,经过transformer进行交叉建模。对于用户直播行为序列,我们采用Target attention结构做兴趣建模。对于统计特征和内容特征,我们采用GBDT Embedding变成向量后再加入模型。后续经过全连接网络来预测CTR或多目标任务。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"多目标学习"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二部分是关于直播的目标学习框架,首先直播是一个非常经典的多目标学习的场景,优化目标包括直播背景页面的点击(CTR)、进入直播间后的停留时长(Stay Time)、转换率(CVR)、互动率(CMR)、关注率(FLR)。业务往往需要同时优化多个目标,因此多目标学习是非常重要的技术。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/b0\/b0a4f92158114d586f9798445e8cd9ed.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"1. Baseline Model"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/69\/69bc6b1188792c7cdc79937c6422f9dd.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"多目标学习的第一版模型是Baseline模型,是基于shared bottom的工业界标配模型,多目标之间底层共享,顶层各个目标由MLP分开。相比于每个任务学习一个模型有以下三个优点:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"可实现多目标辅助学习,解决某些目标稀缺性"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"相比每个task一个模型,参数量大大减少"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"线上serving,一次计算多个目标"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在1688直播实战里,我们以CTR、CVR、Staytime为三个目标构建了第一版多目标的模型,我们也发现将单目标的模型升级为多目标模型的效果提升明显,因为加入了很多新的label信息。在线上实验中,UV点击率、转化率和停留时长分别增长了2%, 5%和17%。Shared Bottom 模型在工业界得到了广泛应用,但仍存在一个缺点,即当需要优化的多个目标方向不一致时,效果并没有那么好。在这样的背景下,谷歌在18的KDD中提出了MMOE模型。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"2. MMOE Model"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/b0\/b04580ecf5ef0c8ae6c7e21e10094a6a.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"MMOE的前生是Mixture-of-experts(MOE)模型,在input之后,shared bottom改进为了多个expert专家网络和一个gate网络,基于用户的不同来为每个专家网络分配权重,但这个网络仍存在缺点,对于不同的任务,输入还是相同的,多目标之间的输入没有任何区别。谷歌于是进行了下一步优化,得到MMOE网络。MMOE网络仍有多个专家网络,不同的是对于每一个target都有一个gate网络来学习不同的权重,从而每个task都可以通过各自的gate获取差异化的输入。同时gate网络的参数量很小,可以说MMOE采用了一个轻量级的gate网络即实现了多目标输入的差异性。实验验证中,点击率、转化率、关注率和停留时长的多任务的离线指标都是正向的,线上多目标平均提升0.5%。MMOE模型也是1688目前线上服务的多目标模型。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"3. 实战分析"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"下面介绍一下多目标的实战经验。分为Label处理,Loss和线上打分三个部分。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"① Label 处理"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一就是Label的处理,因为在做多目标学习时,我们往往会优化一个重要指标:用户的停留时长,而停留时长作为数值型的回归目标,数值波动较大,不易学习,据统计一般符合对数正态分布。因此我们通常对其取log处理,使其数值更稳定且提高回归拟合效果。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"② Loss"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第二,多目标学习的loss为各个目标的loss加权求和。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/64\/64de97807b395164731b2425dfcc061b.png","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"比如上图公式中,我们把点击率,转化率和关注率的交叉商损失函数利率与停留时长MSE损失函数做一个加权的求和。不同的权重会影响模型的效果,代表训练对不同任务的侧重程度。一个任务的loss权重越大,模型更新的一个梯度就越受它影响。冲着优化它的方向来去优化整个模型的参数,对于别的任务可能会有所伤害。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们的调参经验为:第一点将多目标收敛loss加权到同一量级,一定程度避免梯度的支配,保证多目标的同时优化。第二点提高核心任务的权重。第三点可以参考19年Recsys提出的基于帕累托最优的PE-LTR框架,以及CVPR18年的基于任务的不确定度确认loss权重。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"③ 线上打分"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第三,多目标模型训练完成并上线时需要排序分数将多目标分数整合,常用方法为拍公式和权重。排序公式如图所示主要为点击率乘转化率、停留时长等的加权求和。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/9d\/9d075f7d8bab766daf70ddf37ecbee0d.png","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"权重中人工给定多组参数,再根据业务优先级选择合适参数。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"直播排序Debias"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第三部分工作为直播排序的Debias。Position Bias是直播场景中最突出的Bias,代表着位置越靠前的直播点击率越高,rank模型越趋向于给热门主播打高分,进而获得更大流量,形成feedback loop即数据循环。数据会造成两个后果,一是模型预估不准确,用户看到的结果都比较偏向于热门,二是马太效应增强,头部主播流量进一步增强,腰尾部逐步减少,造成主播流失。直播业务背后是真人主播,考虑平台的长期发展,更应该重视模型的debias。因此我们的目标为解决position bias,不损失效能 (CTR、CVR) 下提升个性化程度、降低马太效应。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/ec\/ec82ec0a6a71da2f8ff9dc5433f35424.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"于是我们引入两个Metrics,一是个性化指标,让用户间排序top-L的差异化占比越大越好。二是马太效应指标,头部T个主播总曝光流量占比越小越好。为了优化这两个指标,我们尝试了几种不同的方法,分别为as feature\/ as model\/ 多塔模型方案。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"1. As feature方案"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一版方案,Position as feature,是业界经典方案,主要做法为将position当作feature加入模型,模型即可学习到不同位置的偏置,线上预测时,将position取默认值(如0),不同item在相同位置可得到对比,达到去偏的效果。线上实验结果显示该方法对于热门直播去偏能力很强,但线上效能有下降。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/5d\/5d1d30dbb170e5ef24e681d8faf2e302.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"2. As Model 方案"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/4e\/4e012b5a033c5c5dc816677cb2515902.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"于是我们更新到第二版模型,position as model。训练阶段加入Biasnet,估计出每个position的bias logits。主网络负责目标任务,例如CTR预测。两个网络的结果求和后经过sigmoid计算点击率loss。该模型优点在于Biasnet学习偏置,实现了主网络的无偏效果。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Biasnet建模中也加入了系统、场景id等特征,建模不同区块展示样式的bias。线上预测时我们可以摘除Biasnet,只保留无偏主网络。线上效果符合预期,个性化提高、马太效应降低,效能也有提升(预估更准)。待改进点为Biasnet认定每个position的bias为一个定值,无关于与用户的相关性。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"3. 多塔模型"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"因此,我们就提出了第三版模型,多塔位置敏感模型。该模型的出发点为建模不同相关性的直播,在不同位置的位置bias的差异性,进而优化全局的排序效果。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"① 特点"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们依此建模出的多塔模型有以下特点:"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"多塔预测多个position上的CTR"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"每个塔样本来自同样位置,没有bias;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用上所有的用户与直播的交叉特征,拟合出每个位置对应的CTR分布与CTR delta;"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"多目标学习范式,底层共享表征"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/dc\/dce0057d4f3ca3ff6e071d766c15410c.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"② 建模方法"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/6b\/6b057f13a317e3c1f6326919e056c877.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在具体的建模方法中,我们将position 1~9 作为9个塔,position大于10的作为第十个塔。同时由于每条样本只属于一个position,我们将每个塔的loss传入loss mask,保证只有对应的塔的梯度回传。在线上服务中,多塔模型可以预测出商品在每一个位置的点击率,可使用贪心选择每个位置CTR最高的直播,构成推荐list。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"③ 模型优化探索"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"同时我们对于多塔模型也有一些优化和探索,首先它是一个多目标范式,因此可以做一些多目标优化。第二就是我们也希望强化建模不同塔对应position的CTR分布(如KL loss)。第三除贪心法外,我们也可以使用list-wise或者组合优化的推荐列表生成。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"④ 1688直播线上效果与原因"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"CVR增加了3.6%,staytime增加了3%,但个性化和马太效应持平甚至负向,不符合预期。分析后原因有以下三点:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"数据分布"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"多塔模型消除了position bias,但引入更严重的selection bias,头部训练数据多为热门主播,冷门主播训练不够充分,点击率不够高。可以考虑引入随机样本、样本单边采样等方法解决。"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"召回不丰富"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"直播场景推荐物料较少,召回个性化较弱, 而对于短视频\/商品推荐等召回丰富的场景,多塔模型预期效果更好。"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"展示Bias"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/59\/5957d9a24160b5a6e7603d68e251fc4d.jpeg","alt":"图片","title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"直播Feeds卡片会展示在线人数、热度等,用户更倾向于点热度高的,这也加重了直播域的Selection bias。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"然后目前我们仍致力于解决这些问题,还在做一些技术的迭代。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"总结"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"今天分享了基于用户直播易构行为建模的排序模型迭代,线上采用的是Target Attention加Transformer的方案,多目标学习的shared bottom和MMOE模型,和直播排序Debias的As Feature,As Model,多塔模型。"}]},{"type":"image","attrs":{"src":"https:\/\/static001.infoq.cn\/resource\/image\/17\/0d\/17c85c158e942b89546f5d821ddyy20d.jpg","alt":null,"title":"","style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":"","fromPaste":false,"pastePass":false}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我们的最终模型如上图所示。在用户行为建模层,我们基于transformer建模item序列的异构兴趣。对于用户的直播序列,我们采用target attention。对于其他特征,我们采用GBDT encoding。将三个结果进行Embedding和拼接,传入顶层二分模型。一部分是无偏的CTR预估模型,在训练中加入Biasnet并在线上预估时去掉达到debias效果。另一部分针对点击后目标,包括停留时长、转化率等,使用MMOE做多目标学习,同时我们也会将CTR任务加入模型作为辅助模型,但是线上并不使用。最后融合多个目标结果得出排序结果。以上就是分享的全部内容。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"分享嘉宾:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"王修充"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"阿里巴巴 | 算法专家"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"王修充,阿里巴巴算法专家,硕士毕业于北京航空航天大学,先后在京东推荐算法、阿里巴巴CBU技术部推荐算法团队工作,目前工作方向为直播、短视频推荐算法在电商场景的应用。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"本文转载自:DataFunTalk(ID:dataFunTalk)"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文链接:"},{"type":"link","attrs":{"href":"https:\/\/mp.weixin.qq.com\/s\/4rwdlnRH-r65ltQFb2AwnQ","title":"xxx","type":null},"content":[{"type":"text","text":"阿里1688直播推荐算法实践"}]}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章