Abstract
Graph Neural Networks (GNNs) have demonstrated significant success in various domains, yet their performance is heavily dependent on the quality of the input graph structure. In many real-world scenarios, data is stored in tabular formats, necessitating a manual and often suboptimal conversion process. This paper introduces AutoG, an automated framework that leverages Large Language Models (LLMs) and a GNN-based "oracle" to construct high-quality graph schemas from raw tables. AutoG systematically addresses common challenges in graph construction, such as identifying implicit relationships and creating task-specific geometries, achieving performance levels comparable to human-expert designs across multiple benchmarks.
Introduction
While GNNs have revolutionized fields like recommendation systems and drug discovery, they are constrained by a "garbage in, garbage out" paradigm: the model's efficacy is fundamentally limited by the underlying graph structure. Most real-world data resides in relational tables rather than pre-defined graphs. Currently, transforming these tables into a graph schema is a laborious, manual process requiring deep domain expertise. Heuristic approaches—such as treating every table as a node type—often fail to capture implicit relationships or inadvertently create "super-nodes" that degrade performance.
AutoG addresses these issues by automating the graph construction process. It treats schema design as a series of intelligent transformations, using LLMs to propose candidates and an automated discriminator to select the most effective structure for a given task.
Methodology
The AutoG framework consists of three primary modules designed to move beyond simple semantic mapping to structural reasoning.
- Input Context Module: To provide the LLM with a nuanced understanding of the data, this module supplies statistical metadata—including unique counts, modes, and sample values—alongside column names. This allows the model to distinguish between different data types (e.g., categorical vs. numerical IDs) more effectively.
- Generator Module (Chain-of-Augmentation): The LLM acts as a planner, restricted to a set of four atomic actions to prevent hallucination:
CONNECT_TWO_COLUMNS: Establishing inter-table relationships.GENERATE_NEW_TABLE: Normalizing data to create new node types.REMOVE/ADD PRIMARY KEY: Redefining tables as nodes or edges.UNFOLD_MULTI_CATEGORY: Processing list-like categorical columns.- Discriminator Module (The Oracle): Since LLMs cannot perfectly predict downstream GNN performance, AutoG generates multiple candidate schemas. These are evaluated by training a "basket" of diverse GNN models (e.g., RGCN, HGT) on a data subset. The schema demonstrating the best early-stage validation performance is selected.
Datasets and Evaluation
The authors introduced a new benchmark comprising eight multi-tabular datasets from e-commerce, academic, and medical domains. These datasets were curated to test four specific structural challenges:
- C1: Missing cross-table relationships.
- C2: Self-induced relationships (columns that should be promoted to nodes).
- C3: Ambiguity in table roles (node vs. edge).
- C4: Task-specific graph requirements.
Key Insights
- Task-Specific Geometry: A critical finding is that the optimal graph structure is task-dependent. For instance, in the Microsoft Academic Graph (MAG), a schema optimized for venue prediction may differ significantly from one optimized for publication year prediction. AutoG dynamically adapts the graph to the specific objective.
- Statistical Reasoning: LLMs perform better when provided with data distributions (min, max, mode) rather than just semantic labels. This enables "deep reasoning" about the underlying data structure.
- Efficiency of Early Metrics: The research demonstrates that full GNN training is not required to rank candidate schemas. Training for only 10% of total epochs provides a sufficient signal, making the iterative "Oracle" loop computationally viable.
Results
AutoG consistently achieved performance levels nearly identical to, and occasionally exceeding, those of human experts. On the RetailRocket dataset, AutoG improved the AUC from approximately 50% (using standard heuristics) to 74.78%, approaching the expert score of 84.70%. Furthermore, AutoG proved robust in complex scenarios involving implicit relationships (Challenge C2), where existing automated methods like JTD and TabGNN often struggle.
Conclusion and Future Work
AutoG represents a significant step toward automating graph machine learning pipelines. However, limitations remain. The framework's reliance on semantic column names means performance can degrade on anonymized data. Additionally, while effective for moderately complex schemas, scaling to massive industrial databases with hundreds of tables remains an open challenge. Future research will focus on improving structural pruning to remove noisy connections and enhancing performance on data with obscured semantics.
Summary updated