Feedforward heteroassociative network with HH dynamics (Lytton 1998)

 Download zip file   Auto-launch 
Help downloading and running models
Using the original McCulloch-Pitts notion of simple on and off spike coding in lieu of rate coding, an Anderson-Kohonen artificial neural network (ANN) associative memory model was ported to a neuronal network with Hodgkin-Huxley dynamics.
1 . Lytton WW (1998) Adapting a feedforward heteroassociative network to Hodgkin-Huxley dynamics. J Comput Neurosci 5:353-64 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism: Hippocampus;
Cell Type(s):
Channel(s): I Na,t; I K;
Gap Junctions:
Receptor(s): GabaA; AMPA;
Simulation Environment: NEURON;
Model Concept(s): Pattern Recognition; Temporal Pattern Generation; Spatio-temporal Activity Patterns; Simplified Models; Attractor Neural Network;
Implementer(s): Lytton, William [billl at neurosim.downstate.edu];
Search NeuronDB for information about:  GabaA; AMPA; I Na,t; I K;
matrix.mod *
naf.mod *
passiv.mod *
pregen.mod *
sinstim.mod *
bg.inc *
boxes.hoc *
declist.hoc *
decvec.hoc *
default.hoc *
loadr.hoc *
local.hoc *
mosinit.hoc *
nrnoc.hoc *
simctrl.hoc *
sns.inc *
snshead.inc *
// $Id: run.hoc,v 1.253 2002/04/22 14:48:41 billl Exp $

//* prpatt(vec) presents pattern
ipatt = 0  // the chosen pattern for presentation
proc prpatt () { local ii,jj
  for ii=0,$o1.size-1 { 
    if ($o1.x[ii]>0) {
      incell[ii].v = 50
  ininh.v = 50

//* outputData
proc initMisc1() {
  gotime = 5
  nextgo = 1e10

proc outputData() {
  if (t>gotime+dt) { 
    forsec "incell" { v = v_init } 
    gotime = gotime + nextgo
  } else if (t>gotime) { 

//* Printlist stuff
tmplist = new List("NRN")

//* grast() puts filled squares on 1s and 0's on 0s
proc grast () { local i
  YO = ovl.object(ipatt)
  for lvtr(XO,&x,panobjl.object(0).glist,YO) {
    if (x==1) { XO.mark(tstop/4,40,"S",8)
    } else    { XO.mark(tstop/4,40,"o",8) }

//* show() run out a vector and then superimpose the squares
proc show () { 
  if ($1>npatt) { printf("%d greater than npatt: %d.\n",$1,npatt) return }
  ipatt = $1

//* testrun() run through all the patterns and compare output
proc testrun () { local ii,jj,p1,p2,ham
  p1 = allocvecs(2)  
  for ipatt=0,npatt-1 {
    rdplist(mso[p2]) // scan the printlist for firing
    print ipatt
  for ltr2(XO,YO,veclist,ovl) {
    ham = XO.hamming(YO)
  print ""  mso[p1].printf  print "mean=",mso[p1].mean

//* testrun1() just test 1 of them
proc testrun1 () { local ii,jj,p1,p2,ham
  p1 = allocvecs(2)  
  if (numarg()==2) { run() print "" }
  rdplist(mso[p2]) // scan the printlist for firing
  print mso[p2].hamming(ovl.object(ipatt))

//* rdplist(vec) reads the printlist and sets vec entries to 1 if firing there
thresh = 0
thresht = 300
proc rdplist() { local ii,max,tme
  ii = -1
  for ii=0,printlist.count-1 { // can't 'return' from an iterator
    XO = printlist.object(ii)
    if (strcmp(temp_string_,"0")==0) { ii = 0  // first one
    } else if (ii>=szout) { return // all done
    } else if (ii>=0) {
      if (strcmp(temp_string_,temp_string2_)!=0) { 
        printf("%s out of order.\n",XO.var) return }
    tme = XO.vec.indwhere(">",thresh) * printStep // time of first spike    
    if (tme<0) { tme=1e10 } // no spikes were found
    max = (tme < thresht)

//* arraynum(STR,NAME,TERM)
// return the NAME array number for STR where string contains TERM
// returns -1 if does not fit 
proc arraynum() { local l1,l2,l3
  temp_string_ = ""
  if (sfunc.substr($s1,$s2) != 0) { return }
  if (sfunc.substr($s1,$s2) == -1) { return }
  sfunc.right(temp_string_,1) // remove '\['

//* variance ()
// calculate variance by moving mean from vec.x[i] to x
// NB: binom() changed
proc variance () { local i
  i = 0
  print "NB: must set up vec with means in order to calc stdev's."
  tot = fac(szinp)/fac(iflip)^2 // the total number of vectors
  for (BVBASE=-1.5;BVBASE<=0.9;BVBASE=BVBASE+0.1) {
    mean = vec.x[i]

//* check out questionable identity
// log of M!/(M/m)!^m
func fh() { return logfac($1)-$2*logfac($1/$2) }
func lcb() { return logfac($1)-logfac($1-$2)-logfac($2) }
func cb() { return exp(logfac($1)-logfac($1-$2)-logfac($2)) }
func pm() { return exp(logfac($1)-logfac($1-$2)) }
// compare with binomial expansion to the m power
proc idnty () { local M,m,i,j,s1,F
  M = $1
  m = $2
  F = int(M/m)
  if (F!=M/m) { printf("ERROR: %d not divisible by %d.\n",M,m) return }
  s1 = 0
  for i=0,F {
    a = exp(m*lcb(F,i))
    s1 = s1 + a
  a = exp(fh(M,m))
  print s1," ",a," ",s1-a

//* binom(num) where num is F - the number of flips
// now calculates out the expected value
func binom () { local num,i,j,s1,s2,s3,ni,nf,full
  num = $1
  s1 = s2 = s3 = 0
  nf = fac(num)
  for i=0,num { // doesn't make any difference if include X.X or not (eg 1,num)
    ni = num-i
    a = nf/fac(ni)/fac(i)
    a = a*a/tot
    s3 = s3 + a*(((ni*BVBASE*BVBASE+ ni + 2*i*BVBASE) - mean)^2)
    s1 = s1 + a*(ni*BVBASE*BVBASE+ ni + 2*i*BVBASE)
  full = num*BVBASE*BVBASE + num // num*1*1 actually
  return s1

//* compdots (): compare dotprods
// do allocvecs first
proc compdots () { local i,j,k,s1,s2,last,bnm,ll
  ll = 0
  last = BVBASE
  for (BVBASE=-1.2;BVBASE<=-0.8;BVBASE=BVBASE+0.1) {
    for ltr(XO,ivl) { XO.sw(last,BVBASE) }
    for ltr(XO,ivl) {
      for i=(i1+1),ivl.count-1 {
        if (!eqobj(XO,YO)) {
    //    bnm = binom(iflip)
    //    printf("%g\t\t%g\t\t%g\t\t%g\t\t%g\n",BVBASE,XO.dot(XO),s1/s2,bnm,XO.dot(XO)/bnm)
    last = BVBASE
    ll = ll+1

//* proc dotprods() { 
proc dotprods() { local sum,n,min,max,ham,sum2,dot
  sum=0  sum2=0
  n = 0
  for ltr(XO,ovl) {
//  for ltr(XO,tmplist) 
    sum=0 n=0
    min=1e10 max=-1e10
    for ltr(YO,ovl) { 
      if (! eqobj(XO,YO)) {
        ham = XO.hamming(YO) 
        dot = XO.dot(YO) 
//      print XO," ",YO," ",XO.dot(YO)," ",ham
//        printf("%d ",XO.hamming(YO))
        if (ham>max) { max=ham }
        if (ham<min) { min=ham }
//        sum = sum+XO.hamming(YO)  n=n+1
        sum = sum+XO.dot(YO)  n=n+1
    print XO," ",min," ",max," ",sum/n
    sum2 = sum2+sum
  print sum2/n/ovl.count

//* stats() runs some statistics on performance
proc stats() { local ii,jj,p1,p2,ham,savszout,oflip
  rs = $1
  savszout = szout
  p1 = allocvecs(2)  p2=p1+1
//  for case(&szout,300,150,100,75,50,25) 
  for case(&szout,40)  {
    oflip = szout/2 // density of excitation out (Fo)
    ham = 0
    for ii=0,rs-1 {
      jj = 0
      for ltr2(XO,YO,ivl,ovl) {
        ham = ham + mso[p2].hamming(YO)
        jj = jj+1
    ham = ham/jj/rs
    printf("%d/%d N=%d stats(%d)=%g\n",szinp,szout,npatt,rs,ham)

//* proc nontarg ()
proc nontarg () { local jj,kk,p0,p1,p2,p3,p4,p5,p6,ham2,ham1,szi1,szf
  szf = 50
  szi1 = szf+1
  p0 = allocvecs(7,szinp)
  p1=p0+1 p2=p1+1 p3=p2+1 p4=p3+1 p5=p4+1 p6=p5+1
  if (veclist.count!=convn) { veclist.remove_all() mkveclist(convn,szinp[convn-1]) }
  for (kalap = 2.5;kalap<8;kalap=kalap+1) {
    print kalap
    for ltr(YO,ovl) { // npatt rows go through input/output pairs
      for jj=0,szf {  // cols change from 0 to half the bits
        for ii=0,convn-1 {
          mso[p3].resize(szinp[ii]) mso[p4].resize(szinp[ii])
          mso[p3].flipbits(mso[p4],jj) // flip them in the copy not the original
        ham1 = test[0].hamming(YO) // calc hamming distance from target
        ham2 = test[0].sum // calc activity in the output
        mso[p5].mset(i1,jj,szi1,ham1)  // save the value
        mso[p6].mset(i1,jj,szi1,ham2)  // save the value
    mso[p0].resize(szi1) mso[p1].resize(szi1)
    mso[p2].resize(szi1) mso[p3].resize(szi1)
    for ii=0,szf { 
      mso[p2].x[ii] = mso[p4].mean
      mso[p3].x[ii] = mso[p4].stdev
      mso[p0].x[ii] = mso[p4].mean
      mso[p1].x[ii] = mso[p4].stdev
    //  printf("hamming: mso[%d],mso[%d]; sum: mso[%d],mso[%d] (mean,sdev)\n",p2,p3,p0,p1)
    tmpfile.printf("\n\"h %d %g\n",conva,kalap)
    tmpfile.printf("\n\"s %d %g\n",conva,kalap)

//* kala (testvec,mnum)
// kala = kohonen-anderson linear associator
// process the vector through the linear associator
proc kala () { local mnum
  for mnum=0,convn-1 {
    kala1(test[mnum],mat[mnum],$o1.object(mnum),mnum)  // excitation
    if (mnum>0) { test[0].add(test[mnum]) }

proc kala1 () { local mnum
  $o1.mmult($o2,$o3)  // excitation
  $o1.add(inhv[$4])      // inhibition
  $o1.mul(npatt/ddot[$4]) // normalization
  $o1.thresh((BVBASE+1)/2)   // thresholding

//* proc testmat ()
// testmat([MAT#,INV#]) test mat MAT# with INV#, comparing output with OUV#
// default is to combine all mats (also with MAT#=-1), and try all INV#
proc testmat () { local ii,jj,p1,p2,ham,mnum,just1,min,max
  if (numarg()>0) { just1=$1 } else { just1=-1 }
  if (numarg()>1) { min=$2 max=$2 } else { min=0 max=ovl.count-1 }
  p1 = allocvecs(2)  p2=p1+1
  for jj=min,max {
    YO = ovl.object(jj)
    for ii=0,convn-1 { tmplist.append(ivl[ii].object(jj)) }
    if (just1==-1) { kala(tmplist) 
    } else { kala1(test[0],mat[just1],ivl[just1].object(jj),just1) }
    ham = test[0].hamming(YO)
  print "mean=",mso[p1].mean

proc showtest() { local ii
//  newPlot(0,npatt,0,20)
  for ii=0,convn-1 {
    kalap = ii+0.5
    testmat() // comment dealloc out of testmat() in order to show
//    mso[0].mark(graphItem,1,sym[ii].s,6,ii+1)

// compare output without thresholding
// for ltr2(XO,YO,ovl,veclist) {
//   for vtr2(&x,&y,XO,YO) {printf("%g ",x-y) }
//   printf("\n\n")
// }

//* move lists into arrays
objref rr[npatt],ou[npatt],in[npatt]
for ltr(XO,ivl) { in[i1] = XO }
for ltr(XO,ovl) { ou[i1] = XO }
for ltr(XO,veclist) { rr[i1] = XO }

//* proc row(), col() 
proc row () {

proc col () {

setrange(0,-1)  // erase axes
show(28)  // show results for pattern#28
for ltr(XO,panobj.glist) vec.line(XO,ind,2,5)

Lytton WW (1998) Adapting a feedforward heteroassociative network to Hodgkin-Huxley dynamics. J Comput Neurosci 5:353-64[PubMed]

References and models cited by this paper

References and models that cite this paper

Anderson JA (1972) A simple neural network generating an interactive memory Math Biosci 14:197-220

Anderson JA, Rosenfeld E (1988) Neurocomputing: Foundations Of Research

Barkai E, Bergman RE, Horwitz G, Hasselmo ME (1994) Modulation of associative memory function in a biophysical simulation of rat piriform cortex. J Neurophysiol 72:659-77 [Journal] [PubMed]

Borg-graham L (1991) Modelling the non-linear conductances of excitable membranes Cellular Neurobiology: A Practical Approach, Wheal CHADJ&HV, ed. pp.247

Buckmaster PS, Schwartzkroin PA (1995) Interneurons and inhibition in the dentate gyrus of the rat in vivo. J Neurosci 15:774-89 [PubMed]

Bullock TH (1993) Integrative systems research on the brain: resurgence and new opportunities. Annu Rev Neurosci 16:1-15 [PubMed]

Bullock TH (1997) Signals and signs in the nervous system: the dynamic anatomy of electrical activity is probably information-rich. Proc Natl Acad Sci U S A 94:1-6 [PubMed]

Celebrini S, Thorpe S, Trotter Y, Imbert M (2001) Dynamics of orientation coding in area V1 of the awake primate. Vis Neurosci 10:811-25 [PubMed]

Damasio AR (1990) Category-related recognition defects as a clue to the neural substrates of knowledge. Trends Neurosci 13:95-8 [PubMed]

deCharms RC, Merzenich MM (1996) Primary cortical representation of sounds by the coordination of action-potential timing. Nature 381:610-3 [PubMed]

Destexhe A, Mainen Z, Sejnowski TJ (1994) An efficient method for computing synaptic conductances based on a kinetic model of receptor binding Neural Comput 6:14-18 [Journal]

   Efficient Method for Computing Synaptic Conductance (Destexhe et al 1994) [Model]
   Kinetic synaptic models applicable to building networks (Destexhe et al 1998) [Model]
   Application of a common kinetic formalism for synaptic models (Destexhe et al 1994) [Model]

Destexhe A, Mainen ZF, Sejnowski TJ (1994) Synthesis of models for excitable membranes, synaptic transmission and neuromodulation using a common kinetic formalism. J Comput Neurosci 1:195-230 [Journal] [PubMed]

   Application of a common kinetic formalism for synaptic models (Destexhe et al 1994) [Model]
   Kinetic synaptic models applicable to building networks (Destexhe et al 1998) [Model]

Essen VANDC, Maunsell JHR (1983) Hierarchical organization and functional streams in the visual cortex Trends Neurosci 6:370-375

Fransen E, Lansner A (1995) Low spiking rates in a population of mutually exciting pyramidal cells Network:Comput Neural Systems 6:271-288

Fricke RA, Prince DA (1984) Electrophysiology of dentate gyrus granule cells. J Neurophysiol 51:195-209 [Journal] [PubMed]

Fukai T (1996) Competition in the temporal domain among neural activities phase-locked to subthreshold oscillations. Biol Cybern 75:453-61 [PubMed]

Gardner-Medwin AR (1976) The recall of events through the learning of associations between their parts. Proc R Soc Lond B Biol Sci 194:375-402 [PubMed]

Gray CM (1994) Synchronous oscillations in neuronal systems: mechanisms and functions. J Comput Neurosci 1:11-38 [Journal] [PubMed]

Gray CM, Konig P, Engel AK, Singer W (1989) Oscillatory responses in cat visual cortex exhibit inter-columnar synchronization which reflects global stimulus properties. Nature 338:334-7 [PubMed]

Gray CM, Singer W (1989) Stimulus-specific neuronal oscillations in orientation columns of cat visual cortex. Proc Natl Acad Sci U S A 86:1698-702 [PubMed]

Hines M (1993) NEURON--a program for simulation of nerve equations. Neural Systems: Analysis And Modeling, Eeckman F, ed. pp.127

Hopfield JJ (1982) Neural networks and physical systems with emergent collective computational abilities. Proc Natl Acad Sci U S A 79:2554-8 [PubMed]

Hopfield JJ (1984) Neurons with graded response have collective computational properties like those of two-state neurons. Proc Natl Acad Sci U S A 81:3088-92 [PubMed]

Hopfield JJ (1995) Pattern recognition computation using action potential timing for stimulus representation. Nature 376:33-6 [PubMed]

Kapur A, Lytton WW, Ketchum KL, Haberly LB (1997) Regulation of the NMDA component of EPSPs by different components of postsynaptic GABAergic inhibition: computer simulation analysis in piriform cortex. J Neurophysiol 78:2546-59 [Journal] [PubMed]

Kapur A, Pearce RA, Lytton WW, Haberly LB (1997) GABAA-mediated IPSCs in piriform cortex have fast and slow components with different properties and locations on pyramidal cells. J Neurophysiol 78:2531-45 [Journal] [PubMed]

Kohonen T (1972) Correlation matrix memories. IEEE Trans. on Computers 21:353-359

Lansner A, Fransen E (1992) Modelling hebbian cell assemblies comprised of cortical neurons Network 3:105-119

Lansner A, Fransen E (1995) Improving the realism of attractor models by using cortical columns as functional units The Neurobiology Of Computation: Proceedings Of The 3rd Annual Computation And Neural Systems Conference, Bower J, ed.

Lisman JE, Idiart MA (1995) Storage of 7 +/- 2 short-term memories in oscillatory subcycles. Science 267:1512-5 [PubMed]

Lytton WW (1997) Brain organization: from molecules to parallel processing Contemporary Behavioral Neurology, Trimble M:Cummings J, ed. pp.5

Lytton WW, Destexhe A, Sejnowski TJ (1996) Control of slow oscillations in the thalamocortical neuron: a computer model. Neuroscience 70:673-84 [PubMed]

Lytton WW, Hellman KM, Sutula TP (1998) Computer models of hippocampal circuit changes of the kindling model of epilepsy. Artif Intell Med 13:81-97 [PubMed]

Lytton WW, Sejnowski TJ (1991) Simulations of cortical pyramidal neurons synchronized by inhibitory interneurons. J Neurophysiol 66:1059-79 [Journal] [PubMed]

Maass W (1997) Fast sigmoidal networks via spiking neurons. Neural Comput 9:279-304 [PubMed]

Marr D (1971) Simple memory: a theory for archicortex. Philos Trans R Soc Lond B Biol Sci 262:23-81 [PubMed]

Marr D (1982) Vision: A Computational Investigation into the Human Representation and Processing of Visual Information

McCulloch WS, Pitts W (1990) A logical calculus of the ideas immanent in nervous activity. 1943. Bull Math Biol 52:99-115; discussion 73-97 [PubMed]

Menschik ED, Finkel LH (1998) Neuromodulatory control of hippocampal function: towards a model of Alzheimer's disease. Artif Intell Med 13:99-121 [PubMed]

Murthy VN, Fetz EE (1992) Coherent 25- to 35-Hz oscillations in the sensorimotor cortex of awake behaving monkeys. Proc Natl Acad Sci U S A 89:5670-4 [PubMed]

O'Reilly RC, McClelland JL (1994) Hippocampal conjunctive encoding, storage, and recall: avoiding a trade-off. Hippocampus 4:661-82 [PubMed]

Parodi O, Combe P, Ducom JC (1996) Temporal coding in vision: coding by the spike arrival times leads to oscillations in the case of moving targets. Biol Cybern 74:497-509 [PubMed]

Pribram KH (1969) The neurophysiology of remembering. Sci Am 220:73-86 [PubMed]

Scharfman HE (1994) Evidence from simultaneous intracellular recordings in rat hippocampal slices that area CA3 pyramidal cells innervate dentate hilar mossy cells. J Neurophysiol 72:2167-80 [Journal] [PubMed]

Stemmler M (1996) A single spike suffices - the simplest form of stochastic resonance in model neurons Network-computation In Neural Systems 7:687-716

Teyler TJ, DiScenna P (1986) The hippocampal memory indexing theory. Behav Neurosci 100:147-54 [PubMed]

Thorpe S, Fize D, Marlot C (1996) Speed of processing in the human visual system. Nature 381:520-2 [PubMed]

Tovee MJ (1994) Neuronal processing. How fast is the speed of thought? Curr Biol 4:1125-7 [PubMed]

Tovee MJ, Rolls ET, Treves A, Bellis RP (1993) Information encoding and the responses of single neurons in the primate temporal visual cortex. J Neurophysiol 70:640-54 [Journal] [PubMed]

Treves A, Rolls ET (1994) Computational analysis of the role of the hippocampus in memory. Hippocampus 4:374-91 [PubMed]

Willshaw DJ, Buneman OP, Longuet-Higgins HC (1969) Non-holographic associative memory. Nature 222:960-2 [PubMed]

Hines ML, Carnevale NT (2003) Personal Communication of NEURON bibliography

Lytton WW, Hellman KM, Sutula TP (1998) Computer models of hippocampal circuit changes of the kindling model of epilepsy. Artif Intell Med 13:81-97 [PubMed]

Lytton WW, Lipton P (1999) Can the hippocampus tell time? The temporo-septal engram shift model. Neuroreport 10:2301-6 [Journal] [PubMed]

   Hippocampus temporo-septal engram shift model (Lytton 1999) [Model]

Neymotin SA, Jacobs KM, Fenton AA, Lytton WW (2011) Synaptic information transfer in computer models of neocortical columns. J Comput Neurosci. 30(1):69-84 [Journal] [PubMed]

   Synaptic information transfer in computer models of neocortical columns (Neymotin et al. 2010) [Model]

(55 refs)