LLaSA: Large Language and Structured Data Assistant

Yao Xu, Shizhu He, Jiabei Chen, ZengXiangrong ZengXiangrong, Bingning Wang, Guang Liu, Jun Zhao, Kang Liu

Introduction

Large Language Models (LLMs) excel at processing unstructured text but often struggle with structured data formats like tables, databases, or knowledge graphs. The conventional approach—serialization—converts structured data into flat text strings (e.g., Markdown). This process frequently destroys the spatial and relational logic inherent in the data, making it difficult for the model to associate cells with headers or navigate complex graph relationships.

LLaSA (Large Language and Structured Data Assistant) addresses these challenges by treating structured data as a distinct modality. Instead of relying solely on text, LLaSA uses a unified hypergraph representation and a decoupled bridge module to preserve structural integrity.

Methodology

The LLaSA framework introduces three primary innovations to bridge the gap between structured data and language models.

The LLaSA architecture: Structured data is converted to a hypergraph, encoded, and passed through the G-Former to provide structural context to the LLM.

1. Unified Hypergraph Representation

A core contribution of LLaSA is the unification of diverse data types into a single mathematical format: the hypergraph. In this representation, table cells become nodes, while rows and columns are treated as hyperedges connecting them. Similarly, in knowledge graphs, entities are nodes and relationships are hyperedges. This allows a single architecture to process varied structured inputs without specialized components for each type.

Conversion examples: (a) Table to Hypergraph and (b) Knowledge Graph to Hypergraph, illustrating how relational structures are preserved as nodes and edges.

2. The G-Former Bridge

Inspired by vision-language models, the G-Former acts as a structural bottleneck. It uses learnable "query tokens" to extract relevant features from the hypergraph encoder. These features are then injected into the LLM as "soft prompts" alongside the standard serialized text. This dual-input approach provides the LLM with both the raw data and a "map" of its internal connections.

3. Decoupled Pretraining

Unlike previous methods that tightly couple Graph Neural Networks (GNNs) with specific LLMs, LLaSA employs a decoupled pretraining strategy. The hypergraph encoder and G-Former are pretrained independently using self-supervised tasks:

  • Graph-Text Matching: Aligning graph structures with their textual descriptions.
  • Graph-Dependent Answer Generation: Training the G-Former to generate template-based answers using only graph features.

This ensures the structural encoder is model-agnostic and can be integrated with various LLMs like Llama-3 or Mistral with minimal friction.

Evaluation and Results

LLaSA was pretrained on 25 million tables and evaluated across 13 datasets covering structured QA, fact verification, and data-to-text generation.

Key Findings

  • State-of-the-Art Performance: LLaSA 7B (Mistral-based) achieved SOTA results on 4 out of 10 primary tasks, outperforming GPT-4 by 15.9% on average across the evaluated suite.
  • Structural Awareness: In "Frozen" LLM scenarios (Prompt Tuning), LLaSA showed a 12% improvement over standard prompting, demonstrating that the hypergraph tokens effectively communicate structure to the model.
  • Efficiency: By using the G-Former to compress graph information into a few informative tokens, LLaSA reduces noise and allows the LLM to focus on task-relevant structural details.

Conclusion

LLaSA demonstrates that treating data structure as a geometric modality significantly enhances LLM reasoning capabilities. By decoupling the structural encoder from the language model, the framework offers a flexible, high-performance solution for complex structured data tasks. Future work will explore scaling to longer context windows and handling increasingly irregular real-world database schemas.

Summary updated

BibTeX
@inproceedings{xu2025llasa,
  author = {Yao Xu and Shizhu He and Jiabei Chen and ZengXiangrong ZengXiangrong and Bingning Wang and Guang Liu and Jun Zhao and Kang Liu},
  title = {{LLaSA: Large Language and Structured Data Assistant}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  doi = {10.18653/v1/2025.naacl-long.97},
}
Figure