Master theses

A relaxing day at the spa: fixing out-of-order data in temporal reasoning systems

Keywords: Complexity and Computability, Discrete Algorithms, Logic Programming

Promotors: Femke Ongenae, Pieter Bonte

Students: max 1

Problem

Logic programming is a field that has revealed quite a lot of its secrets the last years. Checking assumptions and computing the different possible models based on a given set of propositions and rules, those are problems that largely have been solved and for which we have quite some efficient reasoners at our disposal. In these cases, however, there's the assumption that we just `have' all of the data, like some database, file or other source that we can pull.

Those systems are prefectly fine for keeping track of your local library's inventory, but if we're talking railway networks, patient monitoring or industrial control systems and other fast-moving environments, then updating the data, running the reasoner again and waiting until it pushes out some result is not going to cut it.

To tackle those scenario's, we need to think about data more as a `stream' than as a static file or database. That's exactly what we do in a field called Stream Reasoning (SR). Here, we literally add an extra dimension - time - to the logics you already know, like predicate and first-order logic. In addition to the operators you already know, like AND, OR and NOT, we now also get operators such 'always', 'once', 'before', 'after', 'since', 'until'. As a result, our systems get a lot more expressive and complex at the same time. Reasoning over time is an incredibly versatile tool and one of the most promising ways to achieve scalable real-time systems. One of the most promising frameworks for real-time reasoning, and where this thesis is mainly centered around, is called DatalogMTL, a framework that combines Datalog (a subset of Prolog) with a temporal logic called Metric Temporal Logic. It boasts strong complexity results and has seen promising implementation in several engines.

Despite of how strong and well-developed stream reasoning systems like DatalogMTL can be, there still some problems left unsolved; when thinking about data as a 'stream', it's very tempting to think that all the data in that stream are ordered neatly in chronological order. A peak into some real-life applications and that assumption quickly falls apart: some delay in data transfer or some connecivity issues and the order becomes scrambled, or more professionally, the data is 'out-of-order'. That brings us to the challenge we want to tackle: "How can we deal with 'out-of-order data', either by restoring order to the data or by limiting the impact of the disrupted order on the subsequent reasoning process?"

Imagine a state-of-the-art wellness center of the future, designed to provide guests with a fully automated and personalized relaxation experience. The facility is equipped with advanced motion sensors at key locations—the sauna, jacuzzi, shower, and relaxation area—that detect when a person arrives or leaves. This data is used to adjust temperatures and optimize guest comfort.

However, in a real-world system, sensor data does not always arrive in the correct order due to network delays, sensor misfires, or processing lag. When this happens, the system may make incorrect or inefficient decisions, leading to a disrupted guest experience, wasted resources, and potential health risks.

One critical example of this issue is personalized sauna and water temperature control. Ideally, the system should detect when a guest enters the sauna and slightly increase the temperature for optimal comfort. Upon exiting the sauna, the system should lower the temperature for energy efficiency. When the guest moves to the jacuzzi, the water temperature should be pre-adjusted for a smooth transition. Finally, when the guest enters the shower, the system should suggest an optimal cold or warm rinse based on their prior activities. However, if the sauna exit event is delayed, the system may keep heating the sauna unnecessarily, wasting energy. If the jacuzzi entry event arrives before the sauna exit, the system may assume the guest skipped the sauna altogether and fail to adjust the jacuzzi temperature in time, leaving them with lukewarm water. Similarly, if the shower entry event arrives before the jacuzzi exit, the system might incorrectly set the water temperature, making it too hot or too cold.

Goal

DatalogMTL is a very capable temporal reasoning framework, but is still struggles with out-of-order data. This is huge loss, since many monitoring and industrial applications are confronted with this out-of-order problem. Extending DatalogMTL with methods for handling this out-of-order problem opens up multiple different applications avenues. Our proposed solution lies in the direction of non-monotonic reasoning, where previously drawn conclusions can be invalidated and corrected based on newly received information (or here: 'old' information that has been received later than expected). This can be done introducing event orders and rule prioritization or via the combination of DatalogMTL with Answer Set Programming (ASP) paradigms. (and existing ASP solvers).

The end goal of this thesis is to propose one or multiple novel approaches for handling out-of-order data in DatalogMTL. The priority is to first and foremost make a theoretical proposition. In addition, a second component of the thesis can be one of the following, depending on the preferences and strengths of the student(s):

(a) a formal proof of the complexity of the designed methods and their correctness. (b) a prototype implementation of the approach within existing DatalogMTL engines and an evaluation thereof on artifical data or real data supplied by the supervisors.

This research lies at the intersection between the subjects of Logic Programming, Discrete Algorithms and Automata, Computability and Complexity. It brings the student up close to the active research of UGent's Knowledge on Web Scale (KnoWS) group (EA05) and KULeuven's Stream Intelligence Lab.