Schema-adaptable Knowledge Graph Construction

Hongbin Ye, Honghao Gui, Xin Xu, Xi Chen, Huajun Chen, Ningyu Zhang

Abstract

Traditional Knowledge Graph Construction (KGC) systems are typically "reactive," relying on static schemas and requiring expensive retraining when new entities or relations emerge. This paper introduces the task of schema-adaptable KGC, where models must proactively adapt to dynamically changing ontologies without parameter updates. We present ADAKGC, a framework utilizing schema-enriched prefix instructors and dynamic trie-based decoding to navigate evolving schemas. Our experiments across NER, relation extraction, and event extraction benchmarks demonstrate that ADAKGC significantly outperforms existing baselines in handling horizontal, vertical, and hybrid schema expansions.

1. Introduction

Knowledge Graph Construction (KGC) is the process of extracting structured information—such as entities, relations, and events—from unstructured text. Historically, KGC models have been trained on closed-set schemas. However, real-world data is inherently dynamic; new domains emerge and existing ontologies expand. When the schema changes, traditional systems often suffer from "catastrophic forgetting" or require resource-intensive retraining.

To address this, we propose a shift toward "proactive" KGC. In this paradigm, a model must understand a new schema description and immediately apply it to extraction tasks by leveraging the semantic relationships between existing and novel categories. This paper introduces ADAKGC (ADAptive Knowledge Graph Construction), a baseline designed for this zero-shot adaptation challenge.

2. Methodology: The ADAKGC Framework

ADAKGC is built upon the T5 (Text-to-Text Transfer Transformer) architecture, treating KGC as a sequence-to-structure generation task. It introduces two primary innovations to handle schema evolution:

2.1 Schema-enriched Prefix Instructor (SPI)

Rather than treating the schema as simple text input, ADAKGC utilizes "soft prompts" or continuous vectors. The SPI linearizes the schema graph and converts it into learnable prefix instructors. These instructors guide the model's encoder and decoder to focus on the specific constraints and semantic nuances of the current iteration's schema, allowing the model to adapt its internal representations dynamically.

2.2 Schema-conditioned Dynamic Decoding (SDD)

A common failure mode in generative KGC is the "hallucination" of labels that are either obsolete or not yet introduced. To mitigate this, we implement a trie-based constrained decoding mechanism. This ensures that at every step of the generation process, the model is restricted to tokens that form valid labels within the current version of the schema.

3. Experimental Setup

To evaluate schema adaptability, we transformed three classic KGC datasets into dynamic benchmarks:

  • FEW-NERD: For Named Entity Recognition (NER).
  • NYT (New York Times): For Relation Extraction (RE).
  • ACE2005: For Event Extraction (EE).

We tested these datasets under three distinct expansion patterns:

  1. Horizontal Expansion: Adding new classes at the same hierarchical level.
  2. Vertical Expansion: Adding specific subclasses to existing parent classes to test structural inheritance.
  3. Hybrid Expansion: A combination of both horizontal and vertical changes.

4. Results and Discussion

ADAKGC consistently outperformed established frameworks such as TANL and UIE across all tasks. Notably, on the ACE2005 hybrid expansion dataset, ADAKGC improved trigger extraction by 0.71% and event argument extraction by 3.65% over the UIE baseline.

4.1 Structural Inheritance and Generalization

Our results indicate that models can effectively transfer knowledge through structural inheritance. In vertical expansion scenarios, the model successfully leveraged knowledge from "parent" nodes to identify "child" nodes (e.g., using the concept of Location to help identify Country). However, as schemas grow in complexity over multiple iterations, performance generally declines, highlighting the ongoing challenge of zero-shot adaptation to deep, multi-layered ontologies.

4.2 The Role of Constraints

Ablation studies confirmed that the Schema-conditioned Dynamic Decoding (SDD) is vital. Without trie-based constraints, models frequently defaulted to labels encountered during initial training, even when those labels were explicitly removed from the active schema. This suggests that "Weak Transfer" errors—where old parameters interfere with new label updates—remain a significant hurdle.

4.3 Comparison with LLMs

Evaluations of GPT-3.5 and ChatGPT revealed that while Large Language Models (LLMs) possess strong instruction-following and chain-of-thought reasoning capabilities, they often underperform specialized, smaller models in low-shot structural extraction. This is likely due to a lack of domain-specific fine-tuning for the rigid structural requirements of KGC.

5. Conclusion and Future Work

ADAKGC provides a robust baseline for the emerging task of schema-adaptable KGC. By combining soft-prompting with constrained decoding, we enable models to evolve alongside their ontologies. Future research should focus on deeper, more interconnected real-world ontologies, the integration of multimodal knowledge, and better alignment strategies for LLMs to handle complex structural extraction tasks.

Summary updated

BibTeX
@inproceedings{ye2023schema,
  author = {Hongbin Ye and Honghao Gui and Xin Xu and Xi Chen and Huajun Chen and Ningyu Zhang},
  title = {{Schema-adaptable Knowledge Graph Construction}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.425},
}
Figure