Source-linked AI summary

General Semantic Knowledge Infusion for Spatio-Temporal Traffic Forecasting

Mattis thor Straten, Yannick Wolker, Steffen Strohm, Prathvish Mithare, Ralf Krestel, Matthias Renz

arXiv:2608.17440v1cs.LG

TL;DR

Traffic forecasting models often rely on sensor proximity or road topology, which omits functional and semantic context. This paper infuses knowledge-graph-derived semantic adjacency into existing models and finds improved results for most baselines, with architecture-specific exceptions.

  • Problem

    Traffic prediction lacks contextual information about surrounding urban functions when models rely primarily on spatial proximity or road-network topology.

  • Method

    The paper extracts parameterized knowledge-graph subgraphs, generates embeddings, and fuses their semantic adjacency matrices with established traffic-prediction approaches.

  • Results

    Additional semantic context improves results for most evaluated traffic-prediction baselines, with architecture-specific exceptions such as DCRNN.

  • Takeaways & Limitations

    The findings identify external semantic adjacency as an opportunity to add knowledge beyond spatial structure in spatio-temporal traffic prediction.

Abstract

from arXiv · show

Although Graph Neural Networks (GNNs) have made significant advances in spatio-temporal traffic forecasting, their performance is limited when they rely solely on sensor proximity or road-network topology. This paper presents a spatio-temporal prediction framework, developed to incorporate knowledge in various forms. This framework aims to improve sensor-level, contextual understanding of the environment. A general-purpose knowledge graph (e.g., Wikidata) is used to create semantic subgraphs around traffic sensors and generate knowledge graph embeddings that capture meaningful relationships, such as nearby points of interest, administrative hierarchies, and the functional roles of locations. These embeddings are then fused with conventional traffic sensor graphs to provide additional adjacency matrices informed by semantics. This allows GNNs to learn the semantic context beyond physical connectivity. This study differs from previous research in two key ways. Firstly, rather than proposing a novel GNN architecture, it demonstrates the general impact of external knowledge on prediction accuracy. Secondly, experiments with well-established traffic forecasting approaches show that external knowledge provides additional information that street network data alone cannot convey. The results show that integrating data from general-purpose knowledge graphs and sensor networks through data fusion can enhance the prediction accuracy of traffic forecasting models, and offers a potential pathway toward improved interpretability.

I. INTRODUCTION

The introduction motivates knowledge infusion for traffic prediction because urban dynamics depend on heterogeneous, multifaceted semantic context beyond spatial proximity. It proposes studying semantically derived adjacency matrices from general-purpose knowledge graphs within established prediction approaches, with controlled analysis of their performance impact.

  • Motivation: Traffic prediction benefits from semantic context because vehicle flows depend on surrounding urban functionality as well as spatial proximity.The introduction identifies functional characteristics of the urban environment as relevant determinants of vehicle flows.
  • Problem: Knowledge graphs represent multifaceted traffic context through structured relationships among places, entities, and concepts.Relevant perspectives include land use, nearby points of interest, administrative hierarchies, and street semantics.
  • Contribution: The work investigates semantically derived adjacency matrices from general-purpose knowledge graphs for existing graph-neural-network traffic prediction approaches.This addresses methods that commonly define adjacency using spatial properties such as travel time or network distance.
  • Contribution: It introduces a general-purpose knowledge-infusion pipeline that does not rely on hand-crafted semantic features or curated knowledge graphs.The pipeline is presented as a contribution for integrating semantic information without city-specific knowledge-graph construction.
  • Contribution: The study systematically analyzes semantic relationships derived from knowledge graphs in established traffic prediction approaches.This focuses on the relationships supplied by external knowledge rather than introducing a new prediction architecture.
  • Contribution: A controlled analysis enables performance gains to be attributed to the added semantic context.The design isolates the contribution of semantic information to prediction performance.

II. RELATED WORK · A. Traffic Prediction with Graph Neural Networks · B. Knowledge Graph Embeddings

The related work frames traffic prediction as multivariate forecasting on irregular sensor networks, motivating graph structures and evolving adjacency designs. It also presents knowledge graph embeddings as numerical semantic representations, with growing relevance for retrieval and contextualization.

  • A. Traffic Prediction with Graph Neural Networks: Traffic prediction is typically formulated as multivariate time-series forecasting from historical measurements at distributed sensors.The objective is to predict future traffic values for all sensors.
  • A. Traffic Prediction with Graph Neural Networks: Because traffic networks are mostly irregular highway networks, graph structures are suitable for modeling them.Sensors are distributed throughout the traffic network rather than arranged regularly.
  • A. Traffic Prediction with Graph Neural Networks: GNNs model each traffic sensor as a graph node, with adjacency matrices determining connectivity and information exchange.Early methods use fixed distance-based adjacency matrices, while later approaches develop adaptive matrices with learned training weights.
  • B. Knowledge Graph Embeddings: Knowledge graphs provide structured semantics for enriching downstream prediction tasks, while knowledge graph embeddings numerically represent entities and relations.Current surveys emphasize incorporating multiple perspectives alongside interpretability and robustness.
  • B. Knowledge Graph Embeddings: Graph-structured information is increasingly integrated into retrieval-augmented generation systems through graph-based retrieval.GraphRAG leverages relational structure rather than relying solely on unstructured text retrieval.
  • B. Knowledge Graph Embeddings: This research direction highlights the relevance of knowledge graphs and embeddings for enhancing reasoning and contextualization in large language model–based systems.The statement follows work on GraphRAG and relationally structured retrieval.

C. Knowledge Graphs for Traffic Prediction · III. METHOD

The paper motivates semantic knowledge infusion as a way to improve explainability, data sparsity, and computational efficiency in spatio-temporal traffic forecasting. It extends existing traffic prediction approaches by using a general-purpose knowledge graph to derive sensor-level semantic context and modify adjacency matrices.

  • C. Knowledge Graphs for Traffic Prediction: Neural-network-based spatio-temporal predictive analytics are inherently difficult to explain.The paper identifies machine-readable and human-understandable knowledge infusion as a major goal of prior research.
  • C. Knowledge Graphs for Traffic Prediction: External knowledge sources can help address data sparsity in spatio-temporal prediction.Prior studies also associate external knowledge with reduced computational-resource requirements.
  • C. Knowledge Graphs for Traffic Prediction: Many prior knowledge-infusion approaches rely on a hand-designed knowledge graph and a novel prediction architecture.These are presented as two common features of previous approaches pursuing explainability and related benefits.
  • C. Knowledge Graphs for Traffic Prediction: Wang et al. infused knowledge into established traffic-prediction baselines across two traffic datasets.Their method added semantic adjacency matrices representing traffic structure, traffic pattern, and regional functionality.
  • C. Knowledge Graphs for Traffic Prediction: Wang et al. did not examine whether their knowledge-extraction process could be generalized or how it affected prediction accuracy.This limitation motivates evaluating a more general extraction approach.
  • III. METHOD: The proposed method enriches traffic forecasting with semantic context from a general-purpose knowledge graph covering the region of interest.It modifies the adjacency matrices of existing forecasting approaches rather than introducing the stated method as a new prediction architecture.
  • III. METHOD: Geo-referenced knowledge-graph entities near traffic sensors are used with knowledge-graph embeddings to approximate each sensor’s semantic context.The method can then leverage pairwise similarity between the neighborhoods of two sensors as semantic information.

A. Spatially Connected Knowledge Graph · B. Spatially Infused Traffic Prediction

The framework builds spatially bounded knowledge-graph subgraphs around traffic sensors, then converts semantic sensor embeddings into an additional adjacency matrix. Established graph-convolution approaches fuse this semantic context with traffic inputs alongside conventional spatial connectivity.

  • A. Spatially Connected Knowledge Graph: Spatial filtering identifies knowledge-graph entities within a predefined distance threshold, producing sensor-centered subgraphs containing spatially relevant points of interest.The threshold defines each sensor’s contextual neighborhood.
  • A. Spatially Connected Knowledge Graph: The Direct Neighborhood includes points of interest, their types, and knowledge-graph properties connecting points of interest with types and taxonomic subtypes.
  • A. Spatially Connected Knowledge Graph: The One-Hop Neighborhood extends the Direct Neighborhood with one-hop neighbors, entity types, and interconnections among entities in the selected knowledge graph.
  • B. Spatially Infused Traffic Prediction: ComplEx embeddings generate a semantically informed adjacency matrix by scoring sensor similarity through the real part of a Hermitian inner product.
  • B. Spatially Infused Traffic Prediction: The semantic adjacency matrix combines spatial autocorrelation with long-distance semantic relationships, such as those linking business districts and vacation resorts.
  • B. Spatially Infused Traffic Prediction: Multiple adjacency matrices act as filters on traffic-volume inputs across established graph-convolution approaches.
  • B. Spatially Infused Traffic Prediction: Concatenating graph-convolution outputs allows the adjacency-matrix set’s cardinality to vary, provided it is known before training.

IV. RESULTS

The results demonstrate that integrating semantic information can improve preexisting traffic prediction models. They compare these results with unmodified approaches.

  • The study demonstrates the effectiveness of integrating semantic information into preexisting traffic prediction models.
  • Semantic information is incorporated into existing traffic prediction models rather than requiring an entirely new modeling framework.
  • The evaluation compares models integrating semantic information against unmodified approaches.

A. Experiment Data & Setup

Experiments use the San Diego LargeST highway dataset and augment road-network adjacency with spatially selected Wikidata subgraphs embedded for traffic forecasting. Multiple established baselines and specified computing hardware support the evaluation.

  • Experiment Data & Setup: The San Diego LargeST highway dataset contains 716 traffic sensors and more than 35 000 temporal measurements.
  • Experiment Data & Setup: Road-network adjacency uses a Gaussian kernel over network distances, retaining edges above 0.01 and filling approximately 3% of the matrix.
  • Embedded Wikidata Subgraphs: Spatially close, geo-referenced Wikidata entities are retrieved around sensors using experimental thresholds of 600 m and 2.5 km.The 600 m threshold represents immediate urban surroundings, while Wikidata coverage and data quality vary across global regions.
  • Embedded Wikidata Subgraphs: Direct Neighborhood and One-Hop Neighborhood subgraphs are created from selected Wikidata entities, their types, subclasses, direct properties, and one-hop neighbors.
  • Embedded Wikidata Subgraphs: PyKEEN embeds the Wikidata subgraphs in 64 dimensions, selected to represent subgraphs containing up to 144 141 triples while balancing capacity and efficiency.The selection is based on preliminary experiments outside the paper’s scope.

B. Influence of Adjacency Matrix

This section investigates how semantic adjacency matrices from two subgraphs and two spatial radii influence selected traffic-forecasting baselines with differing adjacency-learning designs.

  • B. Influence of Adjacency Matrix: The study evaluates semantic adjacency matrices derived from two different subgraphs across two spatial radii.These configurations are reported in Table I.
  • B. Influence of Adjacency Matrix: The selected baselines can all handle multiple adjacency matrices but differ in whether adaptive adjacency is learned through backpropagation.Each baseline uses at least one fixed adjacency matrix with spatial context.
  • B. Influence of Adjacency Matrix: The experiments compare how these semantic adjacency configurations affect baseline models with different adjacency-matrix design choices.The comparison focuses on the influence of semantic adjacency matrices on the selected baselines.

1) Only Semantic Context:

Replacing physical sensor-distance adjacency with semantic adjacency generally improves prediction for D2STGNN, STTN, and STGCN, outperforming both network-distance and random adjacency baselines. The benefit is architecture-dependent, with no consistent improvement for GWaveNet or DCRNN.

  • Only Semantic Context:: Semantic adjacency matrices replace physical distance-based relationships between traffic sensors, while a density-matched random adjacency provides an additional baseline.The random matrix is shared across baselines and connects randomly selected sensors.
  • Only Semantic Context:: All semantic adjacency replacements improve prediction over both network-distance and random adjacency for D2STGNN, STTN, and STGCN.These include adaptive baselines D2STGNN and STTN and the fixed baseline STGCN.
  • Only Semantic Context:: GWaveNet and DCRNN show no consistent improvement when semantic adjacency replaces the baseline adjacency, indicating architecture-dependent usefulness.The comparison baseline is the network-distance adjacency matrix, alongside the randomly chosen adjacency matrix.

2) Semantic and Spatial Context:

Adding semantic adjacency matrices generally improves traffic forecasting baselines, though gains vary by model. DCRNN and GWaveNet show limited or absent benefits under semantic-adjacency replacement.

  • Semantic and Spatial Context: Semantic adjacency matrices improve performance for most traffic prediction baselines, with DCRNN as a notable exception.The comparison is reported in Table III.
  • Semantic and Spatial Context: GWaveNet improves across all four added semantic adjacency matrices in both its fixed and adaptive versions.However, these variants benefit less from semantic context than most baselines.
  • Semantic and Spatial Context: Neither GWaveNet variant improves when the original adjacency matrix is replaced by the semantic one.The passage distinguishes this replacement setting from adding semantic matrices as additional inputs.

3) Structure of Adjacency Matrices:

Adjacency-matrix choice produces major performance differences by altering the spatial and semantic contexts available to traffic sensors. Semantic matrices add long-range, functionally informed connections that generally improve baseline performance, although effects vary by model and configuration.

  • Spatial and semantic structure: Spatial adjacency connects sensors by network distance, producing predominantly local connections along the main and secondary diagonals.Semantic adjacency matrices show similar structural patterns while encoding semantic relationships beyond physical proximity.
  • Performance by adjacency: 17.64 (-15.2%) is D2STGNN’s 600m D result, compared with its 20.82±0.00 Original baseline.Adaptive GWaveNet changes from 18.32±0.02 Original to 18.72 (+2.1%) with Random, while STTN changes from 19.27±0.23 to 18.97 (-1.6%) with 600m D.
  • Spatial and semantic structure: 2.5 km semantic clusters mix more than spatial clusters, indicating combined spatial proximity and semantic long-range connectivity.The 600 m semantic matrix instead separates sensors according to whether they have spatial neighbors in the knowledge graph.
  • Performance by adjacency: Semantic matrices improve most baselines, but DCRNN degrades significantly in certain configurations.The reported improvement is attributed to long-range connections linking functionally similar regions, similar to adaptive adjacency matrices.

V. CONCLUSION

The paper introduces a general pipeline that infuses knowledge from a general-purpose knowledge graph into spatio-temporal predictive tasks. It uses parameterized subgraph extraction and knowledge graph embeddings to construct semantic adjacency matrices, improving prediction across six traffic forecasting approaches.

  • The work introduces a general pipeline for infusing knowledge from a general-purpose knowledge graph into spatio-temporal predictive tasks.
  • A parameterized subgraph extraction method and knowledge graph embeddings construct semantic adjacency matrices connecting the prediction task’s original spatial entities.
  • As a proof of concept, the method improves spatio-temporal prediction across six traffic prediction approaches.
Loading 2608.17440v1…