---
title: Declarative Decision-Theoretic Ethical Programs
url: https://www.emergentmind.com/topics/declarative-decision-theoretic-ethical-programs-ddteps
type: topic
---

# Declarative Decision-Theoretic Ethical Programs

Declarative Decision-Theoretic Ethical Programs (DDTEPs) are declaratively specified decision-theoretic logic programs whose rules, probabilities, and utilities encode ethical norms and assessments of consequences; they were introduced as a way to formalize professional codes of ethics and to render machine ethical reasoning, decision-making, and learning more transparent and accountable [1711.06035]. In the subsequent literature, the term also denotes a broader architectural pattern in which ethical knowledge and context are represented declaratively, uncertainty is modeled probabilistically, and actions are selected or constrained through expected-utility or related optimization procedures, often with explicit causal and explanatory structure [2502.21250].

## 1. Historical emergence and motivating problem

DDTEPs emerged from work on the ethics of algorithms, value alignment, and the opacity of “black box” machine learning systems. The original proposal argued that, rather than learning ethics entirely from data, AI systems should begin from the way humans already formalize values in professional codes of ethics, especially in gatekeeping domains such as archives and libraries [1711.06035]. In that account, a code of ethics is not merely advisory prose; it is a public, explicit formalization of what a profession considers good practice, and thus a candidate substrate for machine ethical reasoning.

The core motivation is twofold. First, complex ethical domains contain rich, structured knowledge that is difficult to capture in narrow function approximators. Second, opaque systems make ethical reasoning inscrutable, which impedes accountability, critique, and revision. DDTEPs were therefore proposed as “adaptive white boxes”: explicit ethical bias is specified up front, while selected probabilistic parameters or other components may still be learned from data [1711.06035].

This framing aligns with later work that treats ethical reasoning as a meta-level computational problem rather than a single fixed moral theory. In that line, declarative representations of context and norms are combined with probabilistic reasoning and decision-theoretic optimization, and then constrained by higher-level properties such as consistency, robustness, convergence, and alignment with human ethical judgments [2502.21250]. A common misconception is that DDTEPs denote one specific language or one fixed ethical doctrine. The literature instead presents them as a family of executable ethical specifications sharing a declarative interface and a decision-theoretic semantics.

## 2. Core formal architecture

In the original instantiation, DDTEPs are written in DT-ProbLog, a relational probabilistic programming language extended with decision-theoretic constructs. A DDTEP contains action choices, probabilistic dependencies, logical background knowledge, and utility annotations [1711.06035]. Probabilistic rules have the form
\[
p :: a :- b_1, \ldots, b_n
\]
decision choices are written as
```prolog
?::choice1; ?::choice2; ...; ?::choice_n.
```
and utilities are attached through
```prolog
utility(e, r).
```
The induced semantics is a distribution over possible worlds \(\omega\), each with total utility \(U(\omega)\); for a decision strategy \(d\),
\[
EU(d)=\sum_{\omega} P(\omega \mid d)\,U(\omega),
\qquad
d^*=\arg\max_d EU(d).
\]

A more general reconstruction treats DDTEPs as programs over three declarative vocabularies: circumstantial dicta \(C\), ethical prescripts \(E\), and actions \(A\). The probabilistic layer specifies \(P(C)\) and \(P(E\mid C)\), while the decision-theoretic layer specifies utilities \(u(a\mid c_i,e_j)\) and expected utility
\[
U(a \mid C,E)=\sum_{i=1}^n\sum_{j=1}^m P(c_i)\cdot P(e_j\mid c_i)\cdot u(a\mid c_i,e_j),
\]
with action selection
\[
a^*=\arg\max_{a\in A} U(a\mid C,E).
\]
The same framework also supports multi-objective aggregation,
\[
U(a \mid C,E)=\sum_{j=1}^{m}\alpha_j\cdot U_j(a\mid C,e_j),
\]
where the weights \(\alpha_j\) encode prioritization of ethical principles and may themselves be context-sensitive [2502.21250].

To support reuse across scenarios, the literature introduces scenario matrices \(M=[m_{ij}]\) with entries
\[
m_{ij}=w(e_i,c_j)\cdot P(e_i\mid c_j),
\]
together with normalization and a normalized collection \(\mathcal{N}=\{M_1,\dots,M_k\}\). New scenarios can be compared by distances such as
\[
d(M_x,M_y)=\sum_{i=1}^{m}\sum_{j=1}^{n}|m_{ij}^{(x)}-m_{ij}^{(y)}|,
\]
then assigned to similar clusters for retrieval and adaptation of ethical weights [2502.21250]. This suggests a modular view in which a DDTEP is not just a one-shot decision rule but a library of reusable ethical profiles.

## 3. Declarative, causal, and learning substrates

Although DT-ProbLog provided the initial implementation vehicle, the literature does not restrict DDTEPs to a single logic. Later syntheses explicitly note that intermediate representations can be instantiated in propositional logic, first-order logic, action and temporal logics, situation calculus, dynamic logics, or multi-agent and BDI logics depending on the domain [2502.21250]. This pluralism is important: DDTEPs are defined less by syntax than by the conjunction of declarative representation, uncertainty handling, and decision-theoretic execution.

Logic Programming, especially Answer Set Programming (ASP), supplies a closely related substrate. Under stable-model semantics, ASP rules take the form
\[
H \leftarrow A_1,\ldots,A_m,\; not\ A_{m+1},\ldots, not\ A_n,
\]
with facts, constraints, defaults, and non-monotonic defeat by stronger norms or exceptions [2009.11186]. Ethical reasoning is encoded through domain facts, causal relations, norms, duties, prohibitions, permissions, and constraints. Because derivations are symbolic, the same rules that implement a decision can also support explanation.

Inductive Logic Programming extends this substrate by learning new ethical rules from cases. With background knowledge \(B\), positive examples \(E^+\), and negative examples \(E^-\), ILP seeks a hypothesis \(H\) such that
\[
B\cup H\models E^+ \quad \text{and} \quad B\cup H\not\models E^-.
\]
This permits a DDTEP to begin with hand-specified rules and then refine them incrementally, as in architectures that combine ASP with ILED for ethical evaluation in online customer service chatbots [2009.11186].

A deeper causal lineage is provided by the qualitative decision theory of conditional oughts. There, an epistemic state is
\[
ES=\big(\kappa(w),\,\mathcal{T},\,\mu(w)\big),
\]
where \(\kappa(w)\) is a Spohn ranking, \(\mathcal{T}\) is a causal network, and \(\mu(w)\) is an integer-valued utility ranking. Conditional oughts are not primitive modal atoms but derived comparisons:
\[
O(A \mid C)\ \text{is assertable iff}\ u(A;\kappa_A(w\mid C)) > u(\text{true};\kappa(w\mid C)).
\]
This supplies a direct conceptual basis for DDTEPs in which “ought” emerges from beliefs, causal intervention, and expected utility rather than from a purely axiomatic deontic operator [1303.1455].

## 4. Normative semantics and major variants

DDTEPs are often presented as meta-ethical rather than theory-specific. The framework over circumstantial dicta and ethical prescripts can encode consequentialist reasoning through outcome utilities, deontological or priority rules through prescript weights and constraints, pluralist or prima facie duty systems through multi-objective optimization, and contextual or cultural norms through context-sensitive \(P(e_j\mid c_i)\) and \(w(e_i,c_j)\) [2502.21250]. A common misconception is therefore that DDTEPs are intrinsically utilitarian. The literature instead shows multiple ways of combining scalar evaluation, priority rules, and hard constraints.

One prominent variant formalizes ethical doctrines directly in a sorted first-order modal logic. In the deontic cognitive event calculus, ethical constraints can be stated over actions, intentions, fluents, and utilities \(\mu : \Fluent \times \Moment \to \mathbb{R}\). The Doctrine of Double Effect is encoded through conditions requiring that an action is not forbidden, has net utility above a threshold \(\gamma\), intends only good effects, does not intend bad effects, and does not use bad effects as means to good effects [1703.08922]. This produces a DDTEP-like ethical layer that can either synthesize DDE-compliant systems from scratch or verify an existing planner, Bayesian network, deep neural network, or POMDP-derived model, provided the system exposes intentions, prohibitions, effects, and utilities.

Another variant integrates deontic logic with RL verification and repair. Expected Act Utilitarian deontic logic introduces strategic modalities such as \(\mathsf{O}_E^{s}(\alpha, A, \pi)\), grounded in Bellman-style action quality
\[
Q(K)=\sum_{m' \in M'_K}\Proba(m'\mid m)\,\max_{K' \in \Choice{\alpha}{m'}} Q(K').
\]
An obligation \(\mathsf{O}_E[\alpha\, cstit : A]\) holds when all optimal actions guarantee \(A\), and a strategic obligation holds when all optimal policies \(\pi\) guarantee \(A\). Model checking then proceeds by computing an optimal policy via value iteration, restricting the MDP to its induced Markov chain, and checking the relevant PCTL formula; policy-repair algorithms modify the reference policy to meet the obligation while preserving reward as far as possible [2408.00147].

A further extension replaces average morality with tail-risk control. Expected Moral Shortfall defines a scalar ethical judgement \(EJ(a)\) from weighted consequentialist, deontological, and virtue-ethical components, and then minimizes the CVaR-like functional
\[
EMS = \min_{\tau}\left[ \tau + \frac{1}{1-\theta}\cdot\frac{1}{n}\sum_{i=1}^n \max(\tau - EJ(a_i), 0) \right].
\]
The combined learning objective is
\[
\mathcal{L}(\theta)=\mathbb{L}_{BCE}(X;\theta)+\lambda\cdot \mathbb{L}_{EMS}(X),
\]
which treats moral shortfall as a coherent risk term rather than a mere average penalty [2602.13268]. This suggests a DDTEP design in which ethical performance is governed by explicit risk aversion parameters \(\theta\) and \(\lambda\), not only by expected utility.

Argumentation-based work on hypothetical retrospection supplies yet another semantics. An ethical decision problem is represented as \(\langle A,B,S,U,F,I,m\rangle\), with actions, branches, Boolean state variables, utility classes, forbidden states, an initial assignment, and a mapping from actions to branches. Branches attack each other through consequentialist and deontological critical questions, and action choice is based on probabilistic acceptability,
\[
acceptability[a]=1-\sum_{b\in m(a)\ \text{s.t.}\ b\ \text{attacked}} \Pr(b).
\]
This is not standard expected-utility maximization, but it remains decision-theoretic in that probabilities, utilities, and rule-based normative attacks jointly determine the outcome [2305.01424].

## 5. Applications and canonical examples

DDTEPs were introduced through proof-of-concept dilemmas and gatekeeping domains. In the self-driving-car example, the action choices are `run_into_wall` or `carmageddon`; utilities penalize killing pedestrians, babies, or the passenger, all on a single utility scale. In the encoded scenario, `run_into_wall` yields utility \(-30\), while `carmageddon` yields \(-50\), so sacrificing the passenger is the optimal decision [1711.06035]. The same paper formalizes the cake-or-death problem and the burning-room dilemma, both of which illustrate information gathering as ethically relevant action: asking before acting is optimal because it improves expected utility under uncertainty.

The archival case study shows how a professional code of ethics can be rendered as a DDTEP over researchers, topics, authority, reach, and impact. Topics such as `area51` and `stamps` receive utilities 100 and 1, respectively; probabilistic rules connect `authority`, `reach`, and `help` to publication impact; and the decision variable `give(P,T)` assigns materials to people. The initial optimal policy gives `area51` to Carol and `stamps` to Ann with value \(92.91\), whereas parameter learning from evidence updates the probabilities and changes the optimal policy to giving `area51` to Dan and `stamps` to Ann with value 101 [1711.06035].

Later work generalizes the same pattern to autonomous vehicles using circumstantial dicta such as number of pedestrians on routes A and B, whether individuals are children or adults, whether they hold socially important roles, and whether a route is default or requires intervention. Ethical prescripts include minimizing human casualties, minimizing physical damage, and minimizing external interference. Decision making proceeds by mapping sensory inputs to a context \(C\), computing \(P(E\mid C)\), evaluating \(u(a\mid c,e)\), and selecting \(a^*\) [2502.21250].

Applied machine-learning case studies use DDTEP-like components in admissions and loan approval. One dataset contains 770 graduate admissions applicants; another contains approximately 32,582 loan applications. In both domains, moral features are engineered, ethical judgements \(EJ\) are computed, and EMS is used either to derive moralized labels or to regularize a DNN. Reported comparisons show that EMS can trade off task performance and moral competence more smoothly than post-hoc overriding, while large \(\theta\) values make EMS resemble hard moral constraints [2602.13268].

Other application domains include online customer service chatbots, where ASP encodes principles such as honesty, empathy, and confidentiality and ILP learns intermediate unethical-response rules from examples, and autonomous library systems, where hypothetical retrospection compares recommendation versus non-recommendation under utility classes and forbidden states such as data-protection violation [2009.11186]. RL-oriented work further demonstrates verification on DAC-MDPs with 50,000 states, 15 actions per state, and approximately 3M transitions, as well as policy repair in windy-drone and 12×12 gridworld environments [2408.00147].

## 6. Limitations, controversies, and open problems

The literature is explicit that most DDTEP work provides specifications, proof-of-concept encodings, or high-level designs rather than fully general deployed systems. A first unresolved issue is quantification: how to set or learn \(P(E\mid C)\), \(w(e_i,c_j)\), \(\alpha_j\), utility scales, or risk thresholds from data and stakeholder input, and how to do so without obscuring interpretability [2502.21250]. Related work on logic programming emphasizes the same tension: a decision-theoretic layer must be added carefully so as not to obscure the transparency of symbolic rules [2009.11186].

A second issue concerns normative pluralism and bias. EMS explicitly parameterizes philosophical mixtures through \(W(Ph)=\langle \alpha,\beta,\gamma\rangle\), but the choice of these weights, threshold baselines \(\tau_d\), and mappings from domain features to moral quantities is manual and value-laden [2602.13268]. This suggests that DDTEPs should treat such quantities as explicit parameters open to ethical review rather than hidden constants. A plausible implication is that multi-stakeholder or multi-objective DDTEPs will be necessary when one community’s code or ranking does not transfer across cultures or institutional settings.

A third issue is expressivity versus tractability. Rich logical substrates such as DCEC support intentions, beliefs, means-end reasoning, and doctrine-level verification, but they also raise decidability and efficiency challenges [1703.08922]. Strategic deontic verification over DAC-MDPs is feasible in reported experiments, yet broader classes of PCTL obligations and multi-agent settings remain future work [2408.00147]. The same concern appears in the original DDTEP proposal, which points to alternative formalisms such as Markov logic, relational decision networks, and (PO)MDPs, but does not resolve their trade-offs in expressivity, scalability, and tractability [1711.06035].

Finally, several open research directions recur across the literature: explainability beyond proof traces, formal multi-agent models with joint strategies and social norms, direct integration of structural causal models into expected-utility computation, structure learning of new ethical rules, and formal verification of ethical-logical consistency [2502.21250]. Taken together, these works present DDTEPs not as a closed formalism but as an evolving research program: ethical knowledge is represented declaratively, beliefs and outcomes are evaluated under uncertainty, actions are selected or repaired through decision-theoretic criteria, and the resulting system remains inspectable enough to function as a machine-readable code of ethics [1711.06035].

Source: https://www.emergentmind.com/topics/declarative-decision-theoretic-ethical-programs-ddteps