Abstract
Preferences are ubiquitous in our everyday life. They are essential in the decision making process of individuals. Recently, they have also been employed to represent ethical principles, normative systems or guidelines. In this work we focus on a ceteris paribus semantics for deontic logic: a state of affairs where a larger set of respected prescriptions is preferable to a state of affairs where some are violated. Conditional preference networks (CP-nets) are a compact formalism to express and analyse ceteris paribus preferences, with some desirable computational properties. In this paper, we show how deontic concepts (such as contrary-to-duty obligations) can be modeled with generalized CP-nets (GCP-nets) and how to capture the distinction between strong and weak permission in this formalism. To do that, we leverage on an existing restricted deontic logic that will be mapped into conditional preference nets.
Introduction
Deontic logic allows us to model legal and ethical prescriptions such as obligations and permissions. Its computational implementation may provide a framework to govern the functioning of AI systems, assessing their behaviour in different situations and scenarios, detecting violations and ensuring compliance with ethical and legal requirements [2].
Modelling deontic notions through preferences [7, 46] has the advantage of linking deontic notions to the rich research on preferences, in multiple disciplines, such as philosophy, mathematics, economics and politics. Preferences are also central in artificial intelligence. In this area, researchers study the computational aspects of classical social choice problems, preference aggregation and preference reasoning [15, 42]. Applications of preferences can be found in many different contexts: from multi-agent and recommender systems [39, 44]–where preferences are employed to drive the making decision process of agents or to describe the profile of users–to sentiment analysis techniques [21, 22] and machine learning ensemble approaches [9, 52]–where they are adopted to improve the quality of predictions.
In his seminal paper, Makinson [34] discussed the traditional preference based deontic logics and observed that “The definition of a “betterness” relation between possible worlds suggested above, in terms of the set of explicit promulgations of the code that are violated in each world, is perfectly precise; and such a relation permits a semantic account of conditional obligation.”
As already done in literature [7, 38], we model deontic notions through ceteris-paribus preferences, namely, conditional preferences for a state of affairs over other states of affairs, all the rest being equal. Conditional or rather contextual obligations have been captured in the development of dyadic deontic logic, which captures deontic conditionality through a special conditional operator. The idea of ceteris-paribus preferences was originally introduced by the philosopher and logician Georg Henrik Von Wright [49, 50], and after that, a semantics ables to represent it was first proposed by Bengt Hansson [23]. In particular, we focus on the ceteris-paribus preference for a proposition over its complement. This idea provides the intuition at the basis of CP-nets [5], a formalism which enables representing preferences in a compact way and reasoning about them.
Their application can be effective for the multi-agent pervasive systems of artificial intelligence (AI). Indeed, AI agents are pervasive and they need to be flexible, adaptive, and creative, but at the same time, they have to comply with many ethical and legal requirements [3, 36]. Whether an AI agent is autonomous or collaborating with humans, it should be aware and follow appropriate ethical principles and should thus exhibit properties such as fairness or other virtues [4, 41]. Based on these needs, during the last decade, researchers proposes languages to model and reason with norms in multi-agent systems, enabling methodologies and organization models for checking conflicts between the norms at design time [13, 16].
By modelling a normative system of a multi-agent system through a CP-net we obtain a compact representation that shall allow us to check important properties of the modelled normative system, like for instance consistency. Moreover, preferences of agents can also be modelled through CP-nets [35]. This would enable to check agents’ preferences against the exogenous preferences expressed by various normative systems, such as laws, ethical principles, feasibility constraints, or safety regulations [29, 31]. In this regard, recently, new approaches define metric spaces over structured preferences [26, 30], providing feasible ways for preferences’ comparison. Whilst modeling deontic concepts with ceteris paribus preferences has become a standard approach (see for instance, [24, 46]), we found just one first attempt to model deontic notions with CP-nets in [17]. Unfortunately, this work did not recognise CP-nets limitations (in their original formalization). Indeed, they do not allow for the representation of incomplete preference orders over the values of one or more variables. This limitation can be removed by adopting a recent model generalization called GCP-net (aka generalized CP-net) [18]. To the best of our knowledge, no one else investigated the relationship between deontic concepts and GCP-nets. We think cooperation among researchers from deontic logic and GCP-nets can be very beneficial, and possibly lead to a new workable approach to modelling norms and reasoning about them.
We assume that norms establishing obligations can be viewed as expressing social preferences for situations in which the obligation has complied with other situations in which it is violated. Similarly, we assume that norms establishing liberties (bilateral permissions, to do and not to do) express indifference over complementary situations. In this regard, we discuss and address two topics in deontic logic, namely contrary-to-duty obligations [7] and the distinction between strong and weak permissions.
We show that a consistent GCP-net can be built that captures both an obligation and the prescriptions specifying what should be done in case the obligation is violated. The latter prescriptions may be incompatible with prescriptions on what should be done in case of compliance [8]. We illustrate contrary-to-duty obligations with a well-known example discussed in the literature. However, realistic examples of contrary-to-duty obligations can be found in various domains, such as in commercial contracts, where repair obligations can be established for delay or non-fulfilment: to inform, compensate the damage, replace defective goods, pay penalties, etc. (for a logical model see [20]). It can also be found in civil liability, where harmful behaviour is met with obligations to repair, mitigate, and pay punitive damages in case of persistence.
We also show that a GCP-net model can capture concepts of strong and weak permission, a distinction that has been long discussed in deontic logic [46, 48] and even earlier in legal theory, in connection with issues concerning the completeness of legal systems [53]. We indeed distinguish the case in which an action is positively permitted, through a permissive norm, and the case in which the action is rather unregulated, as no norm, and in particular, no prohibition addresses it [47].
A running example
In this section, we introduce a running example, concerning the presence of cats, dogs, and fences in beach houses (developing the example from [38]). The example is used throughout the paper to explicate new notions when they are introduced.
dogs are forbidden; people may have a cat or not; if there is a dog, then there must be a fence; if there is a fence, then there must be white; if there is no dog, then there must be no fence.
Though most people in her constituency like these policies, some do not. In particular, there are few dog lovers in the city, who do not share the approach to dogs prevailing in Cattown. However, Mary believes that – given the preferences of the majority and the history and peculiar spirit of Cattown – her regulation articulates a social perspective, namely, a view of the community on what it prefers and a view that can justifiably be imposed on all its citizens. If a dog lover has decided to move into Cattown, he should have known what he would find there.
An issue has recently emerged concerning bobcats. It is being debated whether, in the absence of a provision prohibiting or allowing bobcats, John is allowed to keep a bobcat in his garden. Mary thinks that he is not, he should have asked for it, while John believes that he is. Can their conflict of opinion be explained away as merely concerning a conceptual misunderstanding (on the notion of permission)?
Background
To formally express rules such as those enacted by Mary, a restricted deontic language is sufficient. In what follows, we adopt the language proposed and defined in a recent paper [28]. Let Atm be a countable set of atomic propositions and let Lit Atm = Atm ∪ {¬ p : p ∈ Atm}, be the corresponding set of literals. Under this assumption, we can identify propositional valuations (or worlds) with maximal consistent conjunctions of literals. In the following, we will use interchangeably ¬ and to specify the negation.
if p ∈ Atm, then p ∈ ℒCPDL+
if φ, ψ ∈ ℒCPDL+, then ¬φ, φ ∧ ψ ∈ ℒCPDL+
if φ, ψ ∈ ℒCPDL+, then
In particular, Ob (ψ|φ) models an obligation and
Notice that unconditional obligation and permission do not need to be added as primitives in the language of the logic as they are definable from conditional obligation and permission. We also do not need a primitive for the bilateral permission, or liberty, which consists in the permission both of a proposition and of its complement. For the sake of readability let us introduce the following definition:
Using this language and taking into account previous definitions, we can model obligations and permissions depicted in Example 1. We use the following abbreviations: d for “there is a dog”, c for “there is a cat”, f for “there is a fence”, w for “the fence is white”, b for “there is a bobcat”. We can express the norms enacted by Mary as follows (enumeration corresponds to the Example 1): (1)
Contrary-to-duty obligations
The norms in our running example include a “contrary-to-duty” obligation, namely, obligations that are triggered by the violation of another obligation. According to the norm
Strong and weak permissions
Our running example also shows the difference between strong (explicit) and weak (tacit) permissions, an issue much debated within deontic logic. On the one hand, cats are regulated: there is a norm that deals with cats (
Ceteris-Paribus Preferences
We assume a set of variables (also called features or attributes) V = {X1, …, X
n
} each one with a binary domain, i.e. the domain of each X
i
∈ V is such that
A preorder is a reflexive and transitive binary relation ⪯ over the set of all outcomes U = 2 V , which are usually denoted by o, w, …, v. In what follows, w ⪯ v means that v is at least as good/ideal as w, w ≈ v means that w is equivalent to v which is an abbreviation for w ⪯ v and v ⪯ w. Moreover, w ≺ v means that v is better/more ideal than v to be an abbreviation of w ⪯ v and vnotpreceqw. Given two possible outcomes w, v ∈ O, if neither w ⪯ v nor v ⪯ w are valid, then we say that w and v are incomparable, denoted with w ⋈ v. The notation o [V i ] returns the value of the variable V i in the outcome o, while o [- V i ] returns the value of all the variables but V i in the outcome o.
We borrow some notations from [5] in order to define ceteris paribus semantics. In our analysis of the semantics of preferences, we assume that the set of variables V is partitioned into three sets: A set X which includes the variables over whose values the preference is expressed, a set Y which includes the variables whose values are irrelevant to the preference, a set Z which includes the variables that are assumed to remain constant, i.e., that provide the context for the preference.
We use z : x1 ⪯ Y x2 (≺ Y resp.) as an abbreviation for it (we will omit the subscript when it is clear from the context).
As the preference for x1 over x2, in the context of z, is independent from the values of Y, we may say that X is preferentially independent of Y if Z =∅, otherwise we say that X is conditionally preferentially independent of Y given the assignment of Z.
Moreover, from Definition 3 we derive the following notation regarding ceteris-paribus relation between two outcomes u, v.
The previous definition introduces a notation that is useful in those situations where u and v are two complete assignments that differ only in the value for the variable X
i
, that is u = x
i
yz and
Let us refer to Example 1. Mary’s community preferences are over a set of five features, specifically V = {C, D, F, W, B}, with the following domains:
Since V has 5 elements, the set of all outcomes U = 2 V contains 32 possible outcomes. For the sake of readability, in this section, we do not consider variables W and C. Examining a reduced number of outcomes will allow for making the partial orders limited in size. Thus, considering the subset {B, D, F}, the set of outcomes is denoted by the complete assignments to the contemplated variables:
The different attitudes of the community can be represented with a set of ceteris paribus preferences. In particular, with respect to ¬dogs-assignments (i.e.,
Preference for having fences when there are dogs in the house is captured by preferences for fence-assignments over the ceteris-paribus ¬fence-assignments, taking only dog-assignments into consideration (i.e.
Instead, unawareness of bobcats can be modelled through incomparability between bobcat-assignments and ¬bobcat-assignments, which expresses unfamiliarity to the presence of bobcats, i.e. for all x1, x2 ∈ Ass (D) and for all
At last, let us include again the variable C in our analysis, so we can have cats and not have them. This can be represented through the indifference for cat-assignments over ceteris paribus ¬cat-assignments (i.e.
GCP-nets
In order to be able to represent the described scenario, we propose to leverage existing preference frameworks from AI, namely GCP-nets (generalized CP-nets) [18]. GCP-net is an extension of CP-net [5] that allows incomplete preference orders over some values of the features. GCP-nets and related extensions of the formalism [11, 18] are often on multi-valued variables, this means that variables are not strictly boolean. Nevertheless, in this work, we assume that all the variables have binary domains. We start by introducing and defining some useful notions.
We borrow the following definition from [18]:
For each variable V
i
∈ V, a CPT (V
i
) is a set of cp-statements, each one represents an ordering over the specific domain Dom (V
i
) given the assignment to the parents of V
i
, which are denoted with Pa (V
i
). For instance,
The semantics is connected with the induced preference graph over all the outcomes. A directed edge between a pair of outcomes (o i , o j ), which differ only in the value of one variable, means that o j ⪯ o i . A worsening flip is a change in the value of a variable to a less preferred value according to the cp-statement for that variable.
The semantics of a GCP-net is a preorder over all the outcomes, i.e. a reflexive and transitive binary relation over the set of complete assignment of values to the variables of the GCP-net. Thus, for any two outcomes o, u which differs only on the value of one variable X
i
∈ V we have: o ⪯ u if o [X
i
] ⪯ u [X
i
] given o [Pa (X
i
)] o ⋈ u if there is not a cp-statements for o [X
i
] , u [X
i
] given o [Pa (X
i
)]
The partial order induced by the GCP-net is denoted as Ord𝒩.
The GCP-net formalism provides a qualitative compact representation that is useful to represent scenarios similar to the one depicted by the reduced deontic logic introduced in Section 3.
Deontic Language and GCP-nets: bridging the gap
A set of obligations and liberties (bilateral permissions) expressed in the restricted language defined in Section 3 can be represented using a GCP-net, we will call it a prescriptive CP-net. Note that we do not provide for the representation of unilateral permission. In fact, we assume that unilateral permissions must be implied either by an obligation (in case the complement is forbidden) or by liberty (in case the complement is also permitted). Indeed, the restriction on obligations and liberties where antecedents are conjunctions of literals and consequent is a single literal is compatible with the syntax of generalized CP-nets.
Incomparability
In the previous section, we introduced the notion of incomparability. In the ceteris paribus semantics, the notion of incomparability does not allow to differentiate between two different states of affairs: one where two outcomes are incomparable because nothing is said about some values of a feature, and another, where two or more variables are independent and thus preferences are described over the domains of these variables no matter the assignment of the others. Both cases induce a preference graph where some outcomes are incomparable because there does not exist a path between them. But, while the former case describes a lack of information, possibly because the individual does not know or does not have any information about some features (for instance, in our example the lack of information about bobcats), the latter describes a situation where preferences are reported on all the features but not on all combinations of them (for instance, in the running example norms do not tell whether the situation in which there is not a dog and no fence–whatever the color–is better or worse than the situation where there is not a dog and there is a white fence). In this last situation, the issue is connected with the color of the fence and the lack of dependencies between the fence’s presence and the color. This seems to be simpler to fix: the individual already has preferences over values of the single features, thus the incomparability can be overcome by adding a contextual dependency over some values. For instance, forcing the choice of white color only when a fence is present and the liberty of choosing the color whenever the fence is not present.
Strong incomparability describes the relation among outcomes of different components. They are incomparable because some information is missing: specifically, preferences are not reported for all the values in the domain of some features. This lack of information can be hard to fix since it entails a lack of knowledge about the scenario.
The next definition refers to weakly connected components: a directed graph is said to be weakly connected if the undirected graph resulting from removing the orientation of the edges is connected, i.e. if any pair of vertexes w, v in the undirected graph has a path from w to v.
Weak incomparability describes a less problematic situation. In this case, preferences are reported for values in the domain, but the incomparability is due to some missing dependencies among features. We can reduce the number of incomparable outcomes by adding dependencies among features.
Modeling Deontic Language with GCP-nets
In this section, we define the GCP-net that is induced by a given set of prescriptions. We call this extension a Prescriptive CP-net.
for each atomic proposition v
i
∈ Atm corresponds a variable V
i
∈ V with for each conditional obligation each obligation
Notice that variables with empty CP-tables or partially empty CP-tables may exist. These variables will induce incomparability in the preorder.
Based on preferences described in Example 1, Fig. 1 reports the dependency graph and CP-tables of the prescriptive CP-net which represents Mary’s community preferences. The prescriptive CP-net is over the set of variables V = {B, C, D, F, W}. Notice that: (a) Variable B does not have a CP-table because the community did not express any preferences about bobcats. (b) The indifference on the values of variable C describes the liberty to have or not cats.

The GCP-net which represents Mary’s community preferences of Example 1.
The strong attitude about dogs induces strict order over the domain of the variable D, similarly, orders over the variable W depend on the strong preference for the white color. Orders over the variable F depend on whether or not there is a dog. The partial order induced by the GCP-net is reported in Fig. 2. The binary relation among outcomes is based on dependencies and preferences reported in the CP-tables of the GCP-net. For instance, outcome

The partial order induced by the GCP-net in Fig. 1: for the sake of readability, we group into the same nodes some outcomes of the preference model. Outcomes in the same node are indifferent, this is due to the indifference over the values of variable C.
Another example is
Notice that the preference graph has two components. Outcomes in the two components differ on the assignment of the variable B for which no preferences are expressed. Thus each component represents a scenario: one in which we consider the presence of bobcats, and the other in which there are no bobcats. Following Definition 6,
In this section we shall provide a ceteris paribus semantics for the deontic language provided above. In the next session, we shall show that this semantics identifies models that correspond to GCP-nets. The semantics of the deontic language is defined in terms of preference relations on worlds.
A set of ceteris-paribus conditional obligations and liberties C is consistent if it has at least one model, and inconsistent otherwise. A set of ceteris-paribus conditional obligations and liberties C entails another preference formula C′, written C ⊨ C′, if every model of C is also a model of C′. In the following definition, an outcome refers to conjunctions of propositional literals referring to each variable in V exactly once, and which are consistent. Thus, for instance, φ refers to the valuation of variable Φ. Satisfaction for formulas in the language ℒCPDL+ (Atm) is defined as follows, where u ⊨ φ means that the propositional formula φ is true at the valuation corresponding to the outcome u:
where ||ψ|| M = {w ∈ W : M, w ⊨ ψ} is the truth set of ψ relative to the preference model M.
The class of models satisfying a set of norms C is denoted with 𝒫 C . Among all the possible M ∈ 𝒫 C , rel (𝒫 C ) ⊆ 𝒫 C is the subset of models that refers only to consistent conjunctions of propositional literals in C. Then M C = (U, ⪯ C ) is the preference model such that for each M = (U, ⪯) ∈ rel (𝒫 C ) , ⪯ C ⊆ ⪯.
Given the previous definitions we now show that a set of ceteris-paribus norms in ℒCPDL+ (Atm) is expressible with a prescriptive CP-net, this means that the preorder induced by the GCP-net is a model which satisfies C.
We show how to prove (1) showing how this can be done for obligations. Let start by assuming that M
C
⊨
On the basis of the GCP-net models described above the following proposition holds.

(3a) The prescriptive CP-net induced by the duty framework of Proposition 2. (3b) The partial order induced by the prescriptive CP-net which satisfies the duty framework of Proposition 2.
Our analysis shows that a set of norms expressed in deontic logic can be translated into a corresponding GCP-net without loss of semantics, thus providing a conditional preference network giving a compact representation.
On the contrary, GCP-nets allow different scenarios to be modelled and interesting properties and information about the set of norms to be inferred. Adopting the GCP-net framework we are able to reason about:
Both of the aforementioned problems are usually far from easy. In general both dominance and consistency for CP-nets can be NP-complete [5, 18]. But when the CP-net is over a set of binary variables, and the dependency graph is a tree, the dominance testing becomes linear in the number of variables, if it is a poly-tree then dominance testing becomes polynomial in the number of variables [5]. Moreover, in many scenarios, the presence of cycles in the dependency graph means that the network is inconsistent [14]. Thus, consistency testing would allow inconsistencies (contradiction) to be determined in a set of norms while the dominance test allows for testing whether one world is better than another. There are other possible applications that can be enabled with the adoption of a GCP-net, we briefly describe them in the next paragraphs.
Preference comparison. Another application of this preference framework is in the comparison of preferences. We can think of the decision-making process as an evaluation of the resulting state-of-affairs. We choose one among all the available options because we prefer the resulting state-of-affair over the others. Thus, we can think of moral and normative judgements as a form of preferences, driven by moral or normative reasoning [43]. Finding a feasible way to model, reason, and compare these preferences are central in the field of Artificial Intelligence in order to ensure a convergence of AI agents’ behavior with humans’ values.
One possible solution is to compute the distance among preferences by exploiting the compact representation of such domains. In recent studies, preferences represented with compact representation are used in metric spaces in order to define how similar they are [26, 30]. When both the normative system and individual preferences are represented compactly, preferences comparisons might be useful to understand whether an agent is deviating from the desired behaviour–which is depicted by the legal framework. When this is the case, the system might intervene to find a trade-off which better aligns with the set of values [32].
Let us expand Example 1 in order to depict a situation in which preferences of individuals deviate from the normative system.

(4a) The GCP-net which represents Bob preferences of Example 2. (4b) The GCP-net represents preferences of the group of activists as described in Example 2.
On the other side, a group of activists in Cattown is fighting the normative system and attacking the set of obligations and permissions which should regulate the presence of dogs, cats and fences. They think that anyone–humans and animals–should move freely in the city and thus they prefer to live without fences. Moreover, many of the people in the group are dog lovers and are indifferent to cats. The preferences of this group are represented in Fig. 4b.
The previous example describes the different points of view that might exist in society: different perspectives that people might have over the same set of features, a situation which is very common in practice. Sometimes norms are closed to the preferences of people, some others are not.
We can use a metric space to measure the similarity of preferences in Mary’s community [30, 33]. This may help to understand which individual is adhering to the normative system or how to adjust the set of obligations and permissions in order to mitigate differences in society.
A definition of distance over GCP-nets does not exist yet, but existing metrics work on the induced partial orders making the comparison feasible.
These kinds of assessments may be used to study possible ways of changing a normative system in order to get closer to the preferences of individuals in the community. This should be done to reduce divergences between a group of people and the normative system. On the contrary, they can also be used to identify which part of the normative system is more infringed.
Modelling factual and deontic detachment. The proposed language allows two important principles of detachments related to the conditional nature of the modeled norms to be modelled:
The CP-net framework allows us to model factual detachment: from fact φ and conditional norm O (φ|ψ) we infer ψ. In the CP-net, factual detachment can be computed by considering the partial assignments of variables in P corresponding to φ: for each literal p or ¬p in φ the corresponding atom p in P is assigned respectively true or false. Then for each CP-table of the descendants of P, we consider only preference orders where atoms in P have the given partial assignments. The process is repeated recursively for each atom in P. Called m the number of atoms in P, if the dependency graph is acyclic, then this can be done in O (m).
On the contrary, deontic detachment cannot be captured by our preference model. Indeed, inferring
Modelling disjunctive obligations. The proposed language does not allow for deontic operators
This limitation, however, does not really affect the expressiveness of the language, since an obligation to realise at least one of two states of affairs φ and ψ can be modelled through the combination of two obligations
Let us exemplify this situation by expanding our running example.
The previous example describes a situation where mutually exclusive norms can be enforced. Using our language, the normative system can be represented with the following obligations:
Focusing only on the norms in Example 3, we can build the prescriptive CP-net represented in Fig. 5. Notice that in this case the dependency graph of the related prescriptive CP-net is not acyclic.

The prescriptive CP-net which represents the normative system described in the Example 3.
GCP-nets, and their variants, are an interesting and emerging preference frameworks that enable the representation of conditional preferences in a compact way. These frameworks are adopted in many different scenarios. For instance, in recommender systems, it is used to improve the accuracy of personalized search [51], and recently it was also employed to capture and represent how the deliberation process of a group of individuals switches to different moral frameworks in order to make a moral decision [1].
In this work, we have shown how to model contrary-to-duty obligations and permissions using GCP-nets. Using this formalism, we have also shown how to capture the distinction between strong and weak permissions. In order to do that, we adopted a restricted deontic logic representing a set of obligations and permissions. The resulting normative system induces a preference order over the possible worlds.
The adoption of these preference representations shall allow the combination of machine learning methods and standard reasoning frameworks to compare preferences from different users [33].
Footnotes
Acknowledgments
Roberta Calegari, Andrea Loreggia, and Giovanni Sartor have been supported by the H2020 ERC Project “CompuLaw” (G.A. 833647).
Authors have no Conflict of Interest (CoI) to share.
