A generic framework for population-based algorithms, implemented on multiple FPGAs
Summary (4 min read)
1 Introduction
- Many bio-inspired algorithms are based on populations of agents trained to solve some problem such as optimising functions or recognising categories.
- The authors take up this challenge, and, in section 2, outline a generic framework abstracted from the individual population-based models of the following classes: genetic algorithms (GA), AIS negative selection, AIS clonal selection, PSO, and ant colony optimisation (ACO).
- The framework provides a basis for factoring out the commonalities, and applying various properties uniformly across all the classes of algorithms, even where they were previously thought particular to one class (section 3).
- In section 4 the authors describe their proof-of-concept prototype implementation of the generic framework on a platform of multiple field programmable gate array (FPGA) chips.
2 The generic framework for population algorithms
- There are many specific algorithms and implementation variants of the different classes.
- Rather, the authors take a step back from the specifics, and abstract the basic underlying concepts, particularly the more bio-inspired ones, of each class of algorithm.
- The authors unify the similarities between these basics in order to develop a generic framework.
- The intention is that such a framework provides a useful starting point for the subsequent development of more sophisticated variants of the algorithms.
Basic underlying concepts
- Each individual contains a set of characteristics, which represent the solution.
- The individuals are antibodies; each characteristic is a shape receptor, also known as AIS negative selection.
- There are two populations, also known as AIS clonal selection.
- There is also a population of memory cells drawn from this main population.
- The individuals are the complete paths (not the ants, which are merely mechanisms to construct the complete paths from path steps); the characteristics are the sequence of path steps, where each step has an associated characteristic of length and pheromone level, also known as Ants.
Algorithm stages
- The different specific algorithms each exhibit six clearly distinct stages, comprising a generation.
- These are generalised as: 1. Create : make novel members of the population 2. Evaluate : evaluate each individual for its affinity to the solution 3.
- The authors describe each of these stages, covering the generic properties, and how they are instantiated for each specific class of algorithm.
- Rather than saying that some individuals survive from generation to generation, for uniformity the authors consistently consider each generation to be a completely fresh set of individuals, with some possibly being copies of previous generation individuals.
- As another example, the pheromone changes in the Ant algorithm is mapped to the generic mutate step.
Create
- Creation makes novel members of the populations.
- In the first generation, the whole population is set up, and the members have their characteristics initialised.
- On subsequent generations, creation “tops up” the population with fresh individuals, as necessary.
Evaluate
- The affinity measures how well each individual solves (part of) the problem.
- This function should ideally (but does not always) have the structure of a metric over the space defined by the characteristics.
Test
- The test for termination is either (a) a sufficiently good solution is found, or (b) enough generations have been run without finding a sufficiently good solution.
- On termination, the solution is: GA, Swarms, Ants : the highest affinity individual AIS negative selection : the set of individuals with above-threshold affinities AIS clonal selection : the population of memory cells.
Select
- High affinity individuals are selected to contribute somehow to the next generation’s population.
- There are several selection algorithms commonly used.
- N best selects the n highest affinity individuals from the current population.
- Roulette wheel selection randomly chooses a given number of individuals, with probability of selection proportional to their affinity, or to their ranking.
- Tournament randomly selects teams of individuals, and then selects a subset of individuals from each team.
Spawn
- Production of new individuals for the next generation usually involves combining the characteristics of parent individuals from the selected population (ants are a special case).
- If the crossover mask is set to the identity, then the two new individuals are clones of the two parents.
- The selected parents become the basis of the new generation (which is topped up to the population size by creating sufficient new individuals), also known as AIS negative selection.
- The new position is derived from the parent’s position and velocity, the velocity is modified to point towards the best neighbour, and the neighbourhood group is copied from the parent.
- Ants : no individuals are specifically spawned for the next generation: each generation is created afresh from the path steps (whose characteristics are changed by the mutate step).
Other generalisations
- The generic framework allows further features of one specific algorithm to be generalised to the others.
- Evolutionary Strategies encode the mutation rates as characteristics: a similar approach can be used in the other algorithms.
- The ant algorithm could allow the pheromone decay rate to be a characteristic.
- The range of selection strategies can be employed across all the algorithms that have a non-trivial selection stage.
- In particular, AIS clonal selection has two populations: selection strategies could be used on the memory cell population too.
4 The prototype implementation
- There is much opportunity for parallelism in these algorithms: individuals can (to some degree) be evaluated, selected, and created in parallel.
- This suggests efficiency gains by executing these algorithms on parallel hardware.
FPGAs and Handel-C
- The authors chose as their prototype implementation platform a small grid of FPGAs, executing the framework implemented in Handel-C.
- So each individual FPGA can host multiple individuals executing in parallel, and multiple FPGAs allow distributed implementations.
- Handel-C is essentially an executable subset of CSP [Stepney 2003], with some extensions to support FPGA hardware.
- It would have been possible to design a protocol to implement this, allowing the distributed program to be (very close to) a pure Handel-C program.
- So for this prototype, a simple handshaking protocol has been used, and the inter-chip communication hidden in a wrapper.
The implemented framework
- The prototype implementation of the framework provides much of the functionality described above.
- The Handel-C compiler optimises away dead code, so options that are not selected by the user (such as various choices of creation or selection functions) do not appear in the compiled code.
- It is also possible to return intermediate results every generation, to allow investigation of the performance, or for debugging, but this introduces a communication bottleneck.
- Each FPGA chip holds a certain number of islands, each of which holds its individuals.
- Then the appropriate selection method is used on each team in parallel.
Restrictions due to the platform choice
- Some of the design decisions for the framework prototype are due to specific features and limitations of FPGAs and Handel-C, and different platform choices could result in different decisions.
- The use of families is to cope with the limited size of the FPGAs.
- Certain parts of the selection can be performed in parallel, for example, to find the n best, where each individual can read the affinity of all its teammates in parallel.
- Handel-C supports variable bit-width values, requiring explicit casting between values with different widths.
- This can lead to arcane code, particularly when trying to write generic routines.
5 Preliminary results
- The number of (families of) individuals possible per chip varies depending on the settings.
- With all the capabilities turned on, this number drops to about 18 individuals run sequentially, or four if run in parallel, the reduction being due to the increased routing and copies of code.
- The FPGAs being used (300K gate Xilinx SpartanIIE chips) are relatively small: it was thought more important for this proof of concept work to get the maximum number of FPGAs for the budget, rather than the maximum size of each one.
- Looking at only the evaluate stage shows the sequential form taking about twice as long as the parallel form.
- The experiment compares running four individuals in parallel on one chip versus four individuals in parallel on each of the five chips (20 individuals in total), migrating the two best individuals every 100 generations.
7 Acknowledgments
- The authors would like to thank Wilson Ifill and AWE, who provided funding for the FPGAs used in this work.
- Also thanks to Neil Audsley and Michael Ward for turning a large box of components into a usable FPGA grid, and to Fiona Polack and Jon Timmis for detailed comments on earlier versions.
8 References
- 4th Asia-Pacific Conference on Simulated Evolution and Learning, 2002. [3].
- Exploiting Parallelism Inherent in AIRS, an Artificial Immune Classifier.
Did you find this useful? Give us your feedback
Citations
13 citations
10 citations
Cites result from "A generic framework for population-..."
...This suggestion is in part related to the observation that many population-based bio-inspired algorithms have very similar methods [Newborough and Stepney, 2005]....
[...]
9 citations
Cites background or methods from "A generic framework for population-..."
...A distributed framework for multiple search algorithms (applied to FPGA) [153] - Distributed algorithm for searching P2P networks (ImmuneSearch) [245] - Multi-agent system for breaking up a problem (distributed problem solving) (immune network and MHC) applied to TSP (n-TSP) [242] -...
[...]
...[153] John Newborough and Susan Stepney, "A Generic Framework for Population-Based Algorithms, Implemented on Multiple FPGAs," Artificial Immune Systems: 4th International Conference, ICARIS 2005, Banff, Canada, pp....
[...]
...Summary References Conceptual framework for AIS Framework [310] Application of framework [153] Seeking a more complete model [241] More on the theme [309]...
[...]
...[153] John Newborough and Susan Stepney, "A Generic Framework for Population-Based Algorithms, Implemented on Multiple FPGAs," Artificial Immune Systems: 4th International Conference, ICARIS 2005, Banff, Canada, pp. 43-55, 2005....
[...]
...- AIS as a context aware ubiquitous distributed system (immune network) [259] - A distributed framework for multiple search algorithms (applied to FPGA) [153] - Distributed algorithm for searching P2P networks (ImmuneSearch) [245] - Multi-agent system for breaking up a problem (distributed problem solving) (immune network and MHC) applied to TSP (n-TSP) [242] - An agent-based intrusion detection system (Dasgupta, Gonzalez) [66] o A very similar piece of work on agent-based intrusion detection by the same author [68] - Robot control (autonomous, distributed, etc....
[...]
9 citations
8 citations
Cites background or result from "A generic framework for population-..."
...[304] provide a framework that suggested that all population algorithms (including clonal selection) may be treated in a similar manner....
[...]
...Newborough and Stepney proposed a generic framework for population based algorithms based on a general biologically-inspired conceptual framework [304] (considered further in Section 2....
[...]
References
11,419 citations
9,933 citations
7,098 citations
"A generic framework for population-..." refers background in this paper
...For example, Evolutionary Algorithms (EA) are based on analogy to populations of organisms mutating, breeding and selecting to become “fitter” [Mitchell 1996]....
[...]
...© Springer-Verlag Berlin Heidelberg 2005...
[...]
5,822 citations