Skip to content

Leverage Graph method to solve high-dimensional Constraint Satisfaction Problems (CSPs) in synthetic database generation from query workloads.

License

Notifications You must be signed in to change notification settings

chunwangpro/CSP_Graph

Repository files navigation

CSP_Graph

This is the python code of "Graph Based Database Generation from Query Constraints". [Paper] [Code]

The goal is to leverage graph method (GCN) to learn the Cumulative Density Function (CDF) of synthetic database generation problem. The query workloads are considered as Constraint Satisfaction Problems (CSPs).

Datasets

  • census
  • wine

Basic Usage

Our model - GCN

python train.py --dataset wine-3 --query-size 10000 --channels 2,16,1 --num_layers 3 --epochs 3000 --bs 1000 --lr 1e-2 --opt adam --loss MSE

Baseline - PGM

python PGM.py --dataset wine-3 --query-size 10

Baseline - SMT

python SMT_z3.py --dataset wine-3 --query-size 10

File Structure

  • dataset.py : Process the datasets.
  • utils.py / plot_util.py / ce_util.py : Utilitiy functions.
  • preprocessing.py : Build the graph
  • models.py : Build the GCN model.
  • run_experiments.py: Script for PGM / SMT baseline to collect results.
  • demo.py : simple 2D demo for proposal.

Require environment

  • Python
  • PyTorch
  • torch_geometric
  • Networkx

About

Leverage Graph method to solve high-dimensional Constraint Satisfaction Problems (CSPs) in synthetic database generation from query workloads.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages