Graph-Conditional Flow Matching for Relational Data Generation

Davide Scassola, Sebastiano Saccani, Luca Bortolussi

TL;DR

This paper introduces a novel generative model for relational databases that leverages graph neural networks and flow matching to synthesize realistic multi-table data. By conditioning generation on the database's foreign-key graph structure, the model effectively captures complex inter-table dependencies, achieving state-of-the-art fidelity and demonstrating negligible privacy leakage.

What Problem Does This Paper Address?

The increasing value of data is often at odds with privacy concerns, making synthetic data generation a crucial technology for sharing insights without exposing sensitive information. While significant progress has been made in generating single-table tabular data, creating realistic synthetic data for relational databases remains a substantial challenge. Relational data, characterized by interconnected tables via foreign keys, presents complex structural dependencies, including multiple parent tables or various link types between tables. Existing methods often struggle to model these long-range dependencies and intricate relationships, leading to synthetic data that lacks fidelity or fails to capture the true data distribution. This paper aims to bridge this gap by proposing a flexible and expressive generative model capable of handling complex relational structures.

Methods

The core of the proposed method is a Graph-Conditional Flow Matching approach. Instead of generating data table by table or relying on sequential generation, the model learns to generate the entire content of a relational dataset conditioned on its foreign-key graph structure.

Here's a breakdown of the key techniques:

  • Continuous Normalizing Flows (CNFs): The foundation of the generative model is a CNF, which learns to transform a simple noise distribution into the complex target data distribution by solving an ordinary differential equation (ODE).
  • Flow Matching: This framework is used to train the CNF. Instead of directly learning the complex velocity field of the CNF, flow matching trains a neural network to match a conditional velocity field derived from a tractable probability path. This makes training more stable and efficient.
  • Graph Neural Network (GNN): To capture the relational structure, a GNN is integrated into the denoiser (the neural network that learns the velocity field). The GNN processes the entire graph of records and their foreign-key relationships, computing node embeddings that encode context from connected records. These embeddings are then used by table-specific MLPs to generate the clean records. This allows information to propagate across the entire connected component of the database.
  • Variational Parametrization: The authors employ a variational approach to parameterize the marginal velocity, which is learned by matching a variational distribution to the ground truth conditional distribution. This is particularly beneficial for handling categorical variables and improving training convergence.
  • Modular Architecture: The denoiser is composed of a GNN for global context and table-specific MLPs for local feature generation. This modularity allows for flexibility in handling different table structures and can be combined with various graph generation methods.

Datasets

The authors evaluate their method using six real-world relational datasets:

  • AirBnB
  • Biodegradability
  • CORA
  • IMDB MovieLens
  • Rossmann
  • Walmart

These datasets are part of the SyntheRela benchmark library, which is used for evaluating relational data generation methods. The paper notes that some datasets were subsampled for comparison.

Key Insights and Ideas

  • Unified Relational Data Generation: The model treats the entire relational dataset as a single entity (a graph) rather than independent tables. This allows for a more holistic understanding and generation of inter-table dependencies.
  • GNNs as Context Encoders: Integrating GNNs directly into the generative process, rather than using them as a separate pre-processing step, allows for end-to-end learning of relational context, leading to more expressive generation.
  • Flow Matching for Complex Structures: Flow matching proves to be a robust framework for learning generative models of complex, non-i.i.d. data like relational databases, where individual records are not independent.
  • Flexibility and Scalability: The graph-conditional approach is flexible enough to handle complex relational schemas (multiple parents, multiple link types) and scales linearly with the number of records, making it suitable for large datasets.
  • Negligible Privacy Leakage: The evaluation demonstrates that the generated synthetic data exhibits very low privacy risk, with privacy scores consistently close to zero.

Key Results

  • State-of-the-Art Fidelity: The proposed method consistently outperforms existing open-source relational data generation methods on the SyntheRela benchmark, achieving the highest accuracy in discriminator-based fidelity evaluation across most datasets.
  • Improved Performance with GNNs: Ablating the GNN component generally led to a significant increase in validation loss and a decrease in synthetic data fidelity, highlighting the importance of relational context.
  • Applicability to Complex Schemas: The method successfully handles datasets with complex structures, including tables with multiple parents and multiple foreign keys, where other methods struggled.
  • Efficient Training and Generation: The paper reports relatively short training times (under 20 minutes on a single GPU for the largest dataset) and fast generation times (under 10 seconds for the largest dataset).

Limitations and Future Work

  • Hyperparameter Tuning: Like most generative models, the approach requires dataset-specific hyperparameter tuning, particularly for neural network depth and width, to avoid overfitting.
  • Model Architecture: While the current architecture is effective, the authors suggest that more sophisticated model designs could further improve performance.
  • Future Directions:
    • Combining with generative models for large graphs (e.g., exponential random graph models) for even more scalable graph generation.
  • Further exploring the properties of flow matching, such as guidance, inpainting, and distillation, for enhanced generative capabilities.
  • Investigating more advanced GNN architectures for heterogeneous graphs.

Summary updated

BibTeX
@inproceedings{scassola2026graph,
  author = {Davide Scassola and Sebastiano Saccani and Luca Bortolussi},
  title = {{Graph-Conditional Flow Matching for Relational Data Generation}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i30.39712},
}
Figure