XTraffic: A Dataset Where Traffic Meets Incidents with Explainability and More

## Abstract

Abstract Long-separated research has been conducted on two highly correlated tracks: traffic and incidents. Traffic track witnesses complicating deep learning models, e.g., to push the prediction a few percent more accurate, and the incident track only studies the incidents alone, e.g., to infer the incident risk. We, for the first time, spatiotemporally aligned the two tracks in a large-scale region (16,972 traffic nodes) over the whole year of 2023: our XTraffic dataset includes traffic , i.e., time-series indexes on traffic flow, lane occupancy, and average vehicle speed, and incidents , whose records are spatiotemporally-aligned with traffic data, with seven different incident classes. Additionally, each node includes detailed physical and policy-level meta-attributes of lanes. Our data can revolutionalize traditional traffic-related tasks towards higher interpretability and practice: instead of traditional prediction or classification tasks, we conduct: (1) post-incident traffic forecasting to quantify the impact of different incidents on traffic indexes; (2) incident classification using traffic indexes to determine the incidents types for precautions measures; (3) global causal analysis among the traffic indexes, meta-attributes, and incidents to give high-level guidance of the interrelations of various factors; (4) local causal analysis within road nodes to examine how different incidents affect the road segments’ relations. The dataset is available at http://xaitraffic.github.io .

## 1 Introduction

In today’s era of deep learning, a technological foundation has been laid for intelligent transportation systems [, , ]. Primarily, conducting myriad traffic analysis relies on two types of data: traffic and incident data. Traffic data encompasses the traffic state-related time-series, e.g., volume, speed, and occupancy rate on the road network over time. This continuous stream of data is essential for forecasting the future volume, understanding peak usage times, and optimizing traffic signals and routes [, ]. Real-time traffic data allows for dynamic adjustments to be made, enhancing the efficiency of traffic flow and reducing overall travel times. On the other hand, incident data includes information about traffic accidents, road closures, and unexpected events that can significantly affect traffic flow. This data helps in understanding the impact of such incidents on traffic congestion and travel time, facilitating more accurate predictions and enabling timely responses from traffic management systems [, ]. By analyzing patterns and frequencies of incidents, predictive models can also be developed to foresee potential hotspots and prevent future occurrences.

Figure: Figure 1: Our XTraffic contains (a) traffic data with lane-level meta features, (b) incident data, and (c) their essential yet neglected relations
Refer to caption: x1.png

However, current research has been conducting the two tracks of traffic and incident separately, ignoring the inseparable relation of traffic and incident. For example, abundant works [, , , ]
have been using various traffic-only datasets such as PEMS [], META-LA [], LargeST [] for traffic forecasting. They achieved relatively high accuracy because, under normal circumstances, traffic flow generally follows a strong regular temporal pattern. However, they ignore that unexpected incidents will cause abnormal and irregular patterns in traffic flows. On the contrary, in the incident-only data [, ], studies have been done on offering descriptive analysis on the incident patterns [, ], predicting the accident risk [], time-to-accident [], or next incident [], yet there is very limited research using the traffic time-series to identify and explain the incidents and their causal relations with the traffic systems and roads.
Moreover, existing open-source accident datasets [, , , ] are quite constrained: they only include features related to accidents and lack traffic data for corresponding areas. Additionally, the data granularity is large, and there is no specific location information, such as coordinates or absolute postmile (Abs PM) markers. These factors make conducting related research particularly challenging. Some traffic studies that incorporate incident data use datasets that have not been aggregated or made open source, making it difficult to use them as a standard for evaluating new methods. Additionally, due to the issue of large granularity, it’s impossible to analyze the specific impact of accidents on precise road segments. Instead, incident data can only be used to predict general volume within a certain area.

Contributions. To address the research gaps, we introduce the XTraffic dataset. This dataset not only includes three distinct types of traffic time series data for the entire year of 2023 (in Fig. 1(a)), but also encompasses comprehensive incident data (in Fig. 1(b)) and meta-features of roads closely related to traffic flow. The contributions of this dataset can be summarized as follows: (1) We provide a comprehensive collection of multi-type incident records with 476,766 samples, enabling the training and evaluation of traffic forecasting models across various scenarios/incidents. This also supports tasks such as incident discovery and traffic anomaly detection by providing ground truth data. (2) We offer a rich collection of physical and policy-level road meta-features. These features are instrumental for causal analysis of traffic and support the increasingly popular field of interpretable deep learning models. By incorporating these detailed attributes, researchers can delve deeper into the underlying mechanisms that influence traffic behaviors and model predictions. As shown in Fig. 1(c), our XTraffic helps not only Incident $\to$ Traffic: e.g., to analyze how incidents affect the traffic states (with our post-incident traffic forecasting in Sec. 4.2) and traffic node relations (local causal analysis in Sec. 4.5), but also Traffic $\to$ Incident: e.g., to identify the incidents (incident classification in Sec. 4.3) and explain the incident with other factors from the system (global causal analysis in Sec. 4.4).

To our knowledge, our XTraffic is the most recent in terms of the collection period and contains the largest number of sensors, covering three distinct types of traffic volume. This ensures the timeliness of traffic research, providing a robust foundation for studies aiming to capture and explain traffic dynamics, causation, and interrelations. XTraffic serves as a rigid testing bed and empirical support to justify model effectiveness and interoperability in deep learning and traffic community.

## 2 Related Work

### 2.1 Preliminary of Four Intended Tasks

Traffic Forecasting is to predict traffic indexes at nodes within a road network based on historical data collected by sensors at each node. Consider a traffic road network represented as a graph $G=(V,E)$, where $V$ denotes the set of $N$ traffic nodes, with $|V|=N$, and $E$ represents the set of undirected edges. An edge $E_{ij}=1$ indicates a physical connection between nodes $i$ and $j$ in the road network; otherwise, $E_{ij}=0$. Traffic volume data is recorded by sensors in evenly spaced time intervals and can be represented as a sequence of matrices $(\mathbf{X}^{1},\mathbf{X}^{2},...,\mathbf{X}^{T})\in{\mathbb{R}^{N\times T}}$, where $\mathbf{X}^{t}$ is the matrix of volume signals $({x_{1}^{t},x_{2}^{t},...,x_{N}^{t}})$ at time slot $t$ for all $N$ nodes.

The goal in traffic flow forecasting is to devise a function $\mathcal{F}_{1}$ that uses the observed traffic data from $T_{1}$ time slots to predict the traffic volumes for the subsequent $T_{2}$ time slots: $(\mathbf{X}^{t-T_{1}+1},...,\mathbf{X}^{t})\overset{\mathcal{F}_{1}}{
\rightarrow}(\hat{\mathbf{X}}^{t+1},...,\hat{\mathbf{X}}^{t+T_{2}}),$
where $\hat{\mathbf{X}}^{t+1}$ represents the prediction at time $t+1$, and a general loss function is defined as:
$\min\frac{1}{T_{2}}\sum_{i=1}^{T_{2}}\mathcal{L}_{1}(\hat{\mathbf{X}}^{i},
\mathbf{X}^{i}).$

Incident Classification is to identify traffic incidents using traffic indexes. Since traffic sensors are not always available at the site of an incident, for brevity, we associate the parameters in the nearest single sensor to classify an incident, rather than aggregating data from multiple neighboring sensors. For the $i$-th paired sample ($\mathbf{X}_{i}$, $y_{i}$) in the dataset $\mathcal{D}$, $\mathbf{X}^{c}_{i}\in\mathbb{R}^{C\times w}$ is the input and $y_{i}$ represents its corresponding label, where $C$ denotes the number of multivariate feature channels (e.g., speed and flow) and $w$ indicates the time window at the post-incident timing $t$. There is $\mathbf{X}^{c}_{i}=\{\mathbf{x}^{t},\mathbf{x}^{t+1},...,\mathbf{x}^{t+w-1}\}$ and the $j$-th entity $\mathbf{x}^{t+j}\in\mathbb{R}^{C}$. The classification task is: $\hat{y}_{i}=\mathcal{F}_{2}(\mathbf{X}^{c}_{i};\Theta),$
where $\hat{y}_{i}$ is the predicted result, $\mathcal{F}_{2}$ is the classifier, and $\Theta$ is trainable parameters.
The overall objective is to minimize the classification loss $\mathcal{L}_{2}$ (e.g., cross-entropy) on $\mathcal{D}$:
$\min_{\Theta}\frac{1}{|\mathcal{D}|}\sum_{i=1}^{|\mathcal{D}|}\mathcal{L}_{2}(
\mathcal{F}_{2}(\mathbf{X}^{c}_{i};\Theta),y_{i})$.

Causal Analysis and Directed Acyclic Graph (DAG) In causal analysis, the primary objective is to elucidate the causal relationship, which is represented in a dynamic acyclic graph (DAG). Within a DAG, each node corresponds to a variable, and each directed edge delineates a causal relationship between two variables. The causal structural model enables the representation of a node’s distribution $w_{i}$ through $w_{i}=f_{i}(w_{pa_{i}},e_{i})$, where $w_{pa_{i}}$ denotes the set of all parents of node $w_{i}$, and $e_{i}$ represents the exogenous noise associated with node $w_{i}$. We consider two subtasks:
(1) Global Causal Analysis for The Whole System: In global causal analysis, we focus on the problem that macro-level phenomena influence each other, such as the impact of weather on accident rates. Therefore, each node within the graph represents distinct variables like weather conditions, traffic accidents, or overall traffic statistics. This approach helps in understanding the broader implications of various environmental and systematic factors on traffic dynamics.
(2) Local Causal Analysis for Road Relations: In local causal analysis, we focus on the temporal dependency structure underlying the complex traffic road network. We aim to find a graph $\mathcal{G}$ where the nodes are the variables representing traffic nodes at different lag-times and the links represent lagged or contemporaneous causal dependencies between traffic nodes. This approach helps in understanding how topologic of the road network affects traffic conditions.

### 2.2 Related Work of Traffic and Incident Analysis

Traffic Forecasting with Incidents Considered.

A large number of works, e.g., STGCN[], STGODE[], DSTAGNN[], are proposed to improve the prediction accuracy based on GNN [] and RNN [] models. However, these works only consider historical traffic for future traffic, yet other critical impacts, e.g., incidents and meta-features are ignored ([, , , ] offer detailed reviews in traffic forecasting).
There are a few works that have considered incidents when predicting, whose main design is incorporating incident-related embedding as auxiliary information into traditional spatiotemporal prediction framework [, , , ]. For example, DIGC-Net [] inputs the type and duration of the incident to predict the affected speed. Yet, the dataset only brings one week of incident data (17-24 Apr 2019) from a small district, being spatiotemporal limited; STCL [] introduced two-month New York City Vehicle incident data as one-hot accident embedding into the prediction of the Taxi and Bike data. Like what we have observed in most works that analyze traffic with incidents [, ], the transport modes of traffic data and that of incident data are NOT seamlessly matched; thus, it will be less convincing to analyze vehicle incidents’ impact on bike traffic (bike lane is separated from vehicle lane) or on taxi traffic (taxi is only a subset mode of the whole vehicle). Our XTraffic is the first and only dataset that is (1) spatially and temporally large-scale, (2) that modes in traffic and incident are seamlessly matched (all vehicles), which guarantees unbiased analysis between the traffic and incident.

Incident Classification.
It is a crucial task in analyzing non-recurrent congestion []. Recently, several studies have utilized traffic flow data for incident classification [, ]. However, these studies often face at least one of the following three challenges:
(1) Small Data Size []: Many studies suffer from limited datasets that fail to capture the diversity and complexity of traffic patterns, affecting model reliability and generalizability. (2) Limited Dimensionality without Traffic Volume Data [, ]: The absence of critical data dimensions, such as traffic volume, restricts the depth and accuracy of incident classification models. (3) Experiments Based on Non-Public Dataset [, ]: Reliance on proprietary datasets impedes the ability of the broader research community to verify, replicate, or enhance the findings, limiting collaborative advancements.

Traffic Causal Analysis.
This task aims to learn the causal structures among different entities in a traffic system. Usually, the causal structures are formulated as Bayesian networks or DAGs [], where a directed edge denotes the causal link. In the traffic domain, given the traffic indexes are time-series and others can be scalers (e.g., static meta-features), a special DAG structure learning based on heterogeneous data is needed [, ]. To learn the global relation of various factors, e.g., traffic flow, meta-attributes, weather, etc., where each DAG node is a factor to be considered, MultiFun-DAG [] views multivariate time-series in traffic as a multi-function and formulate the structure learning as a “self-expression problem”, i.e., $\mathbf{X}=\mathbf{W}\mathbf{X}+\mathbf{Z}$, based on function-to-function regression and the directed acyclic regularization on the coefficients $\mathbf{W}$ [], a DAG is constructed based on $\mathbf{W}$. MM-DAG [] further consider multi-location at the same time. To learn local causal relation among different locations, where each DAG node is a spacial location, DBGCN [] and DCGCN [] combines DAG with GCN, DCGCN further considers the causal links across the time, i.e., node 1 at $t_{1}$ affects the node 2 at $t_{3}$, and the dynamics of DAG changing over time.

## 3 XTraffic Datacube

### 3.1 Comparison with Existing Datasets

Table: Table 1: The comparison of Existing Traffic Dataset and XTraffic. Each row represents the largest subset within the corresponding dataset.

>p[c]1.8cm|p[c]0.8cmp[c]1.0cmp[c]0.7cm|p[c]1.0cmp[c]1.0cmp[c]0.8cmp[c]0.8cmp[c]1.2cm|p[c]0.6cm
Dataset Nodes Edges Slot (Min) Location Context Physics Policy Granules Incdt.
PeMSD7(L) 1,026 14,534 5 $\checkmark$ $\checkmark$ - - Road
METR-LA 207 1,515 5 $\checkmark$ - - - Road -
PEMS-BAY 325 2,369 5 $\checkmark$ - - - Road -
PEMS07 883 865 5 - - - - Road -
CA 8,600 201,363 15 $\checkmark$ $\checkmark$ - - Road -
XTraffic 16,972 870,100 5 $\checkmark$ $\checkmark$ $\checkmark$ $\checkmark$ Lane $\checkmark$

Table: Table 2: The comparison of Incidents Dataset and XTraffic. We are the only ones who combine traffic with incidents.

| Dataset | Incident | Granules | Volume | Speed | Occupancy |
| --- | --- | --- | --- | --- | --- |
| CTC [] | 1 | Point | - | - | - |
| NYC Col [] | 1 | Road | - | - | - |
| NYS Crashes [] | 1 | Point | - | - | - |
| UKA [] | 1 | Point | - | - | - |
| TAP [] | 1 | Road | - | - | - |
| TAA [] | 1 | Road | - | - | - |
| XTraffic | 7 | Point | ✓ | ✓ | ✓ |

Traffic. We introduce the existing four public datasets widely leveraged in traffic forecasting experiments. The PeMSD7(M) and PeMSD7(L) are proposed by []. The PEMS03,04,07 and 08 are proposed by []. The large-scale traffic dataset LargeST which includes CA, GLA, GBA, and SD subdatasets are proposed by []. We compared the datasets from 7 aspects: Scale (Number of Sensors/Nodes and Neighbors/Edges), Location (Latitude, Longitude, Abs PM), Context (Road Name, City, County), Physics Meta Feature (Road Width, Terrain, Surface Material, etc.), Policy meta feature (Design Speed Limit, Population, Functional Class etc.), Granularity (timer interval, sensor level) and Incident features. As shown in Table 1, our XTraffic is larger than the existing datasets, with 16,972 nodes and 870,100 edges. Compared to other datasets, we include two types of meta features: physics meta feature and policy meta feature. The physics meta feature details the tangible, structural characteristics of a road, and the policy meta feature is fundamental for the operational and planning purposes of a road. These features provide strong support for constructing interpretable traffic forecasting and traffic causal analysis. It’s noteworthy that in terms of model granularity, a node in XTraffic represents a lane with a specific direction, it helps construct proper adjacency matrices, which are used widely in traffic forecasting.

Incident. In Table 2, there are 6 famous existing datasets for accident analysis. Compared with them, our XTraffic includes multiple incident categories besides accidents. The category feature provides fundamental support for studying the impact of different incidents on traffic and also offers ground truth for detecting incidents beyond accidents. By training detection models, we can help label the vast amounts of existing traffic data that do not include incident reports. This enhancement in data labeling not only improves the accuracy of traffic analysis but also strengthens the capabilities of predictive models in identifying potential incidents before they occur. Also, XTraffic include three kinds of traffic time series: traffic volume, road occupancy rate and vehicle average speed. Such an integration significantly broadens the scope of analyzing post-incident impacts.

### 3.2 Collection and Construction

Both incident and traffic data are collected from Caltrans Performance Measurement System ([PEMS](https://pems.dot.ca.gov/)). For traffic data, we removed the sensor with less than $50\%$ observations of traffic volume and reserved the data of 16,972 sensors with meta-features. These sensors are located in 42 different cities and counties. We also collected comprehensive meta-features of these sensors. After excluding the features with the same value and features unrelated to traffic, 26 meta-features are reserved. These meta-features can be divided into 5 types as shown in Table 1. Full meta-features are in Table 6, Appx. A.1. As most methods in traffic forecasting are graph-based, the adjacency matrix is a key component for the model to learn spatial dependency. Typically, the adjacency matrix is constructed based on distance []. In order to get the real travel distance, we set up an open-source rooting machine engine [] based on OpenStreetMap, and calculate the shortest travel distance between two sensors based on the coordinate. One more precise adjacency matrix is constructed based on the direction of the lanes and the coordinates of two sensors $A$ and $B$.
For incident data, we removed repeated incident records and the records without absolute postmile (indicating the position and date-time). As the source and CA PM (we have Abs PM to locate the incident) are relatively redundant in the traffic analysis, thus also being removed. The reserved incident data includes 476,766 samples with 9 features.
Identifying which nodes are impacted by an incident is crucial for leveraging incident records in traffic analysis. To facilitate this, we use a method that combines the freeway name and absolute postmile (Abs PM) markers to pinpoint sensors that might be affected by the incident. We provide two methods for this matching process: (1) involves matching only the nearest sensor on the same freeway as the incident, (2) involves setting a distance threshold and incorporating all sensors within this specified range.

## 4 Experiments

### 4.1 Descriptive Analysis of XTraffic

(1) Different surfaces affect the traffic indexes: The traffic volume, occupancy, and speed vary significantly across different surface materials. In Fig. 2(a), the Base & surface < 7" thick show distinct patterns (especially in volume and occupancy) compared to Bridge deck and Concrete surfaces, indicating that surface type influences traffic behavior. (2) Incidents affect the traffic indexes: In Fig. 2(b), traffic incidents such as incident 1141 cause noticeable disruptions and significant drops in traffic flow.
(3) Long-tail of incident durations: Fig. 2(c) summarizes the distribution of incident durations, revealing a long-tail distribution where most incidents are relatively short, but a few incidents last for an extended period. It also demonstrates the geographical distribution of incidents, with higher concentrations in urban areas. (4) Traffic hazard is the dominant incident: The pie chart in Fig. 2(d) shows hazards constitute the majority (52.2%), followed by accidents (no injuries and w/ injuries, accounting for 35.3%). 1141 and other types collectively amount for 12.6%.

Figure: Figure 2: Descriptive Analysis of our XTraffic
Refer to caption: x2.png

### 4.2 Traffic Forecasting after Incidents

The existing models are
effective in general traffic forecasting tasks. However, their performance under irregular volumes caused by incidents has not been thoroughly discussed. To assess these models’ response in such conditions, we conduct irregular traffic forecasting based on XTraffic.

Experiment Setting: We selected prediction samples from the test set that one incident occurred within a 5-minute window. We divided all the data into training, validation, and test sets in a 6:2:2 ratio. Due to the large volume of data, we chose to conduct experiments using traffic volume data from the San Bernardino (561 mainline sensors) within the XTraffic dataset for the first 3 months. All of the baselines are state-of-the-art in the spatial-temporal forecasting or traffic forecasting domain. Our forecasting experiments were implemented within the same software framework employed by []. We further adhered to the identical experimental settings outlined within the work. We set the batch size as 24 for DSTAGNN and 64 for all of other models. The learning rate is set as 0.001. Other hyperparameters of models are set as the same as the original settings.

**Table 3: The results in different horizons in Monterey (D5 Area). ‘General’ shows the performance of the model across all samples in the test set, while ‘Incident’ is on samples after an incident has occurred, with the top 1 in grey, 2nd in boldface, and 3rd underlined.**
| Test | Model | 5 Mins (t=1) | 15 Mins (t=3) | 30 Mins (t=6) |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE |  |  |
| General | LSTM | 12.58 | 11.81 | 21.45 | 15.41 | 14.21 | 26.29 | 18.68 | 18.03 | 31.54 |
| ASTGCN | 12.45 | 13.11 | 20.90 | 14.59 | 13.66 | 23.10 | 16.03 | 15.56 | 27.82 |  |
| DCRNN | 11.90 | 11.82 | 20.47 | 13.41 | 12.92 | 23.79 | 14.84 | 14.32 | 26.74 |  |
| AGCRN | 12.54 | 12.56 | 22.65 | 13.55 | 13.18 | 25.27 | 14.62 | 14.24 | 27.92 |  |
| GWNET | 11.99 | 11.85 | 20.30 | 13.53 | 12.87 | 23.44 | 14.88 | 14.15 | 26.05 |  |
| STGODE | 12.75 | 13.26 | 21.66 | 14.12 | 14.57 | 24.64 | 15.50 | 16.34 | 27.43 |  |
| DSTAGNN | 13.18 | 12.15 | 21.93 | 16.37 | 18.82 | 27.41 | 19.99 | 19.97 | 33.73 |  |
| D^2STGNN | 12.18 | 12.00 | 21.30 | 13.48 | 13.20 | 24.30 | 14.90 | 14.27 | 27.28 |  |
| Incident | LSTM | 14.17 | 10.13 | 23.75 | 17.41 | 15.38 | 29.43 | 20.93 | 14.33 | 34.05 |
| ASTGCN | 14.06 | 10.55 | 23.22 | 16.42 | 15.06 | 27.63 | 18.40 | 12.59 | 30.48 |  |
| DCRNN | 13.62 | 9.86 | 23.04 | 15.36 | 14.35 | 26.73 | 16.92 | 11.69 | 29.38 |  |
| AGCRN | 14.48 | 10.98 | 25.41 | 15.96 | 14.78 | 28.78 | 17.21 | 11.78 | 31.42 |  |
| GWNET | 13.73 | 10.44 | 22.90 | 15.60 | 14.50 | 26.73 | 17.15 | 11.49 | 29.07 |  |
| STGODE | 14.50 | 10.71 | 24.49 | 16.20 | 15.19 | 27.69 | 17.55 | 12.29 | 30.17 |  |
| DSTAGNN | 14.79 | 10.57 | 24.22 | 18.24 | 17.91 | 30.48 | 21.95 | 15.38 | 35.67 |  |
| D^2STGNN | 13.73 | 10.05 | 23.30 | 15.51 | 14.22 | 27.29 | 17.03 | 11.46 | 30.23 |  |

Results. As shown in Table 3, all baselines perform significantly better in predicting on the general test dataset compared to the incident test dataset, since incidents added irregularity into the traffic systems. This suggests that investigating how to improve the performance of forecasting models on time series prediction following an incident is worthwhile and warrants further research and discussion. More details in Appx. A.2.

### 4.3 Incident Classification

Since traffic incidents typically affect the traffic parameters in the nearest sensors, it is viable to deduce the traffic conditions based on the dynamics of the parameters. In this work, a time series classification task is designed on XTraffic, which involves inferring incident categories based on the traffic parameters during particular time slots detected by the sensors.

Experimental setting. Since traffic sensors are not always available at the site of an incident, we start by identifying the nearest sensor affected by each incident according to the distance (i.e., the ABS PM in Table 6). Then, we extract recorded indexes (traffic speed, lane occupancy, and traffic flow) in these sensors during a time window when the incident occurs.
Augmented with normal data, these form the basis for characterizing traffic parameters, which fall into three categories: “accidents”, “hazards”, and “normal”. According to Fig. 2(b), we standardize the duration length as the 95th percentile, i.e., 2 hours, thus, the time window $w=24$. The task is defined as a multivariate time series classification which uses three-channel time series features with $w=24$ to infer the situations of the traffic. We randomly sampled 9,000 examples to experiment, 3,000 samples per category. The data is divided into training and testing sets in a 7:3 split. We also analyze the channel-wise contribution to classification performance to validate the importance of each channel’s role in the incidents. This involves identifying incidents using features from only one channel.

Baselines. We selected representative baselines from various families, including traditional statistical learning, i.e., Decision Tree (DT) [], contrastive learning method that learns general time-series embedding, i.e., TS2Vec [], MLP-based solution, i.e., gMLP [], sequential models, i.e., Sequencer [], CNN-based models, i.e., OmniScaleCNN [], Transformer-based models, i.e., PatchTST [] and FormerTime []. More details in Appx. A.3.

Figure: Figure 3: Visualization of the representation of the time series on the dataset, extracted from the last hidden layer of OmniScaleCNN.
Refer to caption: x3.png

Performance Evaluation. From Table 4: (1) The best classification can achieve 41% accuracy, indicating classifying traffic conditions based on traffic indexes is feasible (better than random guess). Among the datasets with different inputted features, DT and PatchTST always outperform the baselines.
gMLP also shows strong performance, notably achieving top ranks in several categories and particularly excelling in the mixed channels.
(2) Variability across channels. Different methods exhibit varying degrees of effectiveness depending on the channel used, e.g., Sequencer performing better with speed and worse with flow, and OmniScaleCNN opposite. Thus, selecting appropriate features can guarantee the model effectiveness.(3) Integrating multiple features often leads to better classification. However, the performance gain is method-dependent, e.g., DT and gMLP showing substantial improvement, but TS2Vec and OmniScaleCNN benefit less.

**Table 4: Performance among the SOTA time series classification methods across the datasets, with the top 1 in grey, 2nd in boldface, and 3rd underlined.**
| Methods | speed channel-only | occupancy channel-only | flow channel-only | All channels Mixed |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Acc | Precision | Recall | Acc | Precision | Recall | Acc | Precision | Recall | Acc | Precision | Recall |  |
| DT | 41.6% | 41.5% | 41.5% | 40.4% | 40.2% | 40.2% | 39.4% | 39.3% | 39.3% | 41.6% | 41.4% | 41.5% |
| TS2Vec | 36.6% | 36.2% | 36.2% | 36.6% | 36.5% | 36.4% | 37.3% | 37.0% | 37.0% | 37.3% | 37.0% | 37.0% |
| gMLP | 41.3% | 41.2% | 41.1% | 38.4% | 38.3% | 38.3% | 37.3% | 37.2% | 37.2% | 41.6% | 41.5% | 41.5% |
| Sequencer | 35.8% | 35.8% | 35.6% | 35.6% | 35.3% | 35.2% | 34.1% | 33.9% | 33.9% | 40.3% | 40.2% | 40.2% |
| OmniScaleCNN | 35.7% | 35.1% | 35.1% | 36.9% | 36.3% | 36.3% | 37.0% | 36.8% | 36.8% | 40.9% | 40.8% | 40.8% |
| PatchTST | 38.3% | 38.1% | 38.1% | 39.0% | 38.6% | 38.7% | 39.5% | 39.3% | 39.3% | 39.4% | 39.4% | 39.3% |
| FormerTime | 35.9% | 31.0% | 33.4% | 41.0% | 41.1% | 40.8% | 37.8% | 38.2% | 37.3% | 40.5% | 40.5% | 40.1% |

Fig. 3(a) visualizes the extracted feature from OmniScaleCNN by t-SNE [] using flow data.The selected furthest embeddings (in Fig. 3(b)) shows clear distinct flows between the three classes, yet the closest embeddings (Fig. 3(c)) not. (1) There are distinct and separated patterns in the embeddings of traffic incidents located in corner and center areas, which facilitates classification, causing better performance than random guess. (2) Not all incidents impact traffic indices largely, as many incidents, such as car fires and minor accidents with no injuries, are short-lived. These hard cases confuse the classifier since the traffic patterns do not change significantly.

### 4.4 Global Traffic Causal Analysis

Figure: Figure 4: Global causal: (a) The learned DAG among meta-features, incidents, and traffic indexes. (b) The factual explanation for selected edges.
Refer to caption: x4.png

Experiment Setting: In our XTraffic dataset, we have static variables, e.g., road information, represented as scalar and vector, and dynamic variables, e.g., accidents and traffic flow, represented as functional data. Considering the multimodal nature of the variables, we employ MM-DAG [] to construct the causal network in different districts. We collect data on 17 variables across four districts with the highest incident rates throughout 2023. These variables fall into three categories: (1) meta-feature variables, e.g., temporal, environmental, road structural information; (2) incident variables, i.e., the occurrence of incidents; and (3) traffic statistics, which reflect traffic conditions. (Details of these variables in Table 7, Appx. A.4). We consider the data collected at each road node for each day as a single sample, using a granularity of one hour.
In learning DAG, two constraints are placed:
(1) edges are not allowed to point toward meta-feature variables since meta-feature variables generally describe environmental and infrastructural contexts that inherently influence other variables rather than being influenced by them. (2) traffic statistics variables are restricted from directing edges towards other nodes since these statistics fundamentally represent outcomes or states of the traffic system, typically influenced by both high-level environmental conditions and specific incidents, rather than serving as direct causes themselves.

Results: Fig. 4(a) illustrates the four causal networks derived by MM-DAG. (1) Certain static variables are essential; such as road surface, terrain, and road width, they exert significant influences on the incidence of traffic events and the overall traffic conditions. (2) The static variables’ impacts are consistent: Across various districts, due to their inherent properties, these underlying attributes consistently influence road and traffic dynamics across different regions. (3)
Dynamic variables like time, weather, and visibility also affect traffic incidents, though their causal relationships appear to be weaker and vary by district. For example, the causal links from events to fire and events to hazards show variability and weaker connections in different districts.

We further explain four significant edges. In Fig. 4(b1), the probability of encountering hazards is higher during the early morning (5 AM to 8 AM) and late afternoon (after 3 PM) on weekdays compared to weekends, likely due to increased traffic flow during peak commuting hours. In Fig. 4(b2), rain increases the probability of accidents compared to dry conditions, but the amount of rainfall does not significantly affect the accident rate. In Fig. 4(b3), bridges and road surfaces with a base thickness of >7 inches have a lower probability of hazards compared to concrete surfaces. This may be due to the enhanced durability and grip provided by thicker road surfaces and bridge constructions. In Fig. 4(b4), flat terrain is associated with higher average speeds compared to rolling terrains. The tendency for higher speeds on flat terrains is likely due to the reduced need for vehicles to decelerate for climbs or curves, allowing for more consistent and faster travel.

### 4.5 Local Causal Analysis for Road Relations

To demonstrate the value of our XTraffic dataset in revealing the causal relations among the roads, we conduct local causal analysis on a real case from XTraffic. We employ the $\text{PCMCI}^{+}$ [] algorithm for causal structure learning.
Since the underlying ground truth of causal dependencies is unknown, the hyperparameters, e.g., significance level and maximum time lag, are set for better interpretability.

Figure: Figure 5: Case of Local Causal Analysis
Refer to caption: x5.png

Experiment Setting: In Fig. 5, we select the road network near an interchange in Novato, California. On the evening of February 11, 2023, a traffic incident “1141” occurred at the eastbound exit of the interchange. This incident indicates that a traffic collision occurred and that there were potential injuries requiring a medical response. We then select four traffic nodes, represented by their traffic flow indexes, $\{X^{1},X^{2},X^{3},X^{4}\}$, that might be affected by the traffic incident.
We see from Fig. 5 (a2) that the decrease in traffic flow of $X^{3}$, which is the node closest to the incident, significantly accelerated after the incident occurred.
Result: The causal graphs learned by $\text{PCMCI}^{+}$ are in Fig. 5 (b), where the colors depict the strength of causal dependencies and the label of a link represents the time lag of causal dependencies. The pre-incident causal structure matches the common understanding about traffic propagation, indicating that traffic flow propagates from $X^{2}$ through $X^{3}$ to $X^{4}$. Compared to the pre-incident graph, the post-incident graph has two additional lagged causal links $X^{3}\stackrel{{\scriptstyle\text{lag }1}}{{\longrightarrow}}X^{2}$ and $X^{4}\stackrel{{\scriptstyle\text{lag }1}}{{\longrightarrow}}X^{1}$. In such a complicated dynamic traffic system, explaining the change of causal dependencies is challenging and we endeavour to provide some conjectures for reference. Due to the traffic collision between $X^{2}$ and $X^{3}$, congestion likely occurred near $X^{3}$, reducing the traffic flow at each time slot. However, the traffic demand from $X^{2}$ to $X^{3}$ did not decrease in the short term, causing the congestion to gradually spread to $X^{2}$.
The congestion at the eastbound exit of the interchange led to a decrease in traffic demand from $X^{1}$ to $X^{4}$. Fewer vehicles chose to slow down to enter the ramp, causing increased speed and higher traffic flow at $X^{1}$. (Details in Appx. A.5)

## 5 Conclusion and Limitations

Conclusion. We propose a pioneering traffic and incident dataset XTraffic. It integrates traffic flow data with incident records and road comprehensive meta-features, filling a significant gap in traffic analysis and Incident analysis. XTraffic lays a solid groundwork for research focused on understanding traffic dynamics, causality, and interrelationships. Through four groups of experiments, we demonstrate that our dataset offers expanded possibilities for research in traffic forecasting, incident classification, and detection, as well as causal analysis.

Limitation and future work.Our dataset currently faces three primary limitations. Firstly, weather data is crucial for traffic and incident analysis; however, our dataset lacks well-integrated weather information for use. Secondly, while we can locate specific incident locations relatively precisely using absolute PM values and road names, this method is less effective for visualization compared to using latitude and longitude coordinates. Lastly, there are still gaps in our traffic data. In response to these issues, we plan to enhance our dataset by collecting more comprehensive weather data. Additionally, we will use OpenStreetMap to analyze and generate precise geographical coordinates for incidents. Finally, we aim to develop improved methods for imputing missing values in the traffic data to ensure completeness and reliability.

## References

- Alsahfi [2024]
T. Alsahfi.
Spatial and temporal analysis of road traffic accidents in major californian cities using a geographic information system.
*ISPRS International Journal of Geo-Information*, 13(5):157, 2024.
- Andersen and Torp [2018]
O. Andersen and K. Torp.
Dynamic spatio-temporal integration of traffic accident data.
In *Proceedings of the 26th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems*, pages 596–599, 2018.
- Anjum et al. [2022]
T. Anjum, B. Lin, and A. Narayan.
Leveraging spatio-temporal features to forecast time-to-accident.
In *Proceedings of the 30th International Conference on Advances in Geographic Information Systems*, pages 1–2, 2022.
- Bai et al. [2020]
L. Bai, L. Yao, C. Li, X. Wang, and C. Wang.
Adaptive graph convolutional recurrent network for traffic forecasting.
*Advances in neural information processing systems*, 33:17804–17815, 2020.
- Bedane [2020]
T. T. Bedane.
Road traffic accident dataset of addis ababa city.
*Addis Ababa*, 2020.
- Cheng et al. [2023]
M. Cheng, Q. Liu, Z. Liu, Z. Li, Y. Luo, and E. Chen.
Formertime: Hierarchical multi-scale representations for multivariate time series classification.
In *Proceedings of the ACM Web Conference 2023*, pages 1437–1445, 2023.
- Choi et al. [2022]
J. Choi, H. Choi, J. Hwang, and N. Park.
Graph neural controlled differential equations for traffic forecasting.
In *Proceedings of the AAAI Conference on Artificial Intelligence*, volume 36, pages 6367–6374, 2022.
- Demšar [2006]
J. Demšar.
Statistical comparisons of classifiers over multiple data sets.
*The Journal of Machine learning research*, 7:1–30, 2006.
- Department [2024]
C. P. Department.
Chicago traffic crashes, 2024.
URL [https://data.cityofchicago.org/Transportation/Traffic-Crashes-Crashes/85ca-t3if/](https://data.cityofchicago.org/Transportation/Traffic-Crashes-Crashes/85ca-t3if/).
- Department [2022]
N. Y. C. P. Department.
New york city motor vehicle collisions, 2022.
URL [https://data.cityofnewyork.us/Public-Safety/Motor-Vehicle-CollisionsCrashes/h9gi-nx95](https://data.cityofnewyork.us/Public-Safety/Motor-Vehicle-CollisionsCrashes/h9gi-nx95).
- Fang et al. [2021]
Z. Fang, Q. Long, G. Song, and K. Xie.
Spatial-temporal graph ode networks for traffic flow forecasting.
In *Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining*, pages 364–373, 2021.
- Golze et al. [2021]
J. Golze, U. Feuerhake, C. Koetsier, and M. Sester.
Impact analysis of accidents on the traffic flow based on massive floating car data.
*The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences; XLIII-B4-2021*, 43:95–102, 2021.
- Guo et al. [2019]
S. Guo, Y. Lin, N. Feng, C. Song, and H. Wan.
Attention based spatial-temporal graph convolutional networks for traffic flow forecasting.
In *Proceedings of the AAAI Conference on Artificial Intelligence*, volume 33, pages 922–929, 2019.
- Guo et al. [2021]
Z. Guo, Y. Zhang, J. Lv, Y. Liu, and Y. Liu.
An online learning collaborative method for traffic forecasting and routing optimization.
*IEEE Transactions on Intelligent Transportation Systems*, 22(10):6634–6645, 2021.
doi: 10.1109/TITS.2020.2986158.
- Hochreiter and Schmidhuber [1997]
S. Hochreiter and J. Schmidhuber.
Long short-term memory.
*Neural computation*, 9(8):1735–1780, 1997.
- Hong et al. [2024]
Y. Hong, H. Zhu, T. Shou, Z. Wang, L. Chen, L. Wang, C. Wang, and L. Chen.
Storm: A spatio-temporal context-aware model for predicting event-triggered abnormal crowd traffic.
*IEEE Transactions on Intelligent Transportation Systems*, 2024.
- Huang et al. [2023]
B. Huang, B. Hooi, and K. Shu.
Tap: A comprehensive data repository for traffic accident prediction in road networks.
In *Proceedings of the 31st ACM International Conference on Advances in Geographic Information Systems*, pages 1–4, 2023.
- Jiang and Luo [2022]
W. Jiang and J. Luo.
Graph neural network for traffic forecasting: A survey.
*Expert Systems with Applications*, page 117921, 2022.
- Lan et al. [2022]
S. Lan, Y. Ma, W. Huang, W. Wang, H. Yang, and P. Li.
Dstagnn: Dynamic spatial-temporal aware graph neural network for traffic flow forecasting.
In *International Conference on Machine Learning*, pages 11906–11917. PMLR, 2022.
- Lan et al. [2023]
T. Lan, Z. Li, Z. Li, L. Bai, M. Li, F. Tsung, W. Ketter, R. Zhao, and C. Zhang.
Mm-dag: Multi-task dag learning for multi-modal data-with application for traffic congestion analysis.
In *Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining*, pages 1188–1199, 2023.
- Lan et al. [2024]
T. Lan, Z. Li, J. Lin, Z. Li, L. Bai, M. Li, F. Tsung, R. Zhao, and C. Zhang.
Multifun-dag: Multivariate functional directed acyclic graph.
*arXiv preprint arXiv:2404.13836*, 2024.
- Li et al. [2013]
D. Li, J. Sander, M. A. Nascimento, and D.-W. Kwon.
Discovering spatial co-clustering patterns in traffic collision data.
In *Proceedings of the Sixth ACM SIGSPATIAL International Workshop on Computational Transportation Science*, pages 55–60, 2013.
- Li et al. [2022]
G. Li, S. Zhong, X. Deng, L. Xiang, S.-H. G. Chan, R. Li, Y. Liu, M. Zhang, C.-C. Hung, and W.-C. Peng.
A lightweight and accurate spatial-temporal transformer for traffic forecasting.
*IEEE Transactions on Knowledge and Data Engineering*, 2022.
- Li et al. [2018a]
R. Li, F. C. Pereira, and M. E. Ben-Akiva.
Overview of traffic incident duration analysis and prediction.
*European transport research review*, 10(2):1–13, 2018a.
- Li et al. [2018b]
Y. Li, R. Yu, C. Shahabi, and Y. Liu.
Diffusion convolutional recurrent neural network: Data-driven traffic forecasting.
In *International Conference on Learning Representations (ICLR)*, 2018b.
- Lin et al. [2023]
J. Lin, Z. Li, Z. Li, L. Bai, R. Zhao, and C. Zhang.
Dynamic causal graph convolutional network for traffic prediction.
In *2023 IEEE 19th International Conference on Automation Science and Engineering (CASE)*, pages 1–8. IEEE, 2023.
- Lin and Li [2020]
Y. Lin and R. Li.
Real-time traffic accidents post-impact prediction: Based on crowdsourcing data.
*Accident Analysis & Prevention*, 145:105696, 2020.
- Liu et al. [2022a]
D. Liu, J. Wang, S. Shang, and P. Han.
Msdr: Multi-step dependency relation networks for spatial temporal forecasting.
In *Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining*, pages 1042–1050, 2022a.
- Liu et al. [2021]
H. Liu, Z. Dai, D. So, and Q. V. Le.
Pay attention to mlps.
*Advances in neural information processing systems*, 34:9204–9215, 2021.
- Liu et al. [2024]
X. Liu, Y. Xia, Y. Liang, J. Hu, Y. Wang, L. Bai, C. Huang, Z. Liu, B. Hooi, and R. Zimmermann.
Largest: A benchmark dataset for large-scale traffic forecasting.
*Advances in Neural Information Processing Systems*, 36, 2024.
- Liu et al. [2022b]
Z. Liu, R. Zhang, C. Wang, Z. Xiao, and H. Jiang.
Spatial-temporal conv-sequence learning with accident encoding for traffic flow prediction.
*IEEE Transactions on Network Science and Engineering*, 9(3):1765–1775, 2022b.
- Luan et al. [2022]
S. Luan, R. Ke, Z. Huang, and X. Ma.
Traffic congestion propagation inference using dynamic bayesian graph convolution network.
*Transportation research part C: emerging technologies*, 135:103526, 2022.
- Luxen and Vetter [2011]
D. Luxen and C. Vetter.
Real-time routing with openstreetmap data.
In *Proceedings of the 19th ACM SIGSPATIAL international conference on advances in geographic information systems*, pages 513–516, 2011.
- Moosavi et al. [2019]
S. Moosavi, M. H. Samavatian, S. Parthasarathy, R. Teodorescu, and R. Ramnath.
Accident risk prediction based on heterogeneous sparse data: New dataset and insights.
In *Proceedings of the 27th ACM SIGSPATIAL international conference on advances in geographic information systems*, pages 33–42, 2019.
- Nie et al. [2022]
Y. Nie, N. H. Nguyen, P. Sinthong, and J. Kalagnanam.
A time series is worth 64 words: Long-term forecasting with transformers.
In *The Eleventh International Conference on Learning Representations*, 2022.
- of Motor Vehicles [2023]
N. Y. S. D. of Motor Vehicles.
New york state motor vehicle crashes, 2023.
URL [https://data.ny.gov/Transportation/Motor-Vehicle-Crashes-VehicleInformation-Three-Ye/xe9x-a24f](https://data.ny.gov/Transportation/Motor-Vehicle-Crashes-VehicleInformation-Three-Ye/xe9x-a24f).
- of Transport [2016]
U. D. of Transport.
Uk accidents, 2016.
URL [https://www.kaggle.com/datasets/daveianhickey/2000-16-traffic-flow-england-scotland-wales](https://www.kaggle.com/datasets/daveianhickey/2000-16-traffic-flow-england-scotland-wales).
- Pamfil et al. [2020]
R. Pamfil, N. Sriwattanaworachai, S. Desai, P. Pilgerstorfer, K. Georgatzis, P. Beaumont, and B. Aragam.
Dynotears: Structure learning from time-series data.
In *International Conference on Artificial Intelligence and Statistics*, pages 1595–1605. Pmlr, 2020.
- Ramakrishnan and Soni [2018]
N. Ramakrishnan and T. Soni.
Network traffic prediction using recurrent neural networks.
In *2018 17th IEEE International Conference on Machine Learning and Applications (ICMLA)*, pages 187–193. IEEE, 2018.
- Runge [2020]
J. Runge.
Discovering contemporaneous and lagged causal relations in autocorrelated nonlinear time series datasets.
In *Conference on Uncertainty in Artificial Intelligence*, pages 1388–1397. Pmlr, 2020.
- Safavian and Landgrebe [1991]
S. R. Safavian and D. Landgrebe.
A survey of decision tree classifier methodology.
*IEEE transactions on systems, man, and cybernetics*, 21(3):660–674, 1991.
- Shao et al. [2022]
Z. Shao, Z. Zhang, W. Wei, F. Wang, Y. Xu, X. Cao, and C. S. Jensen.
Decoupled dynamic spatial-temporal graph neural network for traffic forecasting.
*Proc. VLDB Endow.*, 15(11):2733–2746, sep 2022.
ISSN 2150-8097.
- Shi et al. [2021]
Y. Shi, R. Biswas, M. Noori, M. Kilberry, J. Oram, J. Mays, S. Kharude, D. Rao, and X. Chen.
Predicting road accident risk using geospatial data and machine learning (demo paper).
In *Proceedings of the 29th International Conference on Advances in Geographic Information Systems*, pages 512–515, 2021.
- Song et al. [2020]
C. Song, Y. Lin, S. Guo, and H. Wan.
Spatial-temporal synchronous graph convolutional networks: A new framework for spatial-temporal network data forecasting.
In *Proceedings of the AAAI Conference on Artificial Intelligence*, volume 34, pages 914–921, 2020.
- Tan et al. [2023]
C. Tan, S. Li, Z. Gao, W. Guan, Z. Wang, Z. Liu, L. Wu, and S. Z. Li.
Openstl: A comprehensive benchmark of spatio-temporal predictive learning.
*Advances in Neural Information Processing Systems*, 36:69819–69831, 2023.
- Tang et al. [2021]
W. Tang, G. Long, L. Liu, T. Zhou, M. Blumenstein, and J. Jiang.
Omni-scale cnns: a simple and effective kernel size configuration for time series classification.
In *International Conference on Learning Representations*, 2021.
- Tatsunami and Taki [2022]
Y. Tatsunami and M. Taki.
Sequencer: Deep lstm for image classification.
*Advances in Neural Information Processing Systems*, 35:38204–38217, 2022.
- Van der Maaten and Hinton [2008]
L. Van der Maaten and G. Hinton.
Visualizing data using t-sne.
*Journal of machine learning research*, 9(11), 2008.
- Wu et al. [2019]
Z. Wu, S. Pan, G. Long, J. Jiang, and C. Zhang.
Graph wavenet for deep spatial-temporal graph modeling.
In *The 28th International Joint Conference on Artificial Intelligence (IJCAI)*, 2019.
- Wu et al. [2020]
Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, and S. Y. Philip.
A comprehensive survey on graph neural networks.
*IEEE transactions on neural networks and learning systems*, 32(1):4–24, 2020.
- Xie et al. [2020]
Q. Xie, T. Guo, Y. Chen, Y. Xiao, X. Wang, and B. Y. Zhao.
Deep graph convolutional networks for incident-driven traffic speed prediction.
In *Proceedings of the 29th ACM international conference on information & knowledge management*, pages 1665–1674, 2020.
- Yeddula et al. [2023]
S. D. Yeddula, C. Jiang, B. Hui, and W.-S. Ku.
Traffic accident hotspot prediction using temporal convolutional networks: A spatio-temporal approach.
In *Proceedings of the 31st ACM International Conference on Advances in Geographic Information Systems*, pages 1–4, 2023.
- Yu et al. [2018]
B. Yu, H. Yin, and Z. Zhu.
Spatio-temporal graph convolutional networks: a deep learning framework for traffic forecasting.
In *Proceedings of the 27th International Joint Conference on Artificial Intelligence*, pages 3634–3640, 2018.
- Yuan and Li [2021]
H. Yuan and G. Li.
A survey of traffic prediction: from spatio-temporal data to intelligent transportation.
*Data Science and Engineering*, 6(1):63–85, 2021.
- Yue et al. [2022]
Z. Yue, Y. Wang, J. Duan, T. Yang, C. Huang, Y. Tong, and B. Xu.
Ts2vec: Towards universal representation of time series.
In *Proceedings of the AAAI Conference on Artificial Intelligence*, volume 36, pages 8980–8987, 2022.
- Zheng et al. [2020]
C. Zheng, X. Fan, C. Wang, and J. Qi.
Gman: A graph multi-attention network for traffic prediction.
In *Proceedings of the AAAI conference on artificial intelligence*, volume 34, pages 1234–1241, 2020.
- Zheng et al. [2018]
X. Zheng, B. Aragam, P. K. Ravikumar, and E. P. Xing.
Dags with no tears: Continuous optimization for structure learning.
*Advances in Neural Information Processing Systems*, 31, 2018.
- Zhu et al. [2021]
W. Zhu, J. Wu, T. Fu, J. Wang, J. Zhang, and Q. Shangguan.
Dynamic prediction of traffic incident duration on urban expressways: A deep learning approach based on lstm and mlp.
*Journal of intelligent and connected vehicles*, 4(2):80–91, 2021.

## Checklist

- 1.
For all authors…
(a)
Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] Please see the Section 1
(b)
Did you describe the limitations of your work?
[Yes] Please see Section 5
(c)
Did you discuss any potential negative societal impacts of your work?
[N/A] The paper is related to transportation and does not include personal private information.
(d)
Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] The data is not related to personal information. The traffic data is highly aggregated and does not contain information on human or vehicle trajectories
- 2.
If you are including theoretical results…
(a)
Did you state the full set of assumptions of all theoretical results?
[N/A]
(b)
Did you include complete proofs of all theoretical results?
[N/A]
- 3.
If you ran experiments (e.g. for benchmarks)…
(a)
Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] Although the main contribution of this paper focuses on constructing a new dataset, we also release the code for the experiment which is mentioned in the supplemental material.
(b)
Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] We give the details in the 4 section and supplemental materials.
(c)
Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[No] Limited to the computing resource, we only run the experiment once. We will run the experiments multiple times in the next stage and provide the results on the dataset website.
(d)
Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] Please see Section 4.
- 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets…
(a)
If your work uses existing assets, did you cite the creators?
[Yes] Please see Section 3.2
(b)
Did you mention the license of the assets?
[Yes] There is a Terms of Use of the existing assets, and we mention the content about distrbuting.
(c)
Did you include any new assets either in the supplemental material or as a URL?
[Yes] Please see [http://xaitraffic.github.io](http://xaitraffic.github.io)
(d)
Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[Yes] Please see Section 3.2
(e)
Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[Yes] Please see Section 3.2
- 5.
If you used crowdsourcing or conducted research with human subjects…
(a)
Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A]
(b)
Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A]
(c)
Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]

## Appendix A Appendix

In this Appendix, we will introduce a few more details about the XTraffic data, and the experiment settings of the Post-Incident Traffic Forecasting, Incident Classification, Global Causal Analysis, and Local Causal Analysis.

### A.1 Details of XTraffic

Licence: According to the Ownership section in Caltrans Terms of Use of PEMS, we can collect and construct a dataset from the source and distribute it. We collected all of the data before 17/05/2024. More details and the introduction of the dataset can be found in the supplementary material. Our XTraffic is released under a [CC BY-NC 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0). The code for the experiments is released under a [MIT License](https://opensource.org/licenses/MIT).

Incidents: The details of incident data features are shown in Table 5.

**Table 5: Meta Feature Introduction**
| Feature | Type | Description |
| --- | --- | --- |
| Incident ID | Integer | Unique identifier for each recorded traffic incident. |
| Duration | Integer | Length of the incident measured in minutes from start to resolution. |
| Abs PM | Float | Point of the incident in absolute postmile notation along the road. |
| Fwy | String | The freeway name where the incident occurred. |
| AREA | String | The city or town where the incident took place. |
| DESCRIPTION | String | A brief narrative describing the specifics of the incident. |
| LOCATION | String | The exact address on the freeway where the incident happened. |
| Type | String | Category of the incident, such as accident, hazard, or road closure. |
| dt | DateTime | Timestamp indicating when the incident was first reported. |

Meta-feature: The details of meta-feature table is in Table 6,

**Table 6: Meta Feature Introduction**
| Feature | Type | Description |
| --- | --- | --- |
| Sensor ID | String | Unique identifier for each traffic sensor. |
| Inner Shoulder Width | Float | Width in meters of the inner shoulder on the lane. |
| Outer Shoulder Width | Float | Width in meters of the outer shoulder on the lane. |
| Functional Class | String | Classification of roads based on the function they provide. |
| Inner Median Type | String | Type of median on the inner side of the road. |
| Inner Median Width | Float | Width in meters of the median on the inner side of the road. |
| Road Width | Float | Total width in meters from one side to the other. |
| Lane Width | Float | Width in meters of each traffic lane on the road. |
| Design Speed Limit | Integer | Maximum speed limit designed for the road in kilometers per hour. |
| Terrain | String | Physical features and shape of a landscape, e.g., flat, mountainous. |
| Population | String | Type of terrain surrounding the road, e.g., urban, rural. |
| Barrier | String | Description of any barriers along the road, e.g., guardrail, none. |
| Surface | String | Road surface type, e.g., asphalt, concrete. |
| Roadway Use | String | Primary use of the road, e.g., commercial, residential. |
| Length | Integer | The total length of the lane on the road. |
| Latitude | Float | Geographical latitude of the road’s location. |
| Longitude | Float | Geographical longitude of the road’s location. |
| Abs PM | Float | Point of measurement in absolute postmile notation along the road. |
| Direction | String | The direction of the lane, e.g., East, North. |
| Fwy | String | The name of the freeway where the sensor is located in. |
| District | Integer | The district ID, e.g.. |
| County | String | The county where the sensor is located in, e.g., Orange, Los Angeles. |
| City | String | The city where the sensor is located in, e.g., Marina, Oakland. |
| Sensor Type | String | The sensor cateogry, e.g., radars, magnetometers. |
| Type | String | The level of the road, e.g., mainline, On Ramp. |
| HOV | String | Whether it is HOV lane or not |

### A.2 Experiment Details on Post-Incident Traffic Forecasting

Baselines. The baselines we selected to do the forecasting experiments are typical models in traffic forecasting domain.

- •
LSTM[]: A basic model focusing solely on the temporal relationships within traffic data.
- •
ASTGCN[]: Enhances the STGCN by incorporating an attention mechanism to better capture node correlations.
- •
DCRNN[]: An RNN-based model that utilizes diffusion convolution to model traffic flows.
- •
AGCRN[]: An adaptive model that combines RNN architecture with an attention mechanism to focus on spatial correlations.
- •
GWNET[]: Utilizes a gated mechanism in a TCN framework to filter out irrelevant information effectively.
- •
STGODE[]: Uses ordinary differential equations to dynamically model relationships among traffic nodes.
- •
DSTAGNN[]: Designed to dynamically capture changing correlations among traffic sensors.
- •
D^2STGNN[]: A dual-layer spatial-temporal GNN that addresses hidden correlations in traffic data for forecasting.

### A.3 Experiment Details on Incident Classification

Baselines. We adopt the following representative time series classification baselines. (1) Decision Tree (DT): We tailor the canonical decision tree algorithm for the task, recursively partitioning data based on feature values to create a tree-like model that makes classifications at its leaf nodes. (2) TS2Vec []: It is a universal framework for learning robust and flexible time series representations using hierarchical contrastive learning over augmented context views, making the classification by a linear classifier. (3) gMLP []: It is a simple network architecture based solely on MLPs with gating, which performs as well as Transformers in key language and vision applications. (4) Sequencer []: It models long-range dependencies using LSTMs without self-attention layers, which enhances performance by reducing the sequence length and creating spatially meaningful receptive fields. (5) OmniScaleCNN []: It is a 1D-CNN architecture that utilizes a set of prime number-based kernel sizes to efficiently capture optimal receptive field sizes without scale tuning across diverse time series classification tasks. (6) PatchTST []: It incorporates patching of time series into subseries-level patches and channel-independence to improve long-term forecasting accuracy based on the Transformer backbone. (7) FormerTime []: It employs a hierarchical Transformer-based architecture to learn multi-scale feature maps and introduces an efficient temporal reduction attention mechanism and a context-aware positional encoding generator for multivariate time series classification.

More Results. Fig. 6 reports the critical difference diagram as presented in [], which compares the mean ranks of the baseline methods on the four datasets (three channel-only and all mixed) in the classification task. The thick horizontal lines in the diagram denote groups of methods whose performance differences are not statistically significant within the critical difference (CD) threshold. It can be seen that DT, gMLP, and PatchTST are among the top-performing methods with the lowest mean ranks, indicating their superior performance. Although DT, gMLP, and PatchTST are highlighted as top performers, the differences among the top five methods are not statistically significant since they are in a group, suggesting comparable effectiveness in this task.

Figure: Figure 6: Critical difference diagram over the mean ranks of the compared methods
Refer to caption: x6.png

### A.4 Experiment Details on Global Causal Analysis

The introduction of MM-DAG: MM-DAG is a score-based causal discovery algorithm. It learns multiple DAGs with multimodal data where their consensus and consistency are maximized. For multimodal data, it proposes a multi-modal regression for linear causal relationship description of different variables by functional principal component analysis. For multitask learning, it uses causal difference to ensure the consistency. The overall optimization problem can be represented as:

$$ $\displaystyle\hat{\mathbf{C}}_{(1)},...,\hat{\mathbf{C}}_{(L)}$ $\displaystyle=\underset{\mathbf{C}_{(1)},...,\mathbf{C}_{(L)}}{\arg\min}\sum_{ l=1}^{L}\frac{1}{2N_{l}}\|\mathbf{A}_{(l)}-\mathbf{A}_{(l)}\mathbf{C}_{(l)}\|_ {F}^{2}$ $\displaystyle\quad+\rho\sum_{l_{1},l_{2}}s_{l_{1},l_{2}}DCD(\mathbf{W}_{(l_{1} )},\mathbf{W}_{(l_{2})})+\lambda\sum_{l=1}^{L}\|\mathbf{C}_{(l)}\|_{1}$ $\displaystyle{\rm s.t.\ }h(\mathbf{W}_{(l)})={\rm tr}(e^{\mathbf{W}_{(l)}})-P_ {l}=0,\forall l$ $$

where $\mathbf{A}$ is variables after FPCA, $\mathbf{C}$ are causal matrix and $\mathbf{W}_{(l)ij}=\|\mathbf{C}_{(l)ij}\|_{F}^{2}$. $s_{l_{1},l_{2}}$ is the given constant reflecting the similarity between tasks $l_{1}$ and $l_{2}$, $\rho$ controls the penalty of the difference in causal orders, where larger $\rho$ means less tolerance of difference. $\lambda$ controls the ${L}_{1}$-norm penalty of causal matrix which guarantees that edges are sparse. In our setting, we set $\lambda=0.001$, $\rho=1$ and $s_{l_{1},l_{2}}=1,\forall l_{1},l_{2}$.

Explaination of the nodes: The details of the nodes in the global causal graph in listed in Table 7.

**Table 7: The description and types of the variables used in traffic causal analysis**
| Category | Name | Type | Description |
| --- | --- | --- | --- |
| high-level variables | Time | Scalar | Day type indicator: $=1$ if the day is a weekend; $=0$ otherwise. |
| Event | Scalar | Public holiday indicator: $=1$ if the day is a public holiday; $=0$ otherwise. |  |
| Visibility | Functional | An integer ranged from 0 to 16 to indicate the visibility of the road in the district. |  |
| Surface | Vector | Attributes describing road material, e.g., concrete, bridge deck. |  |
| Terrain | Vector | Characteristics of the terrain surrounding the road, e.g., flat, rolling. |  |
| Width | Scalar | The width of the road. |  |
| Weather | Functional | An integer ranged from 0 (No rain) to 3 (Heavy rain). |  |
| incident variables | Hazard | Functional | Details of any hazards present, e.g., obstacles, spillage. |
| NoInj | Functional | Records of accidents with no injuries. |  |
| UnknInj | Functional | Records of accidents with unknown injury statuses. |  |
| 1141 | Functional | Records of accidents needing an emergency response (coded 1141). |  |
| Fire | Functional | Incidents involving vehicle fires or roadside fires. |  |
| AHazard | Functional | Presence of animals on the road that could cause hazards. |  |
| CarFire | Functional | Specific incidents involving car fires. |  |
| traffic statistics | Flow | Functional | Measures of traffic flow, typically in vehicles per hour. |
| Occupancy | Functional | Percentage of the road occupied by vehicles at a given time. |  |
| Speed | Functional | Average speed of traffic flow. |  |

### A.5 Experiment Details on Local Causal Analysis

In local causal analysis, We employ the $\text{PCMCI}^{+}$ algorithm to discover the causal relations in traffic data, which utilizes momentary conditional independence (MCI) test to determine the existence of causal links. Typically, the lagged and contemporaneous causal relations are displayed in a dynamic Bayesian network (DBN) as shown in Fig. 7 (a). In this work, to simplify the visualization, we choose to use the process graph as shown in Fig. 7 (b) to aggregate the information in the DBN. In both DBN and process graph, the link color denotes the magnitude of the causal effect measured by the MCI test statistic (e.g., the partial correlation coefficient). The label of a link lists all significant lags of cross-dependencies in process graph. Since we are more interested in the causal links between different traffic nodes, the links denoting auto-dependencies in DBN are summarized into node colors in process graph and the auto-dependency lags are omitted.

Figure: Figure 7: Examples of causal graphs for time series variables. (a) Dynamic Bayesian network (DBN). (b) Process graph which summarizes the information in DBN. Process graph aggregates the information in the DBN to simplify the causal structure visualization. While the process graph is nicer to look at, the time series graph better represents the spatio-temporal dependency structure from which causal pathways can be read off. In both graphs, link colors depict the magnitude of the cross-node causal effects as measured by the MCI test statistics. In process graph, node colors depict auto-dependency strength.
Refer to caption: extracted/5714373/figures/dbn_example.png

The choice of causal structure learning method influences the results of local causal analysis. Ideally, we would like to perform analysis on real cases or datasets with known underlying ground truth of causal dependencies. However, such cases or datasets are rare especially in complex dynamic scenarios such as traffic. To enhance the credibility of the learned causal structure, we use different causal discovery methods and verify the consistency of the results obtained by the different methods. Fig. 8 shows the pre-incident causal graphs of case I learned by score-based method DyNotears [] and constrained-based method $\text{PCMCI}^{+}$ []. The graph structures learned by both methods are similar, but the time lag of the link $X^{3}\rightarrow X^{4}$ is different, which is greatly influenced by the sampling frequency of traffic data. Due to the limited number of samples affected by the incidents, we use $\text{PCMCI}^{+}$ to discover post-incident causal structure for its robustness with small sample size and high dimensionality.

Figure: Figure 8: Pre-Incident Causal Graphs for Local Causal Analysis Case Learned by Different Methods. (a) Process Graph Learned by DyNotears. (b) Process Graph Learned by $\text{PCMCI}^{+}$.
Refer to caption: extracted/5714373/figures/case1_pre_comparison.png

### 3.2 Collection and Construction

Both incident and traffic data are collected from Caltrans Performance Measurement System ([PEMS](https://pems.dot.ca.gov/)). For traffic data, we removed the sensor with less than $50\%$ observations of traffic volume and reserved the data of 16,972 sensors with meta-features. These sensors are located in 42 different cities and counties. We also collected comprehensive meta-features of these sensors. After excluding the features with the same value and features unrelated to traffic, 26 meta-features are reserved. These meta-features can be divided into 5 types as shown in Table 1. Full meta-features are in Table 6, Appx. A.1. As most methods in traffic forecasting are graph-based, the adjacency matrix is a key component for the model to learn spatial dependency. Typically, the adjacency matrix is constructed based on distance []. In order to get the real travel distance, we set up an open-source rooting machine engine [] based on OpenStreetMap, and calculate the shortest travel distance between two sensors based on the coordinate. One more precise adjacency matrix is constructed based on the direction of the lanes and the coordinates of two sensors $A$ and $B$.
For incident data, we removed repeated incident records and the records without absolute postmile (indicating the position and date-time). As the source and CA PM (we have Abs PM to locate the incident) are relatively redundant in the traffic analysis, thus also being removed. The reserved incident data includes 476,766 samples with 9 features.
Identifying which nodes are impacted by an incident is crucial for leveraging incident records in traffic analysis. To facilitate this, we use a method that combines the freeway name and absolute postmile (Abs PM) markers to pinpoint sensors that might be affected by the incident. We provide two methods for this matching process: (1) involves matching only the nearest sensor on the same freeway as the incident, (2) involves setting a distance threshold and incorporating all sensors within this specified range.

## 4 Experiments

### 4.1 Descriptive Analysis of XTraffic

(1) Different surfaces affect the traffic indexes: The traffic volume, occupancy, and speed vary significantly across different surface materials. In Fig. 2(a), the Base & surface < 7" thick show distinct patterns (especially in volume and occupancy) compared to Bridge deck and Concrete surfaces, indicating that surface type influences traffic behavior. (2) Incidents affect the traffic indexes: In Fig. 2(b), traffic incidents such as incident 1141 cause noticeable disruptions and significant drops in traffic flow.
(3) Long-tail of incident durations: Fig. 2(c) summarizes the distribution of incident durations, revealing a long-tail distribution where most incidents are relatively short, but a few incidents last for an extended period. It also demonstrates the geographical distribution of incidents, with higher concentrations in urban areas. (4) Traffic hazard is the dominant incident: The pie chart in Fig. 2(d) shows hazards constitute the majority (52.2%), followed by accidents (no injuries and w/ injuries, accounting for 35.3%). 1141 and other types collectively amount for 12.6%.

Figure: Figure 2: Descriptive Analysis of our XTraffic
Refer to caption: x2.png

### 4.2 Traffic Forecasting after Incidents

The existing models are
effective in general traffic forecasting tasks. However, their performance under irregular volumes caused by incidents has not been thoroughly discussed. To assess these models’ response in such conditions, we conduct irregular traffic forecasting based on XTraffic.

Experiment Setting: We selected prediction samples from the test set that one incident occurred within a 5-minute window. We divided all the data into training, validation, and test sets in a 6:2:2 ratio. Due to the large volume of data, we chose to conduct experiments using traffic volume data from the San Bernardino (561 mainline sensors) within the XTraffic dataset for the first 3 months. All of the baselines are state-of-the-art in the spatial-temporal forecasting or traffic forecasting domain. Our forecasting experiments were implemented within the same software framework employed by []. We further adhered to the identical experimental settings outlined within the work. We set the batch size as 24 for DSTAGNN and 64 for all of other models. The learning rate is set as 0.001. Other hyperparameters of models are set as the same as the original settings.

**Table 3: The results in different horizons in Monterey (D5 Area). ‘General’ shows the performance of the model across all samples in the test set, while ‘Incident’ is on samples after an incident has occurred, with the top 1 in grey, 2nd in boldface, and 3rd underlined.**
| Test | Model | 5 Mins (t=1) | 15 Mins (t=3) | 30 Mins (t=6) |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| MAE | MAPE | RMSE | MAE | MAPE | RMSE | MAE | MAPE | RMSE |  |  |
| General | LSTM | 12.58 | 11.81 | 21.45 | 15.41 | 14.21 | 26.29 | 18.68 | 18.03 | 31.54 |
| ASTGCN | 12.45 | 13.11 | 20.90 | 14.59 | 13.66 | 23.10 | 16.03 | 15.56 | 27.82 |  |
| DCRNN | 11.90 | 11.82 | 20.47 | 13.41 | 12.92 | 23.79 | 14.84 | 14.32 | 26.74 |  |
| AGCRN | 12.54 | 12.56 | 22.65 | 13.55 | 13.18 | 25.27 | 14.62 | 14.24 | 27.92 |  |
| GWNET | 11.99 | 11.85 | 20.30 | 13.53 | 12.87 | 23.44 | 14.88 | 14.15 | 26.05 |  |
| STGODE | 12.75 | 13.26 | 21.66 | 14.12 | 14.57 | 24.64 | 15.50 | 16.34 | 27.43 |  |
| DSTAGNN | 13.18 | 12.15 | 21.93 | 16.37 | 18.82 | 27.41 | 19.99 | 19.97 | 33.73 |  |
| D^2STGNN | 12.18 | 12.00 | 21.30 | 13.48 | 13.20 | 24.30 | 14.90 | 14.27 | 27.28 |  |
| Incident | LSTM | 14.17 | 10.13 | 23.75 | 17.41 | 15.38 | 29.43 | 20.93 | 14.33 | 34.05 |
| ASTGCN | 14.06 | 10.55 | 23.22 | 16.42 | 15.06 | 27.63 | 18.40 | 12.59 | 30.48 |  |
| DCRNN | 13.62 | 9.86 | 23.04 | 15.36 | 14.35 | 26.73 | 16.92 | 11.69 | 29.38 |  |
| AGCRN | 14.48 | 10.98 | 25.41 | 15.96 | 14.78 | 28.78 | 17.21 | 11.78 | 31.42 |  |
| GWNET | 13.73 | 10.44 | 22.90 | 15.60 | 14.50 | 26.73 | 17.15 | 11.49 | 29.07 |  |
| STGODE | 14.50 | 10.71 | 24.49 | 16.20 | 15.19 | 27.69 | 17.55 | 12.29 | 30.17 |  |
| DSTAGNN | 14.79 | 10.57 | 24.22 | 18.24 | 17.91 | 30.48 | 21.95 | 15.38 | 35.67 |  |
| D^2STGNN | 13.73 | 10.05 | 23.30 | 15.51 | 14.22 | 27.29 | 17.03 | 11.46 | 30.23 |  |

Results. As shown in Table 3, all baselines perform significantly better in predicting on the general test dataset compared to the incident test dataset, since incidents added irregularity into the traffic systems. This suggests that investigating how to improve the performance of forecasting models on time series prediction following an incident is worthwhile and warrants further research and discussion. More details in Appx. A.2.

### 4.3 Incident Classification

Since traffic incidents typically affect the traffic parameters in the nearest sensors, it is viable to deduce the traffic conditions based on the dynamics of the parameters. In this work, a time series classification task is designed on XTraffic, which involves inferring incident categories based on the traffic parameters during particular time slots detected by the sensors.

Experimental setting. Since traffic sensors are not always available at the site of an incident, we start by identifying the nearest sensor affected by each incident according to the distance (i.e., the ABS PM in Table 6). Then, we extract recorded indexes (traffic speed, lane occupancy, and traffic flow) in these sensors during a time window when the incident occurs.
Augmented with normal data, these form the basis for characterizing traffic parameters, which fall into three categories: “accidents”, “hazards”, and “normal”. According to Fig. 2(b), we standardize the duration length as the 95th percentile, i.e., 2 hours, thus, the time window $w=24$. The task is defined as a multivariate time series classification which uses three-channel time series features with $w=24$ to infer the situations of the traffic. We randomly sampled 9,000 examples to experiment, 3,000 samples per category. The data is divided into training and testing sets in a 7:3 split. We also analyze the channel-wise contribution to classification performance to validate the importance of each channel’s role in the incidents. This involves identifying incidents using features from only one channel.

Baselines. We selected representative baselines from various families, including traditional statistical learning, i.e., Decision Tree (DT) [], contrastive learning method that learns general time-series embedding, i.e., TS2Vec [], MLP-based solution, i.e., gMLP [], sequential models, i.e., Sequencer [], CNN-based models, i.e., OmniScaleCNN [], Transformer-based models, i.e., PatchTST [] and FormerTime []. More details in Appx. A.3.

Figure: Figure 3: Visualization of the representation of the time series on the dataset, extracted from the last hidden layer of OmniScaleCNN.
Refer to caption: x3.png

Performance Evaluation. From Table 4: (1) The best classification can achieve 41% accuracy, indicating classifying traffic conditions based on traffic indexes is feasible (better than random guess). Among the datasets with different inputted features, DT and PatchTST always outperform the baselines.
gMLP also shows strong performance, notably achieving top ranks in several categories and particularly excelling in the mixed channels.
(2) Variability across channels. Different methods exhibit varying degrees of effectiveness depending on the channel used, e.g., Sequencer performing better with speed and worse with flow, and OmniScaleCNN opposite. Thus, selecting appropriate features can guarantee the model effectiveness.(3) Integrating multiple features often leads to better classification. However, the performance gain is method-dependent, e.g., DT and gMLP showing substantial improvement, but TS2Vec and OmniScaleCNN benefit less.

**Table 4: Performance among the SOTA time series classification methods across the datasets, with the top 1 in grey, 2nd in boldface, and 3rd underlined.**
| Methods | speed channel-only | occupancy channel-only | flow channel-only | All channels Mixed |  |  |  |  |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Acc | Precision | Recall | Acc | Precision | Recall | Acc | Precision | Recall | Acc | Precision | Recall |  |
| DT | 41.6% | 41.5% | 41.5% | 40.4% | 40.2% | 40.2% | 39.4% | 39.3% | 39.3% | 41.6% | 41.4% | 41.5% |
| TS2Vec | 36.6% | 36.2% | 36.2% | 36.6% | 36.5% | 36.4% | 37.3% | 37.0% | 37.0% | 37.3% | 37.0% | 37.0% |
| gMLP | 41.3% | 41.2% | 41.1% | 38.4% | 38.3% | 38.3% | 37.3% | 37.2% | 37.2% | 41.6% | 41.5% | 41.5% |
| Sequencer | 35.8% | 35.8% | 35.6% | 35.6% | 35.3% | 35.2% | 34.1% | 33.9% | 33.9% | 40.3% | 40.2% | 40.2% |
| OmniScaleCNN | 35.7% | 35.1% | 35.1% | 36.9% | 36.3% | 36.3% | 37.0% | 36.8% | 36.8% | 40.9% | 40.8% | 40.8% |
| PatchTST | 38.3% | 38.1% | 38.1% | 39.0% | 38.6% | 38.7% | 39.5% | 39.3% | 39.3% | 39.4% | 39.4% | 39.3% |
| FormerTime | 35.9% | 31.0% | 33.4% | 41.0% | 41.1% | 40.8% | 37.8% | 38.2% | 37.3% | 40.5% | 40.5% | 40.1% |

Fig. 3(a) visualizes the extracted feature from OmniScaleCNN by t-SNE [] using flow data.The selected furthest embeddings (in Fig. 3(b)) shows clear distinct flows between the three classes, yet the closest embeddings (Fig. 3(c)) not. (1) There are distinct and separated patterns in the embeddings of traffic incidents located in corner and center areas, which facilitates classification, causing better performance than random guess. (2) Not all incidents impact traffic indices largely, as many incidents, such as car fires and minor accidents with no injuries, are short-lived. These hard cases confuse the classifier since the traffic patterns do not change significantly.

### 4.4 Global Traffic Causal Analysis

Figure: Figure 4: Global causal: (a) The learned DAG among meta-features, incidents, and traffic indexes. (b) The factual explanation for selected edges.
Refer to caption: x4.png

Experiment Setting: In our XTraffic dataset, we have static variables, e.g., road information, represented as scalar and vector, and dynamic variables, e.g., accidents and traffic flow, represented as functional data. Considering the multimodal nature of the variables, we employ MM-DAG [] to construct the causal network in different districts. We collect data on 17 variables across four districts with the highest incident rates throughout 2023. These variables fall into three categories: (1) meta-feature variables, e.g., temporal, environmental, road structural information; (2) incident variables, i.e., the occurrence of incidents; and (3) traffic statistics, which reflect traffic conditions. (Details of these variables in Table 7, Appx. A.4). We consider the data collected at each road node for each day as a single sample, using a granularity of one hour.
In learning DAG, two constraints are placed:
(1) edges are not allowed to point toward meta-feature variables since meta-feature variables generally describe environmental and infrastructural contexts that inherently influence other variables rather than being influenced by them. (2) traffic statistics variables are restricted from directing edges towards other nodes since these statistics fundamentally represent outcomes or states of the traffic system, typically influenced by both high-level environmental conditions and specific incidents, rather than serving as direct causes themselves.

Results: Fig. 4(a) illustrates the four causal networks derived by MM-DAG. (1) Certain static variables are essential; such as road surface, terrain, and road width, they exert significant influences on the incidence of traffic events and the overall traffic conditions. (2) The static variables’ impacts are consistent: Across various districts, due to their inherent properties, these underlying attributes consistently influence road and traffic dynamics across different regions. (3)
Dynamic variables like time, weather, and visibility also affect traffic incidents, though their causal relationships appear to be weaker and vary by district. For example, the causal links from events to fire and events to hazards show variability and weaker connections in different districts.

We further explain four significant edges. In Fig. 4(b1), the probability of encountering hazards is higher during the early morning (5 AM to 8 AM) and late afternoon (after 3 PM) on weekdays compared to weekends, likely due to increased traffic flow during peak commuting hours. In Fig. 4(b2), rain increases the probability of accidents compared to dry conditions, but the amount of rainfall does not significantly affect the accident rate. In Fig. 4(b3), bridges and road surfaces with a base thickness of >7 inches have a lower probability of hazards compared to concrete surfaces. This may be due to the enhanced durability and grip provided by thicker road surfaces and bridge constructions. In Fig. 4(b4), flat terrain is associated with higher average speeds compared to rolling terrains. The tendency for higher speeds on flat terrains is likely due to the reduced need for vehicles to decelerate for climbs or curves, allowing for more consistent and faster travel.

### 4.5 Local Causal Analysis for Road Relations

To demonstrate the value of our XTraffic dataset in revealing the causal relations among the roads, we conduct local causal analysis on a real case from XTraffic. We employ the $\text{PCMCI}^{+}$ [] algorithm for causal structure learning.
Since the underlying ground truth of causal dependencies is unknown, the hyperparameters, e.g., significance level and maximum time lag, are set for better interpretability.

Figure: Figure 5: Case of Local Causal Analysis
Refer to caption: x5.png

Experiment Setting: In Fig. 5, we select the road network near an interchange in Novato, California. On the evening of February 11, 2023, a traffic incident “1141” occurred at the eastbound exit of the interchange. This incident indicates that a traffic collision occurred and that there were potential injuries requiring a medical response. We then select four traffic nodes, represented by their traffic flow indexes, $\{X^{1},X^{2},X^{3},X^{4}\}$, that might be affected by the traffic incident.
We see from Fig. 5 (a2) that the decrease in traffic flow of $X^{3}$, which is the node closest to the incident, significantly accelerated after the incident occurred.
Result: The causal graphs learned by $\text{PCMCI}^{+}$ are in Fig. 5 (b), where the colors depict the strength of causal dependencies and the label of a link represents the time lag of causal dependencies. The pre-incident causal structure matches the common understanding about traffic propagation, indicating that traffic flow propagates from $X^{2}$ through $X^{3}$ to $X^{4}$. Compared to the pre-incident graph, the post-incident graph has two additional lagged causal links $X^{3}\stackrel{{\scriptstyle\text{lag }1}}{{\longrightarrow}}X^{2}$ and $X^{4}\stackrel{{\scriptstyle\text{lag }1}}{{\longrightarrow}}X^{1}$. In such a complicated dynamic traffic system, explaining the change of causal dependencies is challenging and we endeavour to provide some conjectures for reference. Due to the traffic collision between $X^{2}$ and $X^{3}$, congestion likely occurred near $X^{3}$, reducing the traffic flow at each time slot. However, the traffic demand from $X^{2}$ to $X^{3}$ did not decrease in the short term, causing the congestion to gradually spread to $X^{2}$.
The congestion at the eastbound exit of the interchange led to a decrease in traffic demand from $X^{1}$ to $X^{4}$. Fewer vehicles chose to slow down to enter the ramp, causing increased speed and higher traffic flow at $X^{1}$. (Details in Appx. A.5)

## 5 Conclusion and Limitations

Conclusion. We propose a pioneering traffic and incident dataset XTraffic. It integrates traffic flow data with incident records and road comprehensive meta-features, filling a significant gap in traffic analysis and Incident analysis. XTraffic lays a solid groundwork for research focused on understanding traffic dynamics, causality, and interrelationships. Through four groups of experiments, we demonstrate that our dataset offers expanded possibilities for research in traffic forecasting, incident classification, and detection, as well as causal analysis.

Limitation and future work.Our dataset currently faces three primary limitations. Firstly, weather data is crucial for traffic and incident analysis; however, our dataset lacks well-integrated weather information for use. Secondly, while we can locate specific incident locations relatively precisely using absolute PM values and road names, this method is less effective for visualization compared to using latitude and longitude coordinates. Lastly, there are still gaps in our traffic data. In response to these issues, we plan to enhance our dataset by collecting more comprehensive weather data. Additionally, we will use OpenStreetMap to analyze and generate precise geographical coordinates for incidents. Finally, we aim to develop improved methods for imputing missing values in the traffic data to ensure completeness and reliability.

## Checklist

- 1.
For all authors…
(a)
Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] Please see the Section 1
(b)
Did you describe the limitations of your work?
[Yes] Please see Section 5
(c)
Did you discuss any potential negative societal impacts of your work?
[N/A] The paper is related to transportation and does not include personal private information.
(d)
Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] The data is not related to personal information. The traffic data is highly aggregated and does not contain information on human or vehicle trajectories
- 2.
If you are including theoretical results…
(a)
Did you state the full set of assumptions of all theoretical results?
[N/A]
(b)
Did you include complete proofs of all theoretical results?
[N/A]
- 3.
If you ran experiments (e.g. for benchmarks)…
(a)
Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[Yes] Although the main contribution of this paper focuses on constructing a new dataset, we also release the code for the experiment which is mentioned in the supplemental material.
(b)
Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] We give the details in the 4 section and supplemental materials.
(c)
Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[No] Limited to the computing resource, we only run the experiment once. We will run the experiments multiple times in the next stage and provide the results on the dataset website.
(d)
Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] Please see Section 4.
- 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets…
(a)
If your work uses existing assets, did you cite the creators?
[Yes] Please see Section 3.2
(b)
Did you mention the license of the assets?
[Yes] There is a Terms of Use of the existing assets, and we mention the content about distrbuting.
(c)
Did you include any new assets either in the supplemental material or as a URL?
[Yes] Please see [http://xaitraffic.github.io](http://xaitraffic.github.io)
(d)
Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
[Yes] Please see Section 3.2
(e)
Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[Yes] Please see Section 3.2
- 5.
If you used crowdsourcing or conducted research with human subjects…
(a)
Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A]
(b)
Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A]
(c)
Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]

## Appendix A Appendix

In this Appendix, we will introduce a few more details about the XTraffic data, and the experiment settings of the Post-Incident Traffic Forecasting, Incident Classification, Global Causal Analysis, and Local Causal Analysis.

### A.1 Details of XTraffic

Licence: According to the Ownership section in Caltrans Terms of Use of PEMS, we can collect and construct a dataset from the source and distribute it. We collected all of the data before 17/05/2024. More details and the introduction of the dataset can be found in the supplementary material. Our XTraffic is released under a [CC BY-NC 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0). The code for the experiments is released under a [MIT License](https://opensource.org/licenses/MIT).

Incidents: The details of incident data features are shown in Table 5.

**Table 5: Meta Feature Introduction**
| Feature | Type | Description |
| --- | --- | --- |
| Incident ID | Integer | Unique identifier for each recorded traffic incident. |
| Duration | Integer | Length of the incident measured in minutes from start to resolution. |
| Abs PM | Float | Point of the incident in absolute postmile notation along the road. |
| Fwy | String | The freeway name where the incident occurred. |
| AREA | String | The city or town where the incident took place. |
| DESCRIPTION | String | A brief narrative describing the specifics of the incident. |
| LOCATION | String | The exact address on the freeway where the incident happened. |
| Type | String | Category of the incident, such as accident, hazard, or road closure. |
| dt | DateTime | Timestamp indicating when the incident was first reported. |

Meta-feature: The details of meta-feature table is in Table 6,

**Table 6: Meta Feature Introduction**
| Feature | Type | Description |
| --- | --- | --- |
| Sensor ID | String | Unique identifier for each traffic sensor. |
| Inner Shoulder Width | Float | Width in meters of the inner shoulder on the lane. |
| Outer Shoulder Width | Float | Width in meters of the outer shoulder on the lane. |
| Functional Class | String | Classification of roads based on the function they provide. |
| Inner Median Type | String | Type of median on the inner side of the road. |
| Inner Median Width | Float | Width in meters of the median on the inner side of the road. |
| Road Width | Float | Total width in meters from one side to the other. |
| Lane Width | Float | Width in meters of each traffic lane on the road. |
| Design Speed Limit | Integer | Maximum speed limit designed for the road in kilometers per hour. |
| Terrain | String | Physical features and shape of a landscape, e.g., flat, mountainous. |
| Population | String | Type of terrain surrounding the road, e.g., urban, rural. |
| Barrier | String | Description of any barriers along the road, e.g., guardrail, none. |
| Surface | String | Road surface type, e.g., asphalt, concrete. |
| Roadway Use | String | Primary use of the road, e.g., commercial, residential. |
| Length | Integer | The total length of the lane on the road. |
| Latitude | Float | Geographical latitude of the road’s location. |
| Longitude | Float | Geographical longitude of the road’s location. |
| Abs PM | Float | Point of measurement in absolute postmile notation along the road. |
| Direction | String | The direction of the lane, e.g., East, North. |
| Fwy | String | The name of the freeway where the sensor is located in. |
| District | Integer | The district ID, e.g.. |
| County | String | The county where the sensor is located in, e.g., Orange, Los Angeles. |
| City | String | The city where the sensor is located in, e.g., Marina, Oakland. |
| Sensor Type | String | The sensor cateogry, e.g., radars, magnetometers. |
| Type | String | The level of the road, e.g., mainline, On Ramp. |
| HOV | String | Whether it is HOV lane or not |

### A.2 Experiment Details on Post-Incident Traffic Forecasting

Baselines. The baselines we selected to do the forecasting experiments are typical models in traffic forecasting domain.

- •
LSTM[]: A basic model focusing solely on the temporal relationships within traffic data.
- •
ASTGCN[]: Enhances the STGCN by incorporating an attention mechanism to better capture node correlations.
- •
DCRNN[]: An RNN-based model that utilizes diffusion convolution to model traffic flows.
- •
AGCRN[]: An adaptive model that combines RNN architecture with an attention mechanism to focus on spatial correlations.
- •
GWNET[]: Utilizes a gated mechanism in a TCN framework to filter out irrelevant information effectively.
- •
STGODE[]: Uses ordinary differential equations to dynamically model relationships among traffic nodes.
- •
DSTAGNN[]: Designed to dynamically capture changing correlations among traffic sensors.
- •
D^2STGNN[]: A dual-layer spatial-temporal GNN that addresses hidden correlations in traffic data for forecasting.

### A.3 Experiment Details on Incident Classification

Baselines. We adopt the following representative time series classification baselines. (1) Decision Tree (DT): We tailor the canonical decision tree algorithm for the task, recursively partitioning data based on feature values to create a tree-like model that makes classifications at its leaf nodes. (2) TS2Vec []: It is a universal framework for learning robust and flexible time series representations using hierarchical contrastive learning over augmented context views, making the classification by a linear classifier. (3) gMLP []: It is a simple network architecture based solely on MLPs with gating, which performs as well as Transformers in key language and vision applications. (4) Sequencer []: It models long-range dependencies using LSTMs without self-attention layers, which enhances performance by reducing the sequence length and creating spatially meaningful receptive fields. (5) OmniScaleCNN []: It is a 1D-CNN architecture that utilizes a set of prime number-based kernel sizes to efficiently capture optimal receptive field sizes without scale tuning across diverse time series classification tasks. (6) PatchTST []: It incorporates patching of time series into subseries-level patches and channel-independence to improve long-term forecasting accuracy based on the Transformer backbone. (7) FormerTime []: It employs a hierarchical Transformer-based architecture to learn multi-scale feature maps and introduces an efficient temporal reduction attention mechanism and a context-aware positional encoding generator for multivariate time series classification.

More Results. Fig. 6 reports the critical difference diagram as presented in [], which compares the mean ranks of the baseline methods on the four datasets (three channel-only and all mixed) in the classification task. The thick horizontal lines in the diagram denote groups of methods whose performance differences are not statistically significant within the critical difference (CD) threshold. It can be seen that DT, gMLP, and PatchTST are among the top-performing methods with the lowest mean ranks, indicating their superior performance. Although DT, gMLP, and PatchTST are highlighted as top performers, the differences among the top five methods are not statistically significant since they are in a group, suggesting comparable effectiveness in this task.

Figure: Figure 6: Critical difference diagram over the mean ranks of the compared methods
Refer to caption: x6.png

### A.4 Experiment Details on Global Causal Analysis

The introduction of MM-DAG: MM-DAG is a score-based causal discovery algorithm. It learns multiple DAGs with multimodal data where their consensus and consistency are maximized. For multimodal data, it proposes a multi-modal regression for linear causal relationship description of different variables by functional principal component analysis. For multitask learning, it uses causal difference to ensure the consistency. The overall optimization problem can be represented as:

$$ $\displaystyle\hat{\mathbf{C}}_{(1)},...,\hat{\mathbf{C}}_{(L)}$ $\displaystyle=\underset{\mathbf{C}_{(1)},...,\mathbf{C}_{(L)}}{\arg\min}\sum_{ l=1}^{L}\frac{1}{2N_{l}}\|\mathbf{A}_{(l)}-\mathbf{A}_{(l)}\mathbf{C}_{(l)}\|_ {F}^{2}$ $\displaystyle\quad+\rho\sum_{l_{1},l_{2}}s_{l_{1},l_{2}}DCD(\mathbf{W}_{(l_{1} )},\mathbf{W}_{(l_{2})})+\lambda\sum_{l=1}^{L}\|\mathbf{C}_{(l)}\|_{1}$ $\displaystyle{\rm s.t.\ }h(\mathbf{W}_{(l)})={\rm tr}(e^{\mathbf{W}_{(l)}})-P_ {l}=0,\forall l$ $$

where $\mathbf{A}$ is variables after FPCA, $\mathbf{C}$ are causal matrix and $\mathbf{W}_{(l)ij}=\|\mathbf{C}_{(l)ij}\|_{F}^{2}$. $s_{l_{1},l_{2}}$ is the given constant reflecting the similarity between tasks $l_{1}$ and $l_{2}$, $\rho$ controls the penalty of the difference in causal orders, where larger $\rho$ means less tolerance of difference. $\lambda$ controls the ${L}_{1}$-norm penalty of causal matrix which guarantees that edges are sparse. In our setting, we set $\lambda=0.001$, $\rho=1$ and $s_{l_{1},l_{2}}=1,\forall l_{1},l_{2}$.

Explaination of the nodes: The details of the nodes in the global causal graph in listed in Table 7.

**Table 7: The description and types of the variables used in traffic causal analysis**
| Category | Name | Type | Description |
| --- | --- | --- | --- |
| high-level variables | Time | Scalar | Day type indicator: $=1$ if the day is a weekend; $=0$ otherwise. |
| Event | Scalar | Public holiday indicator: $=1$ if the day is a public holiday; $=0$ otherwise. |  |
| Visibility | Functional | An integer ranged from 0 to 16 to indicate the visibility of the road in the district. |  |
| Surface | Vector | Attributes describing road material, e.g., concrete, bridge deck. |  |
| Terrain | Vector | Characteristics of the terrain surrounding the road, e.g., flat, rolling. |  |
| Width | Scalar | The width of the road. |  |
| Weather | Functional | An integer ranged from 0 (No rain) to 3 (Heavy rain). |  |
| incident variables | Hazard | Functional | Details of any hazards present, e.g., obstacles, spillage. |
| NoInj | Functional | Records of accidents with no injuries. |  |
| UnknInj | Functional | Records of accidents with unknown injury statuses. |  |
| 1141 | Functional | Records of accidents needing an emergency response (coded 1141). |  |
| Fire | Functional | Incidents involving vehicle fires or roadside fires. |  |
| AHazard | Functional | Presence of animals on the road that could cause hazards. |  |
| CarFire | Functional | Specific incidents involving car fires. |  |
| traffic statistics | Flow | Functional | Measures of traffic flow, typically in vehicles per hour. |
| Occupancy | Functional | Percentage of the road occupied by vehicles at a given time. |  |
| Speed | Functional | Average speed of traffic flow. |  |

### A.5 Experiment Details on Local Causal Analysis

In local causal analysis, We employ the $\text{PCMCI}^{+}$ algorithm to discover the causal relations in traffic data, which utilizes momentary conditional independence (MCI) test to determine the existence of causal links. Typically, the lagged and contemporaneous causal relations are displayed in a dynamic Bayesian network (DBN) as shown in Fig. 7 (a). In this work, to simplify the visualization, we choose to use the process graph as shown in Fig. 7 (b) to aggregate the information in the DBN. In both DBN and process graph, the link color denotes the magnitude of the causal effect measured by the MCI test statistic (e.g., the partial correlation coefficient). The label of a link lists all significant lags of cross-dependencies in process graph. Since we are more interested in the causal links between different traffic nodes, the links denoting auto-dependencies in DBN are summarized into node colors in process graph and the auto-dependency lags are omitted.

Figure: Figure 7: Examples of causal graphs for time series variables. (a) Dynamic Bayesian network (DBN). (b) Process graph which summarizes the information in DBN. Process graph aggregates the information in the DBN to simplify the causal structure visualization. While the process graph is nicer to look at, the time series graph better represents the spatio-temporal dependency structure from which causal pathways can be read off. In both graphs, link colors depict the magnitude of the cross-node causal effects as measured by the MCI test statistics. In process graph, node colors depict auto-dependency strength.
Refer to caption: extracted/5714373/figures/dbn_example.png

The choice of causal structure learning method influences the results of local causal analysis. Ideally, we would like to perform analysis on real cases or datasets with known underlying ground truth of causal dependencies. However, such cases or datasets are rare especially in complex dynamic scenarios such as traffic. To enhance the credibility of the learned causal structure, we use different causal discovery methods and verify the consistency of the results obtained by the different methods. Fig. 8 shows the pre-incident causal graphs of case I learned by score-based method DyNotears [] and constrained-based method $\text{PCMCI}^{+}$ []. The graph structures learned by both methods are similar, but the time lag of the link $X^{3}\rightarrow X^{4}$ is different, which is greatly influenced by the sampling frequency of traffic data. Due to the limited number of samples affected by the incidents, we use $\text{PCMCI}^{+}$ to discover post-incident causal structure for its robustness with small sample size and high dimensionality.

Figure: Figure 8: Pre-Incident Causal Graphs for Local Causal Analysis Case Learned by Different Methods. (a) Process Graph Learned by DyNotears. (b) Process Graph Learned by $\text{PCMCI}^{+}$.
Refer to caption: extracted/5714373/figures/case1_pre_comparison.png

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: 1. There is a typo at the beginning of the section 3.2, for the collection on April 20, 2024, and ended on May 10, 2024. Would it be more like April 20, 2023?

2. As mentioned in the paper, some incidents may affect only one direction of the traffic. However, among the two matching methods to match the nodes and the incidents, the only criteria to consider is the distance, which is not able to tackle the mentioned observation. Could you explicitly explain how the problem could be tackled?
soundness: 3
strengths: This paper makes an original approach to align the traffic data with the incidents’ records. The experiments part in this paper proves convincingly that this approach could be beneficial for new researches in this field to emerge, showing the significance of this work. The massive analysis and the experiments with recent baseline models greatly validate the work. The work is meaningful for the community.
summary: This paper introduces a new dataset named XTraffic, which provides time-series indexes on Traffic data (traffic flow, lane occupancy, and average vehicle speed), Incident data (Spatiotemporally aligned records of seven different incident types) and Road meta-feature (Detailed physical and policy-level attributes of lanes). The goal of the work is to bridge the gap between traffic and incident data by creating a comprehensive dataset that can improve the interpretability and accuracy of traffic analysis and prediction tasks. The paper demonstrates the effectiveness of XTraffic in four main tasks: post-incident traffic forecasting, incident classification, global causal analysis and local causal analysis. The experiments show that XTraffic significantly improves the performance of traffic forecasting and incident classification models, providing a more detailed understanding of traffic dynamics and incident impacts.
weaknesses: The data are collected by Caltrans Performance Measurement System (PEMS), which leave the main contribution of this paper as the alignment of traffic and incidents. The alignment part has not been sufficiently detailed. It lacks of novelty regarding to ICLR standards.

---

confidence: 3
contribution: 2
initial_rating: 3
presentation: 2
questions: * What were important data processing steps to create the dataset?

* How were these validated?
soundness: 2
strengths: * Considering traffic and incidents jointly, and introducing a benchmark dataset is useful.
* Some of the experimental findings are interesting and may lead to future research: the paper shows that traffic prediction performance is significantly reduced after incidents, studies the performance of models for incident classification, and through causal analysis shows what features are important for traffic.
summary: This paper introduces a new transportation dataset that includes both road traffic and incidents by exporting data from Caltrans Performance Measurement System (PeMS) and performing some data cleaning. The primary advantage of this dataset compared to existing ones is that it includes both road traffic and incidents. The paper presents a number of experiments with this paper, starting with a descriptive analysis of the data, forecasting traffic under normal conditions and after incidents, classifying incidents based on traffic, and causal analysis.
weaknesses: * **Data Collection and Cleaning:** The primary contribution of the paper is supposed to be the novel dataset. However, this entire dataset seems to be just an export from Caltrans PeMS. The paper mentions some data cleaning steps, but these are not described in detail, and it is not clear if they are correct or how useful they are (the entire description of the data collection and cleaning is half a page).

* The paper states: "We also collected comprehensive meta-features of these sensors"
Are these also from PeMS?

* "For incident data, we removed repeated incident records"
How were these identified? Why were there repeated records in the data source?

* "For incident data, we removed ... records without absolute postmile"
Why were these removed? What fraction of the data was removed? How complete was the data to begin with (before these removals)?
In general, it is not clear how reliable this dataset is; there is no validation or discussion.

* Was incident duration (used Section 4.1.2) part of the original data?

* **Details for Experiments:** Most of the experiments lack sufficiently detailed descriptions of their methodology. For example, Section 4.2 include zero discussion of references for the methods that are evaluated (they are listed only in the results table). The description of the "Experiment Setting" also lacks detail. 

* Similarly, Section 4.3 lacks information and references on the methods and on the experimental setup.

* **Related Work:** All of the traffic datasets discussed in Section 2 (Related Work) seem to be from a single source, Caltrans PeMS. It would be good if the paper clarified this and introduced PeMS.

* On a related note, the paper includes the following sentence: "Some traffic studies that incorporate incident data use datasets that have not been aggregated or made open source, making it difficult to use them as a standard for evaluating new methods."
There are no references. Which studies does this refer to?

* **Writing:** The quality of writing needs to be improved. While some of the grammatical mistakes and typos are minor, there were multiple parts that were hard to read and understand. For example: "STCL (Liu et al., 2022b) introduced two-month New York City Vehicle incident data as one-hot accident embedding into the prediction of the Taxi and Bike data. Like what we have observed in most works that analyze traffic with incidents (Liu et al., 2022b; Hong et al., 2024), the transport modes of traffic data and that of incident data are NOT seamlessly matched; thus, it will be less convincing to analyze vehicle incidents’ impact on bike traffic (bike lane is separated from vehicle lane) or on taxi traffic (taxi is only a subset mode of the whole vehicle)." (By the way, this dataset does include vehicle traffic and incidents; not just bike traffic.)

* As another example: "XTraffic serves as a rigid testing bed and empirical support to justify model effectiveness and interoperability in deep learning and traffic community."
What does "rigid testing bed" mean? What does "justifying" model effectiveness and interoperability? Do the authors mean evaluating effectiveness and interoperability?

* Early on, the paper states: "We offer a rich collection of physical and policy-level road meta-features."
At this point, it was not clear what "policy-level" meta-features are.

* The description of related work on traffic causal analysis was rather confusing (lines 145 to 158). For example, symbols $X$, $Z$, and $W$ are used without any introduction. The text is very dense.

* What does the "Incident" column of Table 2 represent? This is never made clear.

* It would be more appropriate to call "Physics" meta-features "Physical" meta-features.

* "Since traffic incidents typically affect the traffic on roads, it is viable to deduce the traffic conditions based on the dynamics of the parameters."
What does this mean?

* **Paper Length:** There are some parts that could be omitted shortened. Section 3.1 includes a lot of redundancy, e.g., most of the text between lines 196 and 215 just repeats what has been stated earlier in the subsection. 

* The descriptive analysis of Section 4.1 does not seem particularly useful. Section 4.1.1 just presents some statistics without any discussion. These could be omitted or moved to the appendix.

* Similarly, Section 4.5 does not seem particularly important since it is just an illustrative example.

* **References:** Some references are malformed: "(Department, 2024; of Motor Vehicles, 2023; of Transport, 2016; Huang et al., 2023)"

* Also, the presentation of the references needs to be improved:
"are proposed by (Yu et al., 2018)" should be "are proposed by Yu et al. (2018)", "(Huang et al., 2023) proposes" should be "Huang et al. (2023) propose" (note the conjugation), and so on.

* **Figure and Table References:** Many of these are wrong, pointing to the wrong table, figures, or subfigures. For example, "Table 4" on line 189, "Fig. 2(a)" on line 272, "Fig. 3(b)" on line 274 are all wrong.

---

confidence: 5
contribution: 2
initial_rating: 5
presentation: 2
questions: * Why do the authors claim that integrating traffic and incident data is underexplored, given that such integration is a fundamental requirement in transportation studies?
* How do the authors define the separation between “traffic data” and “incident data,” and why is it necessary for this research? Is this separation justified in the context of broader transportation literature?
* Why is the work presented as a “new dataset,” given that the data mainly come from existing sources like PeMS, and the integration is primarily a matter of processing? Would this work be more suitable as an open-access contribution on platforms like GitHub?
* Are the authors considering expanding the dataset’s scope to be more applicable across diverse research problems, beyond just causal analysis of traffic on accidents? How do they envision its broader use in both computer science and transportation fields?
soundness: 2
strengths: * The integration of different data sources in XTraffic is a strong point, as it encourages researchers by providing a more holistic view of traffic and incidents.

* The paper compares different tasks related to traffic accidents, presenting a comprehensive analysis of traffic forecasting, incident classification, and causal impacts.

* The benchmarking of different models is well-executed, with references to the work by Liu et al. (2024), ensuring that the dataset is rigorously tested against existing models.
summary: The paper presents XTraffic, a pioneering dataset that spatiotemporally aligns traffic flow data with incident records across 16,972 traffic nodes over the entire year of 2023. The dataset includes traffic indices (flow, lane occupancy, and average vehicle speed), seven types of incidents, and comprehensive meta-attributes for each traffic node. XTraffic aims to improve the interpretability of traffic-related tasks by integrating traffic and incident data. The authors explore four main applications: post-incident traffic forecasting, incident classification based on traffic indices, global causal analysis of traffic dynamics, and local causal analysis at individual road nodes. The dataset provides new opportunities for research in traffic forecasting, incident detection, and understanding causal relationships in traffic systems.
weaknesses: * I have mixed feelings about the paper. While the integration of data sources is commendable, I feel the authors haven’t given enough credit to the PeMS system, which seems to be the primary data source. The dataset appears to be more of an extension of PeMS data with additional metadata, rather than a newly collected dataset.

* The work lacks a thorough literature review, particularly of transportation-related research outside of computer science, which weakens the foundation for its claim that integrating traffic data into accident analysis is underexplored. For example, studies by Jin & Noh (2023), Chen et al. (2024), and Liao et al. (2023) integrate both traffic and incident data, challenging the paper’s assertion that this integration is novel.

* The terminology used is confusing. The division between “traffic data” and “incident data” is misleading, as many transportation studies view accidents as part of traffic datasets. The authors’ use of “traffic state datasets” could be clearer, given the broader taxonomy of traffic data that includes both mobility and incident metrics.

* The paper seems limited in scope, focusing narrowly on datasets used in forecasting tasks while neglecting broader applications seen in transportation studies. It lacks insights into the real-world impacts of the dataset for fields beyond computer science.

* The dataset description does not reflect genuine data collection; it mainly involves downloading, processing, and integrating publicly available data, which challenges its classification as a new dataset. The authors’ claim of “collection” is misleading since the data originates from public U.S. city protocols, not direct field observations or deployments.

* The dataset appears suitable only for evaluating the causal impacts of traffic data on accidents, implying a prescriptive approach to how the dataset should be used. This limits potential applications and doesn’t reflect the diversity of research questions found in transportation venues like Accident Analysis and Prevention (AAP).


-----References
* Jin, Zhixiong, and Byeongjoon Noh. "From prediction to prevention: Leveraging deep learning in traffic accident prediction systems." _Electronics_ 12, no. 20 (2023): 4335.
* Chen, Jiaona, Weijun Tao, Zhang Jing, Peng Wang, and Yinli Jin. "Traffic accident duration prediction using multi-mode data and ensemble deep learning." _Heliyon_ 10, no. 4 (2024).
* Liao, Xishun, Guoyuan Wu, Lan Yang, and Matthew J. Barth. "A Real-World Data-Driven approach for estimating environmental impacts of traffic accidents." _Transportation research part D: transport and environment_ 117 (2023): 103664.

---

confidence: 5
contribution: 2
initial_rating: 3
presentation: 3
questions: 1. The proposed dataset is based on existing data sources, e.g., incident and traffic data are collected from Caltrans Performance Measurement System (PEMS). The first question arises that since these datasets have existed for a while and some studies have already used both of them for traffic forecasting or causal analysis problems. What is the unique idea of this study compared with these existing studies? The second question is that some previous studies also used some external data sources, e.g., weather and Twitter (now X) data. Why not consider these external data sources too? The third question is that if the proposed dataset is built on existing ones. Then it is out of control for the data quality and the original data problems. For example, "For traffic data, we removed the sensor with less than 50% observations of traffic volume and reserved the data of 16,972 sensors with meta-features." There are many problems in the PEMS data, such as data missing. The final problem is how to determine the data amount is sufficient for the matching between the traffic and incident perspectives or not. If the spatial points are too scare, it is difficult to find both the traffic and incident data in the same spatial and temporal range.
2. The matching method could be an important process for the targeted dataset to be built in this paper. However, the authors fail to give details for their matching method. "We provide two methods for this matching process: (1) involves matching only the nearest sensor on the same freeway as the incident, (2) involves setting a distance threshold and incorporating all sensors within this specified range." Which is the specific method used in the formulated datasets? Or how to decide which method to use? How to set the distance threshold is also not given. It is also difficult to evaluate the matching result since there is no ground truth. The authors fail to verify that their matched results are reasonable. More numerical experiments for the matching methods are expected.
3. The final comments are about the experiments. The authors fail to demonstrate that the proposed combined dataset opens new windows for follow-up studies. The descriptive analysis are very intuitive and the case studies can be conducted with existing datasets. It is difficult to understand how this proposed dataset advances relevant studies.
soundness: 2
strengths: This paper aims to propose a comprehensive traffic dataset with both traffic and incident data. This dataset is meaningful as there are no similar structured datasets in the literature.
summary: The paper introduces XTraffic, a comprehensive dataset that integrates traffic flow data with incident records and road meta-features, covering a large-scale region with 16,972 traffic nodes over the entire year of 2023. The dataset aims to bridge the gap between traffic and incident data, enabling research in traffic forecasting, incident classification, and causal analysis. It includes time-series data on traffic flow, lane occupancy, and average vehicle speed, along with records of seven different incident classes that are spatiotemporally aligned with the traffic data. Each node in the dataset also features detailed physical and policy-level meta-attributes of lanes. The paper presents experiments on post-incident traffic forecasting, incident classification using traffic indexes, global causal analysis among traffic indexes, meta-attributes, and incidents, and local causal analysis within road nodes to examine how different incidents affect road segments' relations. The dataset is available for research purposes and is expected to revolutionize traditional traffic-related tasks towards higher interpretability and practical application.
weaknesses: 1. The dataset does not provide the precise latitude and longitude of incidents. While this information could be inferred from the absolute postmile (Abs PM) and the closest sensor location, not having this data readily available could hinder detailed spatial analysis of incident impacts.
2. The dataset is currently insufficient for cross-year seasonal analysis due to the limited data collected so far. The authors are aware of this and are in the process of collecting and organizing data from additional years to enhance the dataset's capabilities in this area.
3. The dataset's granularity may not be fine enough for analyzing the specific impact of incidents on precise road segments, which could be crucial for certain types of traffic management studies.