home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / ai / neuraln / 3233 < prev    next >
Encoding:
Text File  |  1992-08-19  |  9.4 KB  |  222 lines

  1. Newsgroups: comp.ai.neural-nets
  2. Path: sparky!uunet!gumby!destroyer!ubc-cs!alberta!arms
  3. From: arms@cs.UAlberta.CA (Bill Armstrong)
  4. Subject: Wild values (was Reducing Training time ...)
  5. Message-ID: <arms.714208873@spedden>
  6. Keywords: back propagation, training, generalisation
  7. Sender: news@cs.UAlberta.CA (News Administrator)
  8. Nntp-Posting-Host: spedden.cs.ualberta.ca
  9. Organization: University of Alberta, Edmonton, Canada
  10. References: <arms.714091659@spedden> <36944@sdcc12.ucsd.edu> <arms.714146123@spedden> <36967@sdcc12.ucsd.edu>
  11. Date: Wed, 19 Aug 1992 07:21:13 GMT
  12. Lines: 208
  13.  
  14. demers@cs.ucsd.edu (David DeMers) writes:
  15.  
  16. >In article <arms.714146123@spedden> arms@cs.UAlberta.CA (Bill Armstrong) writes:
  17.  
  18. >>Here is an example of a backpropagation neural network that has very
  19. >>wild behavior at some points not in the training or test sets.  
  20.  
  21. >What is the training set?
  22.  
  23. >...
  24.  
  25. >>We assume the net has been trained on a subset of integers and also
  26. >>tested on a subset of integers.  
  27.  
  28. Pick any set of integers that contains at least the six points x = 
  29. -2 -1 0 1 2 3, each one with the f(x) value specified below.
  30. Test on any finite set of integers you like.
  31.  
  32. >...
  33.  
  34. >>Below is the overall function f(x) produced by the net, which is also
  35. >>the specification of what it is *supposed* to do outside the interval
  36. >>(0,1).  In (0,1) the specification is to be less than 0.002 in
  37. >>absolute value.
  38.  
  39. >>f(x) = 40 [ 1/( 1 + e^40*(x - 1/4))  +   1/( 1 + e^-40*(x - 3/4))  -1 ]
  40.  
  41. >So is the specification *exactly* this function?
  42.  
  43. No.
  44.  
  45.   Or is it
  46. >a set of training data for which an approximation is desired?
  47.  
  48. There is a training set of (x,y) pairs where x is an integer and y =
  49. f(x).  The choice of training set is not critical.  The idea is that I
  50. want exactly f(x), except that in (0,1) I want the peak to be removed
  51. in such a way that I have a smooth function very close to 0.  The
  52. bound on values in (0,1) is intended to say only that having a peak is
  53. out of spec.
  54.  
  55. >>The largest deviation of our trained network f(x) from 0 on all integers is
  56.  
  57. >If the spec calls for < 0.002 inside (0,1) and no values within
  58. >(0,1) were used in the training set, how can you possibly
  59. >end up with this function?
  60.  
  61. The idea is that you would like the net output to be small in (0,1).
  62. I just don't want a peak.
  63.  
  64. >This is not simply a pathological example, it is completely
  65. >absurd.
  66.  
  67. You simply haven't grasped it yet.  This kind of little "absurd"
  68. example is going to show many people how dangerous it is to use the
  69. usual approach to neural networks.  When a safety-critical system
  70. blows up because you neglected some wild output of your neural net, it
  71. will be too late to go back and try to understand the example.
  72.  
  73. Anyway, it is not a pathological example.  Once you get the idea, you
  74. can construct lots of examples.  It's only when you reach that point
  75. that you can begin to think about preventing wild values.  Sorry,
  76. calling my little example "absurd" won't convince people who have a
  77. lot to lose from a misbehaved system.  If they are smart, they will
  78. want to see proof that a wild value can't cause a problem.  Are you
  79. ready to supply a proof?  I don't think so, because you still don't
  80. grasp the problem.
  81.  
  82.   How is this network constructed by finding parameters 
  83. >via gradient descent, or any other optimization method for
  84. >finding parameters?  You have started (I presume) with an
  85. >ill-behaved network.  If you begin with a set of weights
  86. >such that all of the basis functions (sigmoids) are in
  87. >their linear region, you can't reach this unstable point
  88. >by training on data consisting of integer x values and
  89. >corresponding y values (all of which are very small)
  90.  
  91. >>f(0) = f(1) = 0.0018...
  92.  
  93. I have had backprop converge on this kind of pathological example,
  94. from some not particularly carefully chosen starting state.  If the
  95. f-values are small, I can see there is a problem with a real BP net,
  96. but the argument is supposed to be mathematical, so numerical accuracy
  97. is not a problem.
  98.  
  99. If you happened to initialize the system by chance to the given
  100. weights, which do produce the desired values on the training set, the
  101. BP algorithm would have 0 mean square error on the training set, and
  102. would not change the weights.  In other words, the weights (+ or - 40)
  103. are stable, and you can reach them.  Maybe there are starting points
  104. from which you can't reach them, but that's a different problem to
  105. find them.
  106.  
  107. >>So f is within 2/1000 of being 0 everywhere on our training and test
  108. >>sets.  Can we be satisfied with it?  No! If we happen to give an input
  109. >>of x = 1/2, we get
  110.  
  111. >>f(1/2) = - 39.99...
  112.  
  113. >>The magnitude of this is over 22000 times larger than anything
  114. >>appearing during training and testing, and is way out of spec.
  115.  
  116. >>Such unexpected values are likely to be very rare if a lot of testing
  117. >>has been done on a trained net, but even then, the potential for
  118. >>disaster can still be lurking in the system.  Unless neural nets are
  119. >>*designed* to be safe, there may be a serious risk involved in using
  120. >>them.
  121.  
  122. >The "wildness" here is postulated; I still don't see how it can
  123. >actually happen on your facts, that the network was trained to
  124. >zero error on a training set of integer values.
  125.  
  126. The "wild" solution is not postulated, it is THE set of weights which
  127. gives 0 error on the training set.  The wild solution is forced upon
  128. the net by the training data.  The use of integers for training and testing
  129. and the fact that they are uniformly spaced is also not critical.
  130.  
  131. >>But to achieve that goal, a design methodology must be used which is
  132. >>*guaranteed* to lead to a safe network.  
  133.  
  134. >What is the spec?  If it is "approximate the function that
  135. >generated this data set", then you need to focus on the
  136. >approximation capabilities of your methods.  You can NEVER
  137. >*guarantee* a "safe" result without some more knowledge
  138. >of what the true function is.  You are making the assumption
  139. >that safe = bounded in a particular manner.  If that's known,
  140. >then why not build it in? 
  141.  
  142. I thnk this is clear now.
  143.  
  144. >>Such a methodology can be
  145. >>based on decomposition of the input space into parts where the
  146. >>function synthesized is forced to be monotonic in each variable. 
  147.  
  148. >This can work.  CART does this; its successor MARS fits local splines. 
  149.  
  150. >In the neural network framework, Mike Jordan and Robert Jacobs 
  151. >are working on a generalization of modular architecture of
  152. >Jacobs, Jordan, Nowlan & Hinton, which recursively splits the
  153. >input space into nested regions and "learns" a mapping within
  154. >each region. 
  155.  
  156. Great.  Do they use monotonicity, or a scheme which allows them to get
  157. tight bounds on *all* outputs, so they can satisfy a "spec" if we
  158. could agree on one?
  159.  
  160. >...
  161.  
  162.  
  163. >>For BP networks, I am not sure a safe design methodology can be
  164. >>developed.  This is not because of the BP algorithm, per se, but
  165. >>rather because of the architecture of multilayer networks with
  166. >>sigmoids: *all* weights are used in computing *every* output (the
  167. >>effect of zero weights having been eliminated).  Every output is
  168. >>calculated using some negative and some positive weights, giving very
  169. >>little hope of control over the values beyond the set of points
  170. >>tested.
  171.  
  172. >True, all weights are used; however, most if not all of them are
  173. >not particularly important in networks used for real-world
  174. >applications (handwritten digit recognition, e.g.)
  175.  
  176. Sure, but a lot of little weights can add up, particularly if values
  177. derived from them get multiplied by a larger weight.
  178.  
  179. >Given a network and a data set, you can compute the partial 
  180. >derivatives of, say, mean squared error wrt the weights, and
  181. >the curvature.  You want the first partials all to be 0,
  182. >and the second partials give some indication of the "contribution".
  183. >See LeCun, Denker & Solla, "Optimal Brain Damage" in NIPS-2.
  184.  
  185. >It is not celestial violins but the nature of compositions
  186. >of ridge functions which allow me to say that a general 
  187. >feedforward network is smooth, and that BP learning adapts
  188. >its response surface to the training data.  
  189.  
  190. At what point will you start looking at the example above and seeing
  191. that such a statement, though it is generally true, can also be
  192. disastrously false.  I think I understand what you mean by
  193. compositions of ridge functions, but if the input pattern to a net is
  194. such that you are not outside the high slope region of some sigmoid on
  195. every path from an input variable to an output, then you may get very
  196. rapid change of output as you vary that input variable.
  197.  
  198. The situation you describe, where you are always in the linear region
  199. of all sigmoids sounds *very* undesirable.  The output should benefit by
  200. some signals getting very attenuated in effect by being near the flat
  201. parts of sigmoids.
  202.  
  203. >If weights are initialized such that the magnitude of
  204. >the vector of weights into a unit is bounded so that the
  205. >response will be in the linear region, I don't believe
  206. >that gradient descent training over a data set will 
  207. >result in "wild" values.  You are going to have to 
  208. >show me how to do it.
  209.  
  210. It depends what you mean by bounded.  The weights in the f(x) above
  211. are bounded by 40.  If you want them bounded by 2, you don't get a
  212. wild value.  Do you always bound your weights in absolute value by
  213. small numbers?  If you do, then you have nothing to worry about, as
  214. long as you can train the net to do what you want (I doubt that you can
  215. then approximate functions like |sin( 10 * x)| which has some sharp
  216. changes of direction on [0,1].)
  217. --
  218. ***************************************************
  219. Prof. William W. Armstrong, Computing Science Dept.
  220. University of Alberta; Edmonton, Alberta, Canada T6G 2H1
  221. arms@cs.ualberta.ca Tel(403)492 2374 FAX 492 1071
  222.