session-based embedding

前记

表示学习Representation Learning从word2vec火起来,一开始解决的是nlp中的词和词组embedding,然后成为通用的session-based 的embedding方法,目前开始在网络表示学习graph embedding中有了更为深刻的应用。本文主要讨论一下比较简单又比较实用的session-based的embedding在业界使用中的一些改进和优化技巧。涉及内容和论文比较多,还没完全看完,持续更新中...

综述

Embedding从入门到专家必读的十篇论文
嵌入方法在推荐系统中的应用

原理介绍

word2vec 中的数学原理详解
Word2vec数学原理全家桶

工业应用方法

  • side_info
    一天造出10亿个淘宝首页,阿里工程师如何实现
    Billion-scale Commodity Embedding for E-commerce Recommendation in Alibaba
    Meta-Prod2Vec: Product Embeddings Using Side-Information for Recommendation

  • 推荐系统超参数调整
    Word2vec applied to Recommendation: Hyperparameters Matter
    fixed:
    -- embedding size 50
    -- number of negative samples 5
    -- learning rate 0.025
    finetune:
    -- the number of epochs(10,200,10)
    -- the window-size(3/7/12/15)
    -- sub sampling parameter(10e-5,10e-1, 10)
    -- negative sampling distribution parameter(-1.4,1.4,0.2)
    实验也很细节NEP
    官方指导
    The training speed can be significantly improved by using parallel training on multiple-CPU machine (use the switch '-threads N'). The hyper-parameter choice is crucial for performance (both speed and accuracy), however varies for different applications. The main choices to make are:
    -- architecture: skip-gram (slower, better for infrequent words) vs CBOW (fast)
    -- the training algorithm: hierarchical softmax (better for infrequent words) vs negative sampling (better for frequent words, better with low dimensional vectors)
    -- sub-sampling of frequent words: can improve both accuracy and speed for large data sets (useful values are in range 1e-3 to 1e-5)
    -- dimensionality of the word vectors: usually more is better, but not always
    -- context (window) size: for skip-gram usually around 10, for CBOW around 5

  • 采样
    基于Graph Embedding的bundle mining
    图是一种抽象程度高、表达能力强的数据结构,它通过对节点和边的定义来描述实体和实体之间的关联关系。常用的图有社交关系网络、商品网络、知识图谱等等。基于权重Sampling(weighted walk)作为正样本的候选,负样本从用户非购买行为中随机抽样;这种随机采样的方法会大概率的将热门节点采集为负样本,这种方式适用于语言模型,因为在自然语言中,热门的单词均为无用单词(比如he、she、it、is、the)。对于我们的商品网络,刚好相反,热门商品往往是最重要的样本,如果采用negative sampling的方式去构造样本,模型肯定是学不出来。因此,我们基于边的权重去采样(weighted walk),使采样尽量往热门节点方向游走,
    odps graph平台实现的,一个分布式的图计算平台,离线graph有2亿条边,3千万节点,10分钟跑完所有的数据,实时部分,我们实现了每分钟最高可更新10w的Graph边的结构,如何在分布式odps graph平台实现这套算法详见另一篇ata,尽请期待。

  • 评价和衡量方法
    Item2Vec: Neural Item Embedding for Collaborative Filtering

-- 定量:对于音乐的类型,找到特别的10个分类下的音乐家,对其音乐作品打上label,使用tsne进行可视化。有一些交叉地方,使用knn分类发现评估集里面有一些错误的信息
-- 定量:对top q个热门的item,使用投票的knn(k=8)的作者的类型是否与item本身的作者类型一致,发现i2v比svd效果好,而且越长尾越好
-- 定性:评估4nn的结果
主流方法
-- 词聚类可以采用 kmeans 聚类,看聚类簇的分布
-- 词cos 相关性查找cos相近的词
-- Analogy对比a:b 与 c:d的cos距离 (man-king woman-queen )
-- 使用tnse,pca等降维可视化展示

词的分布,推荐用google的tensorboard,可以多视角查看,如果不想搭建服务,直接访问这里。另外可以用python的matplotlib。

  • session构建和负采样
    详解Embeddings at Alibaba
    Learning and Transferring IDs Representation in E-commerce
    从KDD 2018 Best Paper看Airbnb实时搜索排序中的Embedding技巧
  • 讨论session-based和graph-based方法的异同
    从Pinterest到阿里,再谈工业界的推荐系统
  • 增量更新和实践技巧
    Embedding 技术在民宿推荐中的应用

  • graph embedding
    当机器学习遇上复杂网络:解析微信朋友圈 Lookalike 算法
    《Graph Embedding及其在知乎的实践.pdf》

工具和框架

gensim
GraphSAGE

性能

http://aial.shiroyagi.co.jp/2015/12/word2vec/

效率比较

todo

https://multithreaded.stitchfix.com/blog/2017/10/18/stop-using-word2vec/
这里有个其他的声音

你可能感兴趣的:(session-based embedding)