Ordnary Dfferenal Equaons n Neuroscence wh Malab eamples. Am - Gan undersandng of how o se up and solve ODE s Am Undersand how o se up an solve a smple eample of he Hebb rule n D
Our goal a end of class undersand Hebban plascy mahemacally Classcal Condonng and Hebb s rule Ear A Nose B Tongue When an aon n cell A s near enough o ece cell B and repeaedly and perssenly akes par n frng, some growh process or meabolc change akes place n one or boh cells such ha A s effcacy n frng B s ncreased D. O. Hebb (949
The generalzed Hebb rule: dw η y and y he oupu s assumed lnear: where are he npus y j w j j 3 4 Resuls n D w w w 3 w 4 y
Eample of Hebb n D θπ/3 m w 0 - - - - 0 The + symbols represen randomly chosen npu pars (, and he red crcles he evoluon of he synapc weghs (w w. (Noe: here npus have a mean of zero
Par I: eamples of ODE s how o se hem up and how o solve hem. Eample : Radoacve decay: Ths s he canoncal eample for a smple D ODE, s also a good eample for a random sascal processes, lke you saw yeserday Assume here s a gven amoun or radoacve maeral defned by he varable X. X( s he amoun a me. The probably ha each aom wll decay n a small me perod s ndependen of wha he oher molecules do, and only radoacve molecules can decay o a non radoacve sae. The probably of decay over a small perod s defned as γ.the amoun remanng a me + s: ( + ( ( γ Les run he followng smple malab program o see wha wll happen o (.
>> zeros(,00; >> /000; >> 0::000*; >> >> (0; >> gamma; >>for jj:(lengh(- (jj+(jj-*gamma*(jj; end >> plo(, Wha s he shape of hese curves? How do hey depend on he parameer γ?
Ths s a dfference equaon: A lle smple mah: Now assume ha he me sep approached 0 (s very small Ths s now a dfferenal equaon: + γ ( ( ( γ γ ( ( ( ( ( ( + + γ d + ( ( lm 0 d γ
d γ How do we solve hs ODE? Make a guess, assume ha: ( A ep( B Noe for hs choce of (: d B A ep( B B ( Inser hs back no he ODE above, ge: B ( γ ( Whch s a soluon f B-γ. So: ( A ep( γ (0 ep( / τ
Soluon: ( (0 ep( / τ Where τ he me consan s τ /γ, and he nal condon deermnes he oher Free consan (0A Termnology, hs s a frs order (only frs dervaves lnear dfferenal equaon. The dynamcal varable depends on only one parameer,. If depends on addonal paramerers we mgh oban paral dfferenal equaons, whch we wll no dscuss here.
Eample : Chemcal reacons. Assume ha when a molecule Of ype A bnds o a molecule of ype B hey can form a produc of ype C. Denoe as A+B C. A represens he concenraon of ype A ec. Assume now ha he probably ha ype A wll bnd wh be depends on her concenraon. Then: da ( γa B da ( γa B dc (3 + γa B Where γ s a rae consan. These are hree coupled ordnary }dfferenal equaons
Malab program len000 /len; Azeros(,000; Bzeros(,000; Czeros(,000; gamma; ( ( (3 da da dc γa B γa B + γa B A(; B(0; melne0::*len; for :len A(+A(-*gamma*A(*B(; B(+B(-*gamma*A(*B(; C(+C(+*gamma*A(*B(; end plo(melne,a,'b'; hold on; plo(melne,b,'r-.';plo(melne,c,'k'; Noe ha here are conservaon equaons: A+CA o and B+CB o
( ( (3 da da dc γa B γa B + γa B
da ( γa B Smplfcaon. da ( γa B dc (3 + γa B da ( γb0a ( C A(0 A Oban soluon: A C A(0 ep( A(0( γb ep( Les assume a case where B>>A. The smalles value on B possble s B(0-A(0 whch s close o B(0. Replace hen he dynamcal varable B wh he parameer BB0B(0. Use conservaon A+CA(0, ge: 0 γb 0
A( C ( A(0 ep( γb0 + sgns represen he appromae A(0( ep( γb0 analycal soluons A(0, B(00, γ Play wh he program parameers and nal condons and compare o he analycal soluon, see when he appromae soluons are no longer a good appromaon.
Fed pons and her sably: The problems unl now are very smple and eacly, mos problems are no. Les ake a smple problem and preend s no o see wha we would do n such a case. Same problem rewren: dc γb 0A0 γb C k k C { 0 3 k k Fed pons when: dc Is hs fed pon sable, ha s when we slghly move away from he FP wll he dynamcs reurn us o he FP or ake us away from? dc k k /k 0 C A 0 k k C Here, he flow s oward he FP, and he FP s sable. If he lne had a posve slope, a he FP would be unsable.
Terms used:. Frs order, only frs dervaves d The equaon s second order. I oo has a smple soluon ry nserng.. Ths equaon s lnear because does no have erms of he n d form. d d + a + b Non lnear equaon are usually hard o solve eacly, and we usually resor o fndng her fed pons and he sably of hese fed pons. 0 ( A ep( λ
3. An equaon of he form d Is non-homogeneous we have mehods for solvng such equaons. Tebooks for dfferenal equaons: d + a + b(. Elemenary dfferenal equaons and boundary value problems. Boyce and DPrma. Ths has mosly analycal soluons and background on fed pons and her sably. To see eamples of equaons for specfc problems solved n erms of he fed pons and her sably you can look a:. Nonlnear Dynamcs and Chaos: Wh Applcaons o Physcs, Bology, Chemsry and Engneerng. S. Sogaz. Ths s no a dffernal equaons ebook, bu he mehods used and eamples are very useful and s an easy read. 0
Recap wha dd we learn unl now?
Par II: The Hebb rule, an eample of learnng dynamcs and how we can solve a D eample. The Hebb rule: w ηy 3 4 w Where: dw η y y w w w w 3 w 4 y If we nser no equaon above we ge: dw η j w j j
Smple D eample (. a. The npu s consan over me: a dw η w ηa w w( w(0 ep( ηa w y b. The npu has a probably of ½ of beng and a probably of ½ of beng -. Assume learnng s slow so ha can ake average over npu dsrbuon: dw w( 0.5 ( + 0.5 ( ηw η w η 444 4443 w( w(0 ep( η
w w( w(0 ep( ηa y dw w( 0.5 ( + 0.5 ( ηw η w η 444 4443 w( w(0 ep( η
D eample. The Hebb rule: Average: dw dw η j w j wj j j η η j j w j Q j w w y Mar noaon: dw ηwq Assume:.0 0.5 0.5.0 wh wh p p 0.5 0.5 Show smple malab smulaon of hs eample
dw where: Q wjqj j j j Assume.0 0.5 0.5.0 wh wh p p 0.5 0.5 Q.5 0.5 0.5 0.5 + 0.5 0.5 0.5 0.5 0 0.65 0.5 0.5 0.65 dw ηwq Les preend now ha we can smply drop hs average symbol dw ηwq
dw ηqw Fnd he egen vecors of Q: Malab code Q u λ u >> Q[0.65, 0.5 0.5, 0.65]; >> [U,lam]eg(Q U u λ.5-0.707 0.707 0.707 0.707 lam u λ 0.5 0.50 0 0.50
The averaged Hebban ODE: Fnd he egen-vecors of Q: dw ηqw Q u λ u These form a complee orhonormal bass Rewre: w( a ( u + a( u d w η ( a ( λ u + a ( u λ So da ηλ a w( a( 0 ep( λ u + a(0 ep( λ u
w ηqw d u u Q λ Fnd he egen-vecors of Q: If Q has he common form: Then: Wha happens f λ >> λ? u u w( (0 ep( 0 ep( ( a a λ λ + The averaged Hebban ODE: a b b a Q + + + + u b a u b a λ λ
General commens abou he form of correlaon mares. They are symmerc Q j Q j., and herefore all of her egenvalues are real. All of her egen-values are posve (Try o prove hs yourself HW- For he general form of a correlaon mar n D: Q a c c b. Learn how o fnd analycally he egen-vecors and egen-values.. Show ha n hs case all egen-values are posve 3. Show ha n he hger dmnsonal case all egen-values are posve
Wha dd we learn oday? HW- Wha would happen wh he learnng rule: dw η ( y wy Oja (98 Where are he F.P, how does hs relae o he egenvecors, and why