Graph neural networks (GNN) have shown promising results for several domains such as materials science, chemistry, and the social sciences. GNN models often contain millions of parameters, and like other neural network (NN) models, are often fed only a fraction of the graphs that make up the training dataset in batches to update model parameters. The effect of batching algorithms on training time and model performance has been thoroughly explored for NNs but not yet for GNNs. We analyze two different batching algorithms for graph based models, namely static and dynamic batching for two datasets, the QM9 dataset of small molecules and the AFLOW materials database. Our experiments show that changing the batching algorithm can provide up to a 2.7x speedup, but the fastest algorithm depends on the data, model, batch size, hardware, and number of training steps run. Experiments show that for a select number of combinations of batch size, dataset, and model, significant differences in model learning metrics are observed between static and dynamic batching algorithms.
翻译:图神经网络(GNN)在材料科学、化学和社会科学等多个领域展现出有前景的结果。GNN模型通常包含数百万个参数,与其他神经网络(NN)模型类似,通常仅以训练数据集中图的一小部分作为批次输入来更新模型参数。批处理算法对训练时间和模型性能的影响已在NN中得到充分探索,但在GNN中尚未深入研究。我们针对基于图的模型分析了两种不同的批处理算法,即静态批处理和动态批处理,并在两个数据集上进行了验证:小分子QM9数据集和AFLOW材料数据库。实验表明,改变批处理算法可提供高达2.7倍的加速效果,但最快的算法取决于数据、模型、批次大小、硬件以及训练步数。实验结果显示,在特定的批次大小、数据集和模型组合下,静态与动态批处理算法在模型学习指标上存在显著差异。