pyhgf.updates.vectorized.volatile.vectorized_posterior_update_mean_value_level#
- pyhgf.updates.vectorized.volatile.vectorized_posterior_update_mean_value_level(layer, child, weights, coupling_fn_grad, posterior_precision)[source]#
Update the mean of the value level for all nodes in a layer.
This is the vectorized equivalent of
pyhgf.updates.posterior.volatile.posterior_update_value_level.posterior_update_mean_value_level().Note
Unlike the standard continuous-state posterior updates elsewhere in the toolbox, the volatile-state updates evaluate coupling function derivatives at the expected mean (i.e. the prediction) rather than the posterior mean. This choice is made to better suit deep learning networks where the prediction serves as the natural reference point for computing updates.
- Parameters:
layer (LayerState) – Current state of the parent layer (being updated).
child (LayerState) – Current state of the child layer (providing prediction errors).
weights (Array) – Weight matrix connecting child to parent, shape
(n_children, n_parents).coupling_fn_grad (Callable) – Gradient of the coupling function.
posterior_precision (Array) – Already-updated posterior precision for the parent layer.
- Returns:
Posterior mean for each node in the parent layer.
- Return type:
jnp.ndarray