Towards Efficient Evolving Multi-Context Systems (Preliminary Report)

Managed Multi-Context Systems (mMCSs) provide a general framework for integrating knowledge represented in heterogeneous KR formalisms. Recently, evolving Multi-Context Systems (eMCSs) have been introduced as an extension of mMCSs that add the ability to both react to, and reason in the presence of commonly temporary dynamic observations, and evolve by incorporating new knowledge. However, the general complexity of such an expressive formalism may simply be too high in cases where huge amounts of information have to be processed within a limited short amount of time, or even instantaneously. In this paper, we investigate under which conditions eMCSs may scale in such situations and we show that such polynomial eMCSs can be applied in a practical use case.

Authors

• 8 publications
• 10 publications
• 17 publications
05/20/2015

On Minimal Change in Evolving Multi-Context Systems (Preliminary Report)

Managed Multi-Context Systems (mMCSs) provide a general framework for in...
03/13/2013

Representing Context-Sensitive Knowledge in a Network Formalism: A Preliminary Report

Automated decision making is often complicated by the complexity of the ...
09/12/2016

Reactive Multi-Context Systems: Heterogeneous Reasoning in Dynamic Environments

Managed multi-context systems (mMCSs) allow for the integration of heter...
05/20/2015

Asynchronous Multi-Context Systems

In this work, we present asynchronous multi-context systems (aMCSs), whi...
05/28/2014

On the cost-complexity of multi-context systems

Multi-context systems provide a powerful framework for modelling informa...
04/25/2015

Preferential Multi-Context Systems

Multi-context systems (MCS) presented by Brewka and Eiter can be conside...
11/30/2021

A framework to measure the robustness of programs in the unpredictable environment

Due to the diffusion of IoT, modern software systems are often thought t...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Multi-Context Systems (MCSs) were introduced in [7], building on the work in [16, 27], to address the need for a general framework that integrates knowledge bases expressed in heterogeneous KR formalisms. Intuitively, instead of designing a unifying language (see e.g., [17, 26], and [23] with its reasoner NoHR [22]) to which other languages could be translated, in an MCS the different formalisms and knowledge bases are considered as modules, and means are provided to model the flow of information between them (cf. [1, 21, 24] and references therein for further motivation on hybrid languages and their connection to MCSs).

More specifically, an MCS consists of a set of contexts, each of which is a knowledge base in some KR formalism, such that each context can access information from the other contexts using so-called bridge rules. Such non-monotonic bridge rules add its head to the context’s knowledge base provided the queries (to other contexts) in the body are successful. Managed Multi-Context Systems (mMCSs) were introduced in [8] to provide an extension of MCSs by allowing operations, other than simple addition, to be expressed in the heads of bridge rules. This allows mMCSs to properly deal with the problem of consistency management within contexts.

One recent challenge for KR languages is to shift from static application scenarios which assume a one-shot computation, usually triggered by a user query, to open and dynamic scenarios where there is a need to react and evolve in the presence of incoming information. Examples include EVOLP [2], Reactive ASP [14, 13], C-SPARQL [5], Ontology Streams [25] and ETALIS [3], to name only a few.

Whereas mMCSs are quite general and flexible to address the problem of integration of different KR formalisms, they are essentially static in the sense that the contexts do not evolve to incorporate the changes in the dynamic scenarios. In such scenarios, new knowledge and information is dynamically produced, often from several different sources – for example a stream of raw data produced by some sensors, new ontological axioms written by some user, newly found exceptions to some general rule, etc.

To address this issue, two recent frameworks, evolving Multi-Context Systems (eMCSs) [19] and reactive Multi-Context Systems (rMCSs) [6, 12, 9] have been proposed sharing the broad motivation of designing general and flexible frameworks inheriting from mMCSs the ability to integrate and manage knowledge represented in heterogeneous KR formalisms, and at the same time be able to incorporate knowledge obtained from dynamic observations.

Whereas some differences set eMCSs and rMCSs apart (see related work in Sec. 6), the definition of eMCSs is presented in a more general way. That, however, means that, as shown in [19], the worst-case complexity is in general high, which may be problematic in dynamic scenarios where the overall system needs to evolve and react interactively. This is all the more true for huge amounts of data – for example raw sensor data is likely to be constantly produced in large quantities – and systems that are capable of processing and reasoning with such data are required.

At the same time, eMCSs inherit from MCSs the property that models, i.e., equilibria, may be non-minimal, which potentially admits that certain pieces of information are considered true based solely on self-justification. As argued in [7], minimality may not always be desired, which can in principle be solved by indicating for each context whether it requires minimality or not. Yet, avoiding self-justifications for those contexts where minimality is desired has not been considered in eMCSs.

In this paper, we tackle these problems and, in particular, consider under which conditions reasoning with evolving Multi-Context Systems can be done in polynomial time. For that purpose, we base our work on a number of notions studied in the context of MCSs that solve these problems in this case [7]. Namely, we adapt the notions of minimal and grounded equilibria to eMCSs, and subsequently a well-founded semantics, which indeed paves the way to the desired result.

The remainder of this paper is structured as follows. After introducing the main concepts regarding mMCSs in Sect. 2, in Sect. 3 we recall with more detail the framework of eMCSs already introducing adjustments to achieve polynomial reasoning. Then, in Sect. 4 we present an example use case, before we adapt and generalize notions from MCSs in Sect. 5 as outlined. We conclude in Sect. 6 with discussing related work and possible future directions.

2 Preliminaries: Managed Multi-Context Systems

Following [7], a multi-context system (MCS) consists of a collection of components, each of which contains knowledge represented in some logic, defined as a triple where is the set of well-formed knowledge bases of , is the set of possible belief sets, and is a function describing the semantics of by assigning to each knowledge base a set of acceptable belief sets. We assume that each element of and is a set, and define .

In addition to the knowledge base in each component, bridge rules are used to interconnect the components, specifying what knowledge to assert in one component given certain beliefs held in the components of the MCS. Bridge rules in MCSs only allow adding information to the knowledge base of their corresponding context. In [8], an extension, called managed Multi-Context Systems (mMCSs), is introduced in order to allow other types of operations to be performed on a knowledge base. For that purpose, each context of an mMCS is associated with a management base, which is a set of operations that can be applied to the possible knowledge bases of that context. Given a management base and a logic , let be the set of operational formulas that can be built from and . Each context of an mMCS gives semantics to operations in its management base using a management function over a logic and a management base , , i.e., is the knowledge base that results from applying the operations in to the knowledge base . Note that this is already a specific restriction in our case, as commonly returns a (non-empty) set of possible knowledge bases for mMCS (and eMCS). We also assume that . Now, for a sequence of logics and a management base , an -bridge rule over , , is of the form where and is a set of bridge literals of the forms and , , with a belief formula of .

A managed Multi-Context System (mMCS) is a sequence , where each , , called a managed context, is defined as where is a logic, , is a set of -bridge rules, is a management base, and is a management function over and . Note that, for the sake of readability, we consider a slightly restricted version of mMCSs where is still a function and not a set of functions as for logic suites [8].

For an mMCS , a belief state of is a sequence such that each is an element of . For a bridge literal , if and if ; for a set of bridge literals , if for every . We say that a bridge rule of a context is applicable given a belief state of if satisfies . We can then define , the set of heads of bridge rules of which are applicable in , by setting .

Equilibria are belief states that simultaneously assign an acceptable belief set to each context in the mMCS such that the applicable operational formulas in bridge rule heads are taken into account. Formally, a belief state of an mMCS is an equilibrium of if, for every , .

3 Evolving Multi-Context Systems

In this section, we recall evolving Multi-Context Systems as introduced in [19] including some alterations that are in line with our intentions to achieve polynomial reasoning. As indicated in [19], we consider that some of the contexts in the MCS become so-called observation contexts whose knowledge bases will be constantly changing over time according to the observations made, similar, e.g., to streams of data from sensors.111For simplicity of presentation, we consider discrete steps in time here.

The changing observations then will also affect the other contexts by means of the bridge rules. As we will see, such effect can either be instantaneous and temporary, i.e., limited to the current time instant, similar to (static) mMCSs, where the body of a bridge rule is evaluated in a state that already includes the effects of the operation in its head, or persistent, but only affecting the next time instant. To achieve the latter, we extend the operational language with a unary meta-operation that can only be applied on top of operations.

Definition 1

Given a management base and a logic , we define , the evolving operational language, as .

We can now define evolving Multi-Context Systems.

Definition 2

An evolving Multi-Context System (eMCS) is a sequence , where each evolving context , is defined as where

• is a logic

• is a set of -bridge rules s.t.

• is a management base

• is a management function over and .

As already outlined, evolving contexts can be divided into regular reasoning contexts and special observation contexts that are meant to process a stream of observations which ultimately enables the entire eMCS to react and evolve in the presence of incoming observations. To ease the reading and simplify notation, w.l.o.g., we assume that the first contexts, , in the sequence are observation contexts, and, whenever necessary, such an eMCS can be explicitly represented by .

As for mMCSs, a belief state for is a sequence such that, for each , we have .

Recall that the heads of bridge rules in an eMCS are more expressive than in an mMCS, since they may be of two types: those that contain and those that do not. As already mentioned, the former are to be applied to the current knowledge base and not persist, whereas the latter are to be applied in the next time instant and persist. Therefore, we distinguish these two subsets.

Definition 3

Let be an eMCS and a belief state for . Then, for each , consider the following sets:

Note that if we want an effect to be instantaneous and persistent, then this can also be achieved using two bridge rules with identical body, one with and one without in the head.

Similar to equilibria in mMCS, the (static) equilibrium is defined to incorporate instantaneous effects based on alone.

Definition 4

Let be an eMCS. A belief state for is a static equilibrium of iff, for each , we have .

Note the minor change due to now only returning one .

To be able to assign meaning to an eMCS evolving over time, we introduce evolving belief states, which are sequences of belief states, each referring to a subsequent time instant.

Definition 5

Let be an eMCS. An evolving belief state of size for is a sequence where each , , is a belief state for .

To enable an eMCS to react to incoming observations and evolve, an observation sequence defined in the following has to be processed. The idea is that the knowledge bases of the observation contexts change according to that sequence.

Definition 6

Let be an eMCS. An observation sequence for is a sequence , such that, for each , is an instant observation with for each .

To be able to update the knowledge bases in the evolving contexts, we need one further notation. Given an evolving context and , we denote by the evolving context in which is replaced by , i.e., .

We can now define that certain evolving belief states are evolving equilibria of an eMCS  given an observation sequence for . The intuitive idea is that, given an evolving belief state for , in order to check if is an evolving equilibrium, we need to consider a sequence of eMCSs, (each with observation contexts), representing a possible evolution of according to the observations in , such that is a (static) equilibrium of . The knowledge bases of the observation contexts in are exactly their corresponding elements in . For each of the other contexts , , its knowledge base in is obtained from the one in by applying the operations in .

Definition 7

Let be an eMCS, an evolving belief state of size for , and an observation sequence for such that . Then, is an evolving equilibrium of size of given iff, for each , is an equilibrium of where, for each , is defined inductively as follows:

Note that in bridge rule heads of observation contexts are thus without any effect, in other words, observation contexts can indeed be understood as managed contexts whose knowledge base changes with each time instant.

The essential difference to [19] is that the can be effectively computed (instead of picking one of several options), simply because always returns one knowledge base. The same applies in Def. 4.

As shown in [19], two consequences of the previous definitions are that any subsequence of an evolving equilibrium is also an evolving equilibrium, and mMCSs are a particular case of eMCSs.

4 Use Case Scenario

In this section, we illustrate eMCSs adapting a scenario on cargo shipment assessment taken from [32].

The customs service for any developed country assesses imported cargo for a variety of risk factors including terrorism, narcotics, food and consumer safety, pest infestation, tariff violations, and intellectual property rights.222The system described here is not intended to reflect the policies of any country or agency. Assessing this risk, even at a preliminary level, involves extensive knowledge about commodities, business entities, trade patterns, government policies and trade agreements. Some of this knowledge may be external to a given customs agency: for instance the broad classification of commodities according to the international Harmonized Tariff System (HTS), or international trade agreements. Other knowledge may be internal to a customs agency, such as lists of suspected violators or of importers who have a history of good compliance with regulations. While some of this knowledge is relatively stable, much of it changes rapidly. Changes are made not only at a specific level, such as knowledge about the expected arrival date of a shipment; but at a more general level as well. For instance, while the broad HTS code for tomatoes (0702) does not change, the full classification and tariffs for cherry tomatoes for import into the US changes seasonally.

Here, we consider an eMCS  composed of two observation contexts and , and two reasoning contexts and . The first observation context is used to capture the data of passing shipments, i.e., the country of their origination, the commodity they contain, their importers and producers. Thus, the knowledge base and belief set language of is composed of all the ground atoms over , , , , , and also and . The second observation context serves to insert administrative information and data from other institutions. Its knowledge base and belief set language is composed of all the ground atoms over , , and . Neither of the two observation contexts has any bridge rules.

The reasoning context is an ontological Description Logic (DL) context that contains a geographic classification, along with information about producers who are located in various countries. It also contains a classification of commodities based on their harmonized tariff information (HTS chapters, headings and codes, cf. http://www.usitc.gov/tata/hts). We refer to [11] and [8] for the standard definition of ; is given as follows:

 Commodity≡(∃HTSCode.⊤) EdibleVegetable≡(∃HTSChapter.\set07') CherryTomato≡(∃HTSCode.\set07020020') Tomato≡(∃HTSHeading.\set0702') GrapeTomato≡(∃HTSCode.\set07020010') CherryTomato⊑Tomato CherryTomato⊓GrapeTomato⊑⊥ GrapeTomato⊑Tomato Tomato⊑EdibleVegetable LowRiskEUCommodity≡(∃ExpeditableImporter.⊤)⊓ (∃CommodCountry.EUCountry) EUCountry(portugal) RegisteredProducer(p1,portugal) EUCountry(slovakia) RegisteredProducer(p2,slovakia)

contains a single operation to add factual knowledge. The bridge rules are given as follows:

Note that can indeed be expressed in the DL [4] for which standard reasoning tasks, such as subsumption, can be computed in PTIME.

Finally,

is a logic programming (LP) indicating information about importers, and about whether to inspect a shipment either to check for compliance of tariff information or for food safety issues. For

we consider that the set of normal logic programs over a signature , is the set of atoms over , and returns returns a singleton set containing only the set of true atoms in the unique well-founded model. The latter is a bit unconventional, since this way undefinedness under the well-founded semantics [15] is merged with false information. However, as long as no loops over negation occur in the LP context (in combination with its bridge rules), undefinedness does not occur, and the obvious benefit of this choice is that computing the well-founded model is PTIME-data-complete [10]. We consider , and and are given as follows:

Now consider the observation sequence where consists of the following atoms on (where in stands for shipment, for commodity, and for importer): of the following atoms on : and of the following atoms on : while and . Then, an evolving equilibrium of size 3 of given is the sequence such that, for each , . Since it is not feasible to present the entire , we just highlight some interesting parts related to the evolution of the system. E.g., we have that since the HTS code does not correspond to the cargo; no inspection on in since the shipment is compliant, is a EU commodity, and was not picked for random inspection; and , even though comes from a EU country, because has been identified at time instant for misfiling, which has become permanent info available at time .

5 Grounded Equilibria and Well-founded Semantics

Even if we only consider MCSs , which are static and where an implicit always returns precisely one knowledge base, such that reasoning in all contexts can be done in PTIME, then deciding whether has an equilibrium is in NP [7, 8]. The same result necessarily also holds for eMCSs, which can also be obtained from the considerations on eMCSs [19].

A number of special notions were studied in the context of MCSs that tackle this problem [7]. In fact, the notion of minimal equilibria was introduced with the aim of avoiding potential self-justifications. Then, grounded equilibria as a special case for so-called reducible MCSs were presented for which the existence of minimal equilibria can be effectively checked. Subsequently, a well-founded semantics for such reducible MCSs was defined under which an approximation of all grounded equilibria can be computed more efficiently. In the following, we transfer these notions from static MCSs in [7] to dynamic eMCSs and discuss under which (non-trivial) conditions they can actually be applied.

Given an eMCS , we say that a static equilibrium is minimal if there is no equilibrium such that for all with and for some with .

This notion of minimality ensures the avoidance of self-justifications in evolving equilibria. The problem with this notion in terms of computation is that such minimization in general adds an additional level in the polynomial hierarchy. Therefore, we now formalize conditions under which minimal equilibria can be effectively checked. The idea is that the grounded equilibrium will be assigned to an eMCS  if all the logics of all its contexts can be reduced to special monotonic ones using a so-called reduction function. In the case where the logics of all contexts in turn out to be monotonic, the minimal equilibrium will be unique.

Formally, a logic is monotonic if

1. is a singleton set for each , and

2. whenever , , and .

Furthermore, is reducible if for some and some reduction function ,

1. the restriction of to is monotonic,

2. for each , and all :

• whenever ,

• whenever ,

• iff .

Then, an evolving context is reducible if its logic is reducible and, for all and all belief sets , .

An eMCS is reducible if all of its contexts are. Note that a context is reducible whenever its logic is monotonic. In this case coincides with and is the identity with respect to the first argument.

As pointed out in [7], reducibility is inspired by the reduct in (non-monotonic) answer set programming. The crucial and novel condition in our case is the one that essentially says that the reduction function and the management function can be applied in an arbitrary order. This may restrict to some extent the sets of operations and , but in our use case scenario in Sect. 4, all contexts are indeed reducible.

A particular case of reducible eMCSs, definite eMCSs, does not require the reduction function and admits the polynomial computation of minimal evolving equilibria as we will see next. Namely, a reducible eMCS  is definite if

1. none of the bridge rules in any context contains ,

2. for all and all , .

In a definite eMCS, bridge rules are monotonic, and knowledge bases are already in reduced form. Inference is thus monotonic and a unique minimal equilibrium exists. We take this equilibrium to be the grounded equilibrium. Let be a definite eMCS. A belief state of is the grounded equilibrium of , denoted by , if is the unique minimal (static) equilibrium of . This notion gives rise to evolving grounded equilibria.

Definition 8

Let be a definite eMCS, an evolving belief state of size for , and an observation sequence for such that . Then, is the evolving grounded equilibrium of size of given iff, for each , is a grounded equilibrium of defined as in Definition 7.

Grounded equilibria for definite eMCSs can indeed be efficiently computed following [7]. The only additional requirement is that all operations are monotonic, i.e., for , we have that . Note that this is indeed a further restriction and not covered by reducible eMCSs. Now, for , let and define, for each successor ordinal ,

 kbα+1i=mng(appnowi(Eα),kbαi),

where and . Furthermore, for each limit ordinal , define , and let . Then Proposition 1 [7] can be adapted:

Proposition 1

Let be a definite eMCS s.t. all are monotonic. A belief state is the grounded equilibrium of iff , for .

As pointed out in [7], for many logics, holds, i.e., the iteration stops after finitely many steps. This is indeed the case for the use case scenario in Sect. 4.

For evolving belief states of size and an observation sequence for , this proposition yields that the evolving grounded equilibrium for definite eMCSs can be obtained by simply applying this iteration times.

Grounded equilibria for general eMCSs are defined based on a reduct which generalizes the Gelfond-Lifschitz reduct to the multi-context case:

Definition 9

Let be a reducible eMCS and a belief state of . The -reduct of is defined as where, for each , we define . Here, results from by deleting all

1. rules with in the body such that , and

2. literals from the bodies of remaining rules.

For each reducible eMCS  and each belief set , the -reduct of is definite. We can thus check whether is a grounded equilibrium in the usual manner:

Definition 10

Let be a reducible eMCS such that all are monotonic. A belief state of is a grounded equilibrium of if is the grounded equilibrium of , that is .

The following result generalizes Proposition 2 from [7].

Proposition 2

Every grounded equilibrium of a reducible eMCS  such that all are monotonic is a minimal equilibrium of .

This can again be generalized to evolving grounded equilibria.

Definition 11

Let be a normal, reducible eMCS such that all are monotonic, an evolving belief state of size for , and an observation sequence for such that . Then, is the evolving grounded equilibrium of size of given iff, for each , is the grounded equilibrium of with defined as in Definition 7.

This computation is still not polynomial, since, intuitively, we have to guess and check the (evolving) equilibrium, which is why the well-founded semantics for reducible eMCSs is introduced following [7]. Its definition is based on the operator , provided for each logic in all the contexts of has a least element . Such eMCSs are called normal.

The following result can be straightforwardly adopted from [7].

Proposition 3

Let be a reducible eMCS such that all are monotonic. Then is antimonotone.

As usual, applying twice yields a monotonic operator. Hence, by the Knaster-Tarski theorem, has a least fixpoint which determines the well-founded semantics.

Definition 12

Let be a normal, reducible eMCS such that all are monotonic. The well-founded semantics of , denoted , is the least fixpoint of .

Starting with the least belief state , this fixpoint can be iterated, and the following correspondence between and the grounded equilibria of can be shown.

Proposition 4

Let be a normal, reducible eMCS such that all are monotonic, , and a grounded equilibrium of . Then for .

The well-founded semantics can thus be viewed as an approximation of the belief state representing what is accepted in all grounded equilibria, even though may itself not necessarily be an equilibrium. Yet, if all deterministically return one element of and the eMCS is acyclic (i.e., no cyclic dependencies over bridge rules exist between beliefs in the eMCS  see [19]), then the grounded equilibrium is unique and identical to the well-founded semantics. This is indeed the case for the use case in Sect. 4.

As before, the well-founded semantics can be generalized to evolving belief states.

Definition 13

Let be a normal, reducible eMCS such that all are monotonic, and an observation sequence for such that . The evolving well-founded semantics of , denoted , is the evolving belief state of size for such that is the well-founded semantics of defined as in Definition 7.

Finally, as intended, we can show that computing the evolving well-founded semantics of can be done in polynomial time under the restrictions established so far. For analyzing the complexity in each time instant, we can utilize output-projected belief states [11]. The idea is to consider only those beliefs that appear in some bridge rule body. Formally, given an evolving context within , we can define to be the set of all beliefs of occurring in the body of some bridge rule in . The output-projection of a belief state of is the belief state , , for .

Following [11, 8], we can adapt the context complexity of from [19] as the complexity of the following problem:

(CC)

Decide, given and , if exist and s.t. .

Problem (CC) can intuitively be divided into two subproblems: (MC) compute some and (EC) decide whether exists s.t. . Here, (MC) is trivial for monotonic operations, so (EC) determines the complexity of (CC).

Let be a normal, reducible eMCS such that all are monotonic,