KGLiDS: A Platform for Semantic Abstraction, Linking, and Automation of Data Science

Mossad Helali, Shubham Vashisth, Philippe Carrier, Katja Hose, Essam Mansour, Cavalcante, Antonio, Ammar, Khaled, Hose, Katja, Mansour, Essam

TL;DR

This paper introduces KGLiDS, a novel platform that leverages knowledge graphs and machine learning to automatically capture the semantics of data science artifacts like datasets and pipelines. This allows for more efficient data discovery, cleaning, transformation, and AutoML, outperforming existing systems in speed and resource usage while maintaining comparable or better accuracy.

What Problem Does This Paper Address?

Data science is booming, leading to a massive proliferation of datasets, scripts, and pipelines. However, the knowledge and expertise embedded within these artifacts are largely siloed, leading to "tribal knowledge" and a lot of duplicated effort. Data scientists often have to reinvent the wheel, spending significant time on tasks like data discovery and preparation. Existing tools tend to focus on either dataset search or pipeline generation, but rarely combine them holistically. Furthermore, many current approaches are computationally expensive and struggle with scalability, especially when dealing with large datasets and dynamic languages like Python.

Methods

KGLiDS tackles this by building a comprehensive knowledge graph (KG) of data science artifacts. The core components include:

  • KG Governor: This orchestrates the KG construction.
  • Pipeline Abstraction: It uses static code analysis, library documentation, and dataset usage analysis to create language-independent representations of Python pipelines. This captures control flow, data flow, and library calls.
  • Data Profiling: This module analyzes datasets to infer fine-grained data types, collect statistics, and generate fixed-size embeddings (CoLR - Column Learned Representations) for columns and tables. This is done using deep learning models and Spark for scalability.
  • KG Construction: This component links the abstracted pipelines with dataset information, using a graph linker to verify predicted dataset usage and build a global schema.
  • KGLiDS Storage: This stores the KG (using RDF-star for edge annotations), embeddings, and machine learning models.
  • KGLiDS Interfaces: A Python library providing APIs for users to interact with the platform, enabling data discovery, cleaning, transformation, and AutoML tasks.

The system leverages knowledge graphs for their ability to represent complex relationships and enable reasoning, and uses machine learning (specifically GNNs for downstream tasks) to learn from these graphs and make predictions.

Datasets

The paper evaluates KGLiDS using several benchmarks:

  • Data Discovery: D³L Small, TUS Small, and SANTOS Small (synthetic and real-world datasets). SANTOS Large was also used for scalability testing.
  • Data Cleaning & Transformation: 13 datasets from an AutoML benchmark and 5 from the UCI repository for cleaning. 17 datasets from AutoLearn's experimental evaluation (UCI repository) for transformation.
  • AutoML: 24 benchmark tables used by the KGpip system.

The paper does not introduce new datasets but utilizes existing ones for comprehensive evaluation.

Key Insights and Ideas

  • Holistic Approach: KGLiDS is the first platform to holistically combine dataset discovery and pipeline automation by representing both as a knowledge graph.
  • Semantic Abstraction: Moving beyond raw data and code to capture the semantics of data science artifacts is key to overcoming differences in formats, languages, and libraries.
  • Embedding-Powered Profiling: Using learned embeddings (CoLR) for columns and tables significantly improves the accuracy of identifying relationships and similarities, especially for numerical data.
  • Scalability through KG and Embeddings: By representing data science artifacts in a KG and using fixed-size embeddings, KGLiDS achieves much better performance (speed and memory) than systems that operate directly on raw data or large, complex graph structures.
  • On-Demand Automation: KGLiDS's GNN models enable on-demand recommendations for data cleaning and transformation, aiming to maximize model performance for a specific task rather than just general data repair.

Key Results

  • Data Discovery: KGLiDS significantly outperforms Starmie and SANTOS in precision and recall on D³L Small and TUS Small benchmarks. It is also much faster, with preprocessing being up to 7.3x faster than SANTOS and query times up to 51.2x faster on SANTOS Large.
  • Pipeline Abstraction: KGLiDS achieves an 82% graph reduction and 95% less processing time compared to GraphGen4Code for the same set of pipelines, while capturing more relevant data science semantics.
  • Data Cleaning: KGLiDS achieves comparable or better F1 scores than HoloClean, while being significantly faster (85% of datasets) and using less memory (38% of datasets). HoloClean also encountered out-of-memory errors on larger datasets.
  • Data Transformation: KGLiDS consistently matches or surpasses AutoLearn's accuracy, while being significantly faster and using much less memory (less than 10GB vs. AutoLearn's variable usage).
  • AutoML: KGLiDS, when integrated with KGpip, improves F1-scores in most cases and significantly reduces hyperparameter search time.

Limitations and Future Work

  • Limitations: The current implementation primarily supports Python pipelines. While the approach is generalizable, specific implementations might be needed for other languages. The paper mentions that the accuracy of static analysis for dynamic languages like Python can be challenging.
  • Future Work: The authors plan to incorporate Large Language Models (LLMs) into KGLiDS for more advanced use cases like exploratory data analysis and feature selection. They also aim to expand the platform's capabilities for data discovery, exploration, reuse, and automation.

Summary updated

BibTeX
@inproceedings{helali2023kglids,
  author = {Mossad Helali and Shubham Vashisth and Philippe Carrier and Katja Hose and Essam Mansour and Cavalcante, Antonio and Ammar, Khaled and Hose, Katja and Mansour, Essam},
  title = {{KGLiDS: A Platform for Semantic Abstraction, Linking, and Automation of Data Science}},
  booktitle = {ICDE},
  year = {2023},
}
Figure