Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3: a (approximate) causal model identifies optimal (regret-bounded) policies

Proved
RobustAgentsCausal.causal_model_identifies_policies

by Xeroth · Nov 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

bayesian-networkscausal-inferencedomain-adaptationidentifiabilityinfluence-diagrams

Let the chance variables take ki≥1k_i\ge1ki​≥1 values, let the decision set be finite and nonempty, and fix the decision parents PaD\mathrm{Pa}_DPaD​. There is a procedure FFF that maps a causal Bayesian network M=(P,G)M=(P,G)M=(P,G) over the chance variables, a utility U(d,c)U(d,\bm c)U(d,c) (so PaU⊆C∪{D}\mathrm{Pa}_U\subseteq\bm C\cup\{D\}PaU​⊆C∪{D}) and a soft intervention σ\sigmaσ to a policy, with the following properties.

  1. If σ\sigmaσ is a soft intervention compatible with GGG, then F(M,U,σ)F(M,U,\sigma)F(M,U,σ) is an optimal policy πσ∗(d∣paD)\pi^*_\sigma(d\mid\mathrm{pa}_D)πσ∗​(d∣paD​) in M(σ)M(\sigma)M(σ).
  2. For every such MMM, UUU and σ\sigmaσ there are constants CCC and ϵ0>0\epsilon_0>0ϵ0​>0 such that the following holds for every 0≤ϵ≤ϵ00\le\epsilon\le\epsilon_00≤ϵ≤ϵ0​. If M′=(P′,G′)M'=(P',G')M′=(P′,G′) is any causal Bayesian network with ∣P′(vi∣pai)−P(vi∣pai)∣≤ϵ|P'(v_i\mid\mathrm{pa}_i)-P(v_i\mid\mathrm{pa}_i)|\le\epsilon∣P′(vi​∣pai​)−P(vi​∣pai​)∣≤ϵ for all iii and all states, then the policy F(M′,U,σ)F(M',U,\sigma)F(M′,U,σ) has regret at most CϵC\epsilonCϵ in M(σ)M(\sigma)M(σ).

Together with Theorem 2, this says that an approximate causal model is necessary and sufficient for regret-bounded policies under local interventions.

Formalization Note "ϵ≪1\epsilon\ll1ϵ≪1" and "regret grows linearly in ϵ\epsilonϵ" are read as a bound CϵC\epsilonCϵ for ϵ\epsilonϵ in some interval [0,ϵ0][0,\epsilon_0][0,ϵ0​], with CCC and ϵ0\epsilon_0ϵ0​ depending on MMM, UUU and σ\sigmaσ. The policies have input PaD\mathrm{Pa}_DPaD​. Conditional distributions of MMM and M′M'M′ are compared at every joint state of the chance variables.

Preamble
import Mathlib
import Definitions.Def_RobustAgentsCausal_Basic

open MeasureTheory
Formal statement
namespace RobustAgentsCausal

theorem causal_model_identifies_policies {ι : Type*} [Fintype ι] [DecidableEq ι] (k : ι → ℕ)
    (hk : ∀ i, 0 < k i) {A : Type*} [Fintype A] [DecidableEq A] [Nonempty A]
    (paD : Finset ι) :
    ∃ F : (ι → Finset ι) → ((i : ι) → Cfg k → Fin (k i) → ℝ) → (A → Cfg k → ℝ) → SoftInt k →
        Cfg k → A → ℝ,
      (∀ (pa : ι → Finset ι) (P : (i : ι) → Cfg k → Fin (k i) → ℝ), IsAcyclic pa → IsCPD pa P →
        ∀ (u : A → Cfg k → ℝ) (σ : SoftInt k), σ.IsCompatible pa →
          IsOptimal paD (softJoint P σ) u (F pa P u σ)) ∧
      (∀ (pa : ι → Finset ι) (P : (i : ι) → Cfg k → Fin (k i) → ℝ), IsAcyclic pa → IsCPD pa P →
        ∀ (u : A → Cfg k → ℝ) (σ : SoftInt k), σ.IsCompatible pa →
          ∃ C ε₀ : ℝ, 0 < ε₀ ∧ ∀ ε : ℝ, 0 ≤ ε → ε ≤ ε₀ →
            ∀ (pa' : ι → Finset ι) (P' : (i : ι) → Cfg k → Fin (k i) → ℝ),
              IsAcyclic pa' → IsCPD pa' P' → (∀ i c v, |P' i c v - P i c v| ≤ ε) →
                IsDeltaOptimal (C * ε) paD (softJoint P σ) u (F pa' P' u σ)) := by sorry

end RobustAgentsCausal
Source
Richens and Everitt, Robust agents learn causal world models, ICLR 2024, arXiv:2402.10877v7, Section 3.1, Theorem 3, p. 6; proof in Appendix E, p. 29
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. Fix the following data:

  • a finite index set ι\iotaι of chance variables CiC_iCi​;
  • for each i∈ιi \in \iotai∈ι, a number of states ki∈Nk_i \in \mathbb{N}ki​∈N, with the hypothesis ki>0k_i > 0ki​>0 for every iii, so variable CiC_iCi​ takes values in {0,…,ki−1}\{0,\dots,k_i-1\}{0,…,ki​−1};
  • a finite, nonempty set AAA of decisions;
  • an arbitrary subset PaD⊆ι\mathrm{Pa}_D \subseteq \iotaPaD​⊆ι, the decision's inputs.

A joint state ccc assigns to every iii a value ci∈{0,…,ki−1}c_i \in \{0,\dots,k_i-1\}ci​∈{0,…,ki​−1}. Since every ki≥1k_i \ge 1ki​≥1, there is at least one joint state. If ι=∅\iota = \emptysetι=∅, there is exactly one.

Terms used in the statement.

  • A graph is a choice of parent set pai⊆ι\mathrm{pa}_i \subseteq \iotapai​⊆ι for each iii. It is acyclic if no iii reaches itself by a nonempty chain i=a0→a1→⋯→am=ii = a_0 \to a_1 \to \dots \to a_m = ii=a0​→a1​→⋯→am​=i with at∈paat+1a_{t} \in \mathrm{pa}_{a_{t+1}}at​∈paat+1​​. This also excludes i∈paii \in \mathrm{pa}_ii∈pai​.

  • A family PPP is a CPD family for pa\mathrm{pa}pa if, for each iii, Pi(c)(v)P_i(c)(v)Pi​(c)(v) is a real number defined for every joint state ccc and value vvv of CiC_iCi​, and:

    • Pi(c)(v)≥0P_i(c)(v) \ge 0Pi​(c)(v)≥0;
    • ∑vPi(c)(v)=1\sum_v P_i(c)(v) = 1∑v​Pi​(c)(v)=1 for every ccc;
    • Pi(c)P_i(c)Pi​(c) depends on ccc only through the coordinates cjc_jcj​, j∈paij \in \mathrm{pa}_ij∈pai​.
  • A soft intervention σ\sigmaσ consists of three pieces of data:

    • a set T⊆ιT \subseteq \iotaT⊆ι;
    • new parent sets pai∗\mathrm{pa}^*_ipai∗​;
    • new real-valued families Pi∗(c)(v)P^*_i(c)(v)Pi∗​(c)(v).
  • σ\sigmaσ is compatible with pa\mathrm{pa}pa if both of the following hold:

    • for each i∈Ti \in Ti∈T, Pi∗P^*_iPi∗​ is nonnegative, sums to 111 over vvv, and depends only on c∣pai∗c|_{\mathrm{pa}^*_i}c∣pai∗​​;
    • the modified graph is acyclic, where the modified graph uses pai∗\mathrm{pa}^*_ipai∗​ for i∈Ti \in Ti∈T and pai\mathrm{pa}_ipai​ for i∉Ti \notin Ti∈/T.

    Nothing is required of pai∗\mathrm{pa}^*_ipai∗​ or Pi∗P^*_iPi∗​ for i∉Ti \notin Ti∈/T.

  • The intervened joint is

Pσ(c)  =  ∏i∈ι{Pi∗(c)(ci)i∈T,Pi(c)(ci)i∉T.P_\sigma(c) \;=\; \prod_{i \in \iota} \begin{cases} P^*_i(c)(c_i) & i \in T,\\ P_i(c)(c_i) & i \notin T.\end{cases}Pσ​(c)=i∈ι∏​{Pi∗​(c)(ci​)Pi​(c)(ci​)​i∈T,i∈/T.​
  • A utility uuu is an arbitrary real function u(d,c)u(d, c)u(d,c) of a decision and a joint state. It is not restricted to depend on any particular subset of variables.

  • A policy with input PaD\mathrm{Pa}_DPaD​ is a function π(c,d)\pi(c, d)π(c,d) such that:

    • π(c,d)≥0\pi(c,d) \ge 0π(c,d)≥0;
    • ∑d∈Aπ(c,d)=1\sum_{d \in A} \pi(c,d) = 1∑d∈A​π(c,d)=1 for every ccc;
    • π(c,⋅)\pi(c,\cdot)π(c,⋅) depends on ccc only through c∣PaDc|_{\mathrm{Pa}_D}c∣PaD​​.

    If PaD=∅\mathrm{Pa}_D = \emptysetPaD​=∅, policies are constant in ccc.

  • For a real function μ\muμ on joint states, the expected utility is

Eμ[π]=∑cμ(c)∑d∈Aπ(c,d) u(d,c).E_\mu[\pi] = \sum_c \mu(c) \sum_{d \in A} \pi(c,d)\, u(d,c).Eμ​[π]=c∑​μ(c)d∈A∑​π(c,d)u(d,c).
  • π\piπ is δ\deltaδ-optimal for (μ,u)(\mu, u)(μ,u) if π\piπ is a policy with input PaD\mathrm{Pa}_DPaD​ and Eμ[π′]≤Eμ[π]+δE_\mu[\pi'] \le E_\mu[\pi] + \deltaEμ​[π′]≤Eμ​[π]+δ for every policy π′\pi'π′ with input PaD\mathrm{Pa}_DPaD​. Optimal means 000-optimal.

Assertion. There exists a single map FFF with the following signature:

  • inputs: a graph pa\mathrm{pa}pa, a family PPP, a utility uuu, and a soft intervention σ\sigmaσ, with no conditions imposed on these inputs by the type of FFF;
  • output: a function F(pa,P,u,σ)(c,d)F(\mathrm{pa},P,u,\sigma)(c,d)F(pa,P,u,σ)(c,d) of joint states and decisions.

This FFF satisfies both of the following properties.

  1. Exactness. Take any acyclic pa\mathrm{pa}pa, any CPD family PPP for pa\mathrm{pa}pa, any utility uuu, and any soft intervention σ\sigmaσ compatible with pa\mathrm{pa}pa. Then F(pa,P,u,σ)F(\mathrm{pa},P,u,\sigma)F(pa,P,u,σ) is an optimal policy with input PaD\mathrm{Pa}_DPaD​ for (Pσ,u)(P_\sigma, u)(Pσ​,u).

  2. Stability. Take any acyclic pa\mathrm{pa}pa, CPD family PPP for pa\mathrm{pa}pa, utility uuu, and σ\sigmaσ compatible with pa\mathrm{pa}pa. There exist reals CCC and ε0>0\varepsilon_0 > 0ε0​>0 with the following property. CCC has no sign restriction, and both CCC and ε0\varepsilon_0ε0​ may depend on pa,P,u,σ\mathrm{pa}, P, u, \sigmapa,P,u,σ. The property is: for every ε\varepsilonε with 0≤ε≤ε00 \le \varepsilon \le \varepsilon_00≤ε≤ε0​, every acyclic graph pa′\mathrm{pa}'pa′, and every CPD family P′P'P′ for pa′\mathrm{pa}'pa′ satisfying

∣Pi′(c)(v)−Pi(c)(v)∣≤εfor all i, all joint states c, all values v,|P'_i(c)(v) - P_i(c)(v)| \le \varepsilon \quad \text{for all } i,\ \text{all joint states } c,\ \text{all values } v,∣Pi′​(c)(v)−Pi​(c)(v)∣≤εfor all i, all joint states c, all values v,

the output F(pa′,P′,u,σ)F(\mathrm{pa}',P',u,\sigma)F(pa′,P′,u,σ) is a (Cε)(C\varepsilon)(Cε)-optimal policy with input PaD\mathrm{Pa}_DPaD​ for (Pσ,u)(P_\sigma, u)(Pσ​,u).

Notes on the stability clause.

  • Regret is measured against the unperturbed intervened joint PσP_\sigmaPσ​, which is built from PPP, not P′P'P′.
  • The same σ\sigmaσ and the same true utility uuu are passed to FFF.
  • σ\sigmaσ is not required to be compatible with pa′\mathrm{pa}'pa′.
  • pa′\mathrm{pa}'pa′ may differ arbitrarily from pa\mathrm{pa}pa.
  • The case ε=0\varepsilon = 0ε=0 is included. Then P′=PP' = PP′=P, but pa′\mathrm{pa}'pa′ may be any other acyclic graph for which PPP is also a CPD family, and the output must have regret at most C⋅0=0C \cdot 0 = 0C⋅0=0.

Scope of the statement.

  • FFF is only asserted to exist. It may depend on its inputs in any way.
  • No policy oracle, data, or other access mechanism appears in the statement.
Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 23, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me