Abstract
In contrast to large text corpora, knowledge graphs (KG) provide dense and structured representations of factual information. This makes them attractive for systems that supplement or ground the knowledge found in pre-trained language models with an external knowledge source. This has especially been the case for classification tasks, where recent work has focused on creating pipeline models that retrieve information from KGs like ConceptNet as additional context. Many of these models consist of multiple components, and although they differ in the number and nature of these parts, they all have in common that for some given text query, they attempt to identify and retrieve a relevant subgraph from the KG. Due to the noise and idiosyncrasies often found in KGs, it is not known how current methods compare to a scenario where the aligned subgraph is completely relevant to the query. In this work, we try to bridge this knowledge gap by reviewing current approaches to text-to-KG alignment and evaluating them on two datasets where manually created graphs are available, providing insights into the effectiveness of current methods.
Introduction
Pre-trained Language Models (PLMs) like BERT are powerful, but they often lack explicit, structured reasoning capabilities. To address this, researchers frequently "ground" these models by retrieving relevant subgraphs from external Knowledge Graphs (KGs) such as ConceptNet. However, a significant bottleneck remains: Text-to-KG alignment. Accurately identifying which nodes and edges in a massive, noisy graph are relevant to a specific sentence is non-trivial. Most current systems rely on naive lexical matching, which may introduce harmful noise. This study evaluates whether these simple alignment methods are hindering performance by comparing them against "gold standard" human-annotated graphs.
Methodology
We evaluate three primary alignment strategies using BERT as the core classifier. To isolate the impact of alignment quality, we use a simple linearization technique, converting retrieved graphs into strings and prepending them to the input text.
- Approach 1 (Basic String Matching): A baseline identifying exact word matches in the KG and finding shortest paths via Dijkstra’s algorithm.
- Approach 2 (Enhanced String Matching): The current research standard, utilizing n-gram matching, lemmatization, and stop-word filtering to expand node discovery.
- Approach 3 (Path Generator): A generative approach using a fine-tuned GPT-2 to produce "reasoning paths" between entities. A hybrid variant, Approach 3-G, uses human-selected entities as seeds for the generator.
Experimental Setup
The study utilizes two datasets featuring manually created "explanation graphs":
- ExplaGraphs: A binary stance prediction task (support vs. counter) with human-built explanatory graphs.
- COPA-SSE: A subset of the Choice of Plausible Alternatives dataset, containing semi-structured explanations for causal reasoning.
- ConceptNet: The primary external knowledge source for all automated methods.
Analysis of Alignment Quality: The Lexical Trap
A primary finding is the "Lexical Trap": automated methods based on lexical overlap often retrieve semantically irrelevant subgraphs. For instance, matching the word "catch" in a social context might retrieve a graph related to "fishing" or "computing," introducing noise that confuses the model.
Furthermore, ConceptNet may lack the nuanced relations required for specialized tasks like stance detection. Generative models (Approach 3) show promise in bridging this gap by creating more contextually appropriate paths than rigid retrieval.
Results
The performance gap between automated and human alignment is substantial. On the COPA-SSE task, human-curated "Gold" graphs improved accuracy to ~96%, whereas standard lexical matching (Approach 2) actually caused a performance drop compared to the "No Graph" baseline.
| Approach | ExplaGraphs Accuracy | COPA-SSE Accuracy |
|---|---|---|
| No Graph (Baseline) | 69.67% | 67.05% |
| Approach 2 (Standard) | 70.03% | 53.33% |
| Approach 3-G (Hybrid) | 70.57% | 85.86% |
| Gold (Human Graphs) | 80.28% | 96.60% |
Discussion and Conclusion
The results demonstrate that bad alignment is often worse than no alignment. While more complex architectures like Graph Neural Networks might extract more value, the quality of the aligned subgraph remains the primary performance driver. Future research should move beyond simple string matching toward context-aware alignment models to fully leverage the potential of structured knowledge in NLP.
Summary updated