SE-KGE : A location-aware Knowledge Graph Embedding model for Geographic Question Answering and Spatial Semantic Lifting

Gengchen Mai, Krzysztof Janowicz, Ling Cai, Rui Zhu, Blake Regalia, Bo Yan, Meilin Shi, Ni LaoTrans. GIS 2020 · DOI

Abstract

Learning knowledge graph (KG) embeddings is an emerging technique for a variety of downstream tasks such as summarization, link prediction, information retrieval, and question answering. However, most existing KG embedding models neglect space and, therefore, do not perform well when applied to (geo)spatial data and tasks. For those models that consider space, most of them primarily rely on some notions of distance. These models suffer from higher computational complexity during training while still losing information beyond the relative distance between entities. In this work, we propose a location-aware KG embedding model called SE-KGE. It directly encodes spatial information such as point coordinates or bounding boxes of geographic entities into the KG embedding space. The resulting model is capable of handling different types of spatial reasoning. We also construct a geographic knowledge graph as well as a set of geographic query-answer pairs called DBGeo to evaluate the performance of SE-KGE in comparison to multiple baselines. Evaluation results show that SE-KGE outperforms these baselines on the DBGeo dataset for geographic logic query answering task. This demonstrates the effectiveness of our spatially-explicit model and the importance of considering the scale of different geographic entities. Finally, we introduce a novel downstream task called spatial semantic lifting which links an arbitrary location in the study area to entities in the KG via some relations. Evaluation on DBGeo shows that our model outperforms the baseline by a substantial margin.

Introduction

Knowledge Graphs (KGs) like DBpedia and Wikidata serve as the backbone for modern information retrieval and question answering. However, these graphs are often "geography-blind." Standard embedding models—such as TransE or RotatE—treat geographic entities like "California" or "Yosemite National Park" as abstract nodes, ignoring their physical footprints and spatial relationships.

Existing attempts to incorporate spatial data often rely on relative distances, which can be computationally expensive and discard absolute position and orientation. Crucially, many models treat every geographic feature as a single point, failing to account for the "scale effect": the fact that a city is smaller than a state, and their relationship is one of containment (partonomy) rather than just proximity. To bridge this gap, we introduce SE-KGE (Spatially Explicit Knowledge Graph Embedding), a model designed to encode geographic coordinates and spatial extents directly into a high-dimensional vector space.

The SE-KGE Framework

SE-KGE moves beyond distance-based metrics by treating geographic entities as regions with specific scales. The architecture consists of three core components:

1. Dual Entity Encoder

Instead of a single vector, SE-KGE represents each entity through the concatenation of two distinct embeddings:

  • Feature Embedding: Captures semantic types and attributes (e.g., "City," "River," or "Population").
  • Space Embedding: Captures the physical location and extent of the entity.

2. Multi-Scale Space Encoder

To generate the space embedding, the model utilizes a Space2Vec architecture. A key innovation here is how the model handles scale. For small entities (like a specific building), it encodes a single coordinate. For larger entities (like a state or national forest), the model randomly samples points from the entity’s bounding box during training. This allows the model to learn a distribution representing the entity's spatial extent, effectively treating it as a region in the embedding space.

3. Spatially Explicit Operators

To handle complex queries, SE-KGE employs specialized operators:

  • Projection: Uses block diagonal matrices to transform head entities and relations into tail entity predictions, maintaining the distinction between spatial and semantic components.
  • Intersection: Employs a self-attention mechanism to combine multiple constraints within a query, such as finding an entity that "is a city" AND "is located in California."

The DBGeo Benchmark

To evaluate SE-KGE, we developed DBGeo, a new benchmark dataset derived from DBpedia focused on the mainland United States. The dataset includes:

  • 18,780 geographic entities and over 214,000 triples.
  • Spatial Footprints: Point coordinates and bounding boxes for 80.6% of entities, sourced via ArcGIS and OpenStreetMap APIs.
  • Logic Queries: A set of geographic conjunctive graph queries of varying complexity (e.g., 2-chain, 3-inter) to test spatial reasoning capabilities.

Key Tasks and Results

Geographic Logic Query Answering

SE-KGE was tested against state-of-the-art baselines like GQE and CGA. The model consistently outperformed these baselines on the DBGeo dataset, particularly in complex queries involving "hard" negative sampling. This success demonstrates that baking spatial logic into the geometry of the embedding space allows the model to handle partonomy relations implicitly; vectors for subdivisions naturally cluster within the vector-space "volume" of their parent entity.

Spatial Semantic Lifting

We introduced a novel task called Spatial Semantic Lifting. Because the space encoder is inductive, it can encode any arbitrary coordinate—even those not present in the training set. By feeding the model a random latitude/longitude and a specific relation (e.g., broadcastArea^-1), the model can predict which KG entity (like a radio station) covers that location. In this task, SE-KGE outperformed non-semantic baselines by 9.86% in AUC and 9.59% in Average Percentile Rank (APR).

Visual Coherence

Clustering the learned location embeddings revealed that the model successfully captured global position and connectivity. The resulting clusters closely match US Census Bureau regions and state borders, despite the model never being explicitly provided with administrative boundary geometries.

Conclusion and Future Work

SE-KGE demonstrates that explicitly accounting for the scale and absolute position of geographic entities significantly improves KG embedding performance for spatial tasks. While the current model uses axis-aligned bounding boxes—a coarse approximation for complex shapes like winding rivers—it provides a robust foundation for spatial reasoning.

Future research will explore more complex spatial footprints, such as polygons, and expand the model's application to other "lifting" tasks, such as linking sensor data or geotagged imagery to the knowledge graph based on location.

Summary updated

BibTeX
@article{mai2020se,
  author = {Gengchen Mai and Krzysztof Janowicz and Ling Cai and Rui Zhu and Blake Regalia and Bo Yan and Meilin Shi and Ni Lao},
  title = {{SE-KGE : A location-aware Knowledge Graph Embedding model for Geographic Question Answering and Spatial Semantic Lifting}},
  journal = {Trans. GIS},
  year = {2020},
  doi = {10.1111/tgis.12629},
}
Figure