Abstract
Structured data sources, such as tables, graphs, and databases, are ubiquitous knowledge sources. Despite the demonstrated capabilities of large language models (LLMs) on plain text, their proficiency in interpreting and utilizing structured data remains limited. Our investigation reveals a notable deficiency in LLMs' ability to process structured data, e.g., ChatGPT lags behind state-of-the-art (SoTA) model by an average of 35%. To augment the Structured Knowledge Grounding (SKG) capabilities in LLMs, we have developed a comprehensive instruction tuning dataset comprising 1.1 million examples. Utilizing this dataset, we train a series of models, referred to as StructLM, based on the Mistral and the CodeLlama model family, ranging from 7B to 34B parameters. Our StructLM series surpasses task-specific models on 16 out of 18 evaluated datasets and establishes new SoTA performance on 8 SKG tasks. Furthermore, StructLM demonstrates strong generalization across 6 novel held-out SKG tasks, outperforming TableLlama by an average of 35% and Flan-UL2 20B by an average of 10%.
Introduction
While Large Language Models (LLMs) excel at processing plain text, they often stumble when faced with structured data like tables, databases, and knowledge graphs. Most of the world’s high-value information is locked in these structured formats, a field known as Structured Knowledge Grounding (SKG). Historically, SKG has relied on specialized, task-specific models that lack generalization, or general LLMs like ChatGPT, which significantly lag behind specialized SoTA models in this domain. StructLM aims to bridge this gap by creating a generalist model capable of handling diverse structured formats and tasks.
The StructLM Framework
The development of StructLM involved a massive instruction-tuning effort and careful selection of foundation models to ensure robust performance across varied data types.
Massive Instruction Tuning
The researchers curated a dataset of 1.1 million examples, with approximately 700k specifically focused on SKG across 18 "held-in" tasks. To maintain general conversational abilities, they integrated general instruction-following data from the SlimOrca dataset. This mixture prevents the model from overfitting to specific academic formats while enhancing its reasoning capabilities.
Model Foundation and Linearization
StructLM models were built upon the CodeLlama and Mistral families. CodeLlama was chosen because its pre-training on structured, logical code provides a strong prior for understanding data schemas. To process structured data, the models use "linearization"—converting non-linear structures like tables and graphs into a specific text-based syntax that transformers can parse.
Experimental Results
The study evaluated StructLM across 25 SKG tasks, including 18 held-in training tasks (e.g., Spider, TabFact, ToTTo) and 6 novel held-out tasks to test generalization (e.g., BIRD, FinQA).
Key Findings
- Superior Performance: StructLM-7B outperformed 18 task-specific models, effectively replacing 54B parameters worth of specialized models with a single 8x more efficient 7B model.
- New Benchmarks: The series established new SoTA performance on 8 out of 18 evaluated tasks.
- Generalization: On unseen held-out tasks, StructLM outperformed TableLlama by 35% and Flan-UL2 20B by 10%.
- The ChatGPT Gap: StructLM-34B significantly outperforms ChatGPT on nearly every structured task, highlighting that standard RLHF is insufficient for mastering data grounding.
Discussion and Future Work
The research revealed that code pre-training is a critical factor for SKG success, as the symbolic nature of programming languages translates well to database schemas. Interestingly, scaling from 7B to 34B parameters showed diminishing returns, suggesting that SKG remains a fundamental challenge beyond simple model size.
Future work will focus on addressing formatting sensitivity and improving evaluation heuristics. The authors suggest that the next frontier lies in "continued pre-training"—interleaving structured data directly into the massive text corpora used for base models, rather than treating structure as an afterthought during fine-tuning.
Summary updated