GNCN-t1-Sigma (Friston, 2008)

This circuit implements the model proposed in (Friston, 2008) [1]. Specifically, this model is unsupervised and can be used to process sensory pattern (row) vector(s) x to infer internal latent states. This class offers, beyond settling and update routines, a projection function by which ancestral sampling may be carried out given the underlying directed generative model formed by this NGC system.

The GNCN-t1-Sigma is graphically depicted by the following graph:

../_images/gncn_t1_sigma.png
class ngclearn.museum.gncn_t1_sigma.GNCN_t1_Sigma(args)[source]

Structure for constructing the model proposed in:

Friston, Karl. “Hierarchical models in the brain.” PLoS Computational Biology 4.11 (2008): e1000211.

Note this model includes a Laplacian prior to induce some level of sparsity in the latent activities. This model, under the NGC computational framework, is referred to as the GNCN-t1-Sigma/Friston, according to the naming convention in (Ororbia & Kifer 2022).

Node Name Structure:
z3 -(z3-mu2)-> mu2 ;e2; z2 -(z2-mu1)-> mu1 ;e1; z1 -(z1-mu0-)-> mu0 ;e0; z0
e2 -> e2 * Sigma2; e1 -> e1 * Sigma1 // Precision weighting
Parameters

args – a Config dictionary containing necessary meta-parameters for the GNCN-t1-Sigma

DEFINITION NOTE:
args should contain values for the following:
* batch_size - the fixed batch-size to be fed into this model
* z_top_dim: # of latent variables in layer z3 (top-most layer)
* z_dim: # of latent variables in layers z1 and z2
* x_dim: # of latent variables in layer z0 or sensory x
* seed: number to control determinism of weight initialization
* wght_sd: standard deviation of Gaussian initialization of weights
* beta: latent state update factor
* leak: strength of the leak variable in the latent states
* lmbda: strength of the Laplacian prior applied over latent state activities
* K: # of steps to take when conducting iterative inference/settling
* act_fx: activation function for layers z1, z2, and z3
* out_fx: activation function for layer mu0 (prediction of z0) (Default: sigmoid)
project(z_sample)[source]

Run projection scheme to get a sample of the underlying directed generative model given the clamped variable z_sample

Parameters

z_sample – the input noise sample to project through the NGC graph

Returns

x_sample (sample(s) of the underlying generative model)

settle(x, calc_update=True)[source]

Run an iterative settling process to find latent states given clamped input and output variables

Parameters
  • x – sensory input to reconstruct/predict

  • calc_update – if True, computes synaptic updates @ end of settling process (Default = True)

Returns

x_hat (predicted x)

calc_updates(avg_update=True, decay_rate=- 1.0)[source]

Calculate adjustments to parameters under this given model and its current internal state values

Returns

delta, a list of synaptic matrix updates (that follow order of .theta)

clear()[source]

Clears the states/values of the stateful nodes in this NGC system

References:
[1] Friston, Karl. “Hierarchical models in the brain.” PLoS Computational Biology 4.11 (2008): e1000211.