Relational Learning for Spatial Relation Extraction from Natural Language

Parisa Kordjamshidi, Paolo Frasconi, Martijn van Otterlo, Marie-Francine Moens, Luc De Raedt

Abstract

Spatial Role Labeling (SpRL) is the task of extracting structured spatial relationships from natural language. This paper presents a relational learning framework using kLog to identify trajectors, landmarks, and spatial indicators. By representing linguistic data as logical graphs rather than flat feature vectors, the approach captures the inherent nested structure of spatial language, bridging the gap between raw text and formal spatial calculi.

Introduction

When humans hear a sentence like, "The book is on the big table behind the wall," they instinctively construct a 3D mental model. For artificial intelligence, however, mapping these relationships is a significant challenge. The system must identify the objects involved—the Trajector (the object being located) and the Landmark (the reference point)—as well as the Spatial Indicator (the word defining the relationship).

Traditional Information Extraction (IE) often treats this as a flat classification problem, which ignores the rich, hierarchical nature of language. This research proposes a relational learning approach that exploits background knowledge and linguistic structure simultaneously to improve spatial extraction.

Methods: The kLog Framework

The core of this research is the application of kLog, a declarative language for relational learning embedded in Prolog. Unlike standard machine learning that requires fixed-length feature vectors, kLog allows for the representation of complex entities and their relationships.

The kLog framework workflow, transforming relational data into graph kernels for statistical learning.

Relational Representation and Graph Kernels

Instead of flattening a sentence into a table, kLog represents it as a graph of entities (words) and relationships, such as dependency trees and word order. To process these graphs, kLog utilizes a "neighborhood subgraph pairwise distance kernel" (NSPDK). This kernel converts relational graphs into feature vectors that can be processed by statistical learners like Support Vector Machines (SVMs).

Relational graph representation of the sentence "The kids are on the stairs," identifying spatial roles and linguistic features.

Learning Strategies

The authors explored two primary learning settings:

  1. Triplet Classification: The model evaluates every possible combination of (Indicator, Trajector, Landmark) to determine if it constitutes a valid spatial relation.
  2. Relational Sequence Tagging: Using an SVM-HMM, the model tags words in a sequence. To handle sentences with multiple relations, a "pivot" strategy is used: one spatial indicator is selected as a focal point, and other words are tagged relative to it.

Experimental Setup

The study utilized a corpus based on the IAPR TC-12 image dataset (CLEF), consisting of 1,213 English sentences describing 613 images. These sentences contained 1,716 annotated spatial relations. Pre-processing involved the Charniak parser and LTH tools to extract POS tags, dependency roles, and semantic roles.

Key Results and Insights

  • Sequence Tagging Performance: The relational sequence tagging approach (SVM-HMM) significantly outperformed triplet classification. The kLog-based SVM-HMM achieved an F1-score of 0.60 for full spatial relation extraction. While a standard linear-chain Conditional Random Field (CRF) performed slightly better (F1 of 0.65), kLog offers greater flexibility for incorporating domain-specific background knowledge.
  • Role Identification: The system was highly effective at identifying Spatial Indicators (F1 ~0.94), while Trajectors proved more difficult to isolate (F1 ~0.77).
  • The Pivot Strategy: Treating a specific spatial indicator as a "pivot" allowed the model to transform complex multi-relation sentences into manageable sequence tagging tasks.

Limitations and Future Directions

A primary limitation identified was error propagation. In pipelined models, mistakes in initial role prediction (e.g., failing to identify a trajector) inevitably lead to failures in relation extraction. Furthermore, the use of logic-based "candidate selection" rules to prune word combinations creates a performance ceiling; if a rule misses a valid candidate, the learner cannot recover it.

Future work aims to implement Structured Output Prediction, allowing the model to consider global constraints (e.g., ensuring every trajector is linked to an indicator) during the learning process. Additionally, the authors plan to map linguistic extractions directly into formal spatial reasoning models like the Regional Connection Calculus (RCC).

Summary updated

BibTeX
@inproceedings{kordjamshidi2011relational,
  author = {Parisa Kordjamshidi and Paolo Frasconi and Martijn van Otterlo and Marie-Francine Moens and Luc De Raedt},
  title = {{Relational Learning for Spatial Relation Extraction from Natural Language}},
  booktitle = {ILP},
  year = {2011},
  doi = {10.1007/978-3-642-31951-8\_20},
}
Figure