You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Phase 2 of the EP framework review (umbrella: PyAutoMind/research/graphical_ep/ep_framework_review.md; Phase 1 audit: #1332). Package-level documentation stating the exact Bayesian machinery autofit/graphical implements, in formal equations, written so an AI agent (or human) can verify code against the stated math line-by-line.
Autonomy: launched --auto, effective level supervised (docs cap). Plan below per the contract; the run proceeds through implementation and parks at ship sign-off with a batched question. No Heart YELLOW acknowledgement was given at launch.
Plan
autofit/graphical/README.md (new): the formal specification — factor-graph model, mean-field approximating family, the EP step (cavity → tilted → moment-matching KL projection → damped division as natural-parameter EMA), evidence decomposition, convergence criteria, exact conjugate updates, deterministic-variable mechanisms — each equation anchored to the implementing class/method (EPMeanField.factor_approximation, MeanField.update_factor_mean_field, AbstractMessage.project, …). Public and self-contained (no personal-repo references).
Targeted docstring upgrades at the load-bearing statistical points:
MeanField.update_factor_mean_field — the damped-update equation, delta semantics (scalar / per-factor / per-variable MeanField), and the invalid-projection fallback.
TransformedMessage._transform / _inverse_transform + composed_transform.py module docstring — the asymmetric reversal convention and a worked UniformPrior example (folds in bug/priors/11, per its Phase 0 verdict).
Verification: full test_autofit/graphical/ + test_autofit/messages/ suites (docstring-only changes must not alter behaviour); README proofread against source anchors.
Detailed implementation plan
Affected Repositories
PyAutoFit (only) — docs/docstrings; no behaviour changes.
Overview
Phase 2 of the EP framework review (umbrella:
PyAutoMind/research/graphical_ep/ep_framework_review.md; Phase 1 audit: #1332). Package-level documentation stating the exact Bayesian machineryautofit/graphicalimplements, in formal equations, written so an AI agent (or human) can verify code against the stated math line-by-line.Autonomy: launched
--auto, effective levelsupervised(docs cap). Plan below per the contract; the run proceeds through implementation and parks at ship sign-off with a batched question. No Heart YELLOW acknowledgement was given at launch.Plan
autofit/graphical/README.md(new): the formal specification — factor-graph model, mean-field approximating family, the EP step (cavity → tilted → moment-matching KL projection → damped division as natural-parameter EMA), evidence decomposition, convergence criteria, exact conjugate updates, deterministic-variable mechanisms — each equation anchored to the implementing class/method (EPMeanField.factor_approximation,MeanField.update_factor_mean_field,AbstractMessage.project, …). Public and self-contained (no personal-repo references).MeanField.update_factor_mean_field— the damped-update equation, delta semantics (scalar / per-factor / per-variableMeanField), and the invalid-projection fallback.FactorApproximation.project_mean_field— fix the Phase 1 F5 docstring error ((qᶠₐ)ᵟ (qᶠₐ)¹⁻ᵟ→(qᶠₐ)ᵟ (qₐ)¹⁻ᵟ).TransformedMessage._transform/_inverse_transform+composed_transform.pymodule docstring — the asymmetric reversal convention and a worked UniformPrior example (folds inbug/priors/11, per its Phase 0 verdict).MessageInterface.kl— state the direction contractm.kl(other) ≡ KL(m ‖ other), note the known Gamma/Beta deviation tracked in research: EP review phase 1 — statistics audit of autofit/graphical #1332 (F2) pending its fix.AbstractMessage.project— the importance-weighted sufficient-statistics moment-matching equations.log_prior_from_valueper family factually, marked as pending unification under Priors & messages: 9 confirmed bugs — guidance wanted on 5 decisions #1331 decision 4 (the docs do not pre-empt that decision).test_autofit/graphical/+test_autofit/messages/suites (docstring-only changes must not alter behaviour); README proofread against source anchors.Detailed implementation plan
Affected Repositories
Branch / worktree
feature/ep-graphical-docs; worktree~/Code/PyAutoLabs-wt/ep-graphical-docs.aggregator-output-contractsclaim released).Files
autofit/graphical/README.md(new)autofit/graphical/mean_field.py(docstrings:update_factor_mean_field,FactorApproximation, F5 fix)autofit/messages/composed_transform.py(module +_transform/_inverse_transformdocstrings)autofit/messages/interface.py(KL contract onkl)autofit/messages/abstract.py(projectdocstring)Out of scope (later phases)
autofit_workspace/autofit_workspace_test).docs/pages (follow-up via the docs-audit tooling once the README stabilises).