UnifiedSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models

Tianbao Xie, Chen Henry Wu, Peng Shi, Ruiqi Zhong, Torsten Scholak, Michihiro Yasunaga, Chien-Sheng Wu, Ming Zhong, Pengcheng Yin, Sida I. Wang, Victor Zhong, Bailin Wang, Chengzu Li, Connor Boyle, Ansong Ni, Ziyu Yao, Dragomir Radev, Caiming Xiong, Lingpeng Kong, Rui Zhang, Noah A. Smith, Luke Zettlemoyer, Tao Yu

Abstract

Structured knowledge grounding (SKG) tasks, such as text-to-SQL parsing and table-based question answering, have traditionally been treated as distinct problems requiring specialized architectures. We present UnifiedSKG, a framework that unifies 21 diverse SKG tasks into a single text-to-text format. Using T5 as a backbone, we demonstrate that a general-purpose model can achieve state-of-the-art results across nearly all tasks and benefits significantly from multi-task learning via prefix-tuning.

Introduction

Structured knowledge grounding (SKG) involves using organized data—such as databases, web tables, or knowledge graphs—to fulfill user requests. Historically, the field has been fragmented into silos like Semantic Parsing, Table QA, and Data-to-Text Generation, each with its own encoding strategies and architectures. This fragmentation hinders the transfer of progress between sub-fields and often results in models that fail to capture the general logic of grounding that is common across all these tasks.

Overview of the UnifiedSKG framework unifying diverse tasks and knowledge sources into a text-to-text format.

UnifiedSKG addresses these issues by asking: Can we treat all structured knowledge grounding as a simple translation problem?

Methods

The UnifiedSKG framework casts every task into a unified "text-to-text" abstraction. The input is a concatenated string consisting of the [User Request], the [Linearized Structured Knowledge], and any [Context] (e.g., dialogue history). The output is a target text string, such as a SQL query, a direct answer, or a natural language description.

Key Technical Approaches

  • Linearization: To process structured data with Transformers, the authors "flatten" it. For example, a table is converted into a string like col: name | age row 1: Alice | 25....
  • T5 Backbone: The framework benchmarks the T5 model across various sizes (Base, Large, and 3B).
  • Multi-Task Prefix-Tuning (MT-P): Instead of full fine-tuning, which is computationally expensive, the researchers use prefix-tuning. They learn a small set of "prefix" parameters shared across tasks to encourage knowledge transfer, followed by task-specific optimization.
  • Constrained Decoding: For tasks requiring formal languages like SQL, tools like PICARD are used to ensure the model's output is syntactically valid.

Datasets

The framework unifies 21 datasets across six task families, providing a comprehensive benchmark for the field:

  1. Semantic Parsing: Spider, GrailQA, WebQSP, MTOP.
  2. Question Answering: WikiSQL, WikiTQ, CompWebQ, HybridQA, MultiModalQA, FeTaQA.
  3. Data-to-Text: DART, ToTTo.
  4. Conversational: MultiWoZ, KVRET, SParC, CoSQL, SQA.
  5. Fact Verification: TabFact, FEVEROUS.
  6. Formal-Language-to-Text: SQL2Text, Logic2Text.

Results and Insights

The generalist T5-3B model achieved state-of-the-art (SOTA) or near-SOTA performance on nearly all 21 tasks without task-specific architectural tweaks. This suggests that specialized encoders for tables or graphs may become less necessary as model scale increases.

Performance of T5 variants compared to previous state-of-the-art across 21 SKG tasks.

Key Findings

  • Multi-tasking Synergy: Multi-task prefix-tuning consistently outperformed single-task training. On T5-base, the average score across all tasks jumped from 60.82 to 61.84, proving that disparate tasks share a common underlying grounding capability.
  • Encoding Sensitivity: Performance is highly sensitive to input ordering; placing the user's question before the linearized knowledge generally yielded better results.
  • LLM Limitations: Massive models like GPT-3 and Codex struggle in zero-shot and few-shot settings for SKG. For example, T0-3B (a zero-shot specialist) achieved 0% accuracy on the Spider (text-to-SQL) task, highlighting that structured grounding remains a distinct challenge for general language models.

Limitations and Future Work

While powerful, the framework faces challenges with the "context window" problem, as linearizing large databases can lead to truncation and information loss. Additionally, the current framework assumes the relevant "knowledge slice" is already identified, whereas real-world applications require an integrated retrieval step from a massive corpus. Finally, while T5-3B is effective, it can still generate non-executable code for complex tasks, necessitating external constrained decoding.

Conclusion

UnifiedSKG demonstrates that a unified text-to-text approach is a viable and powerful path forward for structured knowledge grounding. The authors have open-sourced the framework at github.com/hkunlp/unifiedskg to encourage the community to move toward more generalizable models.

Summary updated

BibTeX
@inproceedings{xie2022unifiedskg,
  author = {Tianbao Xie and Chen Henry Wu and Peng Shi and Ruiqi Zhong and Torsten Scholak and Michihiro Yasunaga and Chien-Sheng Wu and Ming Zhong and Pengcheng Yin and Sida I. Wang and Victor Zhong and Bailin Wang and Chengzu Li and Connor Boyle and Ansong Ni and Ziyu Yao and Dragomir Radev and Caiming Xiong and Lingpeng Kong and Rui Zhang and Noah A. Smith and Luke Zettlemoyer and Tao Yu},
  title = {{UnifiedSKG: Unifying and Multi-Tasking Structured Knowledge Grounding with Text-to-Text Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.39},
}
Figure