arXiv:2411.16278cs.LGstat.ML2024-11NeurIPS被引 17

通过两阶段训练大幅减少图Transformer的内存占用,提升大图处理能力。

Even Sparser Graph Transformers

  • 先用窄网络在全连接图上训练,提取关键连接
  • 再用这些关键连接训练宽网络,图规模大幅缩减
  • 适合处理大规模图数据,尤其内存受限场景

图Transformer在建模长距离依赖方面表现优异,但通常需要与节点数平方成比例的内存,难以扩展到大规模图。稀疏注意力方法如Exphormer虽有帮助,但常需对输入图进行高阶扩充以获得良好性能,且不针对已有稠密图进行稀疏化。由于学习到的注意力机制通常仅使用少数边,这种高阶连接可能冗余。我们通过实证和理论证明,注意力分数在不同网络宽度下具有一致性。据此提出两阶段方法Spexphormer:首先在全扩增图上训练窄网络;然后仅使用活跃连接,在更稀疏的图上训练宽网络。我们建立了窄网络注意力匹配宽网络的理论条件,并证明Spexphormer在多个图数据集上实现良好性能,同时显著降低内存需求。

原文摘要 · Abstract (English)

Graph Transformers excel in long-range dependency modeling, but generally require quadratic memory complexity in the number of nodes in an input graph, and hence have trouble scaling to large graphs. Sparse attention variants such as Exphormer can help, but may require high-degree augmentations to the input graph for good performance, and do not attempt to sparsify an already-dense input graph. As the learned attention mechanisms tend to use few of these edges, such high-degree connections may be unnecessary. We show (empirically and with theoretical backing) that attention scores on graphs are usually quite consistent across network widths, and use this observation to propose a two-stage procedure, which we call Spexphormer: first, train a narrow network on the full augmented graph. Next, use only the active connections to train a wider network on a much sparser graph. We establish theoretical conditions when a narrow network's attention scores can match those of a wide network, and show that Spexphormer achieves good performance with drastically reduced memory requirements on various graph datasets.

图神经网络注意力机制稀疏化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。