Today’s economy is becoming ever more data-driven, and companies such as Google or Amazon have achieved remarkable success with data-based innovations. However, at the same time, many other companies are still struggling to make the most of their data. In particular for smaller companies, there is often still a large untapped potential. In their project Knowledge Graphs for Intelligent Decision-making with Decentralised Data (KG3D), prof. Joost Vennekens and prof. Anastasia Dimou investigated the challenges of smaller companies to unlock this potential, together with a consortium of local companies.

Background

Making good use of their data is a challenge for many companies. Internal data is scattered over many sources, such as different data sheets of materials and products, machine logs, quality control reports, warehouse and CRM applications, etc. to name a few. Moreover, a lot of data is now also externally available on the internet. The moment a question needs to be answered, an employee needs to gather relevant data sources, analyze the collected information, and leverage it to make a good decision. This process is often quite manual and error-prone: relevant data might not be detected, outdated data might be used, data could be misinterpreted, and the wealth of data could be overwhelming. As a result, the decision-making process is often difficult for novice employees, while decisions—whether made by novices or more experienced staff—may rely on approximations, heuristics, or personal experiences, potentially leading to suboptimal outcomes. As operational decisions are made continuously in companies, substantial gains can be made by tools that assist companies to gather all the data that are needed, make sense of these data and use it to produce better decisions. The KG3D project focused on combining two key technologies to achieve this: knowledge graphs (KGs) for representing, combining, discovering and augmenting information; and logical reasoning engines for providing flexible decision support.

Webshop application

The project showcased the combination of these two technologies in a web shop demo. The purpose of the application is to support users in the selection of the product, in this case a laptop, that best suits the client’s needs. Various sources of information are available: the products for sale are described in a company file, additional product information from manufacturers is available online, and expert employees can interpret this information and can help clients select the right product. For instance, for an online laptop shop, a domain expert could define the minimal specifications of a “gaming laptop”. This knowledge can then be used to indicate which laptops are suitable for gaming, or to offer “gaming” as a selection criterion to the user.

Figure 1: Interactive Consultant interface for a laptop web shop

The application demo brings together diverse data sources into a single, intuitive interface. The Interactive Consultant provides a versatile user interface that displays variables defined in the domain-specific knowledge base and offers generic algorithms applicable to them, such as propagation (i.e., instant determination of consequences), optimization, explanation, and more. Access to the knowledge base and additional inference options (such as ‘show all models’) is available in the application’s header.

Users can interact with the system flexibly, making it possible to find the best solution in just minutes. This is exactly the kind of capability businesses need to make faster, smarter decisions. What’s even more impressive, is how quickly and easily this application was developed and can be maintained. Thanks to the tools that were examined and built in this project, this becomes an almost trivial task.

Automating knowledge graph creation

Knowledge Graphs allow to interlink data in different formats and assign it a computer-understandable meaning.

One of the first and best-known instances, was Google’s Knowledge Graph that launched in 2012. Instead of simple search results based on keywords, Google is now able to perform more sophisticated searches and to compile a summary of the most relevant information, thanks to the semantic understanding of data.

Where the focus was initially on centralizing and disclosing information, it is now shifting to connecting decentralized and privacy-sensitive enterprise data. In this way, knowledge graphs offer an answer to the challenges faced by small and medium-sized enterprises. In these companies, a wealth of data is stored in a fragmented and unstructured way, using various formats, in multiple locations, and labeled with ambiguous or inconsistent terminology. As a result, even the most experienced experts struggle to get a comprehensive view of the available data, making it nearly impossible to use, manage, and maintain them efficiently. In addition to providing an end-to-end view of company data, knowledge graphs offer several other advantages. They enable efficient management of access rights and reduce the need for large, costly data centers by keeping data locally stored.

However, manually creating Knowledge Graphs can be challenging, especially for companies that have no experience with it. This is now tackled by autonomously interpreting and proposing an ontology, and automatically validating the created knowledge graphs afterwards.

Table 1: unlabeled data
Figure 2: Knowledge graph of the first row in the table

In this project, we develop the TorchicTab tool to automatically create knowledge graphs from tabular data. Given the tabular data in Table 1, the outcome is the knowledge graph right next to it. This knowledge graph correctly identifies the different concepts that appear in the table and the relations between them. Although this may seem a simple task for a human, for a computer it is far from trivial. To start with, some columns may contain ambiguous text.
For instance, the word “OSLO” could as well be an abbreviation of Ordnance Survey Liaison Officer. It is only the context that the same record contains ‘Norway’ and the same column contains other capital cities, that allows us to decide that “Oslo” refers to the city. In companies, tables are much larger and contain a wide range of topics and domains, sometimes with their own terminologies. This variability makes it even harder to interpret.
Moreover, data may be incomplete or inconsistent. Therefore, TorchicTab operates in multiple steps. The first step is a pre-processing step to remove noisy data, fix incorrect encodings and annotate the column type.
Next, possible interpretations for each column are generated using multiple sources, such as the Wikidata knowledge graph. The possible interpretations of a column are ranked, based on a literal scoring (i.e., which interpretation of “OSLO” is most common) and context scoring (i.e., taking into account the context of the table). This approach is complemented with a classification algorithm to assign “OSLO” to the best node, in this case Q585 with description “capital city of Norway”.

Once the ontology of the table is created, the resulting knowledge graphs need to be validated to ensure their correctness. Validation is done by checking if the knowledge graph is in line with pre-defined constraints, for example if the allowed data-type is used for each node. Traditionally, SHACL-shapes are used to check such constraints on the knowledge graph data. However, the creation of these SHACL-shapes in itself is a tedious task, because it requires users to describe different constraints that are applicable for each node. This information is often already available somewhere, for example in Excel. SCOOP is a tool that automatically creates SCHACL-shapes based on information that is available elsewhere. Figure 3 below shows an example of a knowledge graph with constraints available in Excel, and the resulting SHACL-shape created by SCOOP.

Figure 3: xample of a SHACL-shape to validate knowledge graph data created from Excel metadata.

As demonstrated in Figure 4, TorchicTab and SCOOP can automatically create and validate the knowledge graphs for local product file and additional processor specifications found online, ensuring a trouble-free setup.

Figure 4: Webshop application creation process

Logical reasoning for decision-making

The domain of Knowledge Representation and Reasoning (KRR) studies methods for intelligent decision making that are not based on pattern recognition but on logical reasoning. Scientific advances in this area focus on representing knowledge in formal languages, such as first-order logic, and creating reasoning engines that support a decision process. In this project, we used the IDP-Z3 reasoning engine, its associated modelling language FO(.) and the Interactive Consultant user interface. The IDP-Z3 reasoning engine follows the knowledge base paradigm, making a strict distinction between domain knowledge and generic reasoning algorithms.

This way, systems can be built in a “low-code” manner: the user only needs to model the domain of interest, after which they can rely on different inferences offered by the reasoning engine to build functionality. An additional advantage is the maintainability of the system, as it only requires keeping the domainmodel up-to-date without interfering with the algorithms that use it.

In the project, we developed the KeBAP framework that allows to integrate knowledge graph data into a FO(.) knowledge base using a logical perspective. A knowledge base in FO(.) consists of 3 tightly coupled blocks: a vocabulary that represents the ontology of the domain (what are we talking about?), a theory that describes what we know about the domain (e.g., what makes a laptop a gaming laptop?) and a structure that contains specific instances. In KeBAP, we developed a way to automatically integrate the knowledge graph ontology into the vocabulary. At a conceptual level, nodes from the knowledge graph can be considered ’types’ in FO(.), and the labels are relations between them.

The KeBAP framework allows to combine data with the knowledge of domain experts and translates it into a FO(.) knowledge base. This knowledge base can then be plugged into the generic Interactive Consultant to produce the interface shown in Figure 1. Importantly, there is no code behind this interface: whenever a user performs an action, the system responds by applying an appropriate form of logical inference to the knowledge base.

Conclusion

While a web shop is of course a rather simple demonstrator, the project also tackled a number of real-life use cases, such as checking the consistency of public procurement data and transforming different data formats between financial institutions. More details on the different use cases can be found on the project website. This project shows that creating impactful solutions doesn’t have to be slow or complicated: it can be efficient, reliable, and ready to meet the needs of today’s fast-moving businesses.


The related publications:

  • Robin De Vogelaere, Kylian Van Dessel, and Joost Vennekens. A practical approach to handling tabular data in logic. Springer Nature, 2024.
  • Ioannis Dasoulas, Duo Yang, Anastasia Dimou, AM Penuela, A Dimou, R Troncy, O Hartig, M Acosta, H Paulheim, M Alam, and P Lisena. Mlsea: A semantic layer for discoverable machine learning, 2024-05-19.
  • Ioannis Dasoulas, Duo Yang, Xuemin Duan, and Anastasia Dimou. Torchictab: Semantic table anno- tation with wikidata and language models, 2023-11-02.

This article is based on the work completed in the TeTra project HBC.2022.0071 on Knowledge Graphs for Decision-making with Decentralised Data, funded by Flanders innovation & entrepreneurship (VLAIO).