Dynamic Knowledge Based User Modeling for Recommender systems Joao Leite and Martina Babini2 Abstract. In this paper we propose the introduction of assignment of ratings to products. It should allow for the usage of logic programming- an extension of answer set programn existing concepts(e. g. product characteristics)as well as for the def recommender systems, as a means for users to specify an inition of new concepts(e. g own qualitative classifications based their models, with the purpose of enhancing recommendation product characteristics). The language should allow for the specifica- tion of rules that use these concepts to define the policies regarding 1 Introduction the recommendations made by the system. The language should also include some for of negation to allow for the specification of both Recommender systems are programs that help the user in navigat- positive as well as negative information ing large volumes of information available, attempting to provide a users should be able to update their models by specifying new solution to the users needs or suggesting items that the user may rules. The system must consider that users are not consistent along many different approaches. Most common techniques used to select fied ones, possibly representing an evolution a m previously speci- like. To chose or discard existing items, recommender systems adopt time i. e, some newer rules may directly contradict the right suggestions are: collaborative filtering(e. g. [11, 9))where needs, and these "contradictions"should be dealt with by the system. user ratings for objects are used to perform an inter-user comparison recommender systems should not depend solely on the model and then propose the best rated items; content-based recommenda- specified by the user. Other approaches and existing systems that tion(e. g. [3)) where measures of similarity between items content do not require the user specification should be used as complement are used to find the right selection, employing techniques from the Their outputs should be taken into consideration since they may al- information retrieval field; knowledge-based recommendation(e.g. ready encode large amounts of data that should not be disregarded, [14, 16])where knowledge about the user, the objects, and some dis- and would be particularly useful in the absence of user specified tance measures between them, are used to infer the right selections knowledge. At the same time the output of the recommender system i.e. relationships between users and objects; and, as always, hybrid should take into strict consideration the user specifications which, if versions of these(e. g.[5, 15) where two or more of these techniques violated, would turn the user away from the recommendation system (collaborative filtering being usually one of them) are used to over- In this paper, we borrow concepts from the area of knowledge rep- come their individual limitations. For further details on this subject resentation and non-monotonic reasoning, to set forth a proposal tha the reader is referre aims at extending systems with the possibility of allowing for users Recommender systems can also be categorised, according to the to specify their individual models and preferences, while taking into way they interact with the user [6], as being single shot systems where account the previously mentioned. Concretely, we will adapt the par for each request the system make its interpretation of information and adigm of Dynamic Logic Programming [2, 10, 1] to suit our needs poses recommendations to the user without taking in account any Dynamic Logic Programming(DLP)is an extension of Answer- previous interaction, and conversational systems where recommen- set Programming(ASP)[8] introduced to deal with knowledge up- ations are made on the basis of the current request of the user and dates. ASP is a form of declarative programming that is similar in some feedback provided as a response to previously proposed items. syntax to traditional logic programming and close in semantics to The extent to which users find the recommendations satisfactory non-monotonic logic, that is particularly suited for knowledge repre is, ultimately, the key feature of such systems, and the accuracy of the sentation. In contrast to Prolog, where proofs and substitutions are user models that are employed by these systems is of key importance at its heart, the fundamental idea underlying ASP is to describe a to this goal. Such user models are often implicit, inferred from past problem declaratively in such a way that models of the description experience. The use of explicit models of both the products and user provide solutions to problems. Enormous progress concerning both as been previously identified as opportune to improve the quality of the theoretical foundations of the approach and implementation is- recommendations, namely addressing the early rater and the sparse sues have been made in recent years. The existence of very efficient ratings problems experienced by many systems 16 ASP solvers(e.g DLV and SModeLs")make it finally possible to In this paper we will concentrate on user modeling for recom- hender systems, with the following in mind 3 The main aditional logic programming(e.g Prolog) hould provide and asP is how negation guage)to specify their models and preferences. This language should gramming, negation-as-failure indicates the failure of a derivation; in ASP. indicates the consistency of a literal. In contrast to Prolog, the semant be expressive enough to allow for specifications that exceed the mere of AsP do not depend on a specific order of evaluation of the rules an of the atoms within each rule. For more on ASP, namely its semantics and New University of Lisbon, Portugal, email: leite@di fc applications, the reader is referred to [4] and [17] UniversitadiBolognaItaly,emailmartina.babini@gmail.com 4http://www.dlvsystem.com/andhttp://www.tcs.hutfi/soFtware/smodels/
Dynamic Knowledge Based User Modeling for Recommender Systems Joao Leite ˜ 1 and Martina Babini2 Abstract. In this paper we propose the introduction of dynamic logic programming – an extension of answer set programming – in recommender systems, as a means for users to specify and update their models, with the purpose of enhancing recommendations. 1 Introduction Recommender systems are programs that help the user in navigating large volumes of information available, attempting to provide a solution to the user’s needs or suggesting items that the user may like. To chose or discard existing items, recommender systems adopt many different approaches. Most common techniques used to select the right suggestions are: collaborative filtering (e.g. [11, 9]) where user ratings for objects are used to perform an inter-user comparison and then propose the best rated items; content-based recommendation (e.g.[3]) where measures of similarity between item’s content are used to find the right selection, employing techniques from the information retrieval field; knowledge-based recommendation (e.g. [14, 16]) where knowledge about the user, the objects, and some distance measures between them, are used to infer the right selections i.e. relationships between users and objects; and, as always, hybrid versions of these (e.g. [5, 15]) where two or more of these techniques (collaborative filtering being usually one of them) are used to overcome their individual limitations. For further details on this subject the reader is referred to [7, 12, 13]. Recommender systems can also be categorised, according to the way they interact with the user [6], as being single shot systems where for each request the system make its interpretation of information and proposes recommendations to the user without taking in account any previous interaction, and conversational systems where recommendations are made on the basis of the current request of the user and some feedback provided as a response to previously proposed items. The extent to which users find the recommendations satisfactory is, ultimately, the key feature of such systems, and the accuracy of the user models that are employed by these systems is of key importance to this goal. Such user models are often implicit, inferred from past experience. The use of explicit models of both the products and user has been previously identified as opportune to improve the quality of recommendations, namely addressing the early rater and the sparse ratings problems experienced by many systems[16]. In this paper we will concentrate on user modeling for recommender systems, with the following in mind: - recommender systems should provide users with a way (language) to specify their models and preferences. This language should be expressive enough to allow for specifications that exceed the mere 1 New University of Lisbon, Portugal, email: jleite@di.fct.unl.pt 2 Universita di Bologna, Italy, email: martina.babini@gmail.com ` assignment of ratings to products. It should allow for the usage of existing concepts (e.g. product characteristics) as well as for the definition of new concepts (e.g. own qualitative classifications based on product characteristics). The language should allow for the specification of rules that use these concepts to define the policies regarding the recommendations made by the system. The language should also include some for of negation to allow for the specification of both positive as well as negative information. - users should be able to update their models by specifying new rules. The system must consider that users are not consistent along time i.e., some newer rules may directly contradict previously speci- fied ones, possibly representing an evolution of the user’s tastes and needs, and these “contradictions” should be dealt with by the system. - recommender systems should not depend solely on the model specified by the user. Other approaches and existing systems that do not require the user specification should be used as complement. Their outputs should be taken into consideration since they may already encode large amounts of data that should not be disregarded, and would be particularly useful in the absence of user specified knowledge. At the same time the output of the recommender system should take into strict consideration the user specifications which, if violated, would turn the user away from the recommendation system. In this paper, we borrow concepts from the area of knowledge representation and non-monotonic reasoning, to set forth a proposal that aims at extending systems with the possibility of allowing for users to specify their individual models and preferences, while taking into account the previously mentioned. Concretely, we will adapt the paradigm of Dynamic Logic Programming [2, 10, 1] to suit our needs. Dynamic Logic Programming (DLP) is an extension of Answerset Programming (ASP) [8] introduced to deal with knowledge updates. ASP is a form of declarative programming that is similar in syntax to traditional logic programming and close in semantics to non-monotonic logic, that is particularly suited for knowledge representation3 . In contrast to Prolog, where proofs and substitutions are at its heart, the fundamental idea underlying ASP is to describe a problem declaratively in such a way that models of the description provide solutions to problems. Enormous progress concerning both the theoretical foundations of the approach and implementation issues have been made in recent years. The existence of very efficient ASP solvers (e.g. DLV and SMODELS 4 ) make it finally possible to 3 The main difference between traditional logic programming (e.g. Prolog) and ASP is how negation as failure is interpreted. In traditional logic programming, negation-as-failure indicates the failure of a derivation; in ASP, it indicates the consistency of a literal. In contrast to Prolog, the semantics of ASP do not depend on a specific order of evaluation of the rules and of the atoms within each rule. For more on ASP, namely its semantics and applications, the reader is referred to [4] and [17]. 4 http://www.dlvsystem.com/ and http://www.tcs.hut.fi/Software/smodels/
investigate some serious applications L0←L1 Ln a tautology is a rule of the form L Body According to DLP, the extension of ASP we use, knowledge is with L E Body. A generalized logic program(GLP)P, in A given by a series of theories, encoded as generalized logic programs a finite or infinite set of rules. If H(r)=A(resp. H(r)= not A) (or answer-set programs), each representing distinct states of the then not H(r)= not A(resp. not H(r)= A). If H(r)=A world. Different states, sequentially ordered, can represent different then -H(r)=A. By the expanded generalized logic program time periods, thus allowing DLP to represent knowledge undergoing corresponding to the glp P, denoted by P, we mean the glp ob- successive updates. As individual theories may comprise mutually tained by augmenting P with a rule of the form not H(r)+b(r) contradictory as well as overlapping information, the role of DLP is for every rule, in P, of the form H(r)+b(r), where H(r) to employ the mutual relationships among different states to deter- is an objective literal. An interpretation M of A is a set of ob- mine the declarative semantics for the combined theory comprised jective literals that is consistent ie, M does not contain both A of all individual theories at each state. Intuitively, one can add, at the and A. An objective literal L is true in M, denoted by M F l end of the sequence, newer rules leaving to DLP the task of ensuring iffL E M, and false otherwise. a default literal not L is true in It these rules are in force, and that previous ones are valid(by in- M, denoted by M F not L, iff L M, and false otherwise. A are not in conflict with newly added ones, these always prevall y set of literals B is true in M, denoted by M F B, iff each lit- ertia)only so far as possible, i.e. that they are kept for as long as the ral in B is true in M. An interpretation M of A is an answer Dynamic Logic Programming can provide an expressive frame- set of a GLP P iff M= least(Puinot A A E M)), where work for users to specify rules encoding their model, preferences and M=MUInotA I A M, A is an objective literal, and least(-) their updates, while enjoying several properties, some discussed be- denotes the least model of the definite program obtained from the ar- low, such as: a simple extendable language: a well defined semantics: gument program, replacing every default literal not a by a new atom the possibility to use default negation to encode non-deterministic notA. Let As (P)denote the set of answer-sets of P. choice, thus generating more than one set of recommendations, fa- a dynamic logic program (DLP) is a sequence of general- cilitating diversity each time the system is invoked; the combination ized logic programs. Let P=(Pi,, Ps)and p=(P1,., Pn) of both strong and default negation to reason with the closed and be DLPs. We use p(p) to denote the multiset of all rules open world assumptions; easy connection with relational databases appearing in the programs P1,..., Ps, and p u p to de (ASP can also be seen as a query language, more expressive than note (Pi U P,,P, U Ps) and (Pi, Pi,p)to denote SQL): support for explanations: amongst others. Pi,., Pn). We can now set forth the definition of a Since we are providing users with a way to express themselves by semantics, based on causal rejection of rules, for DLPs. We start by means of rules, we can also provide the same rule based language to defining the notion of conflicting rules as follows: two rules r and r the owners of the recommendation system, enabling them to specify are conflicting, denoted by r M r, iff H(r)= not H(r),used ome policies that may not be captured by the existing recommenda- accomplish the desired rejection of rules: tion system(e. g. preference for recommending certain products) In a nutshell, we want to propose a system, with a precise formal Definition 1(Rejected Rules) Let P=(Pi, Ps )be a DLP and specification and semantics, composed of three modules, namely the M an interpretation. We define output of an existing recommendation system, a set of rules specified Rej(P, M)=rIreP. by the owner of the recommendation system and a sequence of rules ∈Py,i≤jrMr,MFB(r分} specified by the user, for which we provide an expressive language. The modules are combined in a way such that they produce a set of We also need the following notion of default assumption recommendations that obeys certain properties such as obedience to Definition 2(Default Assumptions) Let p P1,…,P)be the rules specified by the user, removal of contradictions specified dLP and M an interpretation. We define(A is an objective literal) by the user along time. keep the result of the initial recommendation module as much as possible in the final output, among others Def(P, M)=inot A l trE p(P),H(r)=A,MFB(r)) The remainder of this paper is organised as follows: In Sect. 2 we briefly recap the notion of Dynamic Logic Programming, establish- ing the language used throughout. In Sect. 3 we define our framework intuition that some interpretation is a model according iff it obeys an and its semantics In Sect. 4 we preset a brief illustrative example In equation based on the least model of the multiset of all the rules in Sect. 5 we discuss some properties and conlude in Sect. 6. the(expanded) DLP, without those rejected rules, together with a set of default assumptions. The semantics is dubbed(refined) dynamic stable model semantics(RDSM) namic l ogic Programming Progr For self containment, in this Section, we briefly recap the notion and Definition 3(Semantics of Dynamic Logic Programming) Let P semantics of Dynamic Logic Programming needed throughout. Mon =(Pi, .. P,) be a DLP and M an interpretation. M is a(refined) dynamic stable model ofp iff motivation regarding all these notions can be found in [2, 101 Let A be a set of propositional atoms. An objective literal is ei- M=least(P(P)-Rej(p, M)U Def(P, M)) ther an atom A or a strongly negated atom A. a default literal is objective literal preceded by not. A literal is either an objective literal or a default literal. A rule r is an ordered pair H(r)+B(r) where M, P(-)and least(. )are as before. Let RDSm(P)denote where H()(dubbed the head of the rule)is a literal and B(r) the set of all refined dynamic stable models ofP. dubbed the body of the rule) is a finite set of literals. a rule with H(r)=Lo and B(r)=(L1,., In) will simply be writen as 3 Framework and Semantics 5 LPs with default and strong negation both in the body and head of rules In this section we introduce our framework and its semantics
investigate some serious applications. According to DLP, the extension of ASP we use, knowledge is given by a series of theories, encoded as generalized logic programs5 (or answer-set programs), each representing distinct states of the world. Different states, sequentially ordered, can represent different time periods, thus allowing DLP to represent knowledge undergoing successive updates. As individual theories may comprise mutually contradictory as well as overlapping information, the role of DLP is to employ the mutual relationships among different states to determine the declarative semantics for the combined theory comprised of all individual theories at each state. Intuitively, one can add, at the end of the sequence, newer rules leaving to DLP the task of ensuring that these rules are in force, and that previous ones are valid (by inertia) only so far as possible, i.e. that they are kept for as long as they are not in conflict with newly added ones, these always prevailing. Dynamic Logic Programming can provide an expressive framework for users to specify rules encoding their model, preferences and their updates, while enjoying several properties, some discussed below, such as: a simple extendable language; a well defined semantics; the possibility to use default negation to encode non-deterministic choice, thus generating more than one set of recommendations, facilitating diversity each time the system is invoked; the combination of both strong and default negation to reason with the closed and open world assumptions; easy connection with relational databases (ASP can also be seen as a query language, more expressive than SQL); support for explanations; amongst others. Since we are providing users with a way to express themselves by means of rules, we can also provide the same rule based language to the owners of the recommendation system, enabling them to specify some policies that may not be captured by the existing recommendation system (e.g. preference for recommending certain products). In a nutshell, we want to propose a system, with a precise formal specification and semantics, composed of three modules, namely the output of an existing recommendation system, a set of rules specified by the owner of the recommendation system and a sequence of rules specified by the user, for which we provide an expressive language. The modules are combined in a way such that they produce a set of recommendations that obeys certain properties such as obedience to the rules specified by the user, removal of contradictions specified by the user along time, keep the result of the initial recommendation module as much as possible in the final output, among others. The remainder of this paper is organised as follows: In Sect. 2 we briefly recap the notion of Dynamic Logic Programming, establishing the language used throughout. In Sect. 3 we define our framework and its semantics. In Sect. 4 we preset a brief illustrative example. In Sect. 5 we discuss some properties and conlude in Sect. 6. 2 Dynamic Logic Programming For self containment, in this Section, we briefly recap the notion and semantics of Dynamic Logic Programming needed throughout. More motivation regarding all these notions can be found in [2, 10]. Let A be a set of propositional atoms. An objective literal is either an atom A or a strongly negated atom ¬A. A default literal is an objective literal preceded by not. A literal is either an objective literal or a default literal. A rule r is an ordered pair H (r) ← B (r) where H (r) (dubbed the head of the rule) is a literal and B (r) (dubbed the body of the rule) is a finite set of literals. A rule with H (r) = L0 and B (r) = {L1, . . . , Ln} will simply be written as 5 LPs with default and strong negation both in the body and head of rules. L0 ← L1, . . . , Ln. A tautology is a rule of the form L ← Body with L ∈ Body. A generalized logic program (GLP) P, in A, is a finite or infinite set of rules. If H(r) = A (resp. H(r) = not A) then not H(r) = not A (resp. not H(r) = A). If H (r) = ¬A, then ¬H (r) = A. By the expanded generalized logic program corresponding to the GLP P, denoted by P, we mean the GLP obtained by augmenting P with a rule of the form not ¬H (r) ← B (r) for every rule, in P, of the form H (r) ← B (r), where H (r) is an objective literal. An interpretation M of A is a set of objective literals that is consistent i.e., M does not contain both A and ¬A. An objective literal L is true in M, denoted by M L, iff L ∈ M, and false otherwise. A default literal not L is true in M, denoted by M not L, iff L /∈ M, and false otherwise. A set of literals B is true in M, denoted by M B, iff each literal in B is true in M. An interpretation M of A is an answer set of a GLP P iff M0 = least(P ∪ {not A | A 6∈ M}), where M0 = M ∪ {not A | A 6∈ M}, A is an objective literal, and least(.) denotes the least model of the definite program obtained from the argument program, replacing every default literal not A by a new atom not A. Let AS (P) denote the set of answer-sets of P. A dynamic logic program (DLP) is a sequence of generalized logic programs. Let P = (P1, ..., Ps) and P 0= (P 0 1, ..., P0 n) be DLPs. We use ρ (P) to denote the multiset of all rules appearing in the programs P1, ..., Ps, and P ∪ P0 to denote (P1 ∪ P 0 1, ..., Ps ∪ P 0 s) and P 0 i , P0 j , P ✁ to denote P 0 i , P0 j , P1, ..., Pn ✁ . We can now set forth the definition of a semantics, based on causal rejection of rules, for DLPs. We start by defining the notion of conflicting rules as follows: two rules r and r 0 are conflicting, denoted by r ✶ r 0 , iff H(r) = not H(r 0 ), used to accomplish the desired rejection of rules: Definition 1 (Rejected Rules) Let P = (P1, ..., Ps) be a DLP and M an interpretation. We define: Rej (P, M) = ✟ r | r ∈ Pi, ∃r 0 ∈ Pj , i ≤ j, r ✶ r 0 , M B(r 0 ) ✠ We also need the following notion of default assumptions. Definition 2 (Default Assumptions) Let P = (P1, ..., Ps) be a DLP and M an interpretation. We define (A is an objective literal): Def(P, M) = {not A | @r ∈ ρ (P), H (r) = A, M B (r)} We are now ready to define the semantics for DLPs based on the intuition that some interpretation is a model according iff it obeys an equation based on the least model of the multiset of all the rules in the (expanded) DLP, without those rejected rules, together with a set of default assumptions. The semantics is dubbed (refined) dynamic stable model semantics (RDSM). Definition 3 (Semantics of Dynamic Logic Programming) Let P = (P1, ..., Ps) be a DLP and M an interpretation. M is a (refined) dynamic stable model of P iff M0 = least(ρ (P) − Rej (P, M) ∪ Def (P, M)) where M0 , ρ(.) and least(.) are as before. Let RDSM (P) denote the set of all refined dynamic stable models of P. 3 Framework and Semantics In this Section, we introduce our framework and its semantics
Our goal is to take the strengths of DLP as a knowledge represen- it may be impossible to have such control directly inside the initial tion framework with the capabilities of allowing for the representa- module (e.g. if it is a sub-symbolic system such as a neural network) tion of updates, and put it at the service of the user and the company, We these principles in mind, we first define a transformation fror while at the same time ensuring some degree of integration with the a Dynamic Recommender Frame into a Dynamic Logic Program: output of other recommendation modules, possibly based on distinct paradigms(e. g. statistical, etc) Definition 5r) LetR =(M, Po, p) be a Dynamic Recom- To make the presentation of our ideas simpler, we will make mender Frame. Let T(R)be the DLP(PAl, Po, p)where PA assumptions and simplifications that, in our opinion, do not cor {A←:A∈M} mise our proposal and can be subsequently lifted(not in this Intuitively, we construct a DLP where the initial knowledge is the We start by assuming a layered system where the output of the program obtained from the initial model. Such initial program is fol- existing recommendation module is simply used as the input to our lowed (updated with) the owner's policy specification(Po), which is system, and where no feedback to the initial module exists then followed by the sequence of specifications provided by the user. aware that allowing for feedback from our system to the existing And we define the semantics of a drf as follows. module could benefit its output, but such process would greatly de pend on such existing module and we want to make things as gen- Definition 6 (Stable Recommendation Semantics) Let eral as possible, and concentrate on other aspects of the system. This =(M, Po, p) be a Dynamic Recommender takes us to the next assumption, that of the output of sud ch existing MR an interpretation. MR is a stable recommendation iff MR is a module. We consider it to be an interpretation, i.e. a consistent set of dynamic stable model of r(R). Let Sr(r) denote the set of all objective literals representing the recommendations. For simplicity, we can assume that the language contains a reserved predicate of the form rec/I where the items are the terms of the predicate, and the 4 Short Illustrative Example interpretation will contain those predicates corresponding to the rec- In this Section we present a small and very simplified example, with one where some value would be associated with each recommenda- the purpose of illustrating some(very few) features of our proposal tion, e.g. using a predicate of the form rec(item, value). However, Let,s consider an on-line store selling books and dvds with some to get our point across, we will keep to the simplified version where existing recommendation system based on statistical analysis per- the output of the existing module is simply a set of recommendations What we have, then, is an initial interpretation, representing the be a set of recommended products, that, for our purposes, we wi output of the initial module, which we dub the initial model, a gener- alised logic program representing the owner's policy, and a dynamic represent such output, ie. the initial model,and be logic program, representing the rules(and their evolution) specified by the user M=rec(b1), rec(b2), rec(d1), rec(d2), rec(br), rec(d6)1 To formalise this notion, we introduce the concept of Dynamic where bi, and d; are products. The owner can, on top on this, define ome further recommendation policies, such as: Definition 4(Dynamic Recommender Frame) Let a be a set of the system should recommend at most one product of a given edi- propositional atoms. A Dynamic Recommender Frame(DRF),over tor, encoded by the rule(1) A, is a triple(M, Po, p) where M is an interpretation of A, Po a eralised logic program over A, and p a dynamic logic program not rec(X)+editor(X, E), editor(Y, E), X#Y, rec(Y) ove) the system should, non-deterministically, recommend at least one The semantics of a Dynamic Recommender Frame is given by the of products b] and b4, and one of products ds and dr encoded by set of stable models of its transformation into a Dynamic Logic Pro- the rules(2-5)° gram. This transformation is based on a few underlying assumptions concerning the way these three modules should interact and be com- not Tec rec(b4)← not rec(b3) bined. In particular, we want the rules specified by the user to be rec(d6)← not rec(d) rec(d7)← not reci(d6) the most relevant and be able to supersede both those issued by the owner and the recommendation issued by the existing module. This the system should always recommend the film of a recommended book, and vice versa, in case it exists(defined by the predicate system that would explicitly violate their rules(e.g. recommend a rel /2), encoded by the rules(6, 7) horror movie when the user said that no horror movies should be re ommended). This limits the impact of recommendations made by the rec(Y)+ type(Y, dud), type(X, book), rel(X, Y), rec(X) de and the rec(X)+ type(Y, dud), type(X, book),rel(X, Y), rec Y) the user, or to those whose rules specified by the user allow for more than one alternative. The other principle concerns the relationship The owner program Po contains the previous rules, together with between the initial model and the policy specified by the user. Here the store's relational database where the relations brand /2, type/2 ve will opt for giving a prevailing role to the rules specified by the related/ 2, etc, are defined. In this example, we consider the fol wing propositions to be true: type(bi, book), type(di, dvd wner. The rational for this is rather obvious and natural: the owner editor(b1, edi), actor(d4, "Al Pacino"), editor(bs, edi) must be given the option/power to supersede the initial recommen- dation module(e.g. specify preference to specify products of a given 6 This encoding uses the classic even loop through negation which, in ASP. brand over those of another because of higher profit margins), and produces two models each with one of the propositions belonging to it
Our goal is to take the strengths of DLP as a knowledge representation framework with the capabilities of allowing for the representation of updates, and put it at the service of the user and the company, while at the same time ensuring some degree of integration with the output of other recommendation modules, possibly based on distinct paradigms (e.g. statistical, etc). To make the presentation of our ideas simpler, we will make some assumptions and simplifications that, in our opinion, do not compromise our proposal and can be subsequently lifted (not in this paper though). We start by assuming a layered system where the output of the existing recommendation module is simply used as the input to our system, and where no feedback to the initial module exists. We are aware that allowing for feedback from our system to the existing module could benefit its output, but such process would greatly depend on such existing module and we want to make things as general as possible, and concentrate on other aspects of the system. This takes us to the next assumption, that of the output of such existing module. We consider it to be an interpretation, i.e. a consistent set of objective literals representing the recommendations. For simplicity, we can assume that the language contains a reserved predicate of the form rec/1 where the items are the terms of the predicate, and the interpretation will contain those predicates corresponding to the recommended items. It would be straightforward to extend this case to one where some value would be associated with each recommendation, e.g. using a predicate of the form rec(item, value). However, to get our point across, we will keep to the simplified version where the output of the existing module is simply a set of recommendations. What we have, then, is an initial interpretation, representing the output of the initial module, which we dub the initial model, a generalised logic program representing the owner’s policy, and a dynamic logic program, representing the rules (and their evolution) specified by the user. To formalise this notion, we introduce the concept of Dynamic Recommender Frame defined as follows: Definition 4 (Dynamic Recommender Frame) Let A be a set of propositional atoms. A Dynamic Recommender Frame (DRF), over A, is a triple hM, P0, Pi where M is an interpretation of A, P0 a generalised logic program over A, and P a dynamic logic program over A. The semantics of a Dynamic Recommender Frame is given by the set of stable models of its transformation into a Dynamic Logic Program. This transformation is based on a few underlying assumptions concerning the way these three modules should interact and be combined. In particular, we want the rules specified by the user to be the most relevant and be able to supersede both those issued by the owner and the recommendation issued by the existing module. This is a natural principle as users would not accept a recommendation system that would explicitly violate their rules (e.g. recommend a horror movie when the user said that no horror movies should be recommended). This limits the impact of recommendations made by the initial module and the company to those not directly constrained by the user, or to those whose rules specified by the user allow for more than one alternative. The other principle concerns the relationship between the initial model and the policy specified by the user. Here, we will opt for giving a prevailing role to the rules specified by the owner. The rational for this is rather obvious and natural: the owner must be given the option/power to supersede the initial recommendation module (e.g. specify preference to specify products of a given brand over those of another because of higher profit margins), and it may be impossible to have such control directly inside the initial module (e.g. if it is a sub-symbolic system such as a neural network). We these principles in mind, we first define a transformation from a Dynamic Recommender Frame into a Dynamic Logic Program: Definition 5 (Υ) Let R = hM, P0, Pi be a Dynamic Recommender Frame. Let Υ (R) be the DLP (PM, P0, P) where PM = {A ←: A ∈ M}. Intuitively, we construct a DLP where the initial knowledge is the program obtained from the initial model. Such initial program is followed (updated with) the owner’s policy specification (P0), which is then followed by the sequence of specifications provided by the user. And we define the semantics of a DRF as follows: Definition 6 (Stable Recommendation Semantics) Let R = hM, P0, Pi be a Dynamic Recommender Frame and MR an interpretation. MR is a stable recommendation iff MR is a dynamic stable model of Υ (R). Let SR (R) denote the set of all stable recommendations. 4 Short Illustrative Example In this Section we present a small and very simplified example, with the purpose of illustrating some (very few) features of our proposal. Let’s consider an on-line store selling books and dvd’s, with some existing recommendation system based on statistical analysis performed over the years. We consider the output of such module to be a set of recommended products, that, for our purposes, we will consider constant throughout this example. Let the interpretation M represent such output, i.e. the initial model, and be: M = {rec (b1), rec (b2), rec (d1), rec (d2), rec (b7), rec (d6)} where bi,and di are products. The owner can, on top on this, define some further recommendation policies, such as: • the system should recommend at most one product of a given editor, encoded by the rule (1): not rec (X) ← editor (X, E), editor (Y, E), X 6= Y, rec (Y ). • the system should, non-deterministically, recommend at least one of products b3 and b4, and one of products d6 and d7 encoded by the rules (2 - 5)6 : rec (b3) ← not rec (b4). rec (b4) ← not rec (b3). rec (d6) ← not rec (d7). rec (d7) ← not rec (d6). • the system should always recommend the film of a recommended book, and vice versa, in case it exists (defined by the predicate rel/2), encoded by the rules (6,7): rec (Y ) ← type (Y, dvd), type (X, book), rel(X, Y ), rec (X). rec (X) ← type (Y, dvd), type (X, book), rel(X, Y ), rec (Y ). The owner program P0 contains the previous rules, together with the store’s relational database where the relations brand/2, type/2, related/2, etc, are defined. In this example, we consider the following propositions to be true: type (bi, book), type (di, dvd), editor (b1, ed1), actor (d4, “Al Pacino”), editor (b5, ed1), 6 This encoding uses the classic even loop through negation which, in ASP, produces two models each with one of the propositions belonging to it
rel(bs, da), editor(b2, edi), theme(dr, "Gangsters"). With MRl1=rec(dr), rec(b2), rec(b4), rec(b7)) ut any rules specified by the user, the frame has four stable MR12=rec(d4), rec(dr), rec(bs), rec(b3), rec(b7)) recommendations resulting from the effect of the owner's rules on top of the initial mod Note that all four stable recommendations have at least one recom- MRI=rec(b1), rec(bs), rec(d1), rec(d2), rec(br), rec(do) sides the recommendation for d, also the recommendation for b MR2=rec(b2), rec(b3), rec(d1), rec(d2), rec(br), rec(d6)) as specified by rule 7 since they are related. Also note that rules 11 MR3=rec(b1), rec(b4), rec(d1), rec(d2), rec(br), rec(d6)) and 12 cause a direct contradiction with rule 8 for good dvd's.The MRa=rec (b2), rec(b4), rec(d1), rec(d2), rec(br), rec(d6)1 emantics based on the causal rejection of rules deals with this issue Also worth noting is that, for each recommendation. there is an When taking a closer look at the four stable recommendations, we explanation based on user rules, or on owner rules if not overrid can observe that the first rule specified by the owner removed the den by those of the user or, if there is nothing overriding it. on the recommendation for either b1 or b2, and the second and third rules in- initial recommendation(as is the case of product b7). This and other troduced either rec(b3)or rec(b4). The combination of these gener- properties are explored in the next Section ated four stable recommendations Note that the fourth and fifth rules (for products de and dr)did not cause any change because rec(d6) 5 Properties belonged to the initial recommendation and the semantics tends to keep the recommendations by inertia. The recommendation system In this Section we discuss some properties of the Stable Recommen would, non-deterministically, choose one of these stable recommen- dation Semantics. We start with conservation, stating that if the rec- dations to present to the user. ommendation of the existing module is a dynamic stable model of the Lets now consider the user. Initially, being only looking for books, DLP consisting of the owner rules followed by the user DLP, then the the user states that she doesn't want any recommendations for dvds, initial recommendation is a stable recommendation. This ensures that encoded by the rule( 8): not rec(X)+ type(X, dud). This rule the semantics will keep the results of the initial module if they agree alone will override all the initial recommendations for dvds and also with the specification of the owner and user. all the rules of the owner specifying dvd recommendations such as rules 4 and 5. If P1=(P1), where Pi contains rule 8, the four stable Proposition 1( Conservation) Let R=(M, Po, p) be a DRFo commendations of the frame(M, Po, Pi)are: Then,M∈RDSM(Po,P)→SR(R)2{M} MRs=rec (b1), rec(b3), rec(b7)) It is also important to establish the relationship between the stable MR6=rec(b2), rec(bs), rec(b7)) recommendation semantics and dlp for the case where there is no existing recommendation module. This ensures the proper transfer of Mrt=rec(b1), rec(b4), rec(b7)) all properties of DLP, and ASP, to our system MRs=rec(b2), rec (b4), rec(b7)h Proposition 2(Generalisation of DLP) Let Po be a gener- For this, she decides to define the concept of what good dvds 's. alised logic program and p a dynamic logic program. Then, Later on, the user decides to get some recommendations for dvo SR P))= RDSM (P), and SR((O, Po, p)) Initially, she considers a good dvd to be one with Al Pacino or one RDSM((Po, P)) about gangsters. She writes the following two rules(9 and 10) A very important issue in recommendation systems is that of pro- good(X)←type(X,dvd), actor(X,"“ Al Pacino”) viding the user(and the owner) with explanations regarding the rec- good(X)←type(X,dvd), theme(X,“ gangsters”) ommendations made. The fact that the stable recommendation se. mantics is well defined already provides a formal basis to support its Furthermore decides that she wants to get at least one recom- results. However, we can state stronger results concerning the justifi- nendation for a good product. She writes the rules(11-14) cation for the existence and absence of a particular recommendation rec(X)+good(X), not nrec(X) If a recommendation belongs to a stable recommendation then either n_rec(X)+good(X), not rec(X) there is a user rule supporting it, or there is an owner rule supporti it and no user rule overriding it, or it is in the output of the initial rec-atleast_one good (X), rec(X) module and no rules have overridden it. In other words. there is al not rec. at least one If p2=(P1, P2), where P2 contains rule 9-14, the stable recom- Proposition 3(Positive Supportiveness) LetR=(M, Po, p)be hendations of the frame(M, Po, P2)are: a dre and a∈MR∈SR(R)Then: Mr9=rec(da), rec(bs), rec(b3), rec(b7) ErEP(P): H(r)=A, MRF B(r) AR10= rec(d7), rec(b1), rec(b4), rec(br) r’∈Po:H(r)=A,MR=B(r)A ∧r∈p(P):H(r)=notA,MRhB(r)or 7 Here, we restrict the models to the pro A∈MAr∈p(P0,P):H(t)=notA,MR=B(r) a classic construct of AsP The first two rules state that each good product X is either recommended or n_rec. Then, the third Likewise for absence of recommendations. If a recommendation rule makes the proposition rec least_one true if at least uct is recommended. Finally, the fourth rule, an integrity constra belongs to the output of the initial system and is not part of a stable inates all models where rec at least one is not true. The actual recom- recommendation, then there must be a rule overriding it(either from nendation system would, like most answer-set solvers, have special syn- the user or from the owner) tactical shortcuts for these kind of specifications, since we cannot expect the user to write this kind of rules 9 Lack of space prevents us from presenting proofs for the propositions
rel(b5, d4), editor (b2, ed1), theme (d7, “Gangsters”). Without any rules specified by the user, the frame has four stable recommendations resulting from the effect of the owner’s rules on top of the initial model, namely7 : MR1 = {rec (b1), rec (b3), rec (d1), rec (d2), rec (b7), rec (d6)} MR2 = {rec (b2), rec (b3), rec (d1), rec (d2), rec (b7), rec (d6)} MR3 = {rec (b1), rec (b4), rec (d1), rec (d2), rec (b7), rec (d6)} MR4 = {rec (b2), rec (b4), rec (d1), rec (d2), rec (b7), rec (d6)} When taking a closer look at the four stable recommendations, we can observe that the first rule specified by the owner removed the recommendation for either b1 or b2, and the second and third rules introduced either rec (b3) or rec (b4). The combination of these generated four stable recommendations. Note that the fourth and fifth rules (for products d6 and d7) did not cause any change because rec (d6) belonged to the initial recommendation and the semantics tends to keep the recommendations by inertia. The recommendation system would, non-deterministically, choose one of these stable recommendations to present to the user. Let’s now consider the user. Initially, being only looking for books, the user states that she doesn’t want any recommendations for dvd’s, encoded by the rule (8): not rec (X) ← type (X, dvd).This rule alone will override all the initial recommendations for dvd’s and also all the rules of the owner specifying dvd recommendations such as rules 4 and 5. If P1 = (P1), where P1 contains rule 8, the four stable recommendations of the frame hM, P0, P1i are: MR5 = {rec (b1), rec (b3), rec (b7)} MR6 = {rec (b2), rec (b3), rec (b7)} MR7 = {rec (b1), rec (b4), rec (b7)} MR8 = {rec (b2), rec (b4), rec (b7)} Later on, the user decides to get some recommendations for dvd’s. For this, she decides to define the concept of what good dvd’s are. Initially, she considers a good dvd to be one with Al Pacino or one about gangsters. She writes the following two rules (9 and 10): good (X) ← type (X, dvd), actor (X, “Al Pacino”). good (X) ← type (X, dvd), theme (X, “Gangsters”). Furthermore, she decides that she wants to get at least one recommendation for a good product. She writes the rules (11-14)8 : rec (X) ← good (X), not n rec (X). n rec (X) ← good (X), not rec (X). rec at least one ← good (X), rec (X). ← not rec at least one If P2 = (P1, P2), where P2 contains rule 9-14, the stable recommendations of the frame hM, P0, P2i are: MR9 = {rec (d4), rec (b5), rec (b3), rec (b7)} MR10 = {rec (d7), rec (b1), rec (b4), rec (b7)} 7 Here, we restrict the models to the propositions of the form rec/1. 8 These rules are, again, a classic construct of ASP. The first two rules state that each good product X is either recommended or n rec. Then, the third rule makes the proposition rec at least one true if at least one good product is recommended. Finally, the fourth rule, an integrity constraint, eliminates all models where rec at least one is not true. The actual recommendation system would, like most answer-set solvers, have special syntactical shortcuts for these kind of specifications, since we cannot expect the user to write this kind of rules. MR11 = {rec (d7), rec (b2), rec (b4), rec (b7)} MR12 = {rec (d4), rec (d7), rec (b5), rec (b3), rec (b7)} Note that all four stable recommendations have at least one recommendation for a good dvd. Furthermore, MR9 and MR12 have, besides the recommendation for d4, also the recommendation for b5, as specified by rule 7 since they are related. Also note that rules 11 and 12 cause a direct contradiction with rule 8 for good dvd’s. The semantics based on the causal rejection of rules deals with this issue. Also worth noting is that, for each recommendation, there is an explanation based on user rules , or on owner rules if not overridden by those of the user or, if there is nothing overriding it, on the initial recommendation (as is the case of product b7). This and other properties are explored in the next Section. 5 Properties In this Section we discuss some properties of the Stable Recommendation Semantics. We start with conservation, stating that if the recommendation of the existing module is a dynamic stable model of the DLP consisting of the owner rules followed by the user DLP, then the initial recommendation is a stable recommendation. This ensures that the semantics will keep the results of the initial module if they agree with the specification of the owner and user. Proposition 1 (Conservation) Let R = hM, P0, Pi be a DRF9 . Then, M ∈ RDSM ((P0, P)) ⇒ SR (R) ⊇ {M}. It is also important to establish the relationship between the stable recommendation semantics and DLP for the case where there is no existing recommendation module. This ensures the proper transfer of all properties of DLP, and ASP, to our system. Proposition 2 (Generalisation of DLP) Let P0 be a generalised logic program and P a dynamic logic program. Then, SR (h∅, ∅, Pi) = RDSM (P), and SR (h∅, P0, Pi) = RDSM ((P0, P)). A very important issue in recommendation systems is that of providing the user (and the owner) with explanations regarding the recommendations made. The fact that the stable recommendation semantics is well defined already provides a formal basis to support its results. However, we can state stronger results concerning the justifi- cation for the existence and absence of a particular recommendation. If a recommendation belongs to a stable recommendation then, either there is a user rule supporting it, or there is an owner rule supporting it and no user rule overriding it, or it is in the output of the initial module and no rules have overridden it. In other words, there is always an explanation for recommendations. Proposition 3 (Positive Supportiveness) Let R = hM, P0, Pi be a DRF and A ∈ MR ∈ SR (R). Then: ∃r ∈ ρ (P) : H (r) = A, MR B (r) or ∃r 0 ∈ P0 : H (r 0 ) = A, MR B (r 0 )∧ ∧ 6 ∃r ∈ ρ (P) : H (r) = not A, MR B (r) or A ∈ M∧ 6 ∃r ∈ ρ ((P0, P)) : H (r) = not A, MR B (r) Likewise for absence of recommendations. If a recommendation belongs to the output of the initial system and is not part of a stable recommendation, then there must be a rule overriding it (either from the user or from the owner). 9 Lack of space prevents us from presenting proofs for the propositions
Proposition 4(Negative Supportiveness) LetR=(M, Po, p)be 6 Discussion and Conclusions DRF and A MR∈SR(R)andA∈M.mhen,彐r∈ P((Po, P): H(r)=not A, MRFB(r) In this paper we proposed what can be seen as part of a knowledge based (or hybrid) recommender system, everal characteristics As with all logic programming based semantics, it is important to nsure that tautological (irrelevant) rules do not cause any effect rules, automatically removing inconsistencies; Going back to the property of conservation, stating that when the .taking into account the output of other recommendation modules output of the existing module is a dynamic stable model of the DLP ( P, P), then it is a stable recommendation, it could be desirable to providing a semantics with multiple recommendation sets, facili have a stronger result, namely that the semantics obey a notion of tating diversity and non-determinism in recommendations strong conservation according to which it would be the only stable enjoying a formal, well defined, semantics which supports justifi- cations commendation It turns out that the stable recommendation seman- tics does not obey such property enjoying all the other formal properties mentioned in the previous section, and many more inherited from DLP and ASP such as the Proposition 6(Strong Conservation)LetR =(M, Po, p)be a expressiveness of the language and the efficient implementation DRE Then, ME RDSM ((Po, P))+ SR(R)=MH Lack of space prevents us from comparing with other, somehow Likewise, if we could establish a distance measure between sets related, systems. An extended version of this paper will include such of recommendations, we could argue for a semantics that would only We believe, however, that our proposal encodes keep those stable recommendations that are closer to the output of important concepts that can bring an added value to existing systems the existing module, i.e., impose minimal change. If such distance measure is given by REFERENCES Definition 7(Distance between interpretations) Let A be a set of [11 J.J. Alferes, F. Banti, A Brogi, and J Leite, "The refined extension propositional atoms and M, M1, and M2 interpretations ofA.We principle for semantics of dynamic logic programming .', Smudia Logica, say that Mi is closer to M than M2, denoted by M1 CM M2 iff 79(1),(2005) [2] J.J. Alferes, J.A. Leite, L. M. Pereira, H. Przymusinska, and T. Przy MI\MUMMi)C(M2MUMM2 Dynamic updates of non-monotonic knowledge bases g,45(1-3),(2000 The stable rec semantics does not obey minimal change [3 M. Balabanovic and Y Shoham, 'Fab: content-based, collaborative Proposition 7(Minimal Change) LetR=(M, Po, p)be a DRE [4 C Baral, Knowledge Representation, Reasoning and Declarative Prob M1,M2∈BDSM((P0,P)∧M1CMM2M2FSR(R) lem Solving, Cambridge University Press, 200 [5] D. Billsus and M.J. Pazzani, 'User modeling for adaptive news access This is not necessarily a bad property as there are cases where one User Model. User-Adapt. Interact, 10(2-3). 147-180.(2000) may argue for the validity of such stable recommendations that in- 61 D. Bridge and J. P. Kelly, "Diversity-enhanced conversational collab- ative recommendations, in Procs. of the Sixteenth irish Conferenc olve non-minimal change i.. the owner/user rules introduce other n Artificial Intelligence and Cognitive Science, ed, N. Creaney, pl alternatives, even though the initial model is one of them. Lack of 29-38. University of Ulster, (2005) space prevents us from presenting examples of such. However, if de der systems: Survey and experiments sired. such stable recommendations can be eliminated and we can User Model. User-Adapt. Interact, 12(4), 331-370. (2002) define a refined semantics that obeys such properties. Formally [8] M. Gelfond and V. Lifschitz, "Logic programs with classical negation Procs. of ICLP'90. MIT Press, (1990) Definition 8 (Minimal Change stable Recommendation Sem) [9] D. Goldberg, D. Nichols, B. M Oki, and D. Terry, "Using collabora- ve filtering to weave an information tapestry, Communications of the LetR=(M, Po, p)be a DRF and MR an interpretation. MR is a ACM, 35(12), 61-70. (December 1992). Special Issue on Information minimal change stable recommendation iff MR E RDSM T(RD) and MR E RDSM(T(R)): MR CM MR. SRm(R)denotes [10 Leite, Evolving Knowledge Bases, IOS press, 2003 the set of all minimal change stable recommendation.s. [11] P Resnick, N lacovo, M. Suchak, P. Bergstorm, and J Riedl, ' Grou Regarding this new semantics, we have the following properties in Proceedings of ACM 1994 Conference on Computer Supported Co ative Work, Pp. 175-186, Chapel Hill, North Carolina, (1994) ACM Proposition8(Strong Conservation)Let R=(M, Po, P)be[12]PResnick andHRVarian,'Recommendersystems',Communications DRE Then,M∈RDSM(0,P)→SR"(R)={M} of the ACM,40(3),56-58,(1997) Proposition 9(Minimal Change) Let R=(M, Po, P) be a DRE 31 3. Ben Schafer, A Konstan, and ). Riedl, E-commerce recommenda- 1, M2 E RDSM((Po, P))AM CM M2= M2 E SR(R). [14] I Schwab, A. Kobsa, and 1. Koychev. Learning user interests through ositive examples using content analysis and collaborative filter As for the remaining properties, the minimal change stable recom November 30 2001. Intemal Memo, GMD, St. Augustin, German mendation semantics obeys conservation, positive and negative sup- [15] B. Smyth and P. Cotter, "Personalized electronic program guides for portiveness, and immunity to tautologies. As expected, it no longer digital TV,, Al Magazine, 22(2), 89-98 (2005) generalises Dynamic Logic Programming as it is well known that [16] B. Towle and C. Quinn. Knowledge based recommender systems using explicit user models, May 29 2000. Dlpacceptsnon-minimaldynamicstablemodelsthatwouldbe[17woRkinggrouponAnswer-setProgramming.http://wasp.unime.it. eliminated e.g. in the case of an empty output of the initial module
Proposition 4 (Negative Supportiveness) Let R = hM, P0, Pi be a DRF and A /∈ MR ∈ SR (R) and A ∈ M. Then, ∃r ∈ ρ ((P0, P)) : H (r) = not A, MR B (r). As with all logic programming based semantics, it is important to ensure that tautological (irrelevant) rules do not cause any effect. Proposition 5 (Immunity to Tautologies) Let R = hM, P0, Pi be a DRF, E0, ..., Es sets of tautologies, E = (E1, ..., Es) and R0 = hM, P0 ∪ E0, P ∪ Ei. Then, SR (R) = SR (R0 ). Going back to the property of conservation, stating that when the output of the existing module is a dynamic stable model of the DLP (P0, P), then it is a stable recommendation, it could be desirable to have a stronger result, namely that the semantics obey a notion of strong conservation according to which it would be the only stable recommendation. It turns out that the stable recommendation semantics does not obey such property: Proposition 6 (Strong Conservation) Let R = hM, P0, Pi be a DRF. Then, M ∈ RDSM ((P0, P)) 6⇒ SR (R) = {M}. Likewise, if we could establish a distance measure between sets of recommendations, we could argue for a semantics that would only keep those stable recommendations that are closer to the output of the existing module, i.e., impose minimal change. If such distance measure is given by: Definition 7 (Distance between interpretations) Let A be a set of propositional atoms and M, M1, and M2 interpretations of A. We say that M1 is closer to M than M2, denoted by M1 @M M2 iff (M1M ∪ MM1) ⊂ (M2M ∪ MM2) The stable rec. semantics does not obey minimal change: Proposition 7 (Minimal Change) Let R = hM, P0, Pi be a DRF. M1, M2 ∈ RDSM ((P0, P)) ∧ M1 @M M2 6⇒ M2 ∈/ SR (R). This is not necessarily a bad property as there are cases where one may argue for the validity of such stable recommendations that involve non-minimal change i.e., the owner/user rules introduce other alternatives, even though the initial model is one of them. Lack of space prevents us from presenting examples of such. However, if desired, such stable recommendations can be eliminated and we can define a refined semantics that obeys such properties. Formally: Definition 8 (Minimal Change Stable Recommendation Sem) Let R = hM, P0, Pi be a DRF and MR an interpretation. MR is a minimal change stable recommendation iff MR ∈ RDSM (Υ (R)) and @M0 R ∈ RDSM (Υ (R)) : M0 R @M MR. SRm (R) denotes the set of all minimal change stable recommendations. Regarding this new semantics, we have the following properties: Proposition 8 (Strong Conservation) Let R = hM, P0, Pi be a DRF. Then, M ∈ RDSM ((P0, P)) ⇒ SRm (R) = {M}. Proposition 9 (Minimal Change) Let R = hM, P0, Pi be a DRF. M1, M2 ∈ RDSM ((P0, P)) ∧ M1 @M M2 ⇒ M2 ∈/ SRm (R). As for the remaining properties, the minimal change stable recommendation semantics obeys conservation, positive and negative supportiveness, and immunity to tautologies. As expected, it no longer generalises Dynamic Logic Programming as it is well known that DLP accepts non-minimal dynamic stable models that would be eliminated e.g. in the case of an empty output of the initial module. 6 Discussion and Conclusions In this paper we proposed what can be seen as part of a knowledge based (or hybrid) recommender system, with several characteristics, namely: • allowing user personalisation with complex rules, improving the quality of recommendations; • allowing for interaction with user by means of updates to those rules, automatically removing inconsistencies; • taking into account the output of other recommendation modules; • allowing for customisation by the owner of the system; • providing a semantics with multiple recommendation sets, facilitating diversity and non-determinism in recommendations; • enjoying a formal, well defined, semantics which supports justifi- cations; • enjoying all the other formal properties mentioned in the previous section, and many more inherited from DLP and ASP such as the expressiveness of the language and the efficient implementations. Lack of space prevents us from comparing with other, somehow related, systems. An extended version of this paper will include such comparisons. We believe, however, that our proposal encodes some important concepts that can bring an added value to existing systems. REFERENCES [1] J. J. Alferes, F. Banti, A. Brogi, and J. Leite, ‘The refined extension principle for semantics of dynamic logic programming.’, Studia Logica, 79(1), (2005). [2] J. J. Alferes, J. A. Leite, L. M. Pereira, H. Przymusinska, and T. Przymusinski, ‘Dynamic updates of non-monotonic knowledge bases’, Journal of Logic Programming, 45(1-3), (2000). [3] M. Balabanovic and Y. Shoham, ‘Fab: content-based, collaborative rec- ´ ommendation’, Communications of the ACM, 40(3), 66–72, (1997). [4] C. Baral, Knowledge Representation, Reasoning and Declarative Problem Solving, Cambridge University Press, 2003. [5] D. Billsus and M. J. Pazzani, ‘User modeling for adaptive news access’, User Model. User-Adapt. Interact, 10(2-3), 147–180, (2000). [6] D. Bridge and J. P. Kelly, ‘Diversity-enhanced conversational collaborative recommendations’, in Procs. of the Sixteenth Irish Conference on Artificial Intelligence and Cognitive Science, ed., N. Creaney, pp. 29–38. University of Ulster, (2005). [7] R. D. Burke, ‘Hybrid recommender systems: Survey and experiments’, User Model. User-Adapt. Interact, 12(4), 331–370, (2002). [8] M. Gelfond and V. Lifschitz, ‘Logic programs with classical negation’, in Procs. of ICLP’90. MIT Press, (1990). [9] D. Goldberg, D. Nichols, B. M Oki, and D. Terry, ‘Using collaborative filtering to weave an information tapestry’, Communications of the ACM, 35(12), 61–70, (December 1992). Special Issue on Information Filtering. [10] J. Leite, Evolving Knowledge Bases, IOS press, 2003. [11] P. Resnick, N. Iacovou, M. Suchak, P. Bergstorm, and J. Riedl, ‘GroupLens: An Open Architecture for Collaborative Filtering of Netnews’, in Proceedings of ACM 1994 Conference on Computer Supported Cooperative Work, pp. 175–186, Chapel Hill, North Carolina, (1994). ACM. [12] P. Resnick and H. R. Varian, ‘Recommender systems’, Communications of the ACM, 40(3), 56–58, (1997). [13] J. Ben Schafer, J. A. Konstan, and J. Riedl, ‘E-commerce recommendation applications’, Data Min. Knowl. Discov, 5(1/2), 115–153, (2001). [14] I. Schwab, A. Kobsa, and I. Koychev. Learning user interests through positive examples using content analysis and collaborative filtering, November 30 2001. Internal Memo, GMD, St. Augustin, Germany. [15] B. Smyth and P. Cotter, ‘Personalized electronic program guides for digital TV’, AI Magazine, 22(2), 89–98, (2005). [16] B. Towle and C. Quinn. Knowledge based recommender systems using explicit user models, May 29 2000. [17] Working group on Answer-Set Programming. http://wasp.unime.it