Tuple Packing: Efficient Batching of Small Graphs in Graph Neural Networks

09/14/2022
by   Mario Michael Krell, et al.
7

When processing a batch of graphs in machine learning models such as Graph Neural Networks (GNN), it is common to combine several small graphs into one overall graph to accelerate processing and reduce the overhead of padding. This is for example supported in the PyG library. However, the sizes of small graphs can vary substantially with respect to the number of nodes and edges, and hence the size of the combined graph can still vary considerably, especially for small batch sizes. So the costs of excessive padding and wasted compute are still incurred. This paper proposes a new approach – tuple packing – for generating batches that cause minimal overhead. The algorithm extends recently introduced sequence packing approaches to work on the 2D tuples of (|nodes|, |edges|). A monotone heuristic is applied to the 2D histogram of tuple values to define a priority for packing histogram bins together with the objective to reach a limit on the number of nodes as well as the number of edges. Experiments verify the effectiveness of the algorithm on multiple datasets.

READ FULL TEXT

page 5

page 8

page 10

page 11

research
11/29/2017

On S-packing edge-colorings of cubic graphs

Given a non-decreasing sequence S = (s 1,s 2,. .. ,s k) of positive inte...
research
04/14/2021

DistGNN: Scalable Distributed Training for Large-Scale Graph Neural Networks

Full-batch training on Graph Neural Networks (GNN) to learn the structur...
research
10/27/2022

Training Graph Neural Networks on Growing Stochastic Graphs

Graph Neural Networks (GNNs) rely on graph convolutions to exploit meani...
research
08/29/2023

Finding Optimal 2-Packing Sets on Arbitrary Graphs at Scale

A 2-packing set for an undirected graph G=(V,E) is a subset 𝒮⊂ V such th...
research
10/11/2020

DistDGL: Distributed Graph Neural Network Training for Billion-Scale Graphs

Graph neural networks (GNN) have shown great success in learning from gr...
research
05/15/2019

Can Graph Neural Networks Go "Online"? An Analysis of Pretraining and Inference

Large-scale graph data in real-world applications is often not static bu...
research
12/18/2022

Influence-Based Mini-Batching for Graph Neural Networks

Using graph neural networks for large graphs is challenging since there ...

Please sign up or login with your details

Forgot password? Click here to reset