STRuCT-LLM: Unifying Tabular and Graph Reasoning with Reinforcement Learning for Semantic Parsing

Josefa Lia Stoisser, Marc Boubnovski Martell, Lawrence Phillips, Casper Hansen, Julien Fauqueur
6/15/2025
cs.CLcs.AI

Official code: bouv/STRuCT-LLM (6 stars, last commit 2025-07-22).

Abstract

We propose STRuCT-LLM, a unified framework for training large language models (LLMs) to perform structured reasoning over both relational and graph-structured data. Our approach jointly optimizes Text-to-SQL and Text-to-Cypher tasks using reinforcement learning (RL) combined with Chain-of-Thought (CoT) supervision. To support fine-grained optimization in graph-based parsing, we introduce a topology-aware reward function based on graph edit distance. Unlike prior work that treats relational and graph formalisms in isolation, STRuCT-LLM leverages shared abstractions between SQL and Cypher to induce cross-formalism transfer, enabling SQL training to improve Cypher performance and vice versa - even without shared schemas. Our largest model (QwQ-32B) achieves substantial relative improvements across tasks: on semantic parsing, Spider improves by 13.5\% and Text2Cypher by 73.1\%. The model also demonstrates strong zero-shot generalization, improving performance on downstream tabular QA (TableBench: 8.5\%) and knowledge graph QA (CR-LT-KGQA: 1.7\%) without any QA-specific supervision. These results demonstrate both the effectiveness of executable queries as scaffolds for structured reasoning and the synergistic benefits of jointly training on SQL and Cypher (code available at https://github.com/bouv/STRuCT-LLM).

View on arXivView PDF

Code Implementations(1)

bouv/STRuCT-LLMOfficial100%
61Shell, PythonJun 13, 20251 years ago

Similar Papers

Cite this paper

@article{stoisser2025structllm,
  title  = {STRuCT-LLM: Unifying Tabular and Graph Reasoning with Reinforcement Learning for Semantic Parsing},
  author = {Josefa Lia Stoisser and Marc Boubnovski Martell and Lawrence Phillips and Casper Hansen and Julien Fauqueur},
  year   = {2025},
  eprint = {2506.21575},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.21575v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.21575.svg)](https://codeofpaper.com/paper/2506.21575)

Discussion