arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.03462cs.LGstat.ML
收藏

基于图随机特征的线性 Transformer 拓扑掩码

Linear Transformer Topological Masking with Graph Random Features

Google DeepMind(谷歌DeepMind);Google Research(谷歌研究院);University of Cambridge(剑桥大学);Alan Turing Institute(阿兰·图灵研究所);Columbia University(哥伦比亚大学)
Isaac Reid, Kumar Avinava Dubey, Deepali Jain, Will Whitney, Amr Ahmed, Joshua Ainslie, Alex Bewley, Mithun Jacob, Aranyak Mehta, David Rendleman, Connor Schenc… 展开作者

Isaac Reid, Kumar Avinava Dubey, Deepali Jain, Will Whitney, Amr Ahmed, Joshua Ainslie, Alex Bewley, Mithun Jacob, Aranyak Mehta, David Rendleman, Connor Schenck, Richard E. Turner, René Wagner, Adrian Weller, Krzysztof Choromanski

AI总结:

本文提出将拓扑掩码参数化为加权邻接矩阵的可学习函数,并利用图随机特征进行近似,使其与线性注意力兼容,保持 $\mathcal{O}(N)$ 复杂度,在图像和点云任务上取得显著性能提升。

摘要:

在图结构数据上训练 Transformer 时,融入底层拓扑信息对于获得良好性能至关重要。拓扑掩码作为一种相对位置编码,通过根据图中查询与键之间的关系来上调或下调注意力权重来实现这一点。在本文中,我们提出将拓扑掩码参数化为加权邻接矩阵的可学习函数——这是一种新颖且灵活的方法,融入了强结构归纳偏置。通过使用图随机特征对该掩码进行近似(我们为此证明了首个已知的集中界),我们展示了如何使其与线性注意力完全兼容,从而保持关于输入 token 数量的 $\mathcal{O}(N)$ 时间和空间复杂度。此前最快的替代方案复杂度为 $\mathcal{O}(N \log N)$,且仅适用于特定图。我们高效的掩码算法在图像和点云数据任务上带来了显著的性能提升,包括包含超过 3 万个节点的场景。

英文摘要:

When training transformers on graph-structured data, incorporating information about the underlying topology is crucial for good performance. Topological masking, a type of relative position encoding, achieves this by upweighting or downweighting attention depending on the relationship between the query and keys in a graph. In this paper, we propose to parameterise topological masks as a learnable function of a weighted adjacency matrix -- a novel, flexible approach which incorporates a strong structural inductive bias. By approximating this mask with graph random features (for which we prove the first known concentration bounds), we show how this can be made fully compatible with linear attention, preserving $\mathcal{O}(N)$ time and space complexity with respect to the number of input tokens. The fastest previous alternative was $\mathcal{O}(N \log N)$ and only suitable for specific graphs. Our efficient masking algorithms provide strong performance gains for tasks on image and point cloud data, including with $>30$k nodes.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑