Loading ...
Sorry, an error occurred while loading the content.

Evolution of Neural Networks

Expand Messages
  • paros
    I have recently been experimenting with a genetic algorithm to evolve multi-layer perceptrons to produce a particular output. The protoype output is just an
    Message 1 of 32 , Mar 7, 2008
      I have recently been experimenting with a genetic algorithm to evolve
      multi-layer perceptrons to produce a particular output.

      The protoype output is just an image file read in from disk. Weeks
      ago I thought this would be easy-as-pie and the GA would easily find a
      network that produces the image as closely as possible. In fact, I
      only wanted to create this little experiment to ensure that my neural
      network code was correct and "robust".

      I completely misjudged this project! I have been through a
      roller-coaster ride of agony trying to get this to work. I have had
      to write and re-write and formulate and reformulate the fitness metric
      for when two images are "close to each other". I *finally* have a
      good one after a week of solid headache. But I'm still not so sure if
      it's the best I could be using.

      (>) The multi-layer perceptron has an input vector of dimension two.
      Each input corresponds to a 2D coordinate on the image.

      (>) It has two hidden layers of 24 and 32 nodes respectfully.

      (>) The output is 3 nodes. Where each node is Red, Green, and Blue

      I would have to write a short story to describe all the different
      metrics I used for measuring fitness of a candidate image/network. (I
      did HSV metrics. Number of pixels that are exactly correct. Uhm..
      euclidean distance in an RGB cube. All sorts of stuff that I will not
      get into here at this time.) In addition to this headache, I have
      also had very difficult time stopping the evolutionary process from
      getting stuck in a local maximum. I have tried numerous methods.
      I'm not going to cover all of them here (that failed). I will only
      list some ideas that appear to be working.

      (>) After crossover, if the image has lower fitness than its parents,
      it is discarded.

      (>) After mutation only, if the image has lower fitness than it's
      previous incarnation, that mutant is discarded.

      (>) The above two methods makes evolution get out of early local
      maximums, but not out of later ones. (ugh! here we go again!)

      (>) So in order to combat the above problem of the population
      dominated by regime of similar organisms, I have introduced something
      called a High-Mutation Group. Members of this group are called "High
      Mutants" and as my program runs the number of active high mutants is
      displayed. High mutants are created when the algorithm stumbles upon
      an organism of very low fitness (relative to the population of
      course). It is replaced by a totally random organism (as if we are
      starting over). This random organism is not discarded no matter what
      its fitness. So High Mutants all get a free ticket into the next
      generation. Mutation itself is too slow to get a population knocked
      out of a local maximum. The hope is that this pool of highly
      randomized mutants will get crossed with a regime member and maybe
      just maybe it will knock the population out its stuck spot.

      To summarize the agony I have been through in the last few days, the
      essential struggle is that you don't want mutation to be so high that
      it DESTROYS high-fitness candidates in your population. But
      similarly, if you HOLD ON TO high-fitness candidates too much, then
      your population eventually becomes dominated by them and your
      population gets stuck in a fascist regime of the same organism and all
      its children.

      I don't know how to balance these two competing interests. And it's
      like if I give up early stuck spots, I only inherit later ones and

      It's frustrating. It really is.

      Can anyone in this yahoo group provide me links to publications or the
      like where someone has tried to evolve networks in this manner? Thank
      you for your help.
    • A W
      I still suspect that the net does have enough information in the inputs to provide the proper output. perhaps try adding an extra input that s related to the
      Message 32 of 32 , Mar 17, 2008
        I still suspect that the net does have enough information in the inputs to provide the proper output.
        perhaps try adding an extra input that's related to the desired out such as an index to the primary color etc and see how they perform with your current training method.

        ----- Original Message ----
        From: paros <paris_o_o@...>
        To: genetic_programming@yahoogroups.com
        Sent: Monday, March 17, 2008 7:16:22
        Subject: [GP] Re: Evolution of Neural Networks

        No actually I'm convinced this fitness metric is good. The problem
        I'm having is one of lack of diversity at the ends of evolution runs.
        The average population fitness hovers around 60 to 75% and doesn't
        go anywhere for 8 hours or more. This is after an explosion in
        fitness in the first hour. It is now totally obvious to me that the
        process is getting caught in a local maximum, and I have no idea how
        to bump it out.

        --- In genetic_programming @yahoogroups. com, John B├Ąckstrand
        <sandos@...> wrote:
        > paros wrote:
        > > The problem is that I'm not getting that. I'm getting dirty tricks
        > > where evolution ignores difficult parts of the image and just banks on
        > > large swaths of color for quick-and-dirty gains on lots of pixels.
        > > Evolution is trying to maximize fitness and is doing so in whatever
        > > underhanded manner it can find. Please see my other posts on this
        > > forum for a screenshot of the results so far.
        > That is neither underhanded nor a trick: You have simply not defined
        > fitness properly, if fit individuals do not please you.
        > ---
        > John B├Ąckstrand


        border:1px solid #d8d8d8;font-family:Arial;margin:14px 0px;padding:0px 14px;}
        #ygrp-mkp hr{
        border:1px solid #d8d8d8;}
        #ygrp-mkp #hd{
        color:#628c2a;font-size:85%;font-weight:bold;line-height:122%;margin:10px 0px;}
        #ygrp-mkp #ads{
        #ygrp-mkp .ad{
        padding:0 0;}
        #ygrp-mkp .ad a{


        #ygrp-sponsor #ygrp-lc{
        #ygrp-sponsor #ygrp-lc #hd{
        margin:10px 0px;font-weight:bold;font-size:78%;line-height:122%;}
        #ygrp-sponsor #ygrp-lc .ad{
        margin-bottom:10px;padding:0 0;}


        #ygrp-mlmsg {font-size:13px;font-family:arial, helvetica, clean, sans-serif;}
        #ygrp-mlmsg table {font-size:inherit;font:100%;}
        #ygrp-mlmsg select, input, textarea {font:99% arial, helvetica, clean, sans-serif;}
        #ygrp-mlmsg pre, code {font:115% monospace;}
        #ygrp-mlmsg * {line-height:1.22em;}
        #ygrp-text p{
        margin:0 0 1em 0;}
        #ygrp-vitnav a{
        padding:0 1px;}
        clear:both;margin:25px 0;white-space:nowrap;color:#666;text-align:right;}
        #ygrp-actbar .left{
        font-family:Verdana;font-size:77%;padding:15px 0;}
        font-family:verdana;font-size:77%;border-top:1px solid #666;
        padding:5px 0;
        #ygrp-mlmsg #logo{

        #ygrp-reco {
        #ygrp-reco #reco-head {


        background-color:#e0ecee;margin-bottom:20px;padding:2px 0 8px 8px;}
        #ygrp-vital #vithd{
        #ygrp-vital ul{
        padding:0;margin:2px 0;}
        #ygrp-vital ul li{
        list-style-type:none;clear:both;border:1px solid #e0ecee;
        #ygrp-vital ul li .ct{
        #ygrp-vital ul li .cat{
        #ygrp-vital a{

        #ygrp-vital a:hover{

        #ygrp-sponsor #hd{
        #ygrp-sponsor #ov{
        padding:6px 13px;background-color:#e0ecee;margin-bottom:20px;}
        #ygrp-sponsor #ov ul{
        padding:0 0 0 8px;margin:0;}
        #ygrp-sponsor #ov li{
        list-style-type:square;padding:6px 0;font-size:77%;}
        #ygrp-sponsor #ov li a{
        #ygrp-sponsor #nc{
        background-color:#eee;margin-bottom:20px;padding:0 8px;}
        #ygrp-sponsor .ad{
        padding:8px 0;}
        #ygrp-sponsor .ad #hd1{
        #ygrp-sponsor .ad a{
        #ygrp-sponsor .ad a:hover{
        #ygrp-sponsor .ad p{
        margin:0 0 0 0;}
        #ygrp-text tt{
        blockquote{margin:0 0 0 4px;}

        Send instant messages to your online friends http://uk.messenger.yahoo.com

        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.