Price of a symbolic rule set.
ProvedNeuroSymbolicRLHF.constrainedFreeEnergy_ge_subaether-catalogspeculative
Price of a symbolic rule set. Imposing the constraint S costs at most
oscil r - β log ref(S): the reward spread plus a β-weighted penalty for the
probability mass pruned by the symbolic rules. With S = univ the bound is
oscil r, and it degrades logarithmically as the rules prune more mass.
theorem NeuroSymbolicRLHF.constrainedFreeEnergy_ge_sub{β : ℝ} (hβ : 0 < β) [Nonempty ι] {ref r : ι → ℝ}
{S : Finset ι} (href : IsPosProb ref) (hS : S.Nonempty) :
freeEnergy β ref r - constrainedFreeEnergy β ref r S
≤ oscil r - β * Real.log (∑ i ∈ S, ref i) := by sorry
Formalization Note Transplanted verbatim from the Aether Catalog source Speculative/AutoResearch/RLHFSymbolicConstraintLattice.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.
Preamble
-- Thm stub generated from Speculative/AutoResearch/RLHFSymbolicConstraintLattice.lean
import Mathlib
import Definitions.Def_Speculative_AutoResearch_NeuroSymbolicRLHFObjective
import Definitions.Def_Speculative_AutoResearch_RLHFHilbertIsometry
import Definitions.Def_Speculative_AutoResearch_RLHFSymbolicConstraintLattice
/-
# Symbolic constraints as a submodular lattice over the RLHF free energy
Third file of the neurosymbolic RLHF thread (see
`Speculative/AutoResearch/NeuroSymbolicRLHFObjective.lean`,
`MachineLearning/RLHFHilbertIsometry.lean` and
`MachineLearning/RLHFFreeEnergyDuality.lean`).
The *neurosymbolic* part of "neurosymbolic RLHF" is a hard symbolic filter: a
logical rule set restricts the admissible responses to a subset `S` of the
output space. This file studies the induced *constrained free energy*
`F_S(β, r) = β log ∑_{i ∈ S} ref i · exp(r i / β)`,
which we prove is exactly the optimal value of the InstructGPT objective over
policies supported in `S`. The results bridge information theory with the
combinatorics of the Boolean lattice of constraint sets:
* **Level 0 — variational principle on a constraint set**
(`rlhfObj_le_constrainedFreeEnergy`, `rlhfObj_constrainedGibbs`):
`F_S` is attained, exactly, by the `S`-conditioned Gibbs policy.
* **Level 1 — commutation** (`constrainedGibbs_eq_conditional`): aligning and
then applying the symbolic filter gives the same policy as applying the
filter and then aligning. Symbolic filtering and RLHF commute.
* **Level 2 — lattice structure**: `S ↦ F_S(β, r)` is *monotone*
(`constrainedFreeEnergy_mono`) and *submodular*
(`constrainedFreeEnergy_submodular`) on the Boolean lattice of constraint
sets. Submodularity is the diminishing-returns law of symbolic constraints:
relaxing a rule helps least when other rules are already relaxed.
* **Level 3 — price of symbolic alignment**
(`constrainedFreeEnergy_ge_sub`): the value lost by imposing the rule set `S`
is at most `oscil r - β log ref(S)`, i.e. reward spread plus a
`β`-weighted log-mass penalty for the pruned probability.
No `sorry`, no `native_decide`.
-/
open Finset Real BigOperators
noncomputable section
open NeuroSymbolicRLHF
variable {ι : Type*} [Fintype ι] [DecidableEq ι]
/-! ## Constrained partition function and free energy -/
/-! ## Level 0: the constrained variational principle -/
/-! ## Level 1: symbolic filtering commutes with alignment -/
/-! ## Level 2: monotonicity and submodularity over the constraint lattice -/
/-! ## Level 3: the price of symbolic alignment -/
omit [DecidableEq ι] inFormal statement
theorem NeuroSymbolicRLHF.constrainedFreeEnergy_ge_sub{β : ℝ} (hβ : 0 < β) [Nonempty ι] {ref r : ι → ℝ}
{S : Finset ι} (href : IsPosProb ref) (hS : S.Nonempty) :
freeEnergy β ref r - constrainedFreeEnergy β ref r S
≤ oscil r - β * Real.log (∑ i ∈ S, ref i) := by sorrySource