AFM论文精读

深度学习在推荐系统的应用(二)中AFM的简单回顾

AFM模型(Attentional Factorization Machine)

\[ ŷ_{AFM}(x)=ω_0+∑_{i=1}^{n}ω_{i}x_{i}+p^T∑^{n}_{i=1}∑^{n}_{j=i+1}a_{ij}(v_i⊙v_j)x_ix_j \]

算法推导

\[ \text{(非零)特征集:}\chi \]

\[ \text{(非零)特征的embeding输出:}\varepsilon = \left \{ v_ix_i \right \}_{i\in \chi } \]

FM模型数学公式:
\[ \widehat{y}_{FM}(X)=W_0+\sum_{i=1}^n w_ix_i+\sum_{i=1}^n \sum_{j=i+1}^n \widehat{w}_{ij}x_ix_j \text{(1)} \]

pair-wise interaction layer(It expands m vectors to m(m − 1)/2 interacted vectors):
\[ f_{PI}(\varepsilon )=\left \{ v_i \odot v_jx_ix_j \right \}_{i,j \in R_x }\text{(2)} \]

\[ \text{这里}R_x=\left \{ (i,j) \right \}_{i \in \chi ,j \in \chi,j>i } \]

the attention network is defined as :
\[ \acute{a_{ij}}=h^TReLU(W(v_i \odot v_j)x_ix_j+b),a_{ij}= \frac{exp(\acute{a_{ij}})}{\displaystyle \sum_{(i,j) \in R_x}exp(\acute{a_{ij}})}(5) \]

\[ \text{这里}w \in R^{t*k},b \in R^t,h \in R^t,\text{t代表注意力网络隐藏层大小,k是注意力网络输出向量维度大小} \]

综上得AFM模型公式:

\[ ŷ_{AFM}(x)=ω_0+∑_{i=1}^{n}ω_{i}x_{i}+p^T∑^{n}_{i=1}∑^{n}_{j=i+1}a_{ij}(v_i⊙v_j)x_ix_j \]

模型用到得参数集合:
\[ \Theta =\left \{ w_0, \left \{ w_i \right \}_{i=1}^n,\left \{ v_i \right \}_{i=1}^n ,P,W,b,h \right \} \]

论文要点

  • We point out that in these methods(e.g WDL,DCN), feature interactions are implicitly captured by a deep neural network, rather than FM that explicitly models each interaction as the inner product of two features. As such, these deep methods are not interpretable, as the contribution of each feature interaction is unknown.By directly extending FM with the attention mechanism that learns the importance of each feature interaction, our AMF is more interpretable and empirically demonstrates superior performance over Wide&Deep and DeepCross.

  • RQ1 How do the key hyper-parameters of AFM (i.e., dropout on feature interactions and regularization on the attention network) impact its performance?
    分别在开源数据机调参Dropout率和L2正则系数

  • RQ2 Can the attention network effectively learn the importance of feature interactions?
    对比只训练embeding和只训练attention network

  • RQ3 How does AFM perform as compared to the state-of-theart methods for sparse data prediction?
    对比开源数据集上的参数个数与损失;参数更少,损失更低

转载于:https://www.cnblogs.com/arachis/p/AFM_detail.html

03-19
### 关于 AFM 的定义与技术背景 Adaptive Format Mapping (AFM),即自适应格式映射,是一种用于数据转换的技术。它主要用于解决不同系统之间数据交换时的兼容性和一致性问题[^1]。通过这种技术,可以实现多种文件格式之间的无缝转换,从而提高系统的互操作能力。 Active File Monitoring (AFM) 是一种监控机制,通常被应用于企业级存储解决方案中。它的主要功能是对特定目录下的文件活动进行实时跟踪和记录,以便及时发现并响应任何未经授权的操作行为。此方法对于保障信息安全以及维护业务连续性具有重要意义。 如果讨论的是某种具体技术文档中的 AFM,则可能涉及上述两种概念之一或者完全不同的领域应用,请进一步确认所需查询的具体方向以获得更精确的信息。 ```python # Python 示例代码展示如何模拟简单的 Active File Monitoring 功能 import os from time import sleep def monitor_directory(path, interval=5): """ 实现基本的文件夹监控逻辑 参数: path (str): 要监视的目标路径. interval (int): 扫描间隔时间(秒). 返回值: None """ previous_files = set(os.listdir(path)) while True: current_files = set(os.listdir(path)) new_files = current_files - previous_files removed_files = previous_files - current_files if new_files or removed_files: print(f"新增文件: {new_files}, 删除文件: {removed_files}") previous_files = current_files.copy() sleep(interval) if __name__ == "__main__": directory_to_watch = "./example_folder" monitor_directory(directory_to_watch) ``` #### 注意事项说明 以上示例仅作为演示用途,在实际生产环境中部署类似的监测工具前需充分考虑性能开销及隐私保护等问题。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值