Rho Setting
The penalty parameter rho (\(\rho\)) is central to Progressive Hedging (PH) and related decomposition methods. mpi-sppy provides several ways to set and dynamically update rho values. This page consolidates all rho-related options.
Requirement
PH requires the same rho for a given nonanticipative variable in every scenario that passes through that variable’s tree node. mpi-sppy does not check this (except within a proper bundle), and a run that breaks it is ill-defined: PH’s dual weights no longer sum to zero over the scenarios, which is what makes a Lagrangian bound computed from them a bound. See issue #887.
--default-rho,--grad-rhoand--sensi-rhoalways meet it.The norm and primal-dual rho updaters scale every scenario’s rho by the same factor, so they keep it if it held before. The
--dynamic-rho-*options only decide when--sep-rho,--sensi-rhoor--grad-rhorecompute rho, so the method doing the recomputing is what matters.--sep-rhoand--coeff-rhomeet it only if the variable’s objective coefficient is the same in every scenario through its node, because each scenario’s rho comes from that scenario’s own coefficient.A
_rho_settermeets it only if it returns the same value for the variable in every scenario through the node; it is called once per scenario. The same goes for per-scenario rho files (see AML Agnosticism).
Default Rho
The simplest approach is to set a single rho value for all variables:
--default-rho 1.0
This value is used for any variable that does not have a rho set by another mechanism (e.g., a rho setter function or one of the strategies below).
Note
If no _rho_setter function is provided in the model module, then
--default-rho is required unless one of --sep-rho, --coeff-rho,
or --sensi-rho is specified (in which case default-rho is automatically
set to 1 as a fallback).
Rho Setter Function
The model module can define a _rho_setter function that returns
per-variable rho values. This function is passed to the hub constructor
and is called during setup, once per scenario, so it must meet the
Requirement above. See Helper Functions in the Model File for details.
Separation-based Rho (--sep-rho)
Uses the separation between scenario solutions to set rho. Each scenario’s rho is computed from its own objective coefficient; see Requirement. Enabled with:
--sep-rho
The separation is measured from xbar, the probability-weighted mean of the
iteration-0 solutions. When xbar is read from a file with
--init-Xbar-fname (see WXBarReader in Extensions), the file’s
xbar is used instead. --sensi-rho and --grad-rho use the same xbar.
Coefficient-based Rho (--coeff-rho)
Sets rho based on objective function coefficients, each scenario from its own; see Requirement. Enabled with:
--coeff-rho
Sensitivity-based Rho (--sensi-rho)
Sets rho based on sensitivity analysis. Enabled with:
--sensi-rho
Note
If existing rho values have been set (e.g., by --sep-rho or
--coeff-rho), --sensi-rho will use them as starting points.
For this reason, --sensi-rho should typically appear after
--sep-rho or --coeff-rho in the workflow.
Gradient-based Rho (--grad-rho)
Uses gradient information to set rho values. Enabled with:
--grad-rho
A detailed example is in examples.farmer.CI.farmer_rho_demo.py.
The --grad-rho-multiplier option provides a cumulative multiplier
applied when rho is set or updated.
Dynamic Rho Updates
Rho can be updated dynamically during PH iterations using convergence criteria:
--dynamic-rho-primal-crit: trigger updates based on primal convergence--dynamic-rho-dual-crit: trigger updates based on dual convergence--dynamic-rho-primal-thresh: sensitivity threshold for primal trigger (has a default value)--dynamic-rho-dual-thresh: sensitivity threshold for dual trigger (has a default value)
See dyn_rho_base.py for implementation details on how updates are
computed.
Linear Surrogate Rho
Surrogates created with LinearSurrogateDefinition receive a rho derived
from their ordinary source nonants after the configured rho setter and after
every dynamic rho update. See Surrogate Nonant List for the model API
and formula. Bare variables passed through surrogate_nonant_list retain
their normal rho and are not modified by this derived-rho step.
Linear surrogates also introduce redundant W components. Any rho strategy that examines W currently sees the augmented product-space representation, not the effective multiplier projected into the original variable space. See the warning under Surrogate Nonant List before combining linear surrogates with W-based rho strategies.
Norm Rho Updater (--use-norm-rho-updater)
An adaptive rho strategy based on the norm of primal and dual residuals. Enabled with:
--use-norm-rho-updater
There is also a corresponding converger that can be enabled with
--use-norm-rho-converger, which requires --use-norm-rho-updater.
Primal-Dual Rho Updater (--use-primal-dual-rho-updater)
An adaptive rho strategy based on primal-dual balancing. Enabled with:
--use-primal-dual-rho-updater
Additional options:
--primal-dual-rho-update-threshold: threshold for triggering updates--primal-dual-rho-primal-bias: bias towards primal residual
W-based Rho
A rho based on W values is supported through mpisppy.utils.find_rho.py,
which can compute rho using a cost input file created by the gradient
software. If you want to use W values as the cost, you would need to
modify the code in mpisppy/utils/w_utils/wxbarwriter.py to write the final W values in the
right format (i.e., matching the cost output format used by the gradient
software).