arXiv:2611.02373cs.DBNov 2026

Manuscript Offprint

arXiv:2611.02373

Mixed-Type Relational Database Synthesis with Graph-Prompted Language Model

Yuxiang Sun, Mengshi Chen, Jianwei Wang, Wenjie Zhang, Kai Wang

Yuxiang Sun

Shanghai Jiao Tong University

Shanghai, China

scscsc04@sjtu.edu.cn

Mengshi Chen

Shanghai Jiao Tong University

Shanghai, China

chenmengshi@sjtu.edu.cn

Jianwei Wang

University of New South Wales

Sydney, Australia

jianwei.wang1@unsw.edu.au

Wenjie Zhang

University of New South Wales

Sydney, Australia

wenjie.zhang@unsw.edu.au

ABSTRACT

Data access is often limited by privacy or proprietary restrictions, motivating relational database synthesis, which synthesizes realistic contents across related tables. Relational databases couple multitable structure with mixed-type attributes and intricate semantic dependencies among values, making realistic synthesis challenging. In this paper, we propose REMIX, a unified framework for realistic RElational database synthesis with MIXed-type attributes. REMIX integrates a small language model (SLM) and a large language model (LLM) through two key phases: Graph-to-Prompt Tuning and Collaborative SLM–LLM Decoding. To capture attribute dependencies within and across tables, Graph-to-Prompt Tuning represents the database as an attributed heterogeneous graph. We project mixed-type record embeddings and aggregated relational context into soft prompts that serve as continuous vectors for an SLM. We jointly optimize the graph-to-prompt mapping and SLM through autoregressive attribute reconstruction. Furthermore, to reduce semantic inconsistencies, Collaborative SLM–LLM Decoding combines SLM-based record generation with repair programs induced by an LLM. The LLM discovers semantic dependencies, iteratively refines them through independent validation with a statistical bound on the overall probability of false acceptance, and translates validated dependencies into tested programs that repair generated values. Extensive experiments on seven real-world relational databases demonstrate the effectiveness of REMIX in generating high-fidelity data with improved semantic consistency and downstream utility.

1 INTRODUCTION

Relational databases organize records and represent their relationships across tables [8]. They support efficient data management and retrieval, making them a cornerstone of large-scale information systems in e-commerce [1, 17], healthcare [35], and enterprise applications [39, 40]. However, access to real-world databases is often limited by privacy concerns, proprietary restrictions, and data collection costs [10, 11, 21]. Relational database synthesis addresses this problem by generating synthetic database content that preserves the statistical properties and relational dependencies of the source data [19, 30], thereby providing an alternative data source for downstream applications.

Real-world relational databases contain numerical, categorical, and textual attributes whose dependencies can span multiple tables [4, 9, 32]. Textual descriptions provide contextual details that

Kai Wang

Shanghai Jiao Tong University

Shanghai, China

w.kai@sjtu.edu.cn

Input: source relational database DD Numerical Categorical Textual

orders
order_id PKchannelsubtotalnote
O1web90Home-office lighting and seating
order items
order_idPKitem_idPKqtypriceamountdescription
O1I113030Adjustable desk lamp
O1I216060Ergonomic office chair

Mixed-type record synthesis

Output: synthetic database D~\widetilde{D}

orders
order_id PKchannelsubtotalnote
O1web110 ①^{①}Office lighting and seating set
order items
order_idPKitem_idPKqtypriceamountdescription
O1I122045 ②^{②}Warm-white LED desk lamp
O1I216060Mesh office chair

Semantic dependencies and corrections

① subtotal = ∑\sum linked amounts

40+60:110X→100✓40 + 60: 110 X \rightarrow 100 \checkmark

② amount = qty × price

2×20:45X→40✓2 \times 20: 45 X \rightarrow 40 \checkmark

Figure 1: Mixed-type relational database synthesis.

complement numerical and categorical values. Meanwhile, semantic dependencies express arithmetic relationships, domain constraints, and business rules at both record and database levels. Excluding attributes or failing to preserve their semantic dependencies can therefore affect analytical results and downstream predictions. Figure 1 illustrates this synthesis task using a shopping database, where an item's amount equals its quantity times its unit price and an order's subtotal equals the sum of its linked item amounts.

Table 1 compares representative relational database synthesis methods. In early stages, SDV [30] synthesizes related tables using a hierarchical statistical framework, but its assumptions and aggregate summaries can limit the dependencies captured. Conventional neural methods model attribute distributions and relational dependencies through generative adversarial networks (GAN) in RC-TGAN [13], variational autoencoders (VAE) in GraphVAE [26], and autoregressive (AR) models in TabularARGN [37]. However, GANs can suffer from instability and mode collapse, VAEs balance regularization and reconstruction fidelity, and AR models can accumulate errors. Their native support is generally limited to numerical and categorical attributes.

Figure

(a) Graph-conditioned diffusion

(b) Parent-conditioned LM

(c) REMIX (ours)

Figure 2: Framework comparison for relational database synthesis. (a) Graph-conditioned diffusion trains a GNN denoiser with relational context, then jointly denoises related records from noise. (b) Parent-conditioned LM trains on serialized records, then generates parents followed by parent-conditioned children. (c) REMIX jointly tunes its graph-to-prompt mapping and SLM via attribute reconstruction, while an LLM prepares tested programs from validated semantic dependencies. During decoding, the SLM generates mixed-type records from soft prompts, and the programs compute derived values and repair inconsistencies.

Table 1: Comparison of relational database synthesis methods. ✓ denotes support; X denotes no native support. Abbr: AR (autoregressive), GAN (generative adversarial network), GNN (graph neural network), LM (language model).

MethodColumn Type CoverageSemantic RepairBackbone
Num.Cat.Text
SDV [30]✓✓✗✗Statistical Model
RC-TGAN [13]✓✓✗✗GAN
TabularARGN [37]✓✓✗✗AR
GRDM [22]✓✓✗✗GNN+Diffusion
REaLTabFormer [33]✓✓✗✗LM
REMIX✓✓✓✓GNN+LM

Recent methods apply diffusion models and language models (LM) to relational database synthesis. As depicted in Figure 2(a), diffusion-based methods such as GRDM [22] and RelDiff [20] jointly denoise related records conditioned on relational context to capture cross-table dependencies. In parallel, LM-based synthesizers initialize records into token sequences and generate new records autoregressively. For example, REaLTabFormer [33] generates child records conditioned on previously generated parent records, as depicted in Figure 2(b). GReaTER [24] instead restructures and joins selected related records before serialization and generation.

Motivations. LM-based synthesis can generate structured values and text through a common token representation [2]. Existing relational LM methods, however, typically obtain relational context from serialized parent records or selected table joins [24, 33], limiting the related information available for joint generation. Relational diffusion models incorporate cross-table context but primarily target numerical and categorical attributes [22]. Generating text independently of these attributes can overlook their dependencies.

These limitations motivate joint modeling of mixed-type attributes across related tables.

Moreover, a synthetic database can closely match individual attribute distributions while violating semantic dependencies [34]. For example, in a shopping database, an order's subtotal should equal the sum of its linked item amounts. A synthesized order with item amounts of 40 and 60 but a subtotal of 110 violates this dependency despite valid foreign-key links. A naive approach is to check generated records directly, either manually or with an LLM, but such checks can overlook dependencies and yield inconsistent judgments across repeated evaluations. These limitations motivate incorporating semantic dependencies into synthesis to reduce inconsistencies among generated values.

Challenges. Modeling mixed-type attributes across related tables while reducing semantic inconsistencies involves two challenges.

Challenge I. Incorporating relational context into joint modeling of mixed-type attributes is difficult because relevant information spans heterogeneous records and multiple relationship paths. Parent conditioning can omit information from other connected records, while one-to-many joins repeat shared records and produce long serialized inputs. Compressing input while preserving the attribute semantics and relation types needed to capture cross-table dependencies is therefore difficult.

Challenge II. The diverse forms and context-dependent applicability conditions of semantic dependencies complicate their reliable discovery from source data and safe application during synthesis. Inferred dependencies may reflect statistical associations or hold only under specific conditions. Applying them to all synthesized records can therefore lead to incorrect changes. Moreover, noise in the source databases can also cause occasional violations of otherwise valid dependencies, making it difficult to distinguish unreliable rules from valid ones affected by noise.

Our approaches. To address these challenges, we propose REMIX, a unified framework for mixed-type relational database synthesis, as illustrated in Figure 2(c). It first trains a small language model (SLM) for graph-conditioned generation through Graph-to-Prompt Tuning, then combines this generator with repair programs induced by a large language model (LLM) in Collaborative SLM-LLM Decoding.

To address Challenge I, Graph-to-Prompt Tuning learns to supply mixed-type record information and relational context through soft prompts, continuous input vectors that condition the SLM. Specifically, we represent records and foreign-key links as an attributed heterogeneous graph. A type-aware row encoder maps each record's mixed-type attributes to a row embedding, while a heterogeneous graph neural network (GNN) aggregates information from connected records. A projector maps the relational context together with a randomly masked row embedding into soft prompts. Masking encourages the SLM to use relational context during reconstruction. An autoregressive attribute reconstruction objective jointly trains the graph-to-prompt mapping and the SLM. This design supplies relational context without serializing joined tables or requiring a fixed table generation order.

To address Challenge II, Collaborative SLM-LLM Decoding combines the tuned SLM generator with programs constructed by the LLM to repair violations of semantic dependencies. The LLM first proposes semantic dependencies from source data. Validation on independent samples accounts for source noise through a small violation tolerance and uses counterexamples to guide iterative refinement. A statistical acceptance criterion bounds the overall probability of accepting dependencies whose violation probabilities exceed the prescribed tolerance. The LLM then translates validated dependencies into executable programs, which are tested individually and together. The tested programs are reused across generated records. After the tuned SLM generates new records, the programs execute in dependency order to repair violations. REMIX checks interacting program updates together and rolls back changes that introduce new violations.

Contributions. Our main contributions are summarized as follows.

  • We study mixed-type relational database synthesis and propose REMIX, a unified framework for jointly generating structured values and text across related tables.
  • We design Graph-to-Prompt Tuning, which uses type-aware encoding and heterogeneous graph propagation to construct soft prompts for learning mixed-type attribute distributions.
  • We develop Collaborative SLM-LLM Decoding, combining SLM generation with independently validated semantic dependencies and tested programs built by an LLM for computation and repair.
  • Experiments on seven real-world databases show REMIX's gains in fidelity, semantic consistency, and downstream utility.

References (12)