[Paper Review] Knowledge Is Flat: A Seq2Seq Generative Framework for Various Knowledge Graph Completion
This paper proposes KG-S2S, a unified Seq2Seq generative framework that treats diverse knowledge graph completion (KGC) tasks—static, temporal, and few-shot—by flattening KG facts into text, enabling a single model to handle all via text-to-text generation. It achieves state-of-the-art performance across five benchmarks by enhancing input representations with entity descriptions, soft prompts, and constrained decoding, while remaining parameter-efficient and capable of generating novel, plausible entities.
Knowledge Graph Completion (KGC) has been recently extended to multiple knowledge graph (KG) structures, initiating new research directions, e.g. static KGC, temporal KGC and few-shot KGC. Previous works often design KGC models closely coupled with specific graph structures, which inevitably results in two drawbacks: 1) structure-specific KGC models are mutually incompatible; 2) existing KGC methods are not adaptable to emerging KGs. In this paper, we propose KG-S2S, a Seq2Seq generative framework that could tackle different verbalizable graph structures by unifying the representation of KG facts into "flat" text, regardless of their original form. To remedy the KG structure information loss from the "flat" text, we further improve the input representations of entities and relations, and the inference algorithm in KG-S2S. Experiments on five benchmarks show that KG-S2S outperforms many competitive baselines, setting new state-of-the-art performance. Finally, we analyze KG-S2S's ability on the different relations and the Non-entity Generations.
Motivation & Objective
- To address the incompatibility and inflexibility of existing KGC models that are tightly coupled to specific knowledge graph structures.
- To unify diverse KGC tasks—static, temporal, and few-shot—under a single generative framework without architectural changes.
- To mitigate information loss from flattening structured KG facts into text by improving input representations and inference mechanisms.
- To enable the generation of non-entity, plausible knowledge triples for data augmentation and novel knowledge discovery.
- To develop a parameter-efficient model whose size grows slowly with knowledge graph scale, especially compared to embedding-based models.
Proposed method
- Flattening all KG facts—regardless of structure—into a 'text-to-text' format, treating entities, relations, and timestamps as plain text sequences.
- Enhancing input representations using entity descriptions, soft prompts, and Seq2Seq dropout to preserve semantic and structural cues.
- Implementing a constrained decoding algorithm with prefix constraints to guide generation toward valid entities and relations.
- Fine-tuning a pre-trained Seq2Seq language model (T5-base/small) on KG completion tasks using standard text generation objectives.
- Using beam search with a fixed beam width of 40 to balance generation quality and inference cost.
- Integrating a soft prompt mechanism per relation to adapt the model’s in-context behavior without fine-tuning the entire backbone.
Experimental results
Research questions
- RQ1Can a single Seq2Seq generative framework handle multiple knowledge graph completion tasks—static, temporal, and few-shot—without architectural modifications?
- RQ2How effective is the proposed text-to-text approach in preserving structural information from KGs when flattened into sequences?
- RQ3To what extent can the model generate plausible non-entity entities that are semantically valid and useful for knowledge discovery?
- RQ4How does the model’s performance scale with parameter size, and can it remain efficient as KGs grow?
- RQ5Does the use of entity descriptions, soft prompts, and constrained decoding significantly improve generation quality and KGC performance?
Key findings
- KG-S2S achieves state-of-the-art performance on all five benchmarks: WN18RR, FB15K-237, FB15K-237N, ICEWS14, and NELL-One, outperforming both graph-based and PLM-based baselines.
- On FB15K-237N, KG-S2S achieves an MRR of 0.353 with the T5-base backbone (220M parameters), surpassing StAR (354M parameters) which achieves 0.274 MRR.
- Even with a smaller T5-small backbone (60M parameters), KG-S2S achieves 0.351 MRR, demonstrating strong performance with significantly fewer parameters.
- The model’s performance improves with beam width up to 40, after which gains plateau, justifying the choice of beam size 40 as a trade-off between cost and accuracy.
- Without prefix constraints, KG-S2S generates non-entity text that includes semantically valid answers, such as 'Superhero film' for the genre of RoboCop, and 'Indian American' for M. Night Shyamalan’s ethnicity.
- The parameter growth of KG-S2S is nearly constant with KG size due to soft prompt scaling with relations ($O(|\mathcal{R}| \cdot d)$), unlike traditional models that scale with entities and relations ($O((|\mathcal{E}|+|\mathcal{R}|)d)$).
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.