Hopfield and Brody model (Hopfield, Brody 2000) (NEURON+python)

 Download zip file   Auto-launch 
Help downloading and running models
Accession:144549
Demonstration of Hopfield-Brody snychronization using artificial cells in NEURON+python.
Reference:
1 . Hopfield JJ, Brody CD (2001) What is a moment? Transient synchrony as a collective mechanism for spatiotemporal integration. Proc Natl Acad Sci U S A 98:1282-7 [PubMed]
2 . Hopfield JJ, Brody CD (2000) What is a moment? "Cortical" sensory integration over a brief interval. Proc Natl Acad Sci U S A 97:13919-24 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type: Realistic Network;
Brain Region(s)/Organism:
Cell Type(s):
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: NEURON; Python;
Model Concept(s): Pattern Recognition; Coincidence Detection; Temporal Pattern Generation; Synchronization; Attractor Neural Network;
Implementer(s): Lytton, William [billl at neurosim.downstate.edu]; Neymotin, Sam [samn at neurosim.downstate.edu];
/
hoppy
readme.txt
invlfire.mod
misc.mod *
stats.mod
vecst.mod *
declist.hoc *
decmat.hoc *
decnqs.hoc *
decvec.hoc *
default.hoc *
drline.hoc *
grvec.hoc *
init.hoc
labels.hoc
local.hoc *
misc.h
mysetup.py
net.py
nqs.hoc *
nqs_utils.hoc *
nrnoc.hoc *
pyinit.py
simctrl.hoc *
syncode.hoc *
                            
// $Id: drline.hoc,v 1.41 2011/02/15 14:05:02 billl Exp $

// load_file("drline.hoc")

// click and drag left button to draw lines on top of a figure interactively
// select graph to draw on with setdrl(Graph[])
// set color with clr, line width with lne
// select 'Draw curve' for continuous drawing
// select 'Arrow' to place an arrow pointing according to direction of drag

drlflush=1 //whether to flush line drawings each drline call

//* drline(x0,y0,x1,y1,OPT graph or color) 
proc drline () { local color,line
  if (numarg()==0) { print "drline(x0,y0,x1,y1[,g,col,line])"
    return }
  if (numarg()>4) { 
    if (argtype(5)==0) { color=$5 
                         if (numarg()>5) line=$6
    } else {             graphItem = $o5 
                         if (numarg()>5) color=$6
                         if (numarg()>6) line=$7      }}
  graphItem.beginline(color,line)
  graphItem.line($1,$2)
  graphItem.line($3,$4)
  if(drlflush) graphItem.flush()
}

//* set to drawlines on top of fig
proc setdrl () {
  g=$o1 // select this graph for further drawing
  xpanel("")
  $o1.menu_tool("Draw line","drl")
  $o1.menu_tool("Draw curve","drc")
  $o1.menu_tool("Label","drw")
  $o1.menu_tool("Arrow","dra")
  $o1.menu_tool("Circle","drci")
  $o1.menu_tool("Rectangle","drr")
  xvalue("Color","clr",1,"",1)
  xvalue("Line","lne",1,"",1)
  xbutton("Erase","g.erase_all()")
  xpanel()
  $o1.exec_menu("Draw line")
}

//* draw line interactively on top of fig
// interesting that this should work at all since x0,y0 local but still preserving their
// values across multiple calls
proc drl ()  { local x0,y0,type,x,y,keystate
  type=$1 x=$2 y=$3 keystate=$4
  if (type==2) {x0=x y0=y}
  if (type==3) drline(x0,y0,x,y,clr,lne)
}

//* draw circle interactively on top of fig
// drci(2,0,0,0) drci(3,1,0,0)
proc drci ()  { local a,x0,y0,type,x,y,keystate,ii,rad localobj xv,yv
  type=$1 x=$2 y=$3 keystate=$4
  if (type==2) {x0=x y0=y}
  if (type==3) { rad=sqrt((x-x0)^2+(y-y0)^2) 
    a=allocvecs(xv,yv) vrsz(360,xv,yv)
    print "Circle: ",x0,y0,rad
    yv.circ(xv,x0,y0,rad)
    yv.line(g,xv,clr,lne)
    dealloc(a)
  }
}

//* draw retangle interactively on top of fig
proc drr ()  { local x0,y0,type,x,y,keystate
  type=$1 x=$2 y=$3 keystate=$4
  if (type==2) {x0=x y0=y}
  if (type==3) { drline(x0,y0,x0,y,clr,lne)
    drline(x,y0,x,y,clr,lne) drline(x,y,x0,y,clr,lne) drline(x,y0,x0,y0,clr,lne) }
}

//* draw arrow interactively on top of fig
proc dra ()  { local xsz,ysz,type,x,y,keystate,rot
  type=$1 x=$2 y=$3 keystate=$4
  xsz=0.1*(g.size(2)-g.size(1)) // 10% of size
  ysz=0.1*(g.size(4)-g.size(3))
  if (type==2) {x0=x y0=y}
  if (type==3) {
    if (y==y0) {
      if (x>x0) rot=-90 else rot=90
    } else {
      rot=-atan((x-x0)/(y-y0))/2/PI*360
      if ((y-y0)<=0) rot+=180
    }
    g.glyph(arrow(),x,y,xsz,ysz,rot)
  }
}

//* draw curve interactively on top of fig
proc drc ()  { local x0,y0,type,x,y,keystate
  type=$1 x=$2 y=$3 keystate=$4
  if (type==2) { x0=x y0=y
  } else if (type==1) {
    drline(x0,y0,x,y,clr,lne)
    x0=x y0=y
  } else if (type==3) drline(x0,y0,x,y,clr,lne)
}

//* write label
proc drw ()  { local x0,y0,type,x,y,keystate
  type=$1 x=$2 y=$3 keystate=$4
  if (type==2) { 
   string_dialog("Label: ",tstr) 
   g.label(x,y,tstr,1,1,0.5,0.5,clr)
  }
}

obfunc arrow () { localobj o
  o=new Glyph()
  o.m(0,0)  o.l(0,2) o.s(1,4) // draw vertical line
  o.m(0,0)  o.l(0,-2) o.s(1,4) // draw vertical line
  o.m(0,-2) o.l(-2,0) o.s(1,4)
  o.m(0,-2) o.l(2,0) o.s(1,4)
  return o
}

//* hist(g,vec,min,max,bins)
{clr=1 hflg=1 ers=1 sym=1 pflg=0 lin=4 hbup=0} 
declared("hfunc")
// clr:color, hflg=1 draw lines; 2 draw boxes; 3 fill in; ers=erase; 
// pflg=1 normalize hist by size of $o2, so will be probability instead of count
// pflg=2 turn hist upside down
// pflg=3 operate on values with hfunc()
// style determined by hflg
// hflg==0 lines with dots
// hflg==0.x offset lines with dots
// hflg==1 outlines but not down to zero
// hflg==2 outlines with lines down to zero
// hflg==3 just dots
// hflg==3.x lines between dots
// hbup=1 // move baseline up by this amount
func hist () { local a,b,c,min,max,wid,bins,ii,jj,offset,x,y
  if (numarg()==0) { printf("hist(g,vec,min,max,bins)\n") return 0}
  if ($o2.size<2)  { printf("hist: $o2 too small\n",$o2) return -1}
  if ($o2.min==$o2.max)  { printf("hist: %s all one value: %g\n",$o2,$o2.min) return -1}
  if (numarg()==5) {min=$3 max=$4 bins=$5 
  } else if (numarg()==4) { min=0 max=$3 bins=$4 
  } else if (numarg()<=3) { 
    if ((min=0.95*$o2.min)<0) min=1.05*$o2.min
    if ((max=1.05*$o2.max)<0) max=0.95*$o2.max
    bins=100
    if (min>0) min*=0.9 else min*=1.1
    if (max>0) max*=1.1 else max*=0.9
    if (numarg()==3) bins=$3
  }
  wid=(max-min)/bins
  // print min,max,max-wid,wid
  a=b=c=allocvecs(3) b+=1 c+=2
  offset=0 x=-1
  if (ers) $o1.erase_all()
  mso[c].hist($o2,min,bins,wid) // c has values
  if(pflg==1) mso[c].div(mso[c].sum) // normalize to sum to 1
  if(pflg==2) mso[c].mul(-1)
  if(pflg==3) hfunc(mso[c])
  mso[a].resize(2*mso[c].size())
  mso[a].indgen(0.5) 
  mso[a].apply("int") 
  mso[b].index(mso[c], mso[a]) 
  mso[a].mul(wid) mso[a].add(min)
  mso[b].rotate(1)
  mso[b].x[0] = 0 
  mso[b].append(mso[b].x[mso[b].size-1],0)
  mso[b].add(hbup)
  mso[a].append(max,max)
  if (hflg==1 || hflg==2) { 
    mso[b].line($o1, mso[a],clr,lin)
    if (hflg==2) for vtr(&x,mso[a]) drline(x,0,x,mso[b].x[i1],$o1,clr,lin)
  } else if (int(hflg)==0 || hflg>=3) { 
    if (hflg%1!=0) offset=hflg*wid // use eg -0.5+ii/8 to move back to integer
    mso[a].indgen(min,max-wid,wid)
    mso[a].add(wid/2+offset)
    // print mso[a].min,mso[a].max
    // mso[c].mark($o1,mso[a],"O",6,clr,2) // this will place points where 0 count
    for jj=0,mso[a].size-1 if (mso[c].x[jj]!=0) {
      if (hflg!=3 && hflg%1!=0) drline(mso[a].x[jj],0,mso[a].x[jj],mso[c].x[jj],$o1,clr,lin)
      if (hflg==4) {
        if (x!=-1) drline(x,y,mso[a].x[jj],mso[c].x[jj],$o1,clr,lin)
        x=mso[a].x[jj] y=mso[c].x[jj]
      }
      $o1.mark(mso[a].x[jj],mso[c].x[jj],sg(sym).t,10,clr,2) // don't place points with 0 count
    }
  }
  $o1.flush()
  $o1.size(min,max,0,mso[b].max)
  dealloc(a)
  return 1
}

// barplot(g,yvec,xvec[,bar_width]) 
// barplot(g,yvec,xvec[,bar_width,color_vec]) -- for multicolored bars -- each point has a color
// barplot(g,yvec,xvec[,bar_width,color_vec,error_vec]) -- error_vec plots the error
scribble=0
func barplot () { local a,sz,wid,ii,jj,x,y,mulcol localobj go,vx,vy,v1,vcol
  if (numarg()==0) {
    printf("barplot(g,yvec,xvec[,bar_width]), scribble=1 to 'fill in'\n") 
    printf("set scribble=1 to fill in with single color (based on clr)\n")
    printf("barplot(g,yvec,xvec[,bar_width,color_vec]):multicolored bars-each point has a color\n")
    printf("barplot(g,yvec,xvec[,bar_width,color_vec,error_vec]):add +/- error to each bar\n")
    return 0}
  if ((sz=$o2.size)!=$o3.size)  { printf("barplot: x,y vectors differ in size\n") return -1}
  go=$o1 $o3.sort
  if (argtype(4)==0)  wid=$4 else wid=1
  if (argtype(5)==1)  {vcol=$o5 mulcol=-1
    if (sz!=vcol.size) { printf("barplot: color vec wrong size: %d %d\n",sz,vcol.size) return -1}  
  } else if (argtype(5)==0) mulcol=$5 else mulcol=0
  wid/=2
  // print min,max,max-wid,wid
  a=allocvecs(vx,vy,v1)
  if (ers) go.erase_all()
  for vtr2(&x,&y,$o3,$o2,&ii)  { 
    vx.append(x-wid,x-wid,x+wid,x+wid)
    vy.append(0,y,y,0)
  }
  if (mulcol) {
    for vtr2(&x,&y,$o3,$o2,&jj)  { 
      if (mulcol==-1) clr=vcol.x[jj] else clr=mulcol
      vrsz(0,vx,vy)
      vx.append(x-wid,x-wid)
      vy.append(0,y)
      for (ii=0;ii<2*wid;ii+=(wid/100)) { 
        vx.add(wid/100) 
        vy.line(go, vx, clr, 4)
      }
    }
    vy.line(go, vx, clr, 4)
  } else if (scribble) {
    vrsz(0,vx,vy)
    for vtr2(&x,&y,$o3,$o2,&ii)  { 
      vx.append(x-wid,x-wid,x-wid)
      vy.append(0,y,0)
    }
    for (ii=0;ii<2*wid;ii+=(wid/100)) { 
      vx.add(wid/100) 
      vy.line(go, vx, clr, 4)
    }
    vy.line(go, vx, clr, 4)
  } else vy.line(go, vx, clr, lne)
  if(numarg()>5) $o2.ploterr(go, $o3, $o6, 15, 1, 3)
  go.flush()
  go.size(vx.min-wid,vx.max+wid,0,vy.max)
  dealloc(a)
  return 1
}

proc smgs () { local a,b,c,min,max,wid,bins,ii,jj,offset,x,y localobj v1
  if ($o2.size<2)  { printf("smgs: $o2 too small\n",$o2) return -1}
  if ($o2.min==$o2.max)  { printf("smgs: %s all one value: %g\n",$o2,$o2.min) return -1}
  if (numarg()==5) {min=$3 max=$4 bins=$5 
  } else if (numarg()==4) { min=0 max=$3 bins=$4 
  } else if (numarg()<=3) { 
    if ((min=0.95*$o2.min)<0) min=1.05*$o2.min
    if ((max=1.05*$o2.max)<0) max=0.95*$o2.max
    bins=100
    if (min>0) min*=0.9 else min*=1.1
    if (max>0) min*=1.1 else max*=0.9
    if (numarg()==3) bins=$3
  }
  wid=(max-min)/bins
  // print min,max,max-wid,wid
  a=b=c=allocvecs(3,1e4) b+=1 c+=2
  offset=0 x=-1
  if (ers) $o1.erase_all()
  mso[a].indgen(min,max,wid)
  if (0) {
    mso[c].smgs($o2,min,max,wid,wid*wid/4) // c has values
    mso[c].line($o1, mso[a],clr,4)
  } else {
    v1=$o2.sumgauss(min,max,wid,wid/2) // c has values
    v1.line($o1, mso[a],clr,4)
  }
}

//* a few drawing utilities from sam (not too spectacular)
 
//** drawhticks(ticksz,minx,maxx,linewidth,$5-$numarg() == y position of horizontal ticks)
// draw horizontal ticks of a view box along left/right of box
proc drawhticks () { local ticksz,minx,maxx,lw,i
  ticksz=$1 minx=$2 maxx=$3 lw=$4
  for i=5,numarg() {
    drline(minx,$i,minx+ticksz,$i,g,1,lw)    drline(maxx,$i,maxx-ticksz,$i,g,1,lw)
  }
}

//** drawvticks(ticksz,miny,maxy,linewidth,$5-$numarg() == x position of vertical ticks)
// draw vertical ticks of a view box along top/bottom of box
proc drawvticks () { local ticksz,miny,maxy,lw,i
  ticksz=$1 miny=$2 maxy=$3 lw=$4
  for i=5,numarg() {
    drline($i,miny,$i,miny+ticksz,g,1,lw)    drline($i,maxy,$i,maxy-ticksz,g,1,lw)
  }
}

//** drawbox(minx,maxx,miny,maxy[,line,graph]) - draw box
proc drawbox () { local minx,maxx,miny,maxy,ln localobj myg
  minx=$1 maxx=$2 miny=$3 maxy=$4
  if(numarg()>4)ln=$5 else ln=3
  if(numarg()>5)myg=$o6 else myg=g
  drline(minx,miny,minx,maxy,myg,1,ln) //bottom
  drline(minx,miny,maxx,miny,myg,1,ln) //left
  drline(minx,maxy,maxx,maxy,myg,1,ln) //top
  drline(maxx,miny,maxx,maxy,myg,1,ln) //right
}

Hopfield JJ, Brody CD (2001) What is a moment? Transient synchrony as a collective mechanism for spatiotemporal integration. Proc Natl Acad Sci U S A 98:1282-7[PubMed]

References and models cited by this paper

References and models that cite this paper

Abeles M (1991) Corticonics: Neural Circuits of the Cerebral Cortex.

Adrian ED (1942) Olfactory reactions in the brain of the hedgehog. J Physiol 100:459-73 [PubMed]

Bi GQ, Poo MM (1998) Synaptic modifications in cultured hippocampal neurons: dependence on spike timing, synaptic strength, and postsynaptic cell type. J Neurosci 18:10464-72 [PubMed]

Buonomano DV, Merzenich MM (1995) Temporal information transformed into a spatial code by a neural network with realistic properties. Science 267:1028-30 [PubMed]

Chafee MV, Goldman-Rakic PS (1998) Matching patterns of activity in primate prefrontal area 8a and parietal area 7ip neurons during a spatial working memory task. J Neurophysiol 79:2919-40 [Journal] [PubMed]

Doyle AC (1890) Sign Of The Four

Fuster JM (1995) Memory In The Cerebral Cortex: An Empirical Approach To Neural Networks In The Human And Nonhuman Primate

GERSTEIN GL, MANDELBROT B (1964) RANDOM WALK MODELS FOR THE SPIKE ACTIVITY OF A SINGLE NEURON. Biophys J 4:41-68 [PubMed]

Gibson JR, Beierlein M, Connors BW (1999) Two networks of electrically coupled inhibitory neurons in neocortex. Nature 402:75-9 [PubMed]

Hopfield JJ (1996) Transforming neural computations and representing time. Proc Natl Acad Sci U S A 93:15440-4 [PubMed]

Hopfield JJ (1999) Odor space and olfactory processing: collective algorithms and neural implementation. Proc Natl Acad Sci U S A 96:12506-11 [PubMed]

Hopfield JJ, Brody CD (2000) What is a moment? "Cortical" sensory integration over a brief interval. Proc Natl Acad Sci U S A 97:13919-24 [Journal] [PubMed]

   Hopfield and Brody model (Hopfield, Brody 2000) (NEURON+python) [Model]
   Hopfield and Brody model (Hopfield, Brody 2000) [Model]

Hopfield JJ, Brody CD, Roweis S (1998) Adv Neural Inf Processing 10:166-172

Keil A, Muller MM, Ray WJ, Gruber T, Elbert T (1999) Human gamma band activity and perception of a gestalt. J Neurosci 19:7152-61 [PubMed]

Kuffler SW, Nicholls JG, Martin AR (1984) From Neuron To Brain :19-73

Matthews PC, Mirollo RE, Strogatz SH (1991) Physica D 52:293-331

Riehle A, Grun S, Diesmann M, Aertsen A (1997) Spike synchronization and rate modulation differentially involved in motor cortical function. Science 278:1950-3 [PubMed]

Romo R, Brody CD, Hernandez A, Lemus L (1999) Neuronal correlates of parametric working memory in the prefrontal cortex. Nature 399:470-3 [PubMed]

Salinas E, Hernandez A, Zainos A, Romo R (2000) Periodicity and firing rate as candidate neural codes for the frequency of vibrotactile stimuli. J Neurosci 20:5503-15 [PubMed]

Shadlen MN, Newsome WT (1994) Noise, neural codes and cortical organization. Curr Opin Neurobiol 4:569-79 [PubMed]

Singer W, Gray CM (1995) Visual feature integration and the temporal correlation hypothesis. Annu Rev Neurosci 18:555-86 [PubMed]

Sobel EC, Tank DW (1994) In vivo Ca2+ dynamics in a cricket auditory neuron: an example of chemical computation. Science 263:823-6 [PubMed]

Sompolinsky H, Golomb D, Kleinfeld D (1990) Global processing of visual stimuli in a neural network of coupled oscillators. Proc Natl Acad Sci U S A 87:7200-4 [PubMed]

van Vreeswijk C, Sompolinsky H (1998) Chaotic balanced state in a model of cortical circuits. Neural Comput 10:1321-71 [PubMed]

von der Malsburg C, Schneider W (1986) A neural cocktail-party processor. Biol Cybern 54:29-40 [PubMed]

Wehr M, Laurent G (1996) Odour encoding by temporal sequences of firing in oscillating neural assemblies. Nature 384:162-6 [PubMed]

Barak O, Tsodyks M (2006) Recognition by variance: learning rules for spatiotemporal patterns. Neural Comput 18:2343-58 [PubMed]

Cebulla C (2007) Asymptotic behavior and synchronizability characteristics of a class of recurrent neural networks. Neural Comput 19:2492-514 [PubMed]

Cymbalyuk G, Shilnikov A (2005) Coexistence of Tonic Spiking Oscillations in a Leech Neuron Model J Comp Neurosci 18:255-263 [Journal]

Gutig R, Sompolinsky H (2009) Time-warp-invariant neuronal processing. PLoS Biol 7:e1000141 [Journal] [PubMed]

   Time-warp-invariant neuronal processing (Gutig & Sompolinsky 2009) [Model]

Legenstein R, Pecevski D, Maass W (2008) A learning theory for reward-modulated spike-timing-dependent plasticity with application to biofeedback. PLoS Comput Biol 4:e1000180 [Journal] [PubMed]

   Reward modulated STDP (Legenstein et al. 2008) [Model]

Migliore M, Hines ML, Shepherd GM (2005) The role of distal dendritic gap junctions in synchronization of mitral cell axonal output. J Comp Neurosci 18:151-161 [Journal] [PubMed]

   Olfactory bulb mitral cell: synchronization by gap junctions (Migliore et al 2005) [Model]

Migliore M, Messineo L, Cardaci M, Ayala GF (2001) Quantitative modeling of perception and production of time intervals. J Neurophysiol 86:2754-60 [Journal] [PubMed]

   Estimation and Production of Time Intervals (Migliore et al 2001) [Model]

Miller JA, Kenyon GT (2007) Extracting number-selective responses from coherent oscillations in a computer model. Neural Comput 19:1766-97 [PubMed]

Monaco JD, Knierim JJ, Zhang K (2011) Sensory feedback, error correction, and remapping in a multiple oscillator model of place cell activity Frontiers in Computational Neuroscience 5(0):39 [Journal]

   Sensory feedback in an oscillatory interference model of place cell activity (Monaco et al. 2011) [Model]

Okamoto H, Isomura Y, Takada M, Fukai T (2007) Temporal integration by stochastic recurrent network dynamics with bimodal neurons. J Neurophysiol 97:3859-67 [PubMed]

   Temporal integration by stochastic recurrent network (Okamoto et al. 2007) [Model]

Salinas E, Sejnowski TJ (2001) Correlated neuronal activity and the flow of neural information. Nat Rev Neurosci 2:539-50 [PubMed]

Talathi SS, Abarbanel HD, Ditto WL (2008) Temporal spike pattern learning. Phys Rev E Stat Nonlin Soft Matter Phys 78:031918 [Journal] [PubMed]

Welday AC, Shlifer IG, Bloom ML, Zhang K, Blair HT (2011) Cosine Directional Tuning of Theta Cell Burst Frequencies: Evidence for Spatial Coding by Oscillatory Interference J. Neurosci. 31:16157-16176 [Journal] [PubMed]

   Synthesis of spatial tuning functions from theta cell spike trains (Welday et al., 2011) [Model]

Zilli EA (2012) Models of grid cell spatial firing published 2005-2011. Front Neural Circuits 6:16 [Journal] [PubMed]

   Grid cell spatial firing models (Zilli 2012) [Model]

(40 refs)

Hopfield JJ, Brody CD (2000) What is a moment? "Cortical" sensory integration over a brief interval. Proc Natl Acad Sci U S A 97:13919-24[PubMed]

References and models cited by this paper

References and models that cite this paper

Gutig R, Sompolinsky H (2009) Time-warp-invariant neuronal processing. PLoS Biol 7:e1000141 [Journal] [PubMed]

   Time-warp-invariant neuronal processing (Gutig & Sompolinsky 2009) [Model]

Hopfield JJ, Brody CD (2001) What is a moment? Transient synchrony as a collective mechanism for spatiotemporal integration. Proc Natl Acad Sci U S A 98:1282-7 [Journal] [PubMed]

   Hopfield and Brody model (Hopfield, Brody 2000) (NEURON+python) [Model]
   Hopfield and Brody model (Hopfield, Brody 2000) [Model]

Migliore M, Hines ML, Shepherd GM (2005) The role of distal dendritic gap junctions in synchronization of mitral cell axonal output. J Comp Neurosci 18:151-161 [Journal] [PubMed]

   Olfactory bulb mitral cell: synchronization by gap junctions (Migliore et al 2005) [Model]

(3 refs)