Supply chain data present themselves almost exclusively as relational data: orders, clients, suppliers, products, etc. Those data are collected through the business systems - the ERP, the CRM, the WMS - that are used to operate the company.

However, most mainstream machine learning techniques are not well-suited to deal with relational data. Dealing with relational data is usually an afterthought, typically involving some clever hacks on top of a design that is resolutely not aligned with the relational perspective.

Differentiating Relational Queries

Lokad has developed its own flavor of differentiable programming putting the relational use-case front and center. Indeed, we want our machine learning tools to natively embrace the relational nature of the data. Compared to the alternative options, this approach yields numerous benefits, those models are:

  • simpler to write
  • easier to understand and to reason about
  • more interpretable
  • faster to learn, and faster to execute
  • etc

The Lokad platform is programmatic and has been focusing on processing and visualizing relational data since its inception. However, in 2019, we embarked in a new journey, deciding to make our whole machine learning stack embrace the relational paradigm as well.

Differentiating relational queries is a small but fundamental building block in this direction. It’s a mean to propagate gradients through relational queries. Those gradients are used, in turn, to perform a stochastic gradient descent that usually represents the core of the learning/optimization logic.

The paper below presents a contribution of Paul Peseux (Lokad) on this very subject.


Title: Differentiating Relational Queries

Author: Paul Peseux, Lokad

From the Proceedings of the VLDB 2021 PhD Workshop, August 16th, 2021.

Abstract: This work is about performing automatic differentiation of a query in the context of relational databases and queries. This is done in order to perform optimization through gradient descent in these relational databases. This work describes a form of automatic differentiation for a subset of relational queries

Download the paper (PDF)

Download the slides (PDF)