{"title": "Shaping the State Space Landscape in Recurrent Networks", "book": "Advances in Neural Information Processing Systems", "page_first": 105, "page_last": 112, "abstract": null, "full_text": "Shaping the State Space Landscape  in Recurrent \n\nNetworks \n\nPatrice Y.  Simard  >I< \nComputer Science  Dept. \nUniversity of Rochester \nRochester,  NY  14627 \n\nJean Pierre Raysz \n\nLIUC \n\nU niversite  de  Caen \n14032 Caen Cedex \n\nFrance \n\nAbstract \n\nBernard Victorri \nELSAP \nUniversite  de  Caen \n14032 Caen  Cedex \nFrance \n\nFully  recurrent  (asymmetrical)  networks  can  be  thought  of as  dynamic \nsystems.  The  dynamics  can  be  shaped  to  perform  content  addressable \nmemories,  recognize  sequences,  or  generate  trajectories.  Unfortunately \nseveral  problems  can  arise:  First,  the  convergence  in  the  state  space  is \nnot  guaranteed.  Second,  the  learned  fixed  points  or  trajectories  are  not \nnecessarily stable.  Finally,  there  might exist  spurious fixed  points and/or \nspurious  \"attracting\"  trajectories that do  not correspond  to any patterns. \nIn this paper,  we  introduce a  new  energy  function  that  presents solutions \nto all of these problems.  We present an efficient gradient descent algorithm \nwhich directly acts on the stability of the fixed  points and trajectories and \non the size  and shape of the  corresponding basin and valley of attraction. \nThe results are illustrated by the simulation of a small content addressable \nmemory. \n\n1 \n\nINTRODUCTION \n\nRecurrent  neural  networks  have  the  capability of storing  information  in  the  state \nof their  units.  The  temporal  evolution of these  states  constitutes  the  dynamics  of \nthe  system and  depends on  the weights  and  the  input of the  network.  In the  case \nof symmetric connections,  the  dynamics have  been  shown  to be  convergent  [2]  and \nvarious  procedures  are  known  for  finding  the  weights  to  compute  different  tasks. \nIn  unconstrained  neural  networks  however,  little is  known  about  how  to  train  the \nweights  of the  network  when  the  convergence  of the  dynamics is  not  guaranteed. \nIn  his  review  paper  [1],  Hirsh  defines  the  conditions  which  must  be  satisfied  for \n\n>l<Now  with AT&T Bell  Laboratories,  Crawfords Corner  Road,  Holmdel,  NJ  07733 \n\n105 \n\n\f106 \n\nSimard, Raysz, and Victorri \n\nsome given dynamics to converge,  but does not provide mechanisms for  finding the \nweights  to implement these  dynamics. \n\nIn  this  paper,  a  new  energy  function  is  introduced  which  reflects  the  convergence \nand  the  stability of the  dynamics  of a  network.  A  gradient  descent  procedure  on \nthe weights provides an algorithm to control interesting properties of the dynamics \nincluding contraction over  a  subspace,  stability,  and  convergence. \n\n2  AN  ENERGY FUNCTION TO ENFORCE  STABILITY \n\nThis  section  introduces  a  new  energy  function  which  can  be  used  In  com(cid:173)\nbination  with  the  backpropagation  algorithm  for  recurrent  networks  (cf. \n[6; \n5]).  The continuous propagation rule is  given  by the equation: \n\nT..  aXi  = -x' + g' (~w .. x.)  + I-\n\n\"L . J   '3  3 \n\n, at \n\nj \n\n, \n\n(1) \n\nwhere  x~ is the  activation of unit i,  gi  is  a  differentiable function,  Wij  is  the weight \nfrom unit j  to unit i,  and 1i and Ii  are respectively the time constant and the input \nfor  unit i.  A  possible  discretization of this equation is \n\n(2) \n\n(3) \nWhere  5:1  is  the  activation  of unit  i  at  the  discrete  time  step  t.  Henceforth,  only \nthe  discrete  version of the propagation equation will  be  considered  and the tilda in \n5:  will be omitted to avoid heavy  notations . \n\n2.1  MAKING  THE  MAPPING  CONTRACTING  OR EXPANDING \n\nIN  A  GIVEN  DIRECTION \n\nUsing  the Taylor expansion, G(xt + dxt)  can be written  as \n\nG(xt + dxt)  =  G(xt) + G'(xt) . dxt + o(lIxtlD \n\n(4) \nwhere  G'(xt)  is  the  linear  application  derived  from  G(xt)  and  the  term  o(llxtlD \ntends toward 0 faster  than Ilxtli.  The mapping G  is  contracting in  the  direction  of \nthe unitary vector  D  if \n\nIIG(xt + fD)  - G(xt)1I \nfIlG'(x t )  . DII \nIIG'(x t )  . DII \n\n< \nIIfDIl \n< \nf \n<  1 \n\nwhere  f  is a  small positive constant. \n\nAccordingly,  the following  energy function  is  considered \n\nEtJ(X, D) = ~(IIG'(X) . DII2  - I<x? \n\n(5) \n\n(6) \n\n\fShaping the State Space Landscape in Recurrent Networks \n\n107 \n\nwhere  Kx  is  the  target  contracting  rate  at  X  in  the  direction  D.  Depending  on \nwhether  we  choose  Kx  larger  or smaller  than  1,  minimizing  E3(X, D)  will  make \nthe  mapping at  X  contracting  or  expanding in  the  direction  D.  Note  that  D  can \nbe  a  complex vector. \nThe variation of E$(X, D)  in respect  to Wmn  is equal  to: \n\nOE3(X, D)  =  2(IIG'(X)DW _  Kx) 2:: (2:: OGi(X) Dj )  (2::  o2G,(X) Dj) \n\n. .   OXj \n, \n\n] \n\n.  OWmnOXj \n] \n\noWmn \n\n. \n\nAssuming  the  activation function is of the form 2,  the gradient operator  yields: \n\nOGi(X) \n\nOXj  = 8ij (l- 11) + 11 g (Ui)Wij \n\ndt \n\ndt, \n\n(7) \n\n(8) \n\nwhere  Ui  = Ek WikXk.  To  compute  a!f~:~)  the  following  expression  needs  to  be \nevaluated: \n\n~. = T.. \n02Gi(X) \n~ \nuWmn uX]' \n\ndt  (,,(  ) \"\"'(~  ~ \n\n9  Ui  L- UimUknXk + Wik  ~ \n\nOXk  ) \nuWmn \n\nk \n\n'(  \u00bb) \nWij  + UimUjng  Ui \n\n~ \n\n~ \n\n(9) \n\n\u2022  If we  assume  that for  output units, \nwhich  in turn requires  the evaluation of  a&xls \nWmn \nXk  =  X k  and  ~ =  0,  we  will  improve  the  stability  of  the  fixed  point  when \nthe  visible  units  are  clamped  to  the  input.  What we  want  however,  is  to  increase \nstability  for  the  network  when  the  input  units  are  unclamped  (or  hidden).  This \nmeans  that  for  every  unit  (including  output  units),  we  have  to  evaluate  ~. aWmn \nSince  we  are  at the (unstable)  fixed  point, we  have: \n\n8Wmn. \n\nIf we  derived  this equation with respect  to Wmn  we  get: \n\n2:: WijXj \n( )  \n\n(8mi x n + 2:: Wij 0 \nox\u00b7 \nWmn \n\n]  ) \n\n. \n] \n\n. \n] \n\n(10) \n\n(11) \n\nIn  matrix form: \n\n(12) \nWhere  ei  = &~:n' g'  is  a  diagonal  (square)  matrix such  that g~i = g~ (Ej  WijXj) \nand g~j = 0 for  i -#  j  (note that g'w -#  wg'),  y is  a vector  such  that y,  = 8miXn  and \nW  is  the  weight  matrix.  If we  solve  this we  get: \n\ne =  g'(y + we) \n\nThat is: \n\ne =  (Id - g'wr-1g'y \n\n(13) \n\n(14) \n\n\f108 \n\nSimard, Raysz, and Victorri \n\nwhere  the matrix L  is given  by: \n\nL,; = 6,;  - g' (~Wik\"') w'; \n\n(15) \n\nXk  is  the  activation of the  unit  at  the fixed  point so it is the  clamped value for  the \nvisible  unit,  and  xf for  the  hidden  unit  (the  system  converges  to  a  stable  fixed \npoint when  the visible  units are  clamped). \n\nTo obtain the  target  rate of contraction  Kx  at  X  in  the  direction  D,  the  weights \nare updated  iteratively according to the delta rule: \nD.wij = -Tf aEs(X, L) \n\n(16) \n\naWij \n\nThis updating rule has the  advantages and disadvantages of gradient descent  algo(cid:173)\nrithms. \n\n2.2  COMPLEXITY \n\nThe algorithm given above  can be implemented in O(N2) storage and O(N3) steps, \nwhere  N  is  the  number  of units.  This  complexity  however  can  be  improved  by \navoiding inverting the matrix L  using a local algorithm such  as the one presented in \n[7].  Another implementation of this energy function can be achieved using Lagrange \nmultipliers.  This method exactly evaluates  &~::n  by using  a  backward  pass  [9].  Its \ncomplexity depends  on how  many steps  the network  is  unfolded  in time. \n\n2.3  GLOBAL  STABILITY \n\nGlobal convergence  can  be  obtained  if D  is  parallel the  eigenvector  corresponding \nto  the  largest  eigenvalue  of G/(X).  Indeed,  in  that  case  G/(X) . D  is  the  largest \neigenvalue of G'(X).  If X  is  a fixed  point, the Ostrowski  theorem  [4;  3]  guarantees \nX  is stable if and only if the maximum eigenvalue of the Jacobian of G  is less  than \n1 in modulus. \n\nFortunately,  the  eigenvector  corresponding  to  the  largest  eigenvalue  can  easily  be \ncomputed  using  an efficient  iterative method  [8].  By  choosing  D  in that direction, \nfixed  points can  be  made stable. \n\n3  RESULTS \n\nTo  simplify  the  following  discussion,  V  is  defined  to  be  the  unitary  eigenvector \ncorresponding to the largest eigenvalue of the Jacobian of G. \n\nThe energy  function  Es  can  be used  in  at least  three  ways.  First it can  be  used  to \naccelerate  the convergence  toward  an internal state  upon presentation  of a  specific \ninput p.  This is done by increasing the rate of contraction in the direction of V.  The \nchosen  value  for  K x ,  is  therefore  small  with  respect  to  1.  The  resulting  network \nwill settle faster  and therefore  compute its output sooner.  Second,  Es  can be  used \nto  neutralize  spurious  fixed  points  by  making  them  unstable.  If the  mapping  G \n\n\fShaping the State Space Landscape in Recurrent Networks \n\n109 \n\nis  expanding in  the  direction  of V  the fixed  point  will  be  unstable,  and  will  never \nbe  reached  by  the  system.  The  corresponding  target  value  J(xp  should  be  larger \nthan  1.  Third,  and most  importantly, it can  be  used  to force  stability of the fixed \npoints  when  doing  associative  memory.  Recurrent  backpropagation (RBP)  [7]  can \nbe used  to make the patterns fixed  points, but there is no guarantee that these  will \nbe stable.  By making G contract along the direction V, this problem can be solved. \nFurthermore, one can hope that by making the eigenvalue close to 1,  smoothness in \nthe derivatives will make the basins of attraction larger.  This can be used  to absorb \nand suppress  spurious neighboring stable fixed  points. \n\nThe following experiment illustrates how the unstable fixed  points learned with RBP \ncan be made more stable using the energy function Ell.  Consider a network of eight \nfully  connected  units with  two visible  input/output units.  The  network  is  subject \nto  the  dynamic  specified  by  the  equation  2.  Three  patterns  are  presented  on  the \ntwo visible units.  They correspond  to the  coordinates of the three  points (0.3,0.7), \n(0.8,0.4)  and  (0.2,0.1)  which  were  chosen  randomly.  The learning  phase  for  each \npattern consists of 1) clamping the visible units while propagating for five  iterations \n(to let  the  hidden  units settle),  2)  evaluating the difference  between  the  activation \nresulting  from  the  incoming  connections  of the  visible  units  and  the  value  of the \npresented  pattern  (this  is  the  error),  3)  backpropagating  the  corresponding  error \nsignals and 4)  updating the weight.  This procedure  can be  used  to make a  pattern \na  fixed  point  of the  system  [6].  Unfortunately,  there  is  no  guarantee  that  these \nfixed  points  will  be  stable.  Indeed,  after  learning  with  RBP  only,  the  maximum \neigenvalue  of the  Jacobian  of G  for  each  fixed  point  is  shown  in  table  1 (column \nEV,  no  E$).  As  can  be seen,  the maximum eigenvalue of two of the three  patterns \nis  larger  than one. \n\npattern  0 \npattern  1 \npattern 2 \n\nunit 0 \n0.30 \n0.80 \n0.20 \n\nunit 1 \n0.70 \n0.40 \n0.10 \n\nEV,  no  Ell \n\n1.063 \n1.172 \n0.783 \n\nEV,  using Ell \n\n0.966 \n0.999 \n0.710 \n\nTable  1:  Patterns  and  corresponding  norms  of maximum eigenvalues  (EV)  of the \nfree  system,  with and  without  the stability constraint. \n\nFor  a  better  understanding  of what  this  means,  the  network  can  be  viewed  as  a \ndynamic  system  of 8  units.  A  projection  of the  dynamics  of the  system  on  the \nvisible  units  can  be  obtained  by  clamping  these  units  while  propagating  for  five \niterations,  and  computing  the  activation resulting  from  the  incoming  connection. \nThe difference  between  the latter value and  the pattern value is  a  displacement  (or \nspeed)  indicating  in  which  direction  in  the  state  space  the  activations  are  going. \nThe corresponding  vector  field  is  plotted on  the  top figure  1.  It can easily  be  seen \nthat  as  predicted  by  the  eigenvalues,  patterns  0  and  1  are  unstable  (pattern  1  is \nat  a  saddle  point)  and  pattern  2  is  stable.  Furthermore  there  are  two  additional \nspurious fixed  points around  (0.83,0.87) and  (0.78,0.21). \nThe energy function  Ell  can be combined with REP using the following procedure: \n1)  propagate a few  epochs  until the error  is  below  a certain threshold  (10- 5 ),  2) for \neach  pattern,  estimate  the  largest  eigenvalue  A and the  corresponding  eigenvector \nV  and  3),  update  the  weights  using  E$  until IAI  < J(  in direction  V.  Steps  1 to 3 \n\n\f110 \n\nSimard, Raysz, and Victorri \n\n. s \n\n., \n\n.4 \n\n. 2 \n\nI \n\n.,  / \n\n\u2022  , . , ; , / /1  \n,  1 \n\n\u00b7 . . \n:0:  . I \n\n~~ ~  ~  l ~  ~  ~ ~ ~ ~ ~  ~ ~ \n.......... ,' , , , ,  ,  '\"  ........... --\n\\  , ......... \n\\, ....... \n\\  \\. \"(cid:173)\\, ....... \n.......... \",t ... , ..  I' \n\" \\ ,  r \n, \nI  1\\ ....... ....... \n,,,  ....  ,,., ...... ......... \n,,\\\\'T1 \n..  0  ...  --(cid:173)\n\" \n,,\\\\111(\"\"\"'''--(cid:173)\n, \\  \\  1  T  ,  r  r  ,  \\  \"  ..  \u2022  .. - -\n' \"   l  T I l '   , \n,  ....... ---\n----. ......  ,  1\"\\'  '\" \n............ -.... \n___ ,Y ... \n\"\\ \n/' /  I  l  \\  \\  \\  ~  1 I  1 I  ~  \\ \\~ \n\n\u2022  \u2022  \u2022\u2022  \"  I \n\\ \n\nl  I I I  l  \\:\\..\"-\n\n\\  T  T  r  t \n\n,  . . . .  , \n\n~ \n\n\\ \n\n\\ \n\n\\ \n\n, \n\n, \n\no \n\n.2 \n\n.4 \n\n\u00b7 , \n\n, \n\n. s \n\n.s \n\n\\ \n\n\\ \n\n., \n\n,'-\\\\ 1  1 \n\n,,\\\\\\ \\  \\ ~  ~ ~~~~~ 1 ~~ \n\\  , ,  1/ \n....... ,' , , t  , \\ \n-- '\"  ..  \u2022  \u2022  \"  ,  ,  , , ,  \\  , / /  \n\\ \n-_ ..  .. \n.. \n\u2022  \u2022 0  \u00b7 .. \n....  ,  ,  ~~ \n... \n... \n-- ..  \u2022  \u2022  \u2022  \u2022  \u00b7 .. \n-_ ...  \u00b7 \u00b7 \u2022  \u2022  \u00b7 .. \n.. \n..  \u00b7 ~-\n..  \u00b7 \u00b7 ... -\n... \n... \n.. \n.. \n-..- ....  \u00b7 \u2022  \u00b7 \u2022  \u00b7 \u00b7 \u00b7 \u00b7 \u00b7 \u00b7 \u00b7 --\n, ........  \u2022  \u2022  - \u00b7 \u2022  \u00b7 .. \n..  \u00b7 ..... -\n.. \n. . \n.. \n'\"  ,  ,  ,  \" \n\u00b7 \u00b7 \u00b7 0  ......... \n'\"  , ,  ,  \u2022  \u00b7 ..  \u00b7 \u00b7 \u00b7 .. --\n\u2022  \u00b7 \u2022  ..._-\n'\"  1  1  ,  ,  \" \n'\"  f  ,  ,  - \u00b7 \u00b7 \u00b7 \u00b7 \"  \u2022  ....... -. \n............  '0- ..  \u00b7 - \u2022  ,  \u2022 ,  \\ \n'\"\"' ........... \n'- ,  \\ \n-- ....  \" \n\\  \\ ' \\ ,  \n~  J \n\\ \n1 1 \\  \\\\'\\. \n/ /1   1  \\  \\  \\  \\ \n\n~ \n~ \n\n.2 \n\n\u00b7 .  .' \n\nI \n\nI \n\nI \n\n.' \n\nI \n0 \n\nI \n\u2022 2 \n\nFigure  1:  Vector  fields  representing  the  dynamics  of  the  state  space  after  learn(cid:173)\ning the  patterns  (0.3,0.7),  (0.8,0.4) and  (0.2,0.1).  The field  on the top represents \nthe  dynamics of the  network  after  training with  the standard  backpropagation al(cid:173)\ngorithm.  The  field  on  the  bottom  represents  the  dynamics  of the  network  after \ntraining with the standard backpropagation algorithm combined with  Es . \n\n\fShaping the State Space Landscape in Recurrent Networks \n\n111 \n\nare repeated  until no more progress is made.  The largest eigenvalues after learning \nare  shown  in  table  1  in  the  last  column.  As  can  be  noticed,  all  the  eigenvalues \nare less  than one  and therefore  the mapping G  is contracting in all directions.  The \ndynamics of the network is plotted at the bottom of figure  1.  As  can clearly be seen, \nall the patterns are now  attractors.  Furthermore the two spurious fixed  points have \ndisappeared in the large basin of attraction of pattern 1.  This is a  net improvement \nover  RBP  used  alone,  since  the network  can now  be used  as  a  content  addressable \nmemory. \n\n4  DISCUSSION \n\nIn  this  paper  we  have  introduced  mechanisms  to  control  global  aspects  such  as \nstability, attractor size, or contraction speed, of the dynamics of a recurrent network. \nThe  power  of the  algorithm  is  illustrated  by  implementing  a  content  addressable \nmemory with an asymmetric neural network.  After learning, the stable fixed  points \nof the system coincide with the target patterns.  All spurious fixed  points have been \neliminated by spreading the basins of attraction of the  target patterns. \n\nThe main limitation of the algorithm resides  in using  a gradient descent  to update \nthe  weights.  Parameters such  as  the  learning rate  have  to be  carefully  chosen,  for \noptimal performance.  Furthermore,  there  is  always a  possibility that the evolution \nof the  weights  might be trapped  in  a local minimum. \n\nThe  complexity of the  algorithm can  be  further  improved.  In  equation  10  for  in(cid:173)\nstance,  it  is  assumed  that  we  are  at  a  fixed  point.  This  assumption  is  not  true \nunless  the  RBP  error  is  really  small.  This  requires  that  the  RBP  and  the  Es  al(cid:173)\ngorithms are  run alternatively.  A  faster  and more robust  method  consists  in using \nbackpropagation in time to compute ~ and is  presently under  study. \n\nOWrnn \n\nFinally,  the  algorithm  can  be  generalized  to  control  the  dynamics  around  target \ntrajectories,  such  as  in  [5].  The dynamics is  projected onto the hyperplane orthog(cid:173)\nonal  to the state space  trajectory  and  constraints  can  be  applied  on  the  projected \ndynamics. \n\nAcknowledgements \n\nThis  material  is  based  upon  work  supported  by  the  National  Science  Foundation \nunder  Grant number IRI-8903582. \n\nWe  thank  the  S.H.S  department  of C.N.R.S  (France),  Neuristic  Inc.  for  allowing \nthe  use  of its  neural  net  simulator SN2,  and  Corinna Cortes for  helpful  comments \nand support. \n\nReferences \n\n[1]  Morris W. Hirsch.  Convergent activation dynamics in continuous time networks. \n\nNeural Networks,  2:331-349,  1989. \n\n[2]  J.  J.  Hopfield.  Neural  networks  and  physical  systems  with  emergent  collec(cid:173)\ntive  computational abilities.  Proceedings  of the  National Academy  of Sciences, \n79:2554-2558, April 1982. \n\n\f112 \n\nSimard, Raysz, and Victorri \n\n[3]  J.  Ortega and M.  Rockoff.  Nonlinear difference  equations and gauss-seidel  type \n\niterative methods.  SIAM J.  Numer.  Anal., 3:497-513,  1966. \n\n[4]  A Ostrowski.  Solutions  of Equations  and Systems of Equations.  Academic Press, \n\nNew  York,  1960. \n\n[5]  Barak  Pearlmutter.  Learning  state  space  trajectories  in  recurrent  neural  net(cid:173)\n\nworks.  Neural  Computation,  1(2):263-269, 1989. \n\n[6]  Fernado J.  Pineda.  Dynamics and  architecture  in neural  computation.  Journal \n\nof Complexity,  4:216-245,  1988. \n\n[7]  Fernando J.  Pineda.  Generalization of backpropagation to recurrent and higher \norder networks.  In IEEE Conference  on Neural Information Processing Systems, \npages 602-601. American  Institute of Physics,  1987. \n\n[8]  Anthony Ralston and Philip Rabinowitz.  A  First Course  in Numerical Analysis. \n\nMcGraw-Hill,  New  York,  1978. \n\n[9]  Patrice Y.  Simard.  Learning State Space  Dynamics in Recurrent Networks.  PhD \n\nthesis,  University  of Rochester,  1991. \n\n\f", "award": [], "sourceid": 382, "authors": [{"given_name": "Patrice", "family_name": "Simard", "institution": null}, {"given_name": "Jean", "family_name": "Raysz", "institution": null}, {"given_name": "Bernard", "family_name": "Victorri", "institution": null}]}