【GCN-RS-Defence】GCN-Based User Representation Learning for Unifying Robust Recommendation and Frauds
GCN-Based User Representation Learning for Unifying Robust Recommendation and Fraudster Detection (SIGIR’20)
造了一个模型可以同时实现鲁棒推荐系统和欺诈检测。评分预测用GCN,欺诈检测用NRF,把两个模块塞进一个模型中,两个模块也互相扶助。
模型输入
模型输入除了U-I二部图以外还有用户行为数据的统计特征xu∈Rb\mathrm{x}_{u} \in \mathbb{R}^{b}xu∈Rb:
模型初始化时item的embedding是随机初始化的,user的embedding就用这些统计特征初始化。
GCN评分预测模块
和常见的GCN大同小异。以得到user uuu的表征zuz_uzu为例,item vvv 传递的消息:
hv=g(zv⊕eruv)\mathbf{h}_{v}=g\left(\mathbf{z}_{v} \oplus \mathbf{e}_{r_{u v}}\right) hv=g(zv⊕eruv)
zv\mathbf{z}_{v}zv是item vvv的表征,1~5分的评分rrr不用数字,而是引入一个边embedding er∈Re\mathrm{e}_{r} \in \mathbb{R}^{e}er∈Re ,拼接起来输入到lll层的MLP,输出就是传递的消息。
消息聚合得到的新表征:
zunew =σ(W⋅Agg({hk,∀k∈I(u)})+b)\mathrm{z}_{u}^{\text {new }}=\sigma\left(\mathbf{W} \cdot \operatorname{Agg}\left(\left\{\mathbf{h}_{k}, \forall k \in I(u)\right\}\right)+\mathbf{b}\right) zunew=σ(W⋅Agg({hk,∀k∈I(u)})+b)
σ\sigmaσ是ReLU激活函数,I(u)=N(u)∪{u}I(u)=\mathcal{N}(u) \cup\{u\}I(u)=N(u)∪{u}包括u的邻居和u自己。聚合函数Agg()Agg()Agg():
Agg({hk,∀k∈I(u)})=∑k∈I(u)αukhkA g g\left(\left\{\mathbf{h}_{k}, \forall k \in I(u)\right\}\right)=\sum_{k \in I(u)} \alpha_{u k} \mathbf{h}_{k} Agg({hk,∀k∈I(u)})=k∈I(u)∑αukhk
其中αuk\alpha_{u k}αuk是一个类似于attention weight的东西,经过两层神经网络,再normalizing一下:
auk=w2⊤⋅σ(W1⋅[hk⊕zu]+b1)+b2αuk=exp(auk)∑k′∈I(u)exp(auk′)a_{u k}=\mathbf{w}_{2}^{\top} \cdot \sigma\left(\mathbf{W}_{1} \cdot\left[\mathbf{h}_{k} \oplus \mathbf{z}_{u}\right]+\mathbf{b}_{1}\right)+b_{2} \\ \alpha_{u k}=\frac{\exp \left(a_{u k}\right)}{\sum_{k^{\prime} \in I(u)} \exp \left(a_{u k^{\prime}}\right)} auk=w2⊤⋅σ(W1⋅[hk⊕zu]+b1)+b2αuk=∑k′∈I(u)exp(auk′)exp(auk)
更新item的表征过程类似。得到user item的新表征后再经过一个lll层的MLP g′(⋅)g^{\prime}(\cdot)g′(⋅)可以得到回归预测的评分:
r^uv=wproject ⊤g′(zunew⊕zvnew)\hat{r}_{u v}=\mathbf{w}_{\text {project }}^{\top} g^{\prime}\left(\mathbf{z}_{u}^{\boldsymbol{n} e w} \oplus \mathbf{z}_{v}^{n e w}\right) r^uv=wproject⊤g′(zunew⊕zvnew)
NRF欺诈检测模块
这个模块就是一个分类器,输出user uuu是否为恶意用户,输入除了是GCN输出的user表征zunew\mathbf{z}_{u}^{n e w}zunew之外,还要加入user评分预测的平均误差error uuu:
erroru=1∣N(u)∣∑∀v∈N(u)(∣ruv−r^uv∣2)\operatorname{error} u=\frac{1}{|\mathcal{N}(u)|} \sum_{\forall v \in \mathcal{N}(u)}\left(\left|r_{u v}-\hat{r}_{u v}\right|^{2}\right) erroru=∣N(u)∣1∀v∈N(u)∑(∣ruv−r^uv∣2)
将zunew\mathbf{z}_{u}^{n e w}zunew和erroruerror\ uerroru拼接起来,再经过一个全连接层就是NRF的输入Zu∗\mathrm{Z}_{u}^{*}Zu∗了:
zu′=zunew ⊕error uzu∗=Sigmoid(WZ′zu′+bZ′)\mathbf{z}_{u}^{\prime}=\mathbf{z}_{u}^{\text {new }} \oplus \text { error } u \\ \mathrm{z}_{u}^{*}=\operatorname{Sigmoid}\left(\mathrm{W}_{Z^{\prime}} \mathbf{z}_{u}^{\prime}+\mathbf{b}_{Z^{\prime}}\right) zu′=zunew⊕erroruzu∗=Sigmoid(WZ′zu′+bZ′)
NRF有两类节点:prediction nodes和decision nodes。prediction nodes p∈Pop \in \mathcal{P}_{o}p∈Po是叶子节点,每个ppp都维护一个概率分布πp\pi_{p}πp over the label y∈{0,1}y \in\{0,1\}y∈{0,1}, πp=[πp0=P(y=0),πp1=P(y=1)].\pi_{p} = \left[\pi_{p_{0}}=\mathbb{P}(y=0), \pi_{p_{1}}=\mathbb{P}(y=1)\right] .πp=[πp0=P(y=0),πp1=P(y=1)]. decision nodes d∈Dd \in \mathcal{D}d∈D 是一个决策模型fd(zu∗;Θ):zu∗↦[0,1]f_{d}\left(\mathrm{z}_{u}^{*} ; \Theta\right): \mathrm{z}_{u}^{*} \mapsto[0,1]fd(zu∗;Θ):zu∗↦[0,1],判断往左子树走还是右子树走,输出一个标量:
fd(zu∗;Θ)=Sigmoid(wd⊤zu∗)f_{d}\left(\mathrm{z}_{u}^{*} ; \Theta\right)=\operatorname{Sigmoid}\left(\mathrm{w}_{d}^{\top} \mathrm{z}_{u}^{*}\right) fd(zu∗;Θ)=Sigmoid(wd⊤zu∗)
最后对于每颗树T0T_0T0,user uuu被分类成标签yyy的概率:
PTo[y∣zu∗,Θ,π]=∑p∈Poπpy(∏d∈Dfd(zu∗;Θ)Γleft fˉd(zu∗;Θ)Γright )\mathbb{P}_{T_{o}}\left[y \mid \mathrm{z}_{u}^{*}, \Theta, \pi\right]=\sum_{p \in \mathcal{P}_{o}} \pi_{p_{y}}\left(\prod_{d \in \mathcal{D}} f_{d}\left(\mathrm{z}_{u}^{*} ; \Theta\right)^{\Gamma_{\text {left }}} \bar{f}_{d}\left(\mathrm{z}_{u}^{*} ; \Theta\right)^{\Gamma_{\text {right }}}\right) PTo[y∣zu∗,Θ,π]=p∈Po∑πpy(d∈D∏fd(zu∗;Θ)Γleftfˉd(zu∗;Θ)Γright)
那么对于整个森林T={T1,…,TO}\mathcal{T}=\left\{T_{1}, \ldots, T_{O}\right\}T={T1,…,TO} ensemble所有的树:
PT[y∣zu∗,Θ,π]=1O∑o=1OPTo[y∣zu∗,Θ,π]\mathbb{P}_{\mathcal{T}}\left[y \mid \mathrm{z}_{u}^{*}, \Theta, \pi\right]=\frac{1}{O} \sum_{o=1}^{O} \mathbb{P}_{T_{o}}\left[y \mid \mathrm{z}_{u}^{*}, \Theta, \pi\right] PT[y∣zu∗,Θ,π]=O1o=1∑OPTo[y∣zu∗,Θ,π]
最终预测uuu的label:
y^u=argmaxyPT[y∣zu∗,Θ,π],y∈{0,1}\hat{y}_{u}=\underset{y}{\operatorname{argmax}} \mathbb{P}_{\mathcal{T}}\left[y \mid \mathrm{z}_{u}^{*}, \Theta, \pi\right], \quad y \in\{0,1\} y^u=yargmaxPT[y∣zu∗,Θ,π],y∈{0,1}
形象理解
纵向看黑色线就是公式里的连乘,横向看就是公式里的连加。其实这个分类器可以看作“极度”dropout的MLP分类器。
模型训练
模型训练时预测和检测模块相辅相成。
训练评分预测模块时,检测模块可以提供一个恶意用户置信度,用来衡量该用户的loss应不应该用来更新参数:
Lrating =1∣E∣∑∀u,v∈EPT[y=0∣zu∗,Θ,π]⋅(ruv′−ruv)2\mathcal{L}_{\text {rating }}=\frac{1}{|\mathcal{E}|} \sum_{\forall u, v \in \mathcal{E}} \mathbb{P}_{T}\left[y=0 \mid \mathrm{z}_{u}^{*}, \Theta, \pi\right] \cdot\left(r_{u v}^{\prime}-r_{u v}\right)^{2} Lrating=∣E∣1∀u,v∈E∑PT[y=0∣zu∗,Θ,π]⋅(ruv′−ruv)2
训练欺诈检测模块时,预测模块的预测误差会作为检测模块的输入:
Lfraudster =1∣U∣∑∀u∈U,yu∈Y−logPT[y=yu∣zu∗,Θ,π]L=Lrating +λLfraudster \mathcal{L}_{\text {fraudster }}=\frac{1}{|\mathcal{U}|} \sum_{\forall u \in \mathcal{U}, y_{u} \in \mathcal{Y}}-\log \mathbb{P}_{T}\left[y=y_{u} \mid \mathrm{z}_{u}^{*}, \Theta, \pi\right] \\ \mathcal{L}=\mathcal{L}_{\text {rating }}+\lambda \mathcal{L}_{f \text { raudster }} Lfraudster=∣U∣1∀u∈U,yu∈Y∑−logPT[y=yu∣zu∗,Θ,π]L=Lrating+λLfraudster
实验设置
数据集尺寸
真实、恶意用户各划分80%、20%的训练、测试集。刚开始模型在干净训练集上训练,以对比RS模型性能。然后逐渐注入20%、40%、60%、80%、100%的恶意数据。
【GCN-RS-Defence】GCN-Based User Representation Learning for Unifying Robust Recommendation and Frauds相关推荐
- 【Dex-Net 2.0】论文精度:Deep Learning to Plan Robust Grasps with Synthetic Point Clouds and Analytic Grasp
Dex-Net 2.0: Deep Learning to Plan Robust Grasps with Synthetic Point Clouds and Analytic Grasp Metr ...
- 【论文笔记09】Differentially Private Hypothesis Transfer Learning 差分隐私迁移学习模型, ECMLPKDD 2018
目录导引 系列传送 Differentially Private Hypothesis Transfer Learning 1 Abstract 2 Bg & Rw 3 Setting &am ...
- 【论文随笔2】COALA: Co-Aligned Autoencoders for Learning Semantically Enriched Audio Representations
原文链接:[论文随笔2]COALA: Co-Aligned Autoencoders for Learning Semantically Enriched Audio Representations ...
- 【图神经网络DGL】GCN在Karate Club上的实战(消息传递范式 | 生成训练可视化动图)
学习总结 回顾[图神经网络DGL]数据封装和消息传递机制 的数据封装,在做异构图神经网络时,DGL比PyG方便很多(尽管PyG已经支持了异构图Aminer和栗子,但对图结构数据做批处理还是需要自己实现 ...
- 【论文笔记】Towards Universal Sequence Representation Learning for Recommender Systems
论文详细信息 题目:Towards Universal Sequence Representation Learning for Recommender Systems 作者:Yupeng Hou a ...
- 【文献阅读笔记】KAM Theory Meets Statistical Learning Theory: Hamiltonian Neural Networks with Non-Zero Trai
文章发表于[2022]AAAI Technical Track on Machine Learning I 文章目录 文章目的 一.主要内容: 1.用统计学习理论证明哈密顿神经网络的训练模型是原系统的 ...
- 【论文解读|AAAI2021】HGSL - Heterogeneous Graph Structure Learning for Graph Neural Networks 图神经网络的异构图结构学习
文章目录 1 摘要 2 引言 相关工作 3 方法 3.1 特征图产生器 3.1.1 特征相似图 3.1.2特征传播图 3.2 语义图生成器 4 实验 5 结论 论文链接: http://shichua ...
- 【HRNet】《Deep High-Resolution Representation Learning for Human Pose Estimation》
CVPR-2019 代码:https://github.com/leoxiaobin/deep-high-resolution-net.pytorch 文章目录 1 Background and Mo ...
- 【论文阅读|深读】 GraphSAGE:Inductive Representation Learning on Large Graphs
目录 前言 简介 Abstract 1 Introduction 2 Related work 3 Proposed method: GraphSAGE 3.1 Embedding generatio ...
最新文章
- 002_入门HelloWorldServlet
- python程序流程控制_python流程控制
- php中有size_t函数吗,lSize 命令/方法/函数
- (37)zabbix snmp类型 无需安装agent也能监控
- http通信协议的基本原理
- 使用flex布局把三个元素分配成两列,第二列垂直布局两个元素
- SAP JAM活跃度统计
- 使用cocopods安装Alamofire后各种报错
- Bailian4073 最长公共字符串后缀【文本处理】
- 降低站长成本 推荐8个免费或低廉小型建站工具
- jsp三大指令(总结)
- matlab斑点噪声算法,粒子滤波算法中的噪声问题
- 安装pytorch详细教程
- pdf怎么转换成图片,pdf转图片教程
- Lambda表达式的学习
- 原问题与对偶问题的定义和关系
- MA、EMA、SMA、DMA、TMA、WMA
- 带买卖双方的尼日利亚进出口海关数据
- t.cn短链接生成 - 新浪短网址生成器压缩网址详细教程
- [leetCode]327. 区间和的个数
热门文章
- dbv数据库乱码_使用DBV进行数据库版本控制
- CCLE(Cancer Cell Line Encyclopedia)数据库使用
- 集合collection
- 报错:Torch not compiled with CUDA enabled看这一篇就足够了
- hotspot解释器和JIT
- 【惯性导航姿态仪】 04 -Mini AHRS 姿态解算说明
- 今日头条面试——iOS开发面试题
- iOS自动化-iOS录屏xrecord及解决iPhone设备不显示的问题
- 计算机科学与技术考研双非,2021西安电子科技大学计算机科学与技术考研真题经验参考书...
- NetCDF简介与格式入门