kinase

package
v2.0.0-dev0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: BSD-3-Clause Imports: 8 Imported by: 0

README

Kinase Learning Implementation

This implements central elements of the Kinase learning rule, including variables with associated time constants used for integrating calcium signals through the cascade of progressively longer time-integrals, from Ca -> CaM calmodulin (at MTau) -> CaMKII (CaP at PTau for LTP role) -> DAPK1 (CaD at DTau for LTD role).

See kinaseq example for an exploration of the implemented equations, and kinase repository for documentation and simulations about the biophysical basis of the equations.

Time constants and Variables

  • MTau (2 or 5) = calmodulin (CaM) time constant in cycles (msec) -- for synaptic-level integration this integrates on top of Ca signal from send->CaSyn * recv->CaSyn, each of which are typically integrated with a 30 msec Tau.

  • PTau (40) = LTP spike-driven Ca factor (CaP) time constant in cycles (msec), simulating CaMKII in the Kinase framework, with 40 on top of MTau roughly tracking the biophysical rise time. Computationally, CaP represents the plus phase learning signal that reflects the most recent past information.

  • DTau (40) = LTD spike-driven Ca factor (CaD) time constant in cycles (msec), simulating DAPK1 in Kinase framework. Computationally, CaD represents the minus phase learning signal that reflects the expectation representation prior to experiencing the outcome (in addition to the outcome).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaDtParams

type CaDtParams struct {

	// CaM (calmodulin) time constant in cycles (msec) -- for synaptic-level integration this integrates on top of Ca signal from send->CaSyn * recv->CaSyn, each of which are typically integrated with a 30 msec Tau.
	MTau float32 `def:"2,5" min:"1"`

	// LTP spike-driven Ca factor (CaP) time constant in cycles (msec), simulating CaMKII in the Kinase framework, with 40 on top of MTau roughly tracking the biophysical rise time.  Computationally, CaP represents the plus phase learning signal that reflects the most recent past information.
	PTau float32 `def:"39" min:"1"`

	// LTD spike-driven Ca factor (CaD) time constant in cycles (msec), simulating DAPK1 in Kinase framework.  Computationally, CaD represents the minus phase learning signal that reflects the expectation representation prior to experiencing the outcome (in addition to the outcome).  For integration equations, this cannot be identical to PTau.
	DTau float32 `def:"41" min:"1"`

	// if true, adjust dt time constants when using exponential integration equations to compensate for difference between discrete and continuous integration
	ExpAdj slbool.Bool

	// rate = 1 / tau
	MDt float32 `view:"-" json:"-" xml:"-" inactive:"+"`

	// rate = 1 / tau
	PDt float32 `view:"-" json:"-" xml:"-" inactive:"+"`

	// rate = 1 / tau
	DDt float32 `view:"-" json:"-" xml:"-" inactive:"+"`

	// 4 * rate = 1 / tau
	M4Dt float32 `view:"-" json:"-" xml:"-" inactive:"+"`

	// 4 * rate = 1 / tau
	P4Dt float32 `view:"-" json:"-" xml:"-" inactive:"+"`

	// 4 * rate = 1 / tau
	D4Dt float32 `view:"-" json:"-" xml:"-" inactive:"+"`
	// contains filtered or unexported fields
}

CaDtParams has rate constants for integrating Ca calcium at different time scales, including final CaP = CaMKII and CaD = DAPK1 timescales for LTP potentiation vs. LTD depression factors.

func (*CaDtParams) CaAtT

func (kp *CaDtParams) CaAtT(ti int32, caM, caP, caD *float32)

CaAtT computes the 3 Ca values at (currentTime + ti), assuming 0 new Ca incoming (no spiking). It uses closed-form exponential functions.

func (*CaDtParams) Defaults

func (kp *CaDtParams) Defaults()

func (*CaDtParams) Update

func (kp *CaDtParams) Update()

type CaParams

type CaParams struct {

	// spiking gain factor for SynSpk learning rule variants.  This alters the overall range of values, keeping them in roughly the unit scale, and affects effective learning rate.
	SpikeG float32 `def:"12"`

	// maximum ISI for integrating in Opt mode -- above that just set to 0
	MaxISI int32 `def:"100"`

	// time constants for integrating at M, P, and D cascading levels
	Dt CaDtParams `view:"inline"`
	// contains filtered or unexported fields
}

CaParams has rate constants for integrating spike-driven Ca calcium at different time scales, including final CaP = CaMKII and CaD = DAPK1 timescales for LTP potentiation vs. LTD depression factors.

func (*CaParams) CurCa

func (kp *CaParams) CurCa(ctime, utime float32, caM, caP, caD *float32)

CurCa returns the current Ca* values, dealing with updating for optimized spike-time update versions. ctime is current time in msec, and utime is last update time (-1 if never) to avoid running out of float32 precision, ctime should be reset periodically along with the Ca values -- in axon this happens during SlowAdapt.

func (*CaParams) Defaults

func (kp *CaParams) Defaults()

func (*CaParams) FmCa

func (kp *CaParams) FmCa(ca float32, caM, caP, caD *float32)

FmCa computes updates to CaM, CaP, CaD from current calcium level. The SpikeG factor is NOT applied to Ca and should be pre-applied as appropriate.

func (*CaParams) FmCa4

func (kp *CaParams) FmCa4(ca float32, caM, caP, caD *float32)

FmCa4 computes updates to CaM, CaP, CaD from current calcium level using 4x rate constants, to be called at 4 msec intervals. This introduces some error but is significantly faster and does not affect overall learning.

func (*CaParams) FmSpike

func (kp *CaParams) FmSpike(spike float32, caM, caP, caD *float32)

FmSpike computes updates to CaM, CaP, CaD from current spike value. The SpikeG factor determines strength of increase to CaM.

func (*CaParams) IntFmTime

func (kp *CaParams) IntFmTime(ctime, utime float32) int32

IntFmTime returns the interval from current time and last update time, which is 0 if never updated

func (*CaParams) Update

func (kp *CaParams) Update()

type Rules

type Rules int32 //enums:enum

Rules are different options for Kinase-based learning rules These are now implemented using separate Prjn types in kinasex

const (
	// SynSpkCont implements synaptic-level Ca signals at an abstract level,
	// purely driven by spikes, not NMDA channel Ca, as a product of
	// sender and recv CaSyn values that capture the decaying Ca trace
	// from spiking, qualitatively as in the NMDA dynamics.  These spike-driven
	// Ca signals are integrated in a cascaded manner via CaM,
	// then CaP (reflecting CaMKII) and finally CaD (reflecting DAPK1).
	// It uses continuous learning based on temporary DWt (TDWt) values
	// based on the TWindow around spikes, which convert into DWt after
	// a pause in synaptic activity (no arbitrary ThetaCycle boundaries).
	// There is an option to compare with SynSpkTheta by only doing DWt updates
	// at the theta cycle level, in which case the key difference is the use of
	// TDWt, which can remove some variability associated with the arbitrary
	// timing of the end of trials.
	SynSpkCont Rules = iota

	// SynNMDACont is the same as SynSpkCont with NMDA-driven calcium signals
	// computed according to the very close approximation to the
	// Urakubo et al (2008) allosteric NMDA dynamics, then integrated at P vs. D
	// time scales.  This is the most biologically realistic yet computationally
	// tractable verseion of the Kinase learning algorithm.
	SynNMDACont

	// SynSpkTheta abstracts the SynSpkCont algorithm by only computing the
	// DWt change at the end of the ThetaCycle, instead of continuous updating.
	// This allows an optimized implementation that is roughly 1/3 slower than
	// the fastest NeurSpkTheta version, while still capturing much of the
	// learning dynamics by virtue of synaptic-level integration.
	SynSpkTheta

	// NeurSpkTheta uses neuron-level spike-driven calcium signals
	// integrated at P vs. D time scales -- this is the original
	// Leabra and Axon XCAL / CHL learning rule.
	// It exhibits strong sensitivity to final spikes and thus
	// high levels of variance.
	NeurSpkTheta
)

The different versions of Kinase learning rules

const RulesN Rules = 4

RulesN is the highest valid value for type Rules, plus one.

func RulesValues

func RulesValues() []Rules

RulesValues returns all possible values for the type Rules.

func (Rules) Desc

func (i Rules) Desc() string

Desc returns the description of the Rules value.

func (Rules) Int64

func (i Rules) Int64() int64

Int64 returns the Rules value as an int64.

func (Rules) IsValid

func (i Rules) IsValid() bool

IsValid returns whether the value is a valid option for type Rules.

func (Rules) MarshalText

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

MarshalText implements the encoding.TextMarshaler interface.

func (*Rules) SetInt64

func (i *Rules) SetInt64(in int64)

SetInt64 sets the Rules value from an int64.

func (*Rules) SetString

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

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

func (Rules) String

func (i Rules) String() string

String returns the string representation of this Rules value.

func (*Rules) UnmarshalText

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

UnmarshalText implements the encoding.TextUnmarshaler interface.

func (Rules) Values

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

Values returns all possible values for the type Rules.

Directories

Path Synopsis
synca_plot plots kinase SynCa update equations
synca_plot plots kinase SynCa update equations

Jump to

Keyboard shortcuts

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