A Substitution-based Adaptation Model ? Pedro A. Gonz´alez-Calero, Mercedes G´omez-Albarr´an, and Bel´en D´ıaz-Agudo Dep. Sistemas Inform´aticos y Programaci´on Universidad Complutense de Madrid, 28040 Madrid. Spain email:fpedro, albarran,
[email protected]
Abstract. In [3], we have presented Description Logics (DLs) as a suitable knowledge representation technology to model the CBR processes. This paper mainly focuses on the adaptation process. We propose a domain independent model to structure the knowledge needed in a CBR system, where adaptation knowledge is explicitly represented. Built upon this model we propose the use of the DL inference mechanisms to formalize an adaptation scheme based on substitutions, where the search of substitutes is guided by a set of memory instructions. The learning of adaptation knowledge, in the form of search heuristics, also takes advantage of the DL reasoning mechanisms. Keywords: Substitution-based adaptation; Specialized search; Dependency representation; Description logics; Adaptation knowledge learning.
1 Introduction Case adaptation plays a fundamental role in the ability of CBR systems to solve new problems. However, it is in many ways the Achilles’ heel of CBR. Case adaptation is a knowledge-intensive task and most CBR systems have traditionally relied on an enormous amount of built-in adaptation knowledge in the form of adaptation rules. In order to determine which rules must be included in the system, a deep analysis of the tasks and the domain is required. Unfortunately, CBR is often applied to domains poorly understood or difficult to codify in the form of rules. So the leaders in the field have sometimes argued for postponing or avoiding the automatic adaptation [14]. We propose a domain independent model to structure the knowledge needed in a CBR system, where adaptation knowledge is explicitly represented. Built upon this model, we formalize an adaptation scheme based on substitutions, where: – Instead of having rules, dependencies within a case are explicitly represented in order to guide the adaptation. – The search of substitutes is guided by a set of memory instructions. Some of them could be included by the system developer but the rest are learned by the system. Because memory search for substitutes is a central part of the adaptation, learning memory instructions instead of encoding them by hand reduces the system development effort and cost. ? This work is supported by the Spanish Committee of Science & Technology (CICYT TIC98-
0733)
As the representation technology we use Description Logics (DLs), where knowledge is represented by means of three types of formal objects [2]: – Concepts: Descriptions with a potentially complex structure, formed by composing a limited set of description-forming operators. – Relations: Formal terms for properties, also with a potentially complex structure. – Individuals: Formal constructs intended to directly represent objects in the domain of interest as concept instances. A key feature of DLs is that the system can reason about relation and concept descriptions, and automatically infer subsumption relations. A concept C subsumes the concept D (C D) if all the individuals that satisfy the description of D, also satisfy the description of C . One of the most typical DL deductive inferences, classification, is based on this feature [1]. As a result of the inference mechanisms, concepts, relations and individuals are placed into a taxonomy where more general concepts/relations will be above more specific concepts/relations. Likewise, individuals are placed below the concept(s) that they are instances of. Concepts and individuals inherit properties from more general descriptions as well as combine properties as appropriate. As we will see, in our adaptation approach, we profit from these two resulting terminological hierarchies (concepts and relations) in order to find suitable substitutions. Previous works also takes advantage of the DL reasoning mechanisms for the processes involved in the CBR cycle. Characteristics that make DLs suitable for CBR are: – Their declarative semantics helps in the domain comprehension, the understanding of the case indexes and the formal definition of inference mechanisms. – Their ability to automatically classify concepts and recognise instances is a useful property for the case base management. – Their ability to build structured case descriptions provide a flexible and expressive way to represent the cases and their solutions.
2 Knowledge representation We propose a model where the knowledge needed to represent and retrieve cases is structured in three interrelated but conceptually different portions of a knowledge base (KB) represented using DLs: KB = hB ; DK; PSKi. B is domain independent but the knowledge included in DK and PSK depends on the specific application domain where this representation model is applied. The DK portion contains the domain knowledge used in case representation, query formulation and case adaptation. The domain entities and actions are formalized as DL individuals described by the concepts of which they are instances and the relations they have with other individuals. The B portion contains the cases represented as individuals that are instances of the concept C A S E . Each case is linked by DL relations to its descriptive components, the description of a problem—or situation—and a solution to this problem. The description of a C A S E instance ci is a DK individual di that represents the corresponding problem—or situation—the case ci solves. Instance di is used as the case
index in the organization and retrieval tasks. The solution of a C A S E instance ci is a B individual si that represents the solution of the problem described by di . The solution si is connected by means of a DL relation with a set (possibly ordered) of instances each representing a solution component or item. Each one of these items is in its turn described by its relations with other individuals—contents, item-number, depends-ondescription and depends-on-item. The contents relation links each solution item with a DK individual that formalizes this part of the solution. Optionally, the item-number relation is used to identify an item when the representation of some kind of order among the items is required. The dependency relations—depends-on-description and dependson-item—are used to include adaptation knowledge in a solution item itemj , relating it with the description component(s) and/or the solution item(s) that have an influence on it, i.e. with the components where a change will cause itemj adaptation. The PSK portion contains the general knowledge, apart from the one in DK, that is used to support case retrieval and adaptation.
3 The adaptation mechanism We propose a substitution-based adaptation mechanism, guided by the explicit representation of the dependency relations stored in case solutions, as a process that propagates changes from description to solution items, as follows: 1. The list L of items in the solution that need to be adapted is obtained. These items are those that depend on a feature of the case description which has been substituted by a different value in the query, or those others that depend on a solution item that needs to be adapted. 2. Every item in L is substituted by a proper new item. First, those that only depend on values from the case description, then, those that depend on other items of the solution that have already been adapted. Of course, circularity is not allowed in the dependency relation. The search of proper substitutes is accomplished as a kind of specialized search which takes advantage of the DL knowledge base organization. This process can take one of two forms: a general purpose search algorithm, or the replay of previously learnt—or explicitly included by the system developer—search knowledge represented as heuristics. During the adaptation process the user can interact with the system in two ways: – In each substitution step the selected candidate may be presented to the user, who accepts or rejects it. – The whole case is adapted by the system—without human intervention—and then is presented to the user for evaluation. If the adapted case is rejected the user could point—or not—to the place where he/she thinks the process may have failed. When a search failure or rejection happens, the system could start a backtracking process—from the current, the first, the last or the user pointed substitution step. This backtracking process is briefly explained in section 4. The search successes—validated by the user—give a good opportunity to learn the involved search knowledge that could be repeated during later substitution processes.
Person
Thematic-role play-role
Action does
Jogger
Jim Fixx
Len Bias
play-role
Jogging Basketball player
does
wind sprint
Fig. 1. An example freely adapted from SWALE
3.1 Specialized search Specialized search, as described in [7], is a way of finding candidates for substitutions in a case solution, where instructions are given about how to find the needed item. In our model, memory instructions correspond to relation paths that connect a case solution item with another case element. We assume that whenever an item of the solution is said to depend on a case element, a path of relations exists connecting both individuals. The path of relations leads to the place of the knowledge base where substitutes are to be found. For example, if dependsOn(i1 ; i2 ) stands and i2 has already been substituted for another value i02 , then a substitute i01 for i1 has to be found, such that there is a connection between i02 and i01 similar to that between i2 and i1 , and i01 is similar to i1 . In order to implement this process, we need to find the available paths between i2 and i1 and then use those paths and i1 to find the appropriate i01 . The first problem is reduced to that of path searching in the directed graph defined by the individuals in the KB. The second process is the goal of the search operator which is described in the next subsection. We illustrate this approach, with an example freely adapted from the SWALE system [6], as described in [7]. An explanation has to be found for Len Bias’ death. Len Bias was a healthy college basketball player who died unexpectedly of a heart attack. SWALE is reminded of the Jim Fixx case. Jim Fixx was a jogger who seemed to be in good health but died of a heart attack after running. After, his death, doctors found that he had a heart defect that had gone undetected. The assumption was that the jogging put undue stress on his heart, causing the heart attack. Based on the Jim Fixx case, SWALE can hypothesize that Len Bias had a previously undetected heart defect, and that jogging put undue stress on his heart, causing the heart attack. Len Bias, however, was not a jogger. SWALE notices this contradiction and seeks to replace jogging in the Jim Fixx explanation with something more appropriate to Len Bias that can fill the same role. According to our model, an explicit dependency should have been stated between Jim Fixx and jogging in the retrieved case; since Jim Fixx has been substituted for Len Bias a substitute has to be found for jogging such that: it is similar to jogging and is connected to Len Bias in the same way as jogging is connected to Jim Fixx. Following the path of relations (play-role does) from Len Bias the action wind sprint is found to be similar to jogging, as shown in Figure 1, and it is chosen as its substitute. SWALE therefore would propose that Len Bias’ heart attack was provoked by his doing wind sprints, which put too much stress on his heart (which had an unknown defect), causing the heart attack.
C
o
r1 r2
level 1
C2
..... rGk-1 rk-1
level 0
i
a
rk rGk-1
C1
b
rk
c
rk
Fig. 2. Search (o, [r1 ; : : : ; rk ], i )
3.2 Search operator The search operator takes as arguments: the individual o which has substituted an element that previously appeared in the case; an ordered list of relations –relation path– [r1 ; : : : ; rk ] that connects the individual that o has substituted with the individual i that has to be substituted due to its dependency on the already substituted individual; and the individual i. The operator searches for those individuals connected to o through [r1 ; : : : ; rk ] which are instances of the most specific concepts of which i is an instance. If no suitable individuals are found, then search restrictions can be generalized, using two kind of generalization steps: – Rise the abstraction level of the concepts whose instances are being considered. – Rise the abstraction level of the relations that connect o to these instances. This way, we take advantage of the two terminological abstraction hierarchies that can be defined in DLs: the concept hierarchy and the relation hierarchy. We propose the application of different generalization strategies depending on how the KB is designed: generalize only the concept level, only the relation level or generalize both at the same time. The generalization steps are made level by level, until proper substitutes are found. The kind of strategy can be different for different areas of the KB. That is a design decision depending—among other things—on the depth of the hierarchies, i.e. on the level of detail used to describe a particular portion of the KB, and on the knowledge about where will be more likely found a substitute. This design knowledge can be represented by the design heuristics described in section 4. As an example, let’s consider the situation depicted in Figure 2. Here, the search operator would find substitutes in two steps: 1. First, it searches for individuals connected to o through [r1 ; : : : ; rk ] which are instances of concept C1 . And none is found. 2. Second, the concept and/or the relation path are generalized. – If only the concept level is generalized, then the individuals connected to o through the original relation path [ r1 , . . . , rk ] which are instances of C are retrieved: a and b. – If only the relation level is generalized, and supposing that only rk?1 among [r1 ; : : : ; rk ] can be generalized, then the individuals connected to o through the G ,rk ] which are instances of C1 are retrieved: c. generalized path [r1 , . . . , rk? 1
– If both levels are generalized, then the individuals connected to o through the G , rk ] which are instances of C are retrieved: a, b generalized path [r1 , . . . , rk? 1 and c. The retrieved individuals will be ranked by a similarity function (see [4]), and the most similar will be returned. 3.3 Search knowledge learning The search, as described in the two previous sections, finds a relation path and retrieves individuals that satisfy the given restrictions, generalizing them if needed. The cost of this process depends on the size of the KB and it may become quite expensive when applied to knowledge bases of realistic size. In order to alleviate this problem the system includes a learning component that records the successful search episodes as a search heuristic. Besides of the effectiveness, the heuristics also provide with a flexible way of reusing previous user validated search episodes. Search heuristics are represented as concepts including the following slots: origin < concept > concept-level < integer > destination < concept > relation-level < integer > path < relation ? list > weight < integer >
which indicate that instances of origin and destination are connected through the relations in path, and that the recorded search was successful when the relation path was generalized to relation-level and the individuals were instances of destination risen to concept-level. Since more than one heuristic may exist connecting the same pair of concepts through different paths, the weight slot is included in order to record the number of times that an heuristic has been successfully applied. When searching for substitutes, the applicable heuristic with the highest weight is selected. An heuristic is applicable when the dependency being processed, depends ? On(i1 ; i2 ), involves an instance of destination and origin, respectively. The selected heuristic is applied by the repetition of the search that was successful when the heuristic was saved, i.e. the relation path is generalized to relation-level and the retrieved individuals are the instances of destination risen to concept-level. When no substitutes are found at the recorded levels, we distinguish two different possibilities to direct the search of substitutes: – The next—in decreasing weight order—applicable heuristic is tried. The process continues until a search success occurs or there are not more applicable heuristics and no substitutes have been found, in the latter: the same heuristics may be tried again—in the same order—but generalizing the involved search restrictions, and just when none of them retrieves substitutes, the general method is applied, or conversely the general method may be applied to look for new relation paths, and just if no candidates are found the generalization process begins.
– The search restrictions in the current heuristic are generalized first; if no candidates are found then the next heuristic is tried, first at the recorded levels and generalizing them if necessary. Just when no there is no applicable heuristics or when none of them—even generalizing the search restrictions— retrieves substitutes, the general method is applied. The generalization process could be controlled by a parameterized upper bound of the levels that can be reached. The search of substitutes finishes with a search success or failure, namely: – At least one candidate substitute is found. – There are no more possibilities to continue, or a certain number of search operations has been exceeded. This parameter controls the efficiency of the search process and it could be established by the system developer or by the user. During the search process, if an heuristic is successfully applied then its weight is increased, and whenever the general method is applied, if successful substitutes are found then a new heuristic is learnt to be used in the future. The success of a search during an adaptation process is not an easily measurable parameter because it depends on the user satisfaction with the whole adapted case. That makes very relevant the user participation during the adaptation knowledge acquisition performed in form of search heuristics.
4 Extensions We are improving the basic model presented until now, with some extensions that are briefly described in this section. Design heuristics Besides the automatically learnt search heuristics, the system developer can include design heuristics representing either the memory instructions or the generalization strategy to be applied. The design heuristics that record memory instructions are represented like the search heuristics that will be learnt during the system running. They allow the system developer to explicitly include knowledge about how the search of substitutes will be guided. The second type of design heuristics is related to the application of the different generalization strategies— outlined in the previous section—depending on the area of the knowledge base we are dealing with. The designer of the KB could include design knowledge by giving guidelines that will shape the generalization of the search restrictions—that can be acquired either by search heuristics or by the general search method—and by limiting with an upper bound the levels that will be tried. Backtracking on substitutions When the dependencies are chained, i.e. when an individual i0 depends on other i1 that 0 0 has already been substituted by i1 , the new individual i1 will be used as the origin in
the new search process when substituting i0 . When a substitution leads to a locked way during a later substitution, some backtracking steps may be necessary. The substitution of i1 will provoke the substitution of i0 due to the dependency dependsOn(i0 ; i1 ). It could happen that a search failure occurs, i.e. there are no suitable 0 substitutes for i0 using i1 as the origin. The adaptation process then backtracks. Suppose that during the search process several candidate substitutes were found: 0 00 000 (i1 , i1 , i1 , . . . ). As explained before, they were ordered by their similarity with the 0 individual i1 that will be substituted; and the most similar i1 had been chosen. In the 00 current backtracking step the following candidate i1 is tried to substitute i1 and used as the origin of the i0 substitution process; if there were no more candidates, the adaptation process would act like if a search failure had occurred when substituting i1 . The control of the adaptation process could limit the number of backtracking steps or set up a minimum similarity threshold to be fulfilled by the retrieved candidates.
5 Related Work and Conclusions In [12, 13], A. Napoli and J. Lieber study the relationships between the retrieval and the adaptation processes and the classification operation when the cases –or the indexes– are organised in hierarchies. In [12], the adaptation process takes advantage of the hierarchy to generalize—using the LCS—certain case components according to the query case. In [13], the concept hierarchy is used to qualitatively measure case distances during the retrieval and adaptation processes. The similarity path that separates on the hierarchy the query case description from other case descriptions, is used as a sequence of generalization and specialization steps to be applied to the case solutions. Apart from those works also applying DLs to case adaptation, in [11] a unifying framework for adaptation is presented, which shares some ideas with the one presented here. At a high abstraction level, they, as we do, consider case solutions as—possibly— ordered lists of items. Any adaptation can then be expressed as a substitution of a source value by a target value, or the addition or deletion of an item from the solution. An interesting idea proposed in this work, is to present adaptation as a recursive process of substitution at each level of granularity of the solution; an idea that could fit well within the knowledge structures available in DLs. With respect to learning adaptation knowledge, in [15] a framework is presented which focus on what they call knowledge light approaches. This lightness means that they are interested in methods which don’t presume a lot of knowledge acquisition work before learning, but, instead, use already acquired knowledge inside the system. In this sense our approach can also be considered as knowledge light, since search heuristics store knowledge already available somewhere else in the knowledge base. Wilke et al present as the first work on this area, the one described in [5], where Hanney and Keane present an inductive learning algorithm to extract adaptation knowledge from the cases in the case base. Their algorithm builds pairs of cases and uses the feature differences of these cases pairs to build adaptation rules. This approach is based on the assumption that the differences that occur between cases in the case base are representative of the differences that will occur between future problems and the case base.
The most relevant related work is that of David Leake and his group at Indiana University [8], which, among others, has the goal of developing explicit models of the memory search process in order to increase its flexibility and effectiveness. Their approach, exemplified in the DIAL system, integrates rule-based and case-based reasoning mechanisms in the adaptation process. Adaptations problems are initially solved by reasoning form scratch, using abstract rules about structural transformations and general memory search heuristics. Traces of the processing used for successful rule-based adaptation are stored as cases to enable future adaptation. In their approach, two types of general rules are provided as the initial basis for case adaptation: rules describing structural transformations, and rules about how to search memory for the information needed to apply the transformation. Two types of cases are stored to enable future case-based reasoning about the adaptation process itself: memory search cases encapsulate information about the steps in the memory search process; and, adaptation cases encapsulate information about the adaptation problem as a whole, including both the transformation used and the memory search process followed. It can be found a clear parallelism between our work and Leake’s. The process of considering the explicitly recorded dependencies between case items, and applying our search operator in order to find different candidates for substitution, can be seen as a simplified version of the rule-based adaptation process in Leake’s approach. Furthermore, memorized search heuristics in our approach maps to memory search cases in DIAL. Adaptation cases, on the other hand, have no counterpart in our approach, since we do not consider structural transformations of the cases, neither store complete adaptation traces. A final commonality between both approaches relies on human participation, since is the user who validates the proposed adaptations, and if the response is not acceptable, other adaptations are tried. In this sense, the process of acquiring new adaptation cases/search heuristics can be seen as an interactive knowledge acquisition process [10]. The two distinguishing features of our approach are the use of explicitly represented dependency relations between case items, and the use of DLs as the underlying knowledge representation formalism. We consider that the elicitation of dependency relations requires less knowledge engineering effort than the definition of more sophisticated adaptation mechanisms, and they still provide a good enough starting point for the adaptation process. The use of DLs, on the other hand, apart from the inherent benefits of a knowledge representation technology equipped with a well defined and formal semantic, provides a key feature for this approach: an expressive language for relations. In DLs, relations are first-class citizens of the knowledge base; they are defined in terms of a set of relation-forming operators, and the system can make some kind of reasoning on those definitions. Relations, as concepts, are organized in a taxonomy with inheritance. This way, an adaptation process based on relations becomes more flexible and effective. With respect to limitations, the adaptation process proposed here has the general limitation of substitution based methods, which can not change the structure of the solution being adapted. Moreover, the need for an explicit representation of dependencies, restricts the possible adaptations, since only recorded dependencies are explored in case adaptation. And finally, the basic assumption about the existence of a relation path be-
tween dependent individuals has to be taken into account when developing the KB, and may lead to the definition of new relations as the case base gets populated. In general, we consider that our approach may be successful as long as a rich enough knowledge representation of the domain is available. In conclusion, we have presented an application of DLs which formalizes a domain independent scheme to represent cases where the adaptation knowledge is included in the solutions. Also, the adaptation knowledge is explicitly represented in form of search heuristics. Search knowledge is learnt by memorising and weighting the search heuristic successfully used to find a substitute for a non appropriate solution component. Adaptation is usually considered a complex domain-dependent task, but we think that DLs could be the mean to formalize a general adaptation strategy based on the relations between cases, part of cases and the taxonomic representation and reasoning services over the terminology.
References 1. Brachman, R.J., McGuinness, D.L., Patel-Schneider, P.F., Resnick, L. & Borgida, A., 1991: “Living with CLASSIC: When and How to Use a KL-ONE-Like language”, in Principles of Semantic Networks, Morgan Kaufmann. 2. Donini, F.M., Lenzerini, M., Nardi, D., & Schaerf, A., 1996: “Reasoning in Description Logics”, in Foundation of Knowledge Representation, CSLI-Publications. 3. G´omez-Albarr´an, M., Gonz´alez-Calero, P.A., D´ıaz-Agudo B. & Fern´andez- Conde, C., 1999: “Modelling the CBR Life Cycle Using Description Logics”, in Procs. ICCBR’99. 4. Gonz´alez-Calero, P.A., D´ıaz-Agudo, B. & G´omez-Albarr´an, M., 1999: “ Applying DLs for Retrieval in Case-Based Reasoning”, in Procs. DL’99. 5. Hanney, K., Keane, M., 1996: “Learning Adaptation Rules from a Case- Base”, in Procs. EWCBR’96. 6. Kass, A.M., & Leake, D.B., 1988: “Case-based reasoning applied to constructing explanations”, in Procs. of the Workshop on CBR (DARPA) (Kolodner, J., ed.), Morgan Kaufmann. 7. Kolodner, J., 1993: Case-Based Reasoning, Morgan Kaufmann. 8. Leake, D.B., Kinley, A. & Wilson, D., 1995: “Learning to Improve Case Adaptation by Introspective Reasoning and CBR”, in Procs. ICCBR’95. 9. Leake, D.B., Kinley, A. & Wilson, D., 1996: “Acquiring Case Adaptation Knowledge: A Hybrid Approach”, in Procs. of the thirteenth National Conference on Artificial Intelligence, AAAI Press, Menlo Park, CA. 10. Leake, D.B. & Wilson, D., 1999: “Combining CBR with Interactive Knowledge Acquisition, Manipulation and Reuse”, in Procs. ICCBR’99. 11. Mille, A., Fuchs, B., & Herbeaux, O., 1996: “A unifying framework for Adaptation in CaseBased Reasoning”, in Procs. ECAI’96. Workshop of Adaptation in Case-Based Reasoning, John Wiley & Sons, Ltd. 12. Napoli, A., Lieber, J., & Courien, R., 1996: “Classification-Based Problem Solving in CaseBased Reasoning”, in Procs. EWCBR’96. 13. Napoli, A., Lieber, J. & Simon, A., 1997: “A Classification-Based Approach to Case-Based Reasoning”, in Procs. DL’97. 14. Watson, I., 1997: Applying Case-Based Reasoning: Techniques for Enterprise Systems, Morgan Kaufmann. 15. Wilke. W., Vollrath, I., & Bergmann, R., 1997: “Using Knowledge Containers to Model a Framework for Learning Adaptation Knowledge”, in Procs. of the ECML ’97 Workshop on Case-Based Learning.