fsfffb

package
v2.0.0-dev0.2.17 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

README

FS (Fast & Slow) FFFB Inhibition

FFFB is the feedforward (FF) and feedback (FB) inhibition mechanism, originally developed for the Leabra model. It applies inhibition as a function of the average Ge (excitatory conductance) of units in the layer (this is FF = reflecting all the excitatory input to a layer) and average Act rate-code-like activation within the layer (which is FB = reflecting the activity level within the layer itself). Act is slowly integrated over time as a function of the ISI (inter-spike-interval).

FS-FFFB is a fast and slow (FS) version of FFFB that works directly with spike input signals instead of using "internal" variables like Ge and Act, and uses time dynamics based on an emerging consensus about the differences between three major classes of inhibitory interneurons, and their functional properties, e.g., Cardin, 2018.

  • PV: fast-spiking basket cells that target the cell bodies of excitatory neurons and coexpress the calcium-binding protein parvalbumin (PV). These are the "first responders", and are also rapidly depressing -- they provide quick control of activity, responding to FF new input and FB drive, allowing the first spiking pyramidal neurons to quickly shut off other competitors, and maintain a sparse overall level of activity. The PV activity level (and consequent inhibitory conductance into pyramidal cells, Gi) closely tracks the incoming excitatory conductance Ge, which keeps neurons in their sensitive dynamic range e.g., Shadlen & Newsome, 1994.

  • SST: more slowly responding, higher-threshold spiking cells that target the distal dendrites of excitatory neurons and coexpress the peptide somatostatin (SST). These require repetitive, facilitating, afferent input to be activated, and may regulate the dendritic integration of synaptic inputs over a longer timescale. The dependence in the original FFFB of FB on the slower integrated Act variable, which only comes on after the first spike (in order to compute the ISI), is consistent with these slower SST dynamics.

  • VIP: sparse dendrite-targeting cells that synapse onto SST interneurons and the dendrites of pyramidal neurons, and coexpress vasoactive intestinal peptide (VIP). VIP interneurons are a subset of the larger 5HT3aR-expressing interneuron class. These can provide disinhibition of SST inhibition. These are targeted by thalamic pathways into layer 1 of cortex, and may be responsible for arousal and gating-like modulation from the thalamus. We do not directly implement them in axon, but do indirectly capture their effects in the gating dynamics of the pcore model.

Remarkably, the parameters that work to enable successful error-driven learning in axon using the new FS-FFFB equations end up very closely reproducing the net inhibition produced by the original FFFB model, as shown in the following figure.

FS-FFFB vs original FFFB

Figure 1: Comparison of original FFFB inhibition (OGi) vs. new FS-FFFB inhibition (SGi) from the inhib example simulation, showing that the FS-FFFB parameters that enable successful learning produce nearly identical overall levels of inhibition compared to the original. Act.Avg shows the time-averaged activity in the lower layer that feeds into the one shown, and resembles the slow SST response, while the jagged ups and downs are due to the fast PV component.

PV is fast and highly chaotic

The dramatic swings in Gi levels as shown in the above figure are all due to the PV Fast component, which increases directly as a function of incoming FF and FB spikes, and decays with a fast time constant of 6 msec (default):

	FSi += (FFs + FB*FBs) - FSi/FSTau

where:

  • FSi = fast PV contribution to inhibition, time-integrated.
  • FFs = normalized sum of incoming FF spikes.
  • FBs = normalized sum of incoming FB spikes from neurons in the same pool being inhibited.
  • FB = weighting factor for FB spikes, which defaults to 1 but needs to be smaller for smaller networks (0.5) and larger for larger ones (e.g., 4).
  • FSTau = time constant for decaying FSi (6 msec default).

SST is a slow time-average

The slow SST contribution slowly tracks overall spiking activity in the pool, roughly as the Act.Avg green line in the above figure, based on the following equations:

	SSi += (SSf*FBs - SSi) / SSiTau
	SSf += FBs*(1-SSf) - SSf / SSfTau

where:

  • SSi = slow SST contribution to inhibition, time-integrated.
  • SSf = synaptic facilitation component for SS, which increases as a function of spiking activity as shown in the 2nd equation.
  • FBs = normalized sum of incoming FB spikes from neurons in the same pool being inhibited.
  • SSiTau = integration time constant for SSi, which is 50 msec by default (slow).
  • SSfTau = time constant for SSf, which is 20 msec by default.

Combined Gi

The combined overall inhibitory conductance Gi is based on a thresholded version of the FSi component plus a weighted contribution of the SSi level, which tends to be very weak due to the long time integral:

    Gi = |FSi > FS0|_+ + SS * SSi

where:

  • Gi = overall inhibitory conductance.
  • FSi = fast-spiking inhibition per above.
  • SSi = slow-spiking inhibition per above.
  • FS0 = threshold for FSi, default .1 as in the original FFFB, below which it contributes 0. This factor is important for filtering out small levels of incoming spikes and produces an observed nonlinearity in the Gi response.
  • SS = multiplier for SSi, which is 30 by default: SSi is relatively weak so this needs to be a strong multiplier to get into the range of FSi.

Additional SSGi -> VmDend

In addition to the pooled Gi inhibition value described above, the slow inhibition value SSi is applied with a separate weighting factor to the dendritic membrane potential update, as an additional inhibitory component, weighted by the Act.Dend.SSGi parameter (default = 2). This is important for specifically balancing the positive feedback loop in increasing NMDA channel activation, which is voltage gated as a function of VmDend. Over the course of learning VmDend tends to increase for the most active neurons, and this additional SSGi factor balances that and prevents it from entering into a runaway positive feedback loop.

Biologically, the idea is that SSi inhibition affects the overall cellular Vm, but because it comes directly into the distal dendrites, it has an extra impact there.

References

Documentation

Overview

Package fsfffb provides Fast and Slow feedforward (FF) and feedback (FB) inhibition (FFFB) based on incoming spikes (FF) and outgoing spikes (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 GiParams

type GiParams struct {

	// On enables this level of inhibition.
	On slbool.Bool

	// Gi is overall inhibition gain, which is the main parameter to adjust
	// to change overall activation levels, scaling both the FS and SS factors.
	Gi float32 `min:"0" default:"1,1.1,0.75,0.9"`

	// FB is the amount of FB spikes included in FF for driving FS.
	// For small networks, 0.5 or 1 works best; larger networks and
	// more demanding inhibition requires higher levels.
	FB float32 `min:"0" default:"0.5,1,4"`

	// FSTau is fast spiking (PV+) intgration time constant in cycles (msec).
	// Tau is roughly how long it takes for value to change significantly = 1.4x the half-life.
	FSTau float32 `min:"0" default:"6"`

	// SS is the multiplier on SS slow-spiking (SST+) in contributing to the
	// overall Gi inhibition. FS contributes at a factor of 1.
	SS float32 `min:"0" default:"30"`

	// SSfTau is the slow-spiking (SST+) facilitation decay time constant
	// in cycles (msec). Facilication factor SSf determines impact of FB spikes
	// as a function of spike input.
	// Tau is roughly how long it takes for value to change significantly = 1.4x the half-life.
	SSfTau float32 `min:"0" default:"20"`

	// SSiTau is the slow-spiking (SST+) intgration time constant in cycles (msec)
	// cascaded on top of FSTau.
	// Tau is roughly how long it takes for value to change significantly = 1.4x the half-life.
	SSiTau float32 `min:"0" default:"50"`

	// FS0 is the fast spiking zero point: below this level, no FS inhibition
	// is computed, and this value is subtracted from the FSi.
	FS0 float32 `default:"0.1"`

	// FFAvgTau is the time constant for updating a running average of the
	// feedforward inhibition over a longer time scale, for computing FFPrv.
	FFAvgTau float32 `default:"50"`

	// FFPrv is the proportion of previous average feed-forward inhibition (FFAvgPrv)
	// to add, resulting in an accentuated temporal-derivative dynamic where neurons
	// respond most strongly to increases in excitation that exceeds inhibition from last time.
	FFPrv float32 `default:"0"`

	// ClampExtMin is the minimum GeExt value required to drive external clamping dynamics
	// (if clamp is set), where only GeExt drives inhibition.  If GeExt is below this value,
	// then the usual FS-FFFB drivers are used.
	ClampExtMin float32 `default:"0.05"`

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

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

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

	// rate = 1 / tau
	FFAvgDt float32 `edit:"-" display:"-" json:"-" xml:"-"`
	// contains filtered or unexported fields
}

GiParams parameterizes feedforward (FF) and feedback (FB) inhibition (FFFB) based on incoming spikes (FF) and outgoing spikes (FB) across Fast (PV+) and Slow (SST+) timescales. FF -> PV -> FS fast spikes, FB -> SST -> SS slow spikes (slow to get going)

func (*GiParams) Defaults

func (fb *GiParams) Defaults()

func (*GiParams) FS

func (fb *GiParams) FS(fsi, gext float32, clamped bool) float32

FS returns the current effective FS value based on fsi and fsd if clamped, then only use gext, without applying FS0

func (*GiParams) FS0Thr

func (fb *GiParams) FS0Thr(val float32) float32

FS0Thr applies FS0 threshold to given value

func (*GiParams) FSiFromFFs

func (fb *GiParams) FSiFromFFs(fsi, ffs, fbs float32) float32

FSiFromFFs updates fast-spiking inhibition FSi from FFs spikes

func (*GiParams) SSFromFBs

func (fb *GiParams) SSFromFBs(ssf, ssi *float32, fbs float32)

SSFromFBs updates slow-spiking inhibition from FBs

func (*GiParams) ShouldDisplay

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

func (*GiParams) Update

func (fb *GiParams) Update()

type InhibVars

type InhibVars int32 //enums:enum

InhibVars are inhibitory variables for computing fsfffb inhibition.

const (
	// FFsRaw is the raw aggregation of all feedforward incoming spikes into neurons
	// in this pool. It is integrated using FFsRawInt in InhibIntVars.
	FFsRaw InhibVars = iota

	// FBsRaw is the raw aggregation of all feedback outgoing spikes generated
	// from neurons in this pool. It is integrated using FBsRawInt in InhibIntVars.
	FBsRaw

	// GeExtRaw is the raw aggregation of all extra GeExt conductances added to neurons.
	// It is integrated using GeExtRawInt in InhibIntVars.
	GeExtRaw

	// FFs is all feedforward incoming spikes into neurons in this pool,
	// normalized by pool size.
	FFs

	// FBs is all feedback outgoing spikes generated from neurons in this pool,
	// normalized by pool size.
	FBs

	// GeExts is all extra GeExt conductances added to neurons,
	// normalized by pool size.
	GeExts

	// FSi is the fast spiking PV+ fast integration of FFs feedforward spikes.
	FSi

	// SSi is the slow spiking SST+ integration of FBs feedback spikes.
	SSi

	// SSf is the slow spiking facilitation factor, representing facilitating
	// effects of recent activity.
	SSf

	// FSGi is the overall fast-spiking inhibitory conductance.
	FSGi

	// SSGi is the overall slow-spiking inhibitory conductance.
	SSGi

	// TotalGi is the overall inhibitory conductance = FSGi + SSGi.
	TotalGi

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

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

	// FFAvg is the longer time scale running average FF drive, used for FFAvgPrv.
	FFAvg

	// FFAvgPrv is the previous theta cycle FFAvg value, for the FFPrv factor.
	// Updated in the Decay function that is called at start of new State / Trial.
	FFAvgPrv
)
const InhibVarsN InhibVars = 16

InhibVarsN is the highest valid value for type InhibVars, plus one.

func InhibVarsValues

func InhibVarsValues() []InhibVars

InhibVarsValues returns all possible values for the type InhibVars.

func (InhibVars) Desc

func (i InhibVars) Desc() string

Desc returns the description of the InhibVars value.

func (InhibVars) Int64

func (i InhibVars) Int64() int64

Int64 returns the InhibVars value as an int64.

func (InhibVars) MarshalText

func (i InhibVars) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (*InhibVars) SetInt64

func (i *InhibVars) SetInt64(in int64)

SetInt64 sets the InhibVars value from an int64.

func (*InhibVars) SetString

func (i *InhibVars) SetString(s string) error

SetString sets the InhibVars value from its string representation, and returns an error if the string is invalid.

func (InhibVars) String

func (i InhibVars) String() string

String returns the string representation of this InhibVars value.

func (*InhibVars) UnmarshalText

func (i *InhibVars) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (InhibVars) Values

func (i InhibVars) Values() []enums.Enum

Values returns all possible values for the type InhibVars.

Jump to

Keyboard shortcuts

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