Abstract
Knowledge graphs (KGs) have the advantage of providing fine-grained detail for question-answering systems. Unfortunately, building a reliable KG is time-consuming and expensive as it requires human intervention. To overcome this issue, we propose a novel framework to automatically construct a KG from unstructured documents that does not require external alignment. We first extract surface-form knowledge tuples from unstructured documents and encode them with contextual information. Entities with similar context semantics are then linked through internal alignment to form a graph structure. This allows us to extract the desired information from multiple documents by traversing the generated KG without a manual process. We examine its performance in retrieval based QA systems by reformulating the WikiMovies and MetaQA datasets into a tuple-level retrieval task. The experimental results show that our method outperforms traditional retrieval methods by a large margin.
Introduction
Traditional Question Answering (QA) systems generally fall into two categories: Knowledge Base QA (KBQA) and Reading Comprehension (RC). While KBQA offers high precision and interpretability, it is fundamentally limited by the completeness of the underlying database. If a fact is missing from the KG, the system cannot retrieve it. Conversely, RC systems excel at understanding raw text but struggle with multi-hop reasoning—connecting disparate facts spread across multiple documents.
AutoKG addresses this gap by constructing a "virtual" knowledge graph directly from raw text. By bypassing the need for "external alignment"—the process of mapping extracted text to pre-existing databases like Wikidata or Freebase—AutoKG enables structured reasoning over niche or domain-specific information that curated databases often lack.
Methodology
The AutoKG pipeline consists of two primary phases: graph construction and multi-hop traversal.
1. Building the Virtual KG
The system first utilizes Open Information Extraction (OpenIE) to convert raw sentences into surface-form triples: (subject, relation, object). Unlike traditional methods, these triples are not mapped to a fixed vocabulary. Instead, the framework uses BERT to generate contextualized embeddings for every entity and relation mention.
To create the graph structure, AutoKG employs internal alignment. Rather than linking mentions to an external database, it uses an adaptive threshold based on cosine similarity to link mentions within the document set. If two mentions are semantically similar in context, they are connected as the same node in the virtual graph.
2. Multi-hop Traversal
To answer a query, the system identifies "seed" entities and performs an expand-and-prune search (a form of beam search) across the virtual graph. It calculates the cosine similarity between the path's BERT encoding and the query's encoding to navigate through the hops.
Experimental Evaluation
The authors evaluated AutoKG on two major multi-hop QA benchmarks: WikiMovies (1-hop reasoning) and MetaQA (2-hop and 3-hop reasoning). Both datasets were tested using raw Wikipedia articles rather than structured tables to simulate real-world unstructured environments.
Key Results
AutoKG significantly outperformed standard retrieval models such as BM25 and Query Likelihood (QL). As shown in the performance comparison, AutoKG more than doubled the Hits@1 performance of the best baselines in complex 3-hop scenarios.
- WikiMovies (1-hop): Achieved 54.54% Hits@1, compared to 25.71% for the best baseline (QL+RM3-sent).
- MetaQA (3-hop): Achieved 25.76% Hits@1, a substantial improvement over the 11.52% achieved by QL+RM3-sent.
- Coverage: Quality analysis revealed that AutoKG achieved 90% coverage of facts found in human-annotated KBs, suggesting that automated virtual graphs can reach a richness comparable to manual curation.
- Efficiency: The system maintains a throughput of approximately 5.55 queries per second on a single NVIDIA V100 GPU, demonstrating viability for real-time applications.
Discussion and Conclusion
A critical finding of this research is that granularity matters. Tuple-level retrieval proved significantly more effective than sentence-level retrieval, as it allows the system to isolate specific facts within a sentence for the next "hop" in a reasoning chain. Furthermore, the use of contextualized triples naturally handles coreference resolution without requiring a separate, brittle processing step.
While highly effective, the framework is currently limited by the noise inherent in OpenIE, which can extract fragments or pronouns. Future work will focus on refining the path-scoring mechanism and improving the extraction quality to further enhance the robustness of the virtual knowledge graph.
Summary updated