StructLM: Towards Building Generalist Models for Structured Knowledge Grounding

Alex Zhuang, Ge Zhang, Tianyu Zheng, Xinrun Du, Junjie Wang, Weiming Ren, Wenhao Huang, Jie Fu, Xiang Yue, Wenhu Chen

TL;DR

Large Language Models (LLMs) struggle with structured data like tables and graphs, lagging behind specialized models. This paper introduces StructLM, a family of generalist models trained on a massive instruction-tuning dataset for Structured Knowledge Grounding (SKG), achieving state-of-the-art results on many tasks and demonstrating strong generalization to unseen data.

What Problem Does This Paper Address?

LLMs have shown remarkable capabilities in understanding and generating natural language text. However, their proficiency in interpreting and utilizing structured data sources such as tables, knowledge graphs, and databases remains a significant challenge. This gap limits their usefulness in real-world applications where structured data is abundant. The authors highlight that even powerful models like ChatGPT perform considerably worse than specialized models on SKG tasks, indicating that this capability is often overlooked during LLM pre-training. Building a single, generalist model that can effectively handle diverse structured data formats and tasks is a key problem.

Methods

The core of this work is the development of StructLM, a series of models fine-tuned for Structured Knowledge Grounding (SKG). The authors constructed a large-scale instruction-tuning dataset containing 1.1 million examples, combining SKG-specific data with general instruction-following data to improve overall generalizability. They fine-tuned models from the Mistral and CodeLlama families, ranging from 7B to 34B parameters. A key aspect of their approach is the multi-task learning strategy, where models are trained on a diverse mix of SKG tasks simultaneously. They also explored the impact of different pre-training curricula, finding that code pre-training is particularly beneficial for SKG performance.

Datasets

The authors introduced a new 1.1 million example instruction-tuning dataset for SKG. This dataset comprises 25 SKG tasks, with 18 used for "held-in" evaluation and 6 held-out tasks designed to test generalization. The dataset includes various structured data types like tables, knowledge graphs, and database schemas, and covers tasks such as data-to-text generation, question answering, fact verification, and knowledge-grounded conversations. They also utilized existing datasets for evaluation and compared their models against baselines trained on datasets like SlimOrca.

Key Insights and Ideas

  • LLMs are surprisingly weak at structured data: Despite their text prowess, LLMs show a significant performance gap on SKG tasks, even lagging behind specialized models by a considerable margin.
  • A unified approach works: Training a single model on a diverse mix of SKG tasks (multi-task learning) leads to better generalization than task-specific models.
  • Code pre-training is a strong prior: Models pre-trained on code exhibit superior performance on SKG tasks, suggesting a conceptual similarity or benefit from symbolic reasoning.
  • Scaling isn't everything: Increasing model size (from 7B to 34B) yielded only marginal improvements, indicating that structured knowledge grounding might be hitting a performance ceiling with current methods, and innovative architectural or training designs are needed.
  • General instruction data helps generalization: Mixing in general instruction-tuning data improved performance on held-out tasks, potentially by reducing overfitting to specific training task formats.

Key Results

StructLM models achieved state-of-the-art (SoTA) performance on 8 out of 18 held-in SKG tasks. They surpassed task-specific models on 16 out of 18 held-in datasets. On 6 novel held-out SKG tasks, StructLM demonstrated strong generalization, outperforming TableLlama by an average of 35% and Flan-UL2 20B by an average of 10%. Even the smaller 7B StructLM model was significantly more parameter-efficient than previous multi-task approaches.

Limitations and Future Work

The authors acknowledge that the SKG tasks used in their dataset are primarily academic and may not fully represent the complexity and diversity of real-world structured data. The models might have developed an "unnecessary specificity" towards the conventions within their training set. They also note that evaluating zero-shot or few-shot performance can be challenging due to the difficulty of precisely controlling autoregressive transformer outputs, which might mask underlying learned representations.

Future work could involve:

  • Creating larger-scale datasets with more heterogeneous formatting conventions to better capture the SKG domain.
  • Exploring continued pre-training of open foundation models on more structured data formats, similar to current efforts in code and math pre-training.
  • Developing more flexible constrained methods for language model evaluation to better assess learned capabilities.

Summary updated

BibTeX
@inproceedings{zhuang2024structlm,
  author = {Alex Zhuang and Ge Zhang and Tianyu Zheng and Xinrun Du and Junjie Wang and Weiming Ren and Wenhao Huang and Jie Fu and Xiang Yue and Wenhu Chen},
  title = {{StructLM: Towards Building Generalist Models for Structured Knowledge Grounding}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=EKBPn7no4y},
}
Figure