文章目录
1.Virtual-Taobao: Virtualizing real-world online retail environment for reinforcement learning (AAAI 2019)
关键:模拟了淘宝中的customer和interaction
- Virtual Taobao simulates the customers, items, and recommendation system.
- Using VirtualTaobao simulator, one can access a “live” environment just like the real Taobao environment. Virtual customers will be generated once at a time, the virtual customer starts a query, and the recommendation system needs to return a list of items. The virtual customer will decide if it would like to click the items in the list, similar to a real customer.
customer:11个静态特征 one-hot 88维,3维的动态特征(交互时会变换)
item:27维特征
整体流程如下:
- Virtual Taobao samples a feature vector of the customer, including both the customer’s description and customer’s query.
- The system retrives a set of related items according to the query, forming the whole itemset.
- The system uses a model to assign a weight vector corresponding to the item attributes.
- The system calculates the product between the weight vector and the item attributes for each item, and selects the top 10 items with the highest values.
- The selected 10 items are pushed to the customer. Then, the customer will choose to click on some items (results in CTR++), browse the next page (results in starting over from step 2 with changed customer features), or leave the platform (results in the end of the session).
In the above process, the model in step 3, is to be trained. The model inputs the features of the customer and the itemset, and outputs a 27-dimensional weight vector.
方法:
- GAN-SD:生成虚拟客户
- MAIL:生成虚拟交互
- ANC:平台策略(RL容易过拟合)
两个agent
- search engine当做agent,customer feedback当做environment。action是给出的推荐列表,state是用户特征,reward是用户是否购买。
- customer当做agent,search engine当做environment。action是用户行为,state是推荐的结果,reward未知(模仿学习解决)。
一. GAN-SD: Generating Customer Features
和GAN类似,有一个生成器和一个判别器。
- 判别器的损失函数和GAN一样:能尽可能区分出training data和generated data
- 生成器的损失函数不一样,考虑了distribution因素(信息熵越大越好),KL散度 小
这部分就是在模拟真实用户,生成的也不是ID而是88维feature
二. MAIL:Generating Interactions
Multi-agent Adversarial Imitation Learning
- 保证用户策略是未知的
- 同时训练customer policy 和 engine policy
因为不知道customer reward function,用到了模仿学习。
需要专家轨迹(历史交互数据)与采样的轨迹,objective function是 让专家的reward大于采样的reward。
三. ANC: Reduce Overfitting to Virtual-Taobao
上一步使用IRL,会导致学到的策略和历史策略一样,即 没有提升。提出Action Norm Constraint to control the norm of taken actions.
所采取行动的norm大于大多数历史行为的norm时,加上惩罚
总结:
使用RL技术建立了一个simulator,包含了三个部分:模拟用户分布、模拟交互、对reward函数加了一个惩罚项。
但是实际上用到RL技术的只有第二点吧?(不过整体思路是照着RL来的,两个agent的交互,状态转移函数设置)
第一部分GAN-SD是结合了GAN的技术,除了GAN的公式 自己设计了一个新的公式。不过这部分的simulate sampling distribution 我不是很明白。capture the distribution of customers?直接模拟出instance不可以吗 为什么需要wider distribution?
第二部分MAIL使用了模仿学习技术,涉及到multi-agent。参考了GAIL(Generative Adversarial Imitation Learning),直接从专家数据中学习策略(IRL 先学习专家数据的reward function,再用RL方法学习到专家策略)。不过MAIL需要训练两个agent。但是整体算法,好像没有什么很特别的地方啊。
想象我们想要学习打羽毛球,虽然我们无法像专业运动员那样拥有超强的战术策略,但是我们可以通过观察他们的比赛录像,通过观察他们在不同情况下的不同击球策略,来不断提高我们自身的球技。实际上,我们在实际情况下也是这么做的:在家不断学习高手的动作要领,并铭记于心,然后回到球场上一试身手。
实际上,这就是一个从反向强化学习到强化学习的过程。首先通过最优策略的交互样本学习到回报函数,即不同的情境下的不同击球方式(扣杀球,放小球,球速,击球高度等等),能够获得的回报是怎样的。接下来就可以通过得到回报函数进行尝试,使用强化学习的方法得到最终的策略。
第三部分ANC对reward加了一个限制:所采取行动的norm大于大多数历史行为的norm时,有惩罚
一些收获:
参考这篇文章中reward设置,Action Norm Constraint 很简单的式子,但是就 称呼的很不一样。 Reward constraint , Constraint Penalty
2.RECSIM: A Configurable Simulation Platform for Recommender Systems
- 2019年谷歌团队提出的,引用量47,tensorflow写的。(之后又提出了一个RecSim NG)
- 略读了一下 RECSIM: A Confifigurable Simulation Platform for Recommender Systems 这篇论文,并没有写背后的原理,主要是在介绍这个仿真平台的组件、体系结构之类的。Our goal is not to create a “perfect” simulator; we do not expect policies learned in simulation to be deployed in live systems. Rather, we expect simulations that mirror specific aspects of user behavior found in real systems to serve as a controlled environment for developing, evaluating and comparing recommender models and algorithms (especially those designed for sequential user-system interaction). 引用了RecoGym这篇论文,提到 it does not allow user state transitions.
- 下载了代码(讲解),安装了包之后报了个错
configurable()
got an unexpected keyword argument 'blacklist'
,解决不了,加上是tensorflow写的,就没有细究了。 - github 整体流程就像下面这两张图,其中Document Database可以理解成物品集合。右边是左边的展开。
因为代码没有跑通,所以我没有搞明白这个RecSim😢
- user和document都是基于先验分布采样构建的sample_user() sample_document(),没有用到数据集,奇奇怪怪的。
- Recommender推荐k个物品,物品选择一个点击或者不点choice。
- 用户做出选择后,hidden_feature会变化,user interest和remaining time也会发生变换。(这里是在权衡满意度和观看时间,用户粘性)
- 论文还提到,每次采样一个用户。(virtualTaobao的88维也是一个用户)
和VirtualTaobao对比,RecSim每个部分都拆的很开,为读者提供了极大的创作空间,可惜我创作不来 (ㄒoㄒ)。
3.RecoGym: A Reinforcement Learning Environment for the Problem of Product Recommendation in Online Advertising
- 2018年的论文,引用了70,pytorch代码写的。
- 原论文: RecoGym: A Reinforcement Learning Environment for the Problem of Product Recommendation in Online Advertising
- 这篇背景是“online advertising”,分成了organic sessions和bandit sessions,可以想象成 网站给用户推广告(bandit),用户感兴趣于是点进去看了(organic)。
- 涉及到retailer website 和 publisher website:用户点进某个商店看,退出后publisher会推广告(action),希望用户又去店里看。
- online和offline的alignment
- 代码是可以跑通的,不过内容实在是太丰富了。有很多可选agent和environment
- 也是根据某种分布凭空构造用户,每次构造一个 initialize a random user
action
, is a number between0
andnum_products - 1
that references the index of the product recommended.- 先使用某种固定的策略收集数据,离线训练agent;之后使用agent进行online learning。其中,agent是自定义的(需要继承abstract中的agent类);代码里给了一个popularity的例子,每次推荐点击率最多的product。
-