Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lukaszahradnik/deep-db-learning

A modular message-passing scheme reflecting the relational model for end-to-end deep learning from databases
https://github.com/lukaszahradnik/deep-db-learning

artificial-intelligence database deep-learning graph-neural-networks machine-learning python

Last synced: 6 days ago
JSON representation

A modular message-passing scheme reflecting the relational model for end-to-end deep learning from databases

Awesome Lists containing this project

README

        

# Deep Learning for Relational Databases

This repository contains code accompanying the paper [A Deep Learning Blueprint for Relational Databases](https://openreview.net/forum?id=b4GEmjsHAB)

**TL;DR:** (or [**video**](https://www.youtube.com/watch?v=1QUQogj_xmI&ab_channel=TableRepresentationLearning))\
A _modular_ message-passing scheme reflecting the _relational model_ for **end-to-end deep learning from databases**

## About

The system allows to easily connect to any database through a simple connection string (with [SQL Alchemy](https://www.sqlalchemy.org/)), load information from the DB (with [Pandas](https://pandas.pydata.org/)), _**automatically analyze**_ its schema structure and data columns' semantics, and efficiently load and embed the data into learnable ([torch](https://pytorch.org/)) tensor representations.

The subsequent modular neural message-passing scheme operating on top of the resulting (two-level) _**multi-relational hypergraph representation**_ then builds on [**Pytorch Geometric**](https://pyg.org/), allowing to easily utilize any of its modules in the respective functional interfaces (_transformation, combination, aggregation_) of the _**deep relational blueprint**_:

![schema.png](schema.png)

For more information, please read the paper and/or feel free to [reach out](https://github.com/LukasZahradnik/deep-db-learning/discussions) directly to us!

If you like the idea, you can cite the paper as:
```
@inproceedings{zahradnik2023deep,
title={A Deep Learning Blueprint for Relational Databases},
author={Zahradn{\'\i}k, Luk{\'a}{\v{s}} and Neumann, Jan and {\v{S}}{\'\i}r, Gustav},
booktitle={NeurIPS 2023 Second Table Representation Learning Workshop},
year={2023}
}
```
---
### Project Structure

- `db_transformer` - the main module containing the:
- `data` - loading, analysis, conversion, and embedding
- `db` - connection, inspection, and schema detection
- and the transformer-based instantiation of the blueprint
- `experiments` - presented in the paper, including baselines from:
- Tabular models
- Propositionalization
- Statistical Relational Learning
- Neural-symbolic integration

and additionally some:
- `datasets` - some selected DB datasets for debugging
- `examples` - example scripts on data schema detection/conversion

---
### Related

There is also the [**PyNeuraLogic**](https://github.com/LukasZahradnik/PyNeuraLogic) framework that allows for a more flexible [_deep relational learning_](https://medium.com/tag/deep-relational-learning) with the DB relations, operations, queries, and more.
- using [differentiable relational logic](https://github.com/GustikS/NeuraLogic), it allows to skip the intermediate transformation into (hyper)graph tensors, and operate directly with the relational (DB) representation.



SQL tutorial