diff --git a/notebooks/features/expectation_propagation.ipynb b/notebooks/features/expectation_propagation.ipynb index 199147bd..59787edd 100644 --- a/notebooks/features/expectation_propagation.ipynb +++ b/notebooks/features/expectation_propagation.ipynb @@ -438,10 +438,16 @@ "__Full EP Fit__\n", "\n", "That is the entire algorithm. The high-level API runs this loop for us: `factor_graph.optimise(...)` cycles the\n", - "factors, manages damping, tracks the history and writes results to the output folder.\n", + "factors, tracks the history and writes results to the output folder. By default it uses full updates (`delta=1.0`),\n", + "so damping is not enabled unless we explicitly pass an updater.\n", "\n", "Each `AnalysisFactor` is fitted by its own `DynestyStatic`; the `LaplaceOptimiser` passed here is the *default* for\n", - "the remaining factors \u2014 the `PriorFactor`'s \u2014 whose updates are cheap." + "the remaining factors \u2014 the `PriorFactor`'s \u2014 whose updates are cheap.\n", + "\n", + "For a problem where partial updates are worth testing, add\n", + "`updater=af.SimplerUpdater(delta=0.7)` to the call below. This is deliberately commented out: damping is\n", + "problem-dependent and has made hierarchical scale collapse worse in repeated-run diagnostics, so it should be\n", + "validated across repeated fits rather than enabled routinely." ] }, { @@ -456,6 +462,7 @@ " optimiser=laplace,\n", " paths=paths,\n", " ep_history=af.EPHistory(kl_tol=0.05),\n", + " # updater=af.SimplerUpdater(delta=0.7), # Optional; no damping by default.\n", " max_steps=5,\n", ")" ], diff --git a/scripts/features/expectation_propagation.py b/scripts/features/expectation_propagation.py index de4e08cf..601dfe07 100644 --- a/scripts/features/expectation_propagation.py +++ b/scripts/features/expectation_propagation.py @@ -285,10 +285,16 @@ __Full EP Fit__ That is the entire algorithm. The high-level API runs this loop for us: `factor_graph.optimise(...)` cycles the -factors, manages damping, tracks the history and writes results to the output folder. +factors, tracks the history and writes results to the output folder. By default it uses full updates (`delta=1.0`), +so damping is not enabled unless we explicitly pass an updater. Each `AnalysisFactor` is fitted by its own `DynestyStatic`; the `LaplaceOptimiser` passed here is the *default* for the remaining factors — the `PriorFactor`'s — whose updates are cheap. + +For a problem where partial updates are worth testing, add +`updater=af.SimplerUpdater(delta=0.7)` to the call below. This is deliberately commented out: damping is +problem-dependent and has made hierarchical scale collapse worse in repeated-run diagnostics, so it should be +validated across repeated fits rather than enabled routinely. """ laplace = af.LaplaceOptimiser() @@ -298,6 +304,7 @@ optimiser=laplace, paths=paths, ep_history=af.EPHistory(kl_tol=0.05), + # updater=af.SimplerUpdater(delta=0.7), # Optional; no damping by default. max_steps=5, )