fffb

package
v1.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: BSD-3-Clause Imports: 1 Imported by: 26

Documentation

Overview

Package fffb provides feedforward (FF) and feedback (FB) inhibition (FFFB) based on average (or maximum) excitatory netinput (FF) and activation (FB).

This produces a robust, graded k-Winners-Take-All dynamic of sparse distributed representations having approximately k out of N neurons active at any time, where k is typically 10-20 percent of N.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Inhib

type Inhib struct {

	// computed feedforward inhibition
	FFi float32 `desc:"computed feedforward inhibition"`

	// computed feedback inhibition (total)
	FBi float32 `desc:"computed feedback inhibition (total)"`

	// overall value of the inhibition -- this is what is added into the unit Gi inhibition level (along with any synaptic unit-driven inhibition)
	Gi float32 `` /* 146-byte string literal not displayed */

	// original value of the inhibition (before pool or other effects)
	GiOrig float32 `desc:"original value of the inhibition (before pool or other effects)"`

	// for pools, this is the layer-level inhibition that is MAX'd with the pool-level inhibition to produce the net inhibition
	LayGi float32 `` /* 127-byte string literal not displayed */

	// average and max Ge excitatory conductance values, which drive FF inhibition
	Ge minmax.AvgMax32 `desc:"average and max Ge excitatory conductance values, which drive FF inhibition"`

	// average and max Act activation values, which drive FB inhibition
	Act minmax.AvgMax32 `desc:"average and max Act activation values, which drive FB inhibition"`
}

Inhib contains state values for computed FFFB inhibition

func (*Inhib) Decay

func (fi *Inhib) Decay(decay float32)

Decay reduces inhibition values by given decay proportion

func (*Inhib) Init

func (fi *Inhib) Init()

func (*Inhib) Zero added in v1.1.8

func (fi *Inhib) Zero()

Zero clears inhibition but does not affect Ge, Act averages

type Inhibs added in v1.1.14

type Inhibs []Inhib

Inhibs is a slice of Inhib records

type Params

type Params struct {

	// enable this level of inhibition
	On bool `desc:"enable this level of inhibition"`

	// [def: 1.8] [viewif: On] [min: 0] [1.5-2.3 typical, can go lower or higher as needed] overall inhibition gain -- this is main parameter to adjust to change overall activation levels -- it scales both the the ff and fb factors uniformly
	Gi float32 `` /* 238-byte string literal not displayed */

	// [def: 1] [viewif: On] [min: 0] overall inhibitory contribution from feedforward inhibition -- multiplies average netinput (i.e., synaptic drive into layer) -- this anticipates upcoming changes in excitation, but if set too high, it can make activity slow to emerge -- see also ff0 for a zero-point for this value
	FF float32 `` /* 316-byte string literal not displayed */

	// [def: 1] [viewif: On] [min: 0] overall inhibitory contribution from feedback inhibition -- multiplies average activation -- this reacts to layer activation levels and works more like a thermostat (turning up when the 'heat' in the layer is too high)
	FB float32 `` /* 253-byte string literal not displayed */

	// [def: 1.4,3,5] [viewif: On] [min: 0] time constant in cycles, which should be milliseconds typically (roughly, how long it takes for value to change significantly -- 1.4x the half-life) for integrating feedback inhibitory values -- prevents oscillations that otherwise occur -- the fast default of 1.4 should be used for most cases but sometimes a slower value (3 or higher) can be more robust, especially when inhibition is strong or inputs are more rapidly changing
	FBTau float32 `` /* 471-byte string literal not displayed */

	// [def: 0,0.5,1] [viewif: On] what proportion of the maximum vs. average netinput to use in the feedforward inhibition computation -- 0 = all average, 1 = all max, and values in between = proportional mix between average and max (ff_netin = avg + ff_max_vs_avg * (max - avg)) -- including more max can be beneficial especially in situations where the average can vary significantly but the activity should not -- max is more robust in many situations but less flexible and sensitive to the overall distribution -- max is better for cases more closely approximating single or strictly fixed winner-take-all behavior -- 0.5 is a good compromise in many cases and generally requires a reduction of .1 or slightly more (up to .3-.5) from the gi value for 0
	MaxVsAvg float32 `` /* 755-byte string literal not displayed */

	// [def: 0.1] [viewif: On] feedforward zero point for average netinput -- below this level, no FF inhibition is computed based on avg netinput, and this value is subtraced from the ff inhib contribution above this value -- the 0.1 default should be good for most cases (and helps FF_FB produce k-winner-take-all dynamics), but if average netinputs are lower than typical, you may need to lower it
	FF0 float32 `` /* 398-byte string literal not displayed */

	// [view: -] rate = 1 / tau
	FBDt float32 `inactive:"+" view:"-" json:"-" xml:"-" desc:"rate = 1 / tau"`
}

Params parameterizes feedforward (FF) and feedback (FB) inhibition (FFFB) based on average (or maximum) netinput (FF) and activation (FB)

func (*Params) Defaults

func (fb *Params) Defaults()

func (*Params) FBInhib

func (fb *Params) FBInhib(avgAct float32) float32

FBInhib computes feedback inhibition value as function of average activation

func (*Params) FBUpdt

func (fb *Params) FBUpdt(fbi *float32, newFbi float32)

FBUpdt updates feedback inhibition using time-integration rate constant

func (*Params) FFInhib

func (fb *Params) FFInhib(avgGe, maxGe float32) float32

FFInhib returns the feedforward inhibition value based on average and max excitatory conductance within relevant scope

func (*Params) Inhib

func (fb *Params) Inhib(inh *Inhib)

Inhib is full inhibition computation for given inhib state, which must have the Ge and Act values updated to reflect the current Avg and Max of those values in relevant inhibitory pool.

func (*Params) Update

func (fb *Params) Update()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL