
Do We Really Need Graph Neural Networks for Traffic Forecasting?
In this work, we propose two spatial learning modules to
approximate the above efficacies of GNNs without requiring
message passing, reducing the time complexity to linear.
(1) Local Proximity Modeling. We take a local view and
fragment the traffic network to build an ego-graph for each
node, which is constructed by incorporating historical obser-
vations of the node’s neighbors. Then an MLP is applied to
transform the observations to the hidden states at each time
step. (2) Global Correlation Learning. Inspired by recom-
mender systems that learn user embeddings to reflect user
behavioral similarities (He et al., 2017; Zhang et al., 2019),
we propose to use sensor embeddings to represent sensors’
inherent properties and collaboratively capture spatial rela-
tionships between arbitrary sensor pairs in a data-driven
manner. Compared with stacking a number of GNN layers
to enlarge the receptive field and build long-range spatial de-
pendencies, our module sets up direct connections between
nodes and thereby learns the global correlations.
In practice, GNNs can be used alongside various temporal
models, such as GRU (Chung et al., 2014), WaveNet (Oord
et al., 2016), and Transformer (Vaswani et al., 2017), for
spatio-temporal learning. Analogously, we empirically find
that our proposed spatial modules are agnostic to the tempo-
ral encoders and work in a plug-and-play manner. Moreover,
we devise a new training strategy for SimST to further boost
performance, which increases sample diversity during batch
formation and enhances generalization.
Integrating the above components, we propose a
Sim
ple
yet effective
S
patio-
T
emporal learning approach termed
SimST
, which trims the quadratic cost and performs on par
with STGNNs in empirical studies. Our contributions are
summarized as follows.
•
We for the first time demonstrate that GNNs are not the
only choice for spatial modeling in traffic forecasting, by
presenting a simple yet admirable method called SimST.
•
Despite its simplicity, SimST achieves remarkable empir-
ical results in terms of throughput and accuracy against
sophisticated state-of-the-art STGNNs: SimST is signifi-
cantly more efficient than baselines, with up to
39×
higher
inference throughput, while performing on par with them.
•
We conduct ablation and case studies to promote a better
understanding of our method and motivate future research
to rethink the importance of GNNs in traffic forecasting.
2. Related Work
Traffic forecasting is a crucial application in smart city ef-
forts. In recent years, STGNNs have become the most
widely used tools for predicting traffic (Cao et al., 2020;
Liu et al., 2022b; Chen et al., 2021b; 2022). Generally,
they integrate GNNs with either RNNs or TCNs to capture
the spatial and temporal dependencies in traffic data. For
example, DCRNN (Li et al., 2018) considered traffic flow
as a diffusion process and combined a novel diffusion con-
volution with GRU. Other efforts (Pan et al., 2019; Fang
et al., 2021; Liu et al., 2022a) were also based on RNNs.
To improve training speed and enjoy parallel computation,
plenty of works (Wu et al., 2019; 2020; Li & Zhu, 2021)
replaced RNNs with dilated causal convolution.
A fundamental problem for using GNNs in traffic model-
ing is how to establish a graph structure. The mainstream
approach to define such structures is using either a prede-
fined and sparse matrix constructed from the road network
distances between sensors (Yu et al., 2018; Li et al., 2018;
Song et al., 2020), or an adaptive and dense matrix that
records the pairwise relationships between nodes (Wu et al.,
2019; Bai et al., 2020; Han et al., 2021; Choi et al., 2022).
However, researchers have noted that the predefined matrix
is heuristic and does not reflect the genuine dependencies
between nodes, which degrades model performance (Wu
et al., 2019; Bai et al., 2020). Models applying the adaptive
matrix generally achieve superior performance. Though
successful, the adaptive matrix discards the sparsity of the
graph and incurs a quadratic computational cost, making it
hard to deploy for latency-constrained or large-scale traffic
applications. Other methods that use attention mechanisms
for spatial learning (Zheng et al., 2020a) also suffer from
quadratic time complexity. In this study, we propose SimST
to alleviate the inefficiency issue by eliminating the ineffi-
cient GNN component in the model.
3. Preliminary
Traffic Forecasting
Let
G = (V, E)
represent a directed
sensor graph with
|V|
nodes and
|E|
edges, and
X
T
∈
R
|V|×T ×F
denote the features of all nodes from time step 1
to
T
, where
F
is the feature dimension. The features usu-
ally consist of a target attribute (e.g., traffic speed) and other
auxiliary information, such as time of day (Wu et al., 2019).
Following common settings (Li et al., 2018; Wu et al., 2019),
a weighted adjacency matrix
A ∈ R
|V|×|V|
is applied to de-
scribe the graph topology, where
A
ij
= exp(−
dist(v
i
,v
j
)
2
s
2
)
if
dist(v
i
, v
j
) 6 r
else
A
ij
= 0
,
dist(v
i
, v
j
)
denotes the
road network distance between sensors
v
i
and
v
j
,
s
is the
standard deviation of distances, and
r
is a threshold for spar-
sity (Shuman et al., 2013). The non-zero entries in
A
form
the set of edges in E.
In traffic forecasting, we aim to learn a neural network
Θ
to predict the target attribute in future
T
f
steps based on
T
h
historical observations over the sensor graph:
G, X
T
h
Θ
−→
ˆ
Y
T
f
(1)
where
X
T
h
∈ R
|V|×T
h
×F
indicates the observations and
ˆ
Y
T
f
∈ R
|V|×T
f
×1
is the predictions. A prediction loss, e.g.,
评论