A Hybrid Model of Classification and Generation for Spatial Relation Extraction

Feng Wang, Peifeng Li, Qiaoming Zhu

Abstract

Extracting spatial relations from texts is a fundamental task for natural language understanding. Previous studies have primarily treated this as a classification task, often ignoring spatial relations with "null roles" due to their sparse information. To address this, we propose HMCGR, a novel hybrid model that views spatial relation extraction as both a generation and a classification task. HMCGR combines a classification model to extract non-null-role relations with a generative model capable of producing null-role relations. Additionally, a reflexivity evaluation mechanism is employed to improve accuracy based on the physical principles of spatial relations. Experimental results on the SpaceEval dataset demonstrate that HMCGR significantly outperforms state-of-the-art baselines.

Introduction

Spatial Relation Extraction (SRE) involves identifying the relationships between objects in text, typically represented as triplets: a trajector (the object being located), a landmark (the reference object), and a spatial trigger (the word defining the relationship). For example, in "The book is on the table," the trajector is "book," the landmark is "table," and the trigger is "on."

A significant challenge in SRE is the "null role" problem. In natural language, spatial information is frequently incomplete. A sentence like "I went biking" implies a movement (MOVELINK) but lacks a specific destination or "goal." Traditional classification-based models struggle with these cases because they are designed to map complete sets of features to labels, finding it difficult to learn the "semantics of nothing."

Examples of spatial relations (MOVELINK, QSLINK, OLINK) illustrating the presence of null roles.

The HMCGR Framework

To overcome the limitations of pure classification, the HMCGR (Hybrid Model of Classification, Generation, and Reflexivity) architecture integrates four key components:

  1. Candidate Triplet Extraction (CTE): A BERT-CRF pipeline identifies potential spatial entities and assigns them initial roles such as mover, trigger, or landmark.
  2. Spatial Relation Classification (CLS): This module utilizes a Spatial Graph Convolutional Network (GCN). The GCN constructs a graph using four edge types: sentence boundaries, spatial element intersections, dependency trees, and coreference chains. The inclusion of coreference chains is vital, as it allows the model to link pronouns (e.g., "it") back to their original spatial landmarks.
  3. Spatial Relation Generation (GEN): By employing a T5 generative model, the system can produce structured natural language descriptions of relations. This approach is naturally suited for null roles, as the model can generate templates like "the goal is null" by leveraging its pre-trained linguistic knowledge.
  4. Reflexivity Evaluation (RFX): This module enforces physical consistency. Based on the principle that many spatial relations are reversible (e.g., if A is "in" B, then B is "around" A), it generates an inverted version of the sentence and checks for embedding consistency, acting as a self-correction mechanism.
The HMCGR architecture, integrating classification, generation, and reflexivity modules.

Experimental Results

The model was evaluated on the SpaceEval dataset (SemEval 2015 Task 8), focusing on MOVELINK, QSLINK, and OLINK relations. HMCGR achieved a new state-of-the-art F1-score of 70.9, a substantial improvement over the previous BERT-base baseline of 61.2.

The most notable gain was in Recall (79.2 vs. 59.8), indicating that the generative component successfully identified many null-role relations previously missed by classifiers. Specifically, on relations containing null roles, HMCGR improved the F1-score by 6.0 points over the baseline. Ablation studies further highlighted that the coreference edges in the GCN were the most significant contributors to classification accuracy.

Conclusion

HMCGR demonstrates that combining classification and generation provides a robust solution for spatial relation extraction. While classifiers excel at high-precision extraction of complete data, generative models are superior at recovering relations with missing information. Future work will focus on addressing sequential error propagation in the T5 generator and refining the reflexivity module for triggers without clear geometric inverses.

Summary updated

Abstract

Extracting spatial relations from texts is a fundamental task for natural language understanding and previous studies only regard it as a classification task, ignoring those spatial relations with null roles due to their poor information. To address the above issue, we first view spatial relation extraction as a generation task and propose a novel hybrid model HMCGR for this task. HMCGR contains a generation and a classification model, while the former can generate those null-role relations and the latter can extract those non-null-role relations to complement each other. Moreover, a reflexivity evaluation mechanism is applied to further improve the accuracy based on the reflexivity principle of spatial relation. Experimental results on SpaceEval show that HMCGR outperforms the SOTA baselines significantly.
BibTeX
@inproceedings{wang2022hybrid,
  author = {Feng Wang and Peifeng Li and Qiaoming Zhu},
  title = {{A Hybrid Model of Classification and Generation for Spatial Relation Extraction}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2022},
  url = {https://openreview.net/forum?id=P5tmcFJdPs},
}
Figure