Skip to content

research: EP review phase 5 — reconcile the three deterministic-variable mechanisms #1336

Description

@Jammy2211

Overview

Phase 5 of the EP framework review (umbrella: PyAutoMind/research/graphical_ep/ep_framework_review.md). PyAutoFit has three ways to express deterministic relations between model quantities, and they do not share machinery:

  1. Graph-level deterministic variablesFactor(..., factor_out=v), propagated via FactorValue.deterministic_values, with dedicated quasi-Newton curvature transfer in the Laplace path. Exercised (as of Phase 3) by unit tests and the new autofit_workspace_test/scripts/graphical/ep_deterministic.py, but by no known real use case.
  2. Compound prior arithmetic (autofit/mapper/prior/arithmetic/) — model-space composition (prior_a * x + prior_b), added by rhayes777 (PR to be located as part of this phase).
  3. Free shared variables — share a prior across factors and encode the relation inside the likelihood (the IC50 cancer pattern: latents @ coef_matrix + coef_mean computed in log_likelihood_function).

Task (i)-(iv) of the original review asked: should anything be done about the low-level deterministic_variable API going unused by the real use cases? Output: a recommendation (unify / document both / deprecate one) with a migration-cost estimate, posted here for human decision.

Autonomy: --auto, effective supervised (research cap). Read-only investigation — no source edits; parks at the decision.

Plan

  1. Locate the rhayes777 PR(s) that introduced compound prior arithmetic and any EP-side deterministic composition; reconstruct the intended design from the PR discussion.
  2. Census each mechanism: implementation surface, EP interaction (does it create graph variables? messages? evidence contributions?), current users (source, tests, workspaces, HowToFit, IC50, cosmology), statistical semantics (is uncertainty propagated exactly, approximately, or not at all?).
  3. Analyse the gaps: what each mechanism can express that the others cannot; where a user would be silently wrong choosing one over another.
  4. Recommendation + migration cost estimate, posted as the phase verdict; decision (human) then feeds the fix/feature queue and Phase 2 docs get the outcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions