Graph neural networks (GNNs) are widely used as surrogates for costly experiments and first-principles simulations to study the behavior of compounds at atomistic scale, and their architectural complexity is constantly increasing to enable the modeling of complex physics. While most recent GNNs combine more traditional message passing neural networks (MPNNs) layers to model short-range interactions with more advanced graph transformers (GTs) with global attention mechanisms to model long-range interactions, it is still unclear when global attention mechanisms provide real benefits over well-tuned MPNN layers due to inconsistent implementations, features, or hyperparameter tuning. We introduce the first unified, reproducible benchmarking framework - built on HydraGNN - that enables seamless switching among four controlled model classes: MPNN, MPNN with chemistry/topology encoders, GPS-style hybrids of MPNN with global attention, and fully fused local-global models with encoders. Using seven diverse open-source datasets for benchmarking across regression and classification tasks, we systematically isolate the contributions of message passing, global attention, and encoder-based feature augmentation. Our study shows that encoder-augmented MPNNs form a robust baseline, while fused local-global models yield the clearest benefits for properties governed by long-range interaction effects. We further quantify the accuracy-compute trade-offs of attention, reporting its overhead in memory. Together, these results establish the first controlled evaluation of global attention in atomistic graph learning and provide a reproducible testbed for future model development.
翻译:图神经网络(GNN)被广泛用作昂贵实验和第一性原理模拟的替代方法,用于研究原子尺度上的化合物行为。为模拟复杂物理过程,其架构复杂度持续提升。尽管最新GNN通常结合了传统消息传递神经网络(MPNN)层(用于建模短程相互作用)与更先进的图Transformer(GT)及其全局注意力机制(用于建模长程相互作用),但由于实现方式、特征设计或超参数调优的不一致性,目前尚不清楚全局注意力机制何时能比精心调优的MPNN层带来实质性的性能提升。我们提出了首个统一且可复现的基准测试框架——基于HydraGNN构建——该框架支持在四种受控模型类别间无缝切换:MPNN、配备化学/拓扑编码器的MPNN、GPS风格的MPNN与全局注意力混合模型,以及配备编码器的全融合局部-全局模型。利用七个多样化的开源数据集,我们系统性地分离了消息传递、全局注意力以及基于编码器的特征增强各自对回归与分类任务的贡献。研究表明,编码器增强型MPNN构成了稳健的基线模型,而全融合局部-全局模型对于受长程相互作用效应主导的属性展现出最显著的优势。我们进一步量化了注意力机制的精度-计算权衡,并报告了其在内存上的开销。综合而言,这些结果为原子尺度图学习中的全局注意力机制建立了首次受控评估,并为未来模型开发提供了可复现的测试平台。