liveBook · Manning

Causal decision theory

As explained in Causal AI

A causal decision formulation selects actions by evaluating their effects under interventions in a causal model.

Should an investor choose debt or equity? The relevant question is not which choice has historically accompanied higher returns, but what would happen if the investor made each choice. Causal decision theory selects an action by comparing expected utility under those alternative interventions. section 12.2.1 section 12.7

An action has two roles. In observed data, it is a variable with causes: economic conditions may influence an investor’s choice and the eventual outcome. Asking what happened when others chose debt is an observational query. Asking what would happen if debt were chosen is an intervention query. The first describes a pattern; the second addresses the decision. section 12.2.1

Let X be the action, Y the outcome, and U(Y) its utility. The observational rule chooses the x that maximizes E[U(Y) | X=x]. The causal rule chooses the x that maximizes E[U(Y₍X=x₎)]: expected utility after setting X to x. These quantities can differ when causes of the observed action also affect its outcome. A causal model specifies those relationships before evaluating the intervention. section 12.2.4 section 12.7

When the rankings diverge

In an investment model, the economy affects both the choice between debt and equity and the chance of success. Initially, debt ranks first under both rules, although their expected utilities differ. After one success probability changes, conditioning still favors debt ($57,000 versus $53,000), while intervention favors equity ($44,000 versus $39,000). Agreement between the rules in one model is therefore not evidence that conditioning answers the intervention question. section 12.2.4

Listing 12.5 Calculate E(U(Y)|X=x) and E(U(YX=x))
def get_expectation(marginal):     #1
    u_values = marginal.state_names["U"]    #1
    probs = marginal.values    #1
    expectation = sum([x * p for x, p in zip(u_values, probs)])   #1
    return expectation    #1

infer = VariableElimination(model)     #2
marginal_u_given_debt = infer.query( #2
    variables=['U'], evidence={'X': 'debt'})     #2
marginal_u_given_equity = infer.query( #2
    variables=['U'], evidence={'X': 'equity'})    #2
e_u_given_x_debt = get_expectation(marginal_u_given_debt)    #2
e_u_given_x_equity = get_expectation(marginal_u_given_equity)    #2
print("E(U(Y)|X=debt)=", e_u_given_x_debt)    #2
print("E(U(Y)|X=equity)=", e_u_given_x_equity)     #2

int_model_x_debt = do(model, {"X": "debt"})     #3
infer_debt = VariableElimination(int_model_x_debt)    #3
marginal_u_given_debt = infer_debt.query(variables=['U'])    #3
expectation_u_given_debt = get_expectation(marginal_u_given_debt)    #3
print("E(U(Y_{X=debt}))=", expectation_u_given_debt)     #3
int_model_x_equity = do(model, {"X": "equity"})     #3
infer_equity = VariableElimination(int_model_x_equity)     #3
marginal_u_given_equity = infer_equity.query(variables=['U'])    #3
expectation_u_given_equity = get_expectation(marginal_u_given_equity)     #3
print("E(U(Y_{X=equity}))=", expectation_u_given_equity)     #3

The Python comparison queries utility first with the action as evidence, then in models where each action is imposed by an intervention. section 12.2.4

The causal graph matters as much as the calculation. In Newcomb’s paradox, an agent’s intent affects an AI’s earlier prediction and the agent’s later choice; the prediction determines a box’s contents. A later choice cannot change that earlier prediction. Representing intent lets the agent compare interventions on choice while conditioning on what it knows about its intent, rather than treating prediction and choice as an unexplained association. section 12.2.5 section 12.2.6

The same distinction extends to sequential decisions: policies can be represented as stochastic interventions on a causal graph. Conventional and causal reinforcement-learning calculations often rank policies alike, but causal relationships can sometimes change the preferred policy. Model the causes of actions and outcomes when that difference matters. section 12.7

How Causal AI covers it

How deep it goes
Works through expected-utility comparisons and pgmpy causal models, including a parameter change that reverses the preferred investment.
Examples
Uses a debt-versus-equity investment model and an AI-prediction box problem to contrast observational and causal choices.
What it assumes
Assumes familiarity with causal DAGs and expected utility, revisiting the causal hierarchy rather than deriving it from scratch.
What you can do after
Apply it via pgmpy models to compare conditional and interventional expected utility and select an action when their rankings differ.
How it connects
Links interventions and causal DAGs to expected utility, confounding, reinforcement learning, policies, and Newcomb’s paradox.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.