Spatial-Temporal Hypergraph Neural Network for Traffic Forecasting
Traffic forecasting, which benefits from mobile Internet development and
position technologies, plays a critical role in Intelligent Transportation
Systems. It helps to implement rich and varied transportation applications and
bring convenient transportation services to people based on collected traffic
data. Most existing methods usually leverage graph-based deep learning networks
to model the complex road network for traffic forecasting shallowly. Despite
their effectiveness, these methods are generally limited in fully capturing
high-order spatial dependencies caused by road network topology and high-order
temporal dependencies caused by traffic dynamics. To tackle the above issues,
we focus on the essence of traffic system and propose STHODE: Spatio-Temporal
Hypergraph Neural Ordinary Differential Equation Network, which combines road
network topology and traffic dynamics to capture high-order spatio-temporal
dependencies in traffic data. Technically, STHODE consists of a spatial module
and a temporal module. On the one hand, we construct a spatial hypergraph and
leverage an adaptive MixHop hypergraph ODE network to capture high-order
spatial dependencies. On the other hand, we utilize a temporal hypergraph and
employ a hyperedge evolving ODE network to capture high-order temporal
dependencies. Finally, we aggregate the outputs of stacked STHODE layers to
mutually enhance the prediction performance. Extensive experiments conducted on
four real-world traffic datasets demonstrate the superior performance of our
proposed model compared to various baselines.
Chengzhi Yao, Zhi Li, Junbo Wang
# Spatio-Temporal Hypergraph Neural ODE Network for Traffic Forecasting

###### Abstract

Traffic forecasting, which benefits from mobile Internet development and position technologies, plays a critical role in Intelligent Transportation Systems. It helps to implement rich and varied transportation applications and bring convenient transportation services to people based on collected traffic data. Most existing methods usually leverage graph-based deep learning networks to model the complex road network for traffic forecasting shallowly. Despite their effectiveness, these methods are generally limited in fully capturing high-order spatial dependencies caused by road network topology and high-order temporal dependencies caused by traffic dynamics. To tackle the above issues, we focus on the essence of traffic system and propose STHODE: Spatio-Temporal Hypergraph Neural Ordinary Differential Equation Network, which combines road network topology and traffic dynamics to capture high-order spatio-temporal dependencies in traffic data. Technically, STHODE consists of a spatial module and a temporal module. On the one hand, we construct a spatial hypergraph and leverage an adaptive MixHop hypergraph ODE network to capture high-order spatial dependencies. On the other hand, we utilize a temporal hypergraph and employ a hyperedge evolving ODE network to capture high-order temporal dependencies. Finally, we aggregate the outputs of stacked STHODE layers to mutually enhance the prediction performance. Extensive experiments conducted on four real-world traffic datasets demonstrate the superior performance of our proposed model compared to various baselines.

 hypergraph convolution, neural ODE, spatio-temporal forecasting

## I Introduction

Traffic forecasting has raised intensive attention with the increasing spatio-temporal data collected by entities like governments and transportation companies, which contributes to convenient transportation services, including order dispatching, route planning, and ride sharing.

Numerous efforts have been made to achieve encouraging accuracy in traffic forecasting by addressing spatio-temporal dependencies within data originating from road network topology and traffic dynamics. Traditionally, early works viewed traffic forecasting as a time series problem and addressed it via statistical and machine learning methods [1, 2]. However, these methods overlooked spatial dependencies, leading to less-than-ideal performance. Recently, graph neural networks(GNNs) and their variants [3, 4, 5, 6, 7, 8, 9] have dominated this field, arising from their remarkable ability to capture correlations among nodes. Prominent approaches, exemplified by STGCN-based methods [4, 5, 6, 7, 8, 9] characterize the road network topology by representing the pair-wise relationships among nodes using simple graphs and model the traffic dynamics as diffusion progress [4].

Although the aforementioned approaches have shown encouraging performance, we argue that the simple graph squeezes the complex spatio-temporal dependencies into pair-wise ones, which leads to incomplete modeling of the road network topology and traffic dynamics. Technically, most GNNs-based works typically adopt graph convolution networks over a simple geographic graph constructed with spatial correlations and model the traffic dynamics as a discrete diffusion process. They face limitations in two critical aspects: i) The use of simple pair-wise graphs does not adequately model the complex road network topology. ii) Discrete GCNs are inadequate to model traffic dynamics for effectively capturing the evolution of the traffic system.

To address these issues, we propose Spatio-Temporal Hypergraph Ordinary Differential Equation Network(STHODE) for traffic forecasting. The key idea of STHODE is to leverage hypergraph structure to represent complex spatial correlations and ordinary differential equations (ODEs) to model the evolution of dynamical systems. To achieve this goal effectively, we introduce two modules, i.e. spatial module and temporal module. In the spatial module, we construct a spatial hypergraph and employ an adaptive MixHop hypergraph ODE layer to capture high-order spatial dependencies caused by the road network topology. In the temporal module, we construct a temporal hypergraph and leverage a hyperedge evolving ODE layer to capture high-order temporal dependencies caused by the traffic dynamics. Furthermore, we aggregate the outputs of the stacked STHODE layers, leveraging their mutual interactions to improve prediction performance within a supervised learning framework. We validate the effectiveness of STHODE on four real-world datasets and the extensive experimental results demonstrate that our STHODE model outperforms various baseline models. In summary, the main contributions of this paper are as follows:

* We propose a spatial module and a temporal module to model the road network topology and traffic dynamics respectively. We construct two types of hypergraphs to enhance the capture of spatio-temporal dependencies.
* We present Spatio-Temporal Hypergraph Ordinary Differential Equation Network(STHODE) for traffic forecasting, which addresses the limitations of GNNs-based approaches in modeling road network topology and traffic
dynamics. Our proposed method provides improved interpretability compared to existing approaches for traffic forecasting.
* We evaluate STHODE on four real-world datasets through extensive experiments, demonstrating its superiority in traffic forecasting compared to various baselines.

## II Related Works

In this section, we briefly review the related works in three aspects: Traffic Forecasting, Hypergraph Learning, and Neural Ordinary Differential Equations.

**Traffic Forecasting.** Spatio-Temporal Graph Neural Networks(STGNNs) [4, 5, 6, 7, 8, 9] are the most representative approaches to capture spatio-temporal dependencies in traffic forecasting. Most of these methods only consider the pair-wise relationship between traffic sensors and model the traffic dynamics as diffusion progress. Only D2STGNN [5] introduces a framework that separates diffusion and the inherent traffic signal, enabling the modeling of traffic dynamics beyond the diffusion process. However, all of them fail to fully model road network topology due to the limitation of simple graphs.

**Hypergraph learning.** In many real-world problems, relationships among objects are more complex than pair-wise. Hypergraph learning has been employed in various domains to model high-order correlations among data. [10] first introduced hypergraph learning which conducts transductive learning as a propagation process on the hypergraph in the classification task. With the development of deep learning, HGNN [11] introduced the hypergraph deep learning neural network for data representation learning. Recently, Hypergraph learning has attracted more attention in spatio-temporal prediction. STHSL [12] unifies hypergraph dependency modeling with self-supervision learning for spatio-temporal crime representations. All these works highlight the remarkable capability of hypergraph learning in capturing high-order correlations among data.

**Neural Ordinary Differential Equations.** Neural ODE [13] introduces a novel paradigm for extending discrete deep neural networks to continuous scenarios. CGNN [14] extends ODE to graph-structured data. Due to the superior performance and flexible capability, graph ODEs have gained widespread adoption in various research fields, such as traffic forecasting [8], recommendation, and dynamic interacting systems. STGODE [8] utilizes graph ODE to address the over-smoothing problem and effectively model long-range spatio-temporal dependencies in traffic forecasting. However, the limitations of STGODE lie in pair-wise modeling, so we propose a novel approach that leverages hypergraph ODE for a more comprehensive representation.

## III Preliminaries

### _Hypergraph Learning_

**Notation 1:(Hypergraph)** Let \(G=(V,\xi,H,W,E)\) denotes a hypergraph, with the node set \(V=\{v_{1},\dots,v_{N}\}\) and hyperedge set \(\xi=\{e_{1},\dots,e_{M}\}\). The incidence matrix \(H\in\mathbb{R}^{N\times M}\) depicts the connections between nodes and hyperedges, with entries defined as:

\[H_{ij}=\begin{cases}1,&\text{if }v_{i}\in e_{j}\\ 0,&\text{otherwise}\end{cases}. \tag{1}\]

Each hyperedge is assigned with a positive weight \(W(e)\) and a positive embedding \(E(e)\), with all the weights and embeddings stored in \(W=\text{diag}(w_{1},\dots,w_{M})\) and \(E\in\mathbb{R}^{N\times M}\) respectively.

**Notation 2:(Hypergraph Convolution)** Convolution operator on the hypergraph \(G\) is defined based on two assumptions [15]: 1) More propagation should occur between nodes connected by a hyperedge. 2) Hyperedges with larger weights should have a higher impact on propagation. The hypergraph convolution layer is defined as:

\[X_{i}^{l+1}=\sigma(\sum_{j=1}^{N}\sum_{m=1}^{M}H_{im}H_{jm}W_{mm}X_{j}^{l} \mathbf{P}), \tag{2}\]

where \(X_{i}^{l}\) denotes the embedding of node \(v_{i}\) in the \(l\)-th layer.\(\sigma\) denotes an element-wise activation function. \(\mathbf{P}\in\mathbb{R}^{F^{(l)}\times F^{(l+1)}}\) denotes the transform matrix between \(l\)-th layer and \((l+1)\)-th layer.

### _Neural Ordinary Differential Equations_

We can model the evolution of states in a dynamical system using a first-order ODE, i.e. \(z(t):=\frac{dz(t)}{dt}=f(z(t),t)\), where the ODE function \(f\) can be parameterized by a neural network. Given the ODE function \(f\), the whole trajectory of the object is determined by the initial state \(z_{0}\) as follows:

\[\mathbf{z}(t)=\mathbf{z}_{0}+\int_{0}^{T}\frac{dz}{ds}ds=\mathbf{z}_{0}+\int_ {0}^{T}f(\mathbf{z}(s),s)ds. \tag{3}\]

And we can rely on various numerical methods to solve the integral problem, such as Euler and Runge-Kutta.

### _Problem Definition_

**Notation 3:(Traffic Sensor)** A traffic sensor is a sensor deployed in the road network, which samples traffic signals \(\mathbf{X}\) such as flow and vehicle speed.

**Notation 4:(Road Network)** A road network is represented as a hypergraph \(G=(V,\xi,H)\), consisting of different road segments that vary in structure and functionality. The node set \(V\) corresponds to traffic sensors, and the hyperedge set \(\xi\) corresponds to road segments. The incidence matrix \(H\) stores the connection information between traffic sensors and road segments.

**Problem Statement.** Given the historical traffic signals \(\mathbf{X}^{t-T+1:t}=[X_{t-T+1},\dots,X_{t}]\in\mathbb{R}^{T\times N\times F}\) for a sequence of \(T\) time steps, we aim to learn a mapping function \(f\) that predicts the future traffic signals \(\mathbf{X}^{t+1:t+S}=[X_{t+1},\dots,X_{t+S}]\in\mathbb{R}^{S\times N\times F}\) for the next sequence of \(S\) time steps.
## IV Methodology

The overall framework of STHODE is shown in Figure 1. In the following subsections, we introduce how we capture high-order spatial dependencies with the spatial module and high-order temporal dependencies with the temporal module. Furthermore, we aggregate the outputs of the stacked STH-ODE layers, leveraging their mutual interactions to improve prediction performance within a supervised learning framework.

### _The Spatial Module_

**1) Construction of Spatial Hypergraph**: We define \(G_{sp}=(V,\xi,H,W,E)\) as a spatial hypergraph, with \(V\) representing traffic sensors and \(\xi\) denoting hyperedges set. The binary incidence matrix \(H\) encodes node-hyperedge relationships. To model topological influences, we use diagonal matrix \(W\) for road segment types and combine it with hyperedge embedding matrix \(E\) to represent road segment impacts on traffic sensors.

In practice, we often lack complete prior knowledge such as road segment information. Following STGCN [16], we construct a graph adjacency matrix \(A^{ng}\) based on node connectivity and distance. Hyperedges are formed using a centroid-based approach from \(A^{ng}\), including the centroid and its first and second-order neighbors within radius \(R\). The number of nodes in each hyperedge determines its weight \(W(e)\). Further, we propose an adaptive hypergraph incidence matrix \(\tilde{H}\) learned end-to-end, enabling adaptively modeling road network topology.

Given nodes embedding vector and hyperedges embedding vector with learnable parameters \(E_{n}\in\mathbb{R}^{N}\) and \(E_{m}\in\mathbb{R}^{M}\), the adaptive hypergraph incidence matrix \(\tilde{H}\) is defined as:

\[\tilde{H}=H\odot\text{Softmax}(E_{n}\otimes E_{m}^{T}). \tag{4}\]

where \(\odot\) denotes the Hadamard product and \(\otimes\) denotes the Kronecker product. The construction of spatial hypergraph \(G_{sp}\) addresses the limitations of incomplete prior knowledge and enables adaptive modeling of road network topology.

**2) Adaptive MixHop Hypergraph ODE**: Technically, given the spatial hypergraph \(G_{sp}\), we have the normalized adaptive hypergraph matrix \(\tilde{A}\) as follows:

\[\tilde{A}=\tilde{D}^{-\frac{1}{2}}\tilde{H}\tilde{B}^{-1}W\tilde{H}\tilde{D}^{ -\frac{1}{2}}, \tag{5}\]

where \(\tilde{D}\in\mathrm{R}^{N\times N}\) and \(\tilde{B}\in\mathrm{R}^{M\times M}\) are both diagonal matrices. The diagonal entry \(d(v)=\sum_{e\in\xi}W(e)H(v,e)\) denotes the degree of node \(v\) and \(b(e)=\sum_{v\in V}H(v,e)\) denote the degree of the hyperedge \(e\).

Inspired by MixHop GCNs [17], we propose the adaptive MixHop hypergraph convolution layers to capture higher-order information locally and globally following the scheme:

\[\mathbf{X}_{n+1}=\sum_{k=1}^{K}\tilde{A}_{k}\times_{1}\mathbf{X}_{n}\times_{2 }U_{k}\times_{3}Q_{k}+\mathbf{X}_{0}. \tag{6}\]

In the given equation, \(\mathbf{X}_{n}\in\mathrm{N}\times\mathrm{T}\times\mathrm{F}\) represents hidden representation of nodes in the \(n\)-th layer. The hyperparameter \(K\) is the depth of propagation and \(\tilde{A}_{k}\) denotes the matrix \(\tilde{A}\) multiplied by itself \(k\) times. \(U_{k}\in\mathrm{R}^{T\times T}\) and \(Q_{k}\in\mathrm{R}^{F\times F}\) are both trainable transform matrices. The restart distribution [14]\(\mathbf{X}_{0}\) denotes the initial input of the propagation layer, which mitigates the issue of information loss and over-smoothing problem.

However, in the traffic dynamic system, traffic signals and road network status evolve with continuous-time flow. Extending the discrete propagation scheme to a continuous form, we first let \(\mathbf{X}_{n}=\sum_{k=1}^{K}\mathbf{X}_{k,n}\), where

\[\mathbf{X}_{k,n+1}=\tilde{A}_{k}\times_{1}\mathbf{X}_{k,n}\times_{2}U_{k} \times_{3}Q_{k}+\frac{1}{K}\mathbf{X}_{0}, \tag{7}\]

by expanding Eq. 7 we can expand Eq. 6 as:

\[\begin{split}\mathbf{X}_{n}&=\frac{K-1}{K}\sum_{k=1 }^{K}\tilde{A}_{k}^{n}\times_{1}\mathbf{X}_{0}\times_{2}U_{k}^{n}\times_{3}Q_{ k}^{n}\\ &+\frac{1}{K}\sum_{k=1}^{K}\sum_{i=0}^{n}\tilde{A}_{k}^{i}\times_ {1}\mathbf{X}_{0}\times_{2}U_{k}^{i}\times_{3}Q_{k}^{i}\end{split} \tag{8}\]

Fig. 1: The Framework of STHODE.
We replace the discrete \(n\) with a continuous variable \(t\) to extend Eq. 8 to continuous form, which can be viewed as a Riemann sum from \(0\) to \(n\) on variable \(i\). In practice, we clamp entries of \(A_{k}\),\(U_{k}\) and \(Q_{k}\) in the interval \([0,1)\) to simplify Eq. 8. In this way, As \(n\) goes to \(\infty\), we have the integral formulation:

\[\mathbf{X}(t)=\frac{1}{K}\sum_{k=1}^{K}\int_{0}^{t+1}\tilde{A}_{k}^{s}\times_{ 1}\mathbf{X}_{0}\times_{2}U_{k}^{s}\times_{3}Q_{k}^{s}ds. \tag{9}\]

**Proposition 1**: _The first-order derivative of \(X(t)\) in Eq. 9 can be formulated as follows:_

\[\frac{d\mathbf{X}(t)}{dt}= \mathbf{X}_{0}+\frac{1}{K}\sum_{k=1}^{K}(ln(\tilde{A}_{k})\times _{1}\mathbf{X}(t)+ln(U_{k})\times_{2}\mathbf{X}(t)\] \[+ln(Q_{k})\times_{3}\mathbf{X}(t)) \tag{10}\]

Proof.: We directly calculate the first derivative of \(\mathbf{X}(t)\) as:

\[\frac{d\mathbf{X}(t)}{dt}=\frac{1}{K}\sum_{k=1}^{K}\tilde{A}_{k}^{t+1}\times_{ 1}\mathbf{X}_{0}\times_{2}U_{k}^{t+1}\times_{3}Q_{k}^{t+1} \tag{11}\]

To reduce computation cost, we consider the second derivative of \(\mathbf{X}(t)\) and integrate over \(t\) on both sides of the second-order differential equation. We get:

\[\frac{d\mathbf{X}(t)}{dt} =\frac{1}{K}\sum_{k=1}^{K}(ln(\tilde{A}_{k})\times_{1}\mathbf{X}( t)+ln(U_{k})\times_{2}\mathbf{X}(t) \tag{12}\] \[+ln(Q_{k})\times_{3}\mathbf{X}(t))+\textit{const}.\]

To solve the const, we combine Eq. 9, Eq. 11 and Eq. 12, and let \(t\rightarrow-1\). We get:

\[\begin{split} const&=\mathbf{X}_{0}-[ln(\tilde{A}_{k}) \times_{1}\mathbf{X}(-1)+ln(U_{k})\\ &\times_{2}\mathbf{X}(-1)+ln(Q_{k})\times_{3}\mathbf{X}(-1)]= \mathbf{X}_{0}.\end{split} \tag{13}\]

The formulation of Eq. 10 can be further solved by an ODE solver such as the Runge-Kutta method or Euler method:

\[\mathbf{X}(t)=\text{ODESolver}(\frac{d\mathbf{X}(t)}{dt},\mathbf{X}_{0},t), \tag{14}\]

which allows us to build it just as a block within the entire neural network.

### _The Temporal Module_

**1) Construction of Temporal Hypergraph**: We define \(G_{te}=(V,\xi_{te},H_{te})\) as a \(r\)-uniform temporal hypergraph, where \(V\) represents traffic sensors, and each hyperedge contains \(r\) nodes with strong similarity. The binary incidence matrix \(H_{te}\) encodes node-hyperedge relationships.

To measure the similarity between time series \(X_{i}=(x_{1},\dots,x_{T})\) and \(Y_{j}=(y_{1},\dots,y_{S})\) associated with nodes \(v_{i}\) and \(v_{j}\) respectively, we can use the Dynamic Time Warping (DTW) algorithm. In our implementation, we utilize the entire length of the training data for time series \(X_{i}\) and \(Y_{j}\) to measure the similarity between node \(v_{i}\) and \(v_{j}\).

**2) Hyperedge Evolving ODE**: Given that each hyperedge in the temporal hypergraph comprises nodes with the most similar timing patterns, it is intuitive to prioritize information propagation among these interconnected nodes. To achieve this efficiently, we employ hypergraph convolution as our information propagation scheme:

\[\mathbf{X}_{n+1}=A_{te}\times_{1}\mathbf{X}_{n}\times_{2}U\times_{3}Q+ \mathbf{X}_{0}, \tag{15}\]

where \(A_{te}=D_{te}^{-1/2}H_{te}WB_{te}^{-1}H_{te}^{T}D_{te}^{-1/2}\) denotes the temporal hypergraph transform matrix, \(U\in\mathds{R}^{T\times T}\) and \(Q\in\mathds{R}^{F\times F}\) are two trainable weight matrix. Similar to Eq. 9, we can extend Eq. 15 to continuous form and we have the integral formulation:

\[\mathbf{X}(t)=\int_{0}^{t+1}A_{te}^{s}\times_{1}\mathbf{X}_{0}\times_{2}U^{s} \times_{3}Q^{s}ds. \tag{16}\]

Based on Proposition 1, we can derive the following corollary:

**Corollary 1**: _The first-order derivative of X(t) in Eq. 16 can be formulated as following ODE:_

\[\begin{split}\frac{d\mathbf{X}(t)}{dt}=&\mathbf{X} _{0}+ln(A_{te})\times_{1}\mathbf{X}(t)+ln(U)\times_{2}\mathbf{X}(t)\\ &+ln(Q)\times_{3}\mathbf{X}(t))\end{split} \tag{17}\]

The formulation of Eq. 17 can be solved using a designated ODE solver in the form of Eq. 14.

### _Others_

Inspired by Graph WaveNet [9], we use a 1-D dilated causal temporal convolution as the temporal convolution layer (TCN), which enlarges the receptive field and enables parallel computation, and addresses the gradient explosion problem. The dilated causal convolution operation is denoted as:

\[\mathbf{X}*\mathbf{f}_{1\times k}(t)=\sum_{s=0}^{k-1}\mathbf{f}_{1\times k}(s) \mathbf{X}(t-d\times s), \tag{18}\]

where \(\mathbf{X}\in\mathbb{R}^{T\times F}\) is the input of TCN, and \(\mathbf{f}_{1\times k}\in\mathbb{R}^{k}\) is the convolution filter, and \(d\) denotes the dilation factor.

Given the ground truth traffic signal \(Y\in(0,1)\), the objective function of traffic forecasting is evaluated via Huber loss [18] defined as:

\[L(Y,\hat{Y})=\begin{cases}\frac{1}{2}(Y-\hat{Y})^{2}&,\|Y-\hat{Y}\|\leq \delta\\ \delta\|Y-\hat{Y}\|-\frac{1}{2}\delta&,\text{otherwise}\end{cases} \tag{19}\]

where \(\delta\) is a hyperparameter that controls the sensitivity to outliers. Huber loss combines the best properties of both quadratic and linear loss functions, allowing it to handle both small and large errors appropriately. The output of the stacked STHODE layers is aggregated using a max-pooling layer, which selectively combines the information from different blocks. The aggregated features are then passed into a two-layer MLP, which further transforms the features into the final predictions. This overall architecture enables the model to effectively capture both spatio-temporal dependencies.
## V Experiments

This section introduces the experiments on four real-world highway datasets to investigate the effectiveness and robustness of the proposed STHODE. The following research questions are answered:

**RQ1:** How does STHODE perform in traffic forecasting compared to the baseline models?

**RQ2:** How does each component of the model contribute to the performance of our solutions?

**RQ3:** How do different hyper-parameters influence the model performance?

### _Experimental Setting_

**Datasets:** All the datasets are collected by the Caltrans Performance Measurement System(PeMS) in real-time 30 seconds, including four traffic flow datasets sampled from different districts or different periods. Following [4], we set the sample rate to 5 minutes and apply Z-Score normalization to inputs.

**Evaluation Metrics:** Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and Mean Absolute Percentage Error (MAPE).

**Baselines for Comparison:** Various baselines are compared with the proposed STHODE: TCN [19], STGCN [16], DCRNN [4], Graph WaveNet [9], ASTGCN [20], STSGCN [7], STFGNN [12], STGDE [8].

**Parameters Settings:** All experiments are implemented by Pytorch 2.0.0 on NVIDIA GeForce RTX 3090 GPU. We split all datasets with a ratio of 6:2:2 into training sets, validation sets, and test sets. One hour of historical data is used to predict traffic conditions in the next hour. We use Adam as our optimizer and set the learning rate to 0.001. The batch size is 16 and the training epoch is 200. The temporal convolution block has hidden dimensions of 64,32,64.

### _Performance Comparison(RQ1)_

Table I displays the performance comparison results of our STHODE method with various baseline approaches for traffic forecasting. Overall, our proposed STHODE achieves the most competitive performance on the three metrics and significantly surpasses all baselines on all the datasets. The improvement in performance can be attributed to some key factors: 1) The spatial module enables STHODE to effectively model the road network topology, surpassing graph-based methods; 2) The temporal module enables STHODE to fully extract high-order temporal dependencies, further improving prediction accuracy. Leveraging the hypergraph structure enhances the representation of complex relationships between traffic sensors and road segments, resulting in superior prediction accuracy.

### _Model Ablation and Effectiveness Analyses(RQ2)_

To analyze STHODE's components, we conducted ablation experiments on PeMS04: _w/o spatial_: Removes the spatial hypergraph module. _w/o temporal_: Removes the temporal hypergraph module. _w/o ode_: Replaces the ODE solver with a hypergraph convolution layer. _w/o adaptive_: Removes the adaptive hypergraph matrix from spatial hypergraph construction.

Results in Figure 2 indicate: STHODE consistently outperforms all variants, emphasizing the importance of its components. Removing ODE layers (_w/o ode_) reduces performance, which highlights their role in capturing data dynamics. Omitting either the spatial (_w/o spatial_) or temporal module (_w/o temporal_) results in performance decline, which is the significance of road network influences. _w/o adaptive_ highlights the importance of the adaptive hyperedge matrix in capturing data relationships and correlations.

### _Hyperparameter Studies(RQ3)_

In Figure 3, we present results from experiments on the PeMS04 dataset where we varied hyperparameters within the spatial and temporal hypergraph modules. Our observations are as follows:

Sensitivity of Spatial Module: Increasing \(K\) from 1 to 3 generally improves performance. Notably, when \(K=1\)

Fig. 2: Ablation experiments of STHODE on PeMS04 dataset.
the MixHop scheme reduces to the original hypergraph convolution scheme, confirming the effectiveness of MixHop. However, further increasing depth may lead to diminishing returns or overfitting.

Sensitivity of Temporal Module: Increasing \(r\) from 2 to 7 generally improves performance, indicating effective capture of high-order temporal dependencies. However, further increasing \(r\) may introduce noise or irrelevant information, leading to decreased performance.

### _Case Study_

A case study conducted on node 27 and node 35 from the PeMS04 dataset offers a detailed analysis of the performance of STHODE. In Figure 4(a), during the heavy traffic flow from 10:00 to 19:00, STHODE consistently outperforms STODE. In Figure 4(b), around 19:00, an abrupt change occurs and STHODE quickly adapts while maintaining high prediction accuracy. The ability to model the road network topology helps STHODE capture the correlation among different road segments, leading to improved prediction accuracy.

## VI Conclusion

This paper introduces Spatio-Temporal Hypergraph ODE (STHODE). It models the road network topology and traffic dynamics to capture high-order spatio-temporal dependencies for short-term traffic predictions. STHODE utilizes two ODE-based modules that encode a spatial hypergraph and a temporal hypergraph working in parallel to capture high-order spatio-temporal dependencies respectively. Extensive experiments prove the effectiveness of STHODE over various existing methods.
