fffb

package
v2.0.0-dev0.5.5 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

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

	// computed feedback inhibition (total)
	FBi float32

	// 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

	// original value of the inhibition (before pool or other effects)
	GiOrig float32

	// for pools, this is the layer-level inhibition that is MAX'd with the pool-level inhibition to produce the net inhibition
	LayGi float32

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

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

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

func (fi *Inhib) Zero()

Zero clears inhibition but does not affect Ge, Act averages

type Inhibs

type Inhibs []Inhib

Inhibs is a slice of Inhib records

type Params

type Params struct {

	// enable this level of inhibition
	On bool

	// 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 `min:"0" default:"1.8"`

	// 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 `min:"0" default:"1"`

	// 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 `min:"0" default:"1"`

	// 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 `min:"0" default:"1.4,3,5"`

	// 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 `default:"0,0.5,1"`

	// 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 `default:"0.1"`

	// rate = 1 / tau
	FBDt float32 `edit:"-" display:"-" json:"-" xml:"-"`
}

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) FBUpdate

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

FBUpdate 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) ShouldDisplay

func (fb *Params) ShouldDisplay(field string) bool

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