Introduction
Data science is currently a fragmented discipline. Practitioners often work in isolation, leading to "tribal knowledge" where insights regarding dataset utility or optimal cleaning techniques remain unshared. While repositories like Kaggle and OpenML host hundreds of thousands of pipelines, there has lacked a systematic method to learn from these artifacts at scale. Existing solutions typically bifurcate into dataset search or AutoML/pipeline generation, often requiring computationally expensive analysis of raw data. KGLiDS (Knowledge Graph-based Linked Data Science) bridges this gap by creating a unified, semantic representation of the entire data science ecosystem.
System Architecture
The core of KGLiDS is the KG Governor, which orchestrates three primary processes to transform raw artifacts into a queryable Knowledge Graph (KG).
- Pipeline Abstraction: KGLiDS employs static analysis enriched by programming library documentation. It converts Python scripts into language-independent graphs that capture code flow, data flow, and implicit parameters (such as default values in scikit-learn) that standard analysis often overlooks.
- Data Profiling & CoLR Embeddings: To maintain scalability across massive data lakes, KGLiDS utilizes Column Learned Representation (CoLR). These are fixed-size embeddings generated from a 10% sample of a column, capturing semantic meaning (e.g., identifying that "area_sq_ft" and "area_sq_m" are related) regardless of data scale.
- KG Construction: Using the RDF-star standard, the system builds the "LiDS graph." This allows for linking datasets and pipelines while annotating those links with metadata, such as similarity scores between columns.
Semantic Linking and Automation
By connecting code to data, KGLiDS enables complex semantic queries that were previously impossible, such as finding all pipelines that applied a specific model to a dataset with particular features.
For automation, KGLiDS leverages Graph Neural Networks (GNNs) trained on the LiDS graph. These models predict optimal data cleaning or transformation steps for new datasets based on how similar data was handled in historical pipelines. This approach prioritizes semantics over raw data processing, making automation independent of table size.
Evaluation and Key Results
KGLiDS was evaluated using a diverse set of benchmarks, including 13,800 Python scripts and over 3,700 tables from Kaggle, as well as synthetic benchmarks like SANTOS.
- Performance: KGLiDS demonstrated significant efficiency gains, running 7.3x faster than SANTOS in preprocessing and up to 51.2x faster in query execution.
- Scalability: The system maintained a stable memory footprint (under 10GB) during data cleaning tasks, whereas competitors often encountered Out-of-Memory (OOM) errors.
- Accuracy: Despite its speed, KGLiDS achieved comparable or superior F1-scores in AutoML tasks and higher precision/recall in data discovery compared to state-of-the-art systems like Starmie.
- Graph Efficiency: The system achieved an 82% reduction in graph size compared to general-purpose code-to-graph tools by focusing exclusively on semantics relevant to data science.
Conclusion and Future Work
KGLiDS provides a scalable, semantic foundation for automating data science tasks by abstracting pipelines and data into a unified Knowledge Graph. While currently tailored to Python, the underlying abstraction is language-agnostic. Future developments include integrating Large Language Models (LLMs) to support more complex exploratory data analysis and automated feature engineering.
Summary updated