X-LogSMask:面向图结构数据的扩展Transformer
X-LogSMask: Expand Transformer for Graph-Structured Data
AI总结:
提出X-LogSMask,一种可解释的多头对数结构掩码,将对称归一化图拓扑直接注入注意力logits,使标准Transformer无需修改架构即可有效处理图数据,在20个基准测试中13个达到最优。
摘要:
Transformer已成为通用架构,但其全对全自注意力与图数据(其交互是稀疏、结构化和多尺度的)不匹配。现有的图Transformer通过结构编码、混合消息传递模块或学习到的注意力约束来解决这种不匹配,通常引入额外的复杂性和有限的可解释性。这里我们介绍X-LogSMask,一种可解释的多头对数结构掩码,将对称归一化的图拓扑直接注入注意力logits。对数变换将结构连通性转换为拓扑感知的门控信号,抑制不支持的节点交互,同时保留依赖特征的注意力。通过将归一化邻接矩阵的不同幂次分配给不同的注意力头,X-LogSMask赋予每个头一个定义的结构半径,并支持单层内的多跳信息传播。我们进一步表明,标准Transformer编码器可以解释为在完全图上的单步消息传递,这促使X-LogSMask作为无约束自注意力的拓扑约束替代方案。在20个节点级、边级和图级基准测试中,配备X-LogSMask的Transformer在13个数据集上实现了最先进的性能,并在轻量级单层配置中保持竞争力。这些结果表明,简单、可解释的结构掩码可以使自注意力成为有效的图学习算子,而无需改变Transformer架构。代码可在https://this URL获取。
英文摘要:
Transformers have become general-purpose architectures, but their all-to-all self-attention is poorly matched to graph data, whose interactions are sparse, structured and multi-scale. Existing Graph Transformers address this mismatch through structural encodings, hybrid message-passing modules or learned attention constraints, often introducing additional complexity and limited interpretability. Here we introduce X-LogSMask, an explainable multi-head logarithmic structural mask that injects symmetrically normalized graph topology directly into attention logits. The logarithmic transform converts structural connectivity into a topology-aware gating signal, suppressing unsupported node interactions while preserving feature-dependent attention. By assigning different powers of the normalized adjacency matrix to different attention heads, X-LogSMask gives each head a defined structural radius and supports multi-hop information propagation within a single layer. We further show that a standard Transformer encoder can be interpreted as one-step message passing on a complete graph, motivating X-LogSMask as a topology-constrained alternative to unrestricted self-attention. Across 20 node-, edge- and graph-level benchmarks, Transformers equipped with X-LogSMask achieve state-of-the-art performance on 13 datasets and remain competitive in a lightweight one-layer configuration. These results show that simple, interpretable structural masks can make self-attention an effective graph-learning operator without changing the Transformer architecture. The code is available at https://github.com/LiLeyan-0120/X-LogSMask.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。