TL;DR
Graph-based Feature Synthesis (GFS) is a novel framework that automates machine learning over relational databases by treating them as heterogeneous graphs. By integrating powerful single-table models (like DeepFM) into a graph neural network structure, GFS captures complex cross-table relationships without the manual effort or algorithmic biases of traditional feature engineering.
What Problem Does This Paper Address?
Most machine learning models are designed for "flat" data—a single table where each row is an independent observation. However, real-world data usually lives in relational databases spread across multiple tables connected by foreign keys.
To use standard ML, data scientists typically perform manual "feature engineering," joining tables into one massive flat file. This process is notoriously labor-intensive (often cited as taking 80% of a data scientist's time) and frequently destroys the inherent relational structure of the data. Existing automated tools like Deep Feature Synthesis (DFS) help, but they have significant flaws: they are sensitive to the order in which tables are traversed, use rigid rule-based aggregations (like simple means or maximums), and suffer from "column explosion" as they search deeper into the database schema.
Methods
GFS addresses these issues by formulating the relational database as a heterogeneous directed graph.
The framework operates through several key innovations:
- Graph Formulation: Each row in a table becomes a node, and foreign key references become directed edges. This preserves the full structural context of the database.
- Modular "Plug-and-Play" Architecture: GFS is a general framework where any differentiable single-table model (e.g., DeepFM, FT-Transformer) can be plugged in as the node embedding function or the final prediction head. This allows the model to leverage the strong inductive biases already perfected for tabular data.
- Learnable Aggregation: Instead of fixed rules, GFS uses PNA-style (Principal Neighborhood Aggregation) functions. It calculates multiple statistics (mean, max, min) and applies learnable scalers, allowing the model to discover the most important ways to combine information from related records.
- Message Passing with Skip Connections: To prevent the "over-smoothing" problem common in deep GNNs (where node embeddings become indistinguishable), GFS includes residual connections to the raw input features at every layer.
Datasets
The authors evaluated GFS on four diverse real-world multi-table datasets:
- AVS (Acquire-Valued-Shoppers): Customer purchase behavior prediction.
- Outbrain: Click-through rate (CTR) prediction for advertisements.
- Diginetica: E-commerce search and browsing log analysis.
- KDD15: Predicting student dropouts in MOOC courses.
Additionally, they created two synthetic datasets specifically designed to demonstrate the limitations of traditional depth-first search (DFS) methods.
Key Insights and Ideas
- Invariance to Traversal Order: The authors prove that DFS is sensitive to the order of tables in a schema. If you change the order, you might miss critical "join paths." GFS, by contrast, uses full neighbor sampling, making it mathematically invariant to traversal order and ensuring no data paths are ignored.
- Tabular Inductive Bias Matters: General-purpose GNNs often use simple MLPs for node embeddings. GFS shows that using specialized tabular models (like DeepFM) inside the graph layers significantly boosts performance, especially when feature interactions within a single table are complex.
- Efficiency over Complexity: While sophisticated Graph Transformers (like HGT) are powerful, GFS combined with DeepFM was found to be significantly more efficient, requiring only 1/2 to 1/3 of the training time per epoch while achieving better accuracy.
Key Results
GFS consistently outperformed all baselines, including traditional automated feature engineering (DFS) and state-of-the-art GNNs (HGT, RGCN).
- Accuracy: On the Diginetica dataset, GFS achieved an AUC of 0.8106, significantly higher than DFS (0.7963) and RDB2Graph (0.7565).
- Synthetic Robustness: In tests where DFS failed to capture "golden" join paths (dropping to ~0.46 AUC), GFS maintained near-perfect performance (~0.99 AUC), proving its immunity to traversal order issues.
- Training Speed: GFS proved faster than heavy-duty graph models. For example, on the KDD15 dataset, GFS trained in 0.39 hours, compared to 2.45 hours for the Heterogeneous Graph Transformer (HGT).
Limitations and Future Work
The primary limitation discussed is the search depth vs. resource tradeoff. As the search depth $K$ increases, the size of the $K$-hop neighbor subgraph grows rapidly, eventually exhausting GPU memory. While GFS is more efficient than many GNNs, very deep relational structures still pose a hardware challenge.
Future work could explore more advanced sampling techniques to handle extremely large-scale relational graphs or investigate how to automatically determine the optimal search depth for a given schema.
Summary updated