
PyTorch Geometric Temporal: Spatiotemporal Signal Processing with Neural Machine Learning Models Benedek Rozemberczki∗ Paul Scherer Yixuan He AstraZeneca University of Cambridge University of Oxford United Kingdom United Kingdom United Kingdom [email protected] [email protected] [email protected] George Panagopoulos Alexander Riedel Maria Astefanoaei École Polytechnique Ernst-Abbe University for Applied IT University of Copenhagen France Sciences Denmark [email protected] Germany [email protected] [email protected] Oliver Kiss Ferenc Beres Guzmán López Central European University ELKH SZTAKI Tryolabs Hungary Hungary Uruguay [email protected] [email protected] [email protected] Nicolas Collignon Rik Sarkar Pedal Me The University of Edinburgh United Kingdom United Kingdom [email protected] [email protected] ABSTRACT ACM Reference Format: We present PyTorch Geometric Temporal a deep learning frame- Benedek Rozemberczki, Paul Scherer, Yixuan He, George Panagopoulos, work combining state-of-the-art machine learning algorithms for Alexander Riedel, Maria Astefanoaei, Oliver Kiss, Ferenc Beres, Guzmán López, Nicolas Collignon, and Rik Sarkar. 2021. PyTorch Geometric Tempo- neural spatiotemporal signal processing. The main goal of the li- ral: Spatiotemporal Signal Processing with Neural Machine Learning Models. brary is to make temporal geometric deep learning available for In CIKM’21: ACM International Conference on Information and Knowledge researchers and machine learning practitioners in a unified easy- Management, 1-5 November 2021, Online. ACM, New York, NY, USA, 10 pages. to-use framework. PyTorch Geometric Temporal was created with https://doi.org/10.1145/nnnnnnn.nnnnnnn foundations on existing libraries in the PyTorch eco-system, stream- lined neural network layer definitions, temporal snapshot gener- ators for batching, and integrated benchmark datasets. These fea- 1 INTRODUCTION tures are illustrated with a tutorial-like case study. Experiments Deep learning on static graph structured data has seen an unprece- demonstrate the predictive performance of the models implemented dented success in various business and scientific application do- in the library on real world problems such as epidemiological fore- mains. Neural network layers which operate on graph data can casting, ride-hail demand prediction and web-traffic management. serve as building blocks of document labeling, fraud detection, traf- Our sensitivity analysis of runtime shows that the framework can fic forecasting and cheminformatics systems [7, 45–47, 63]. This potentially operate on web-scale datasets with rich temporal fea- emergence and the wide spread adaptation of geometric deep learn- arXiv:2104.07788v3 [cs.LG] 10 Jun 2021 tures and spatial structure. ing was made possible by open-source machine learning libraries. The high quality, breadth, user oriented nature and availability of ∗The project started when the author was a doctoral student of the Center for Doctoral specialized deep learning libraries [13, 15, 46, 67] were all contribut- Training in Data Science at The University of Edinburgh. ing factors to the practical success and large-scale deployment of graph machine learning systems. At the same time the exist- ing geometric deep learning frameworks operate on graphs which Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed have a fixed topology and it is also assumed that the node features for profit or commercial advantage and that copies bear this notice and the full citation and labels are static. Besides limiting assumptions about the input on the first page. Copyrights for components of this work owned by others than ACM data, these off-the-shelf libraries are not designed to operate on must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a spatiotemporal data. fee. Request permissions from [email protected]. Present work. We propose PyTorch Geometric Temporal, an CIKM’21, 1-5 November 2021, Online open-source Python library for spatiotemporal machine learning. © 2021 Association for Computing Machinery. ACM ISBN 978-x-xxxx-xxxx-x/YY/MM...$15.00 We designed PyTorch Geometric Temporal with a simple and con- https://doi.org/10.1145/nnnnnnn.nnnnnnn sistent API inspired by the software architecture of existing widely CIKM’21, 1-5 November 2021, Online B. Rozemberczki, P. Scherer, Y. He, G. Panagopoulos, A. Riedel, M. Astefanoaei, O. Kiss, F. Beres, G. López, N. Collignon, and R. Sarkar used geometric deep learning libraries from the PyTorch ecosystem can differ in terms of the dynamics of the graph and thatofthe [15, 40]. Our framework was built by applying simple design prin- modelled vertex attributes. We take a discrete temporal snapshot ciples consistently. The framework reuses existing neural network view of this data representation problem [25, 26] and our work layers in a modular manner, models have a limited number of public considers three spatiotemporal data types which can be described methods and hyperparameters can be inspected. Spatiotemporal by the subplots of Figure 1 and the following formal definitions: signal iterators ingest data memory efficiently in widely used scien- Definition 2.1. Dynamic graph with temporal signal A dy- tific computing formats and return those in a PyTorch compatible namic graph with a temporal signal is the ordered set of graph and format. The design principles in combination with the test coverage, node feature matrix tuples D = f¹G , X º,..., ¹G , X ºg where documentation, practical tutorials, continuous integration, package 1 1 ) ) the vertex sets satisfy that + = +, 8C 2 f1,...,) g and the node indexing and frequent releases make the framework an end-user C 2 Rj+ j×3 8 2 f g friendly spatiotemporal machine learning system. feature matrices that XC , C 1,...,) . The experimental evaluation of the framework entails node level Definition 2.2. Dynamic graph with static signal. A dynamic regression tasks on datasets released exclusively with the frame- graph with a static signal is the ordered set of graph and node work. Specifically, we compare the predictive performance of spa- feature matrix tuples D = f¹G1, Xº,..., ¹G) , Xºg where vertex tiotemporal graph neural networks on epidemiological forecasting, sets satisfy +C = +, 8C 2 f1,...,) g and the node feature matrix that demand planning, web traffic management and social media in- X 2 Rj+ j×3 . teraction prediction tasks. Synthetic experiments show that with the right batching strategy PyTorch Geometric Temporal is highly Definition 2.3. Static graph with temporal signal. A static scalable and benefits from GPU accelerated computing. graph with a temporal signal is the ordered set of graph and node Our contributions. The main contributions of our work can be feature matrix tuples D = f¹G, X1º,..., ¹G, X) ºg where the node j+ j×3 summarized as: feature matrix satisfies that XC 2 R , 8C 2 f1,...,) g . • We publicly release PyTorch Geometric Temporal the first Representing spatiotemporal data based on these theoretical deep learning library for parametric spatiotemporal machine concepts allows us the creation of memory efficient data structures learning models. which conceptualize these definitions in practice well. • We provide data loaders and iterators with PyTorch Geometric Temporal which can handle spatiotemporal datasets. • We release new spatiotemporal benchmark datasets from the renewable energy production, epidemiological reporting, goods delivery and web traffic forecasting domains. • We evaluate the spatiotemporal forecasting capabilities of the neural and parametric machine learning models available in PyTorch Geometric Temporal on real world datasets. The remainder of the paper has the following structure. In Sec- tion 2 we overview important preliminaries and the related work (a) Dynamic graph with temporal signal. about temporal and geometric deep learning and the characteris- tics of related open-source machine learning software. The main design principles of PyTorch Geometric Temporal are discussed in Section 3 with a practical example. We demonstrate the forecasting capabilities of the framework in Section 4 where we also evalu- ate the scalability of the library on various commodity hardware. We conclude in Section 5 where we summarize the results. The source code of PyTorch Geometric Temporal is publicly available (b) Dynamic graph with static signal. at https://github.com/benedekrozemberczki/pytorch_geometric_ temporal; the Python package can be installed via the Python Pack- age Index. Detailed documentation is accessible at https://pytorch- geometric-temporal.readthedocs.io/. 2 PRELIMINARIES AND RELATED WORK In order to position our contribution and highlight its significance we introduce some important concepts about spatiotemporal data and discuss related literature about geometric deep learning and (c) Static graph with temporal signal. machine learning software. Figure 1: The data iterators in PyTorch Geometric Tempo- 2.1 Temporal Graph Sequences ral can provide temporal snapshots for all of the non static geometric deep learning scenarios. Our framework considers specific input data types on which the spatiotemporal machine learning models operate. Input data types PyTorch Geometric Temporal: Spatiotemporal Signal
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages10 Page
-
File Size-