A generic framework for population-based algorithms, implemented on multiple FPGAs
TL;DR: This work outlines a generic framework that captures a collection of population-based algorithms, allowing commonalities to be factored out, and properties previously thought particular to one class of algorithms to be applied uniformly across all the algorithms.
Abstract: Many bio-inspired algorithms (evolutionary algorithms, artificial immune systems, particle swarm optimisation, ant colony optimisation,...) are based on populations of agents. Stepney et al  argue for the use of conceptual frameworks and meta-frameworks to capture the principles and commonalities underlying these, and other bio-inspired algorithms. Here we outline a generic framework that captures a collection of population-based algorithms, allowing commonalities to be factored out, and properties previously thought particular to one class of algorithms to be applied uniformly across all the algorithms. We then describe a prototype proof-of-concept implementation of this framework on a small grid of FPGA (field programmable gate array) chips, thus demonstrating a generic architecture for both parallelism (on a single chip) and distribution (across the grid of chips) of the algorithms.
Summary (4 min read)
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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).
- 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.
- 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.
- 4th Asia-Pacific Conference on Simulated Evolution and Learning, 2002. .
- Exploiting Parallelism Inherent in AIRS, an Artificial Immune Classifier.
Did you find this useful? Give us your feedback
Cites background from "A generic framework for population-..."
...Indeed, Newborough et al  even argue that the properties of most population-based algorithms — immune algorithms, genetic algorithms, swarms and ant-colonies— can be captured in a generic framework which factors out the commonalities of these algorithms and applies various properties uniformally across all of the classes, even though features such as niching and elitism may at first glance appear particular to just one class....
Cites background from "A generic framework for population-..."
...conceptual level, work by Newborough and Stepney (2005) propose that all population based algorithms are essentially the same: immune or evolutionary....
...However, as argued by Newborough and Stepney (2005), at a certain level are such population-based algorithms like clonal selection ones that can be considered the same as genetic algorithms and other EAs....
...At a more conceptual level, work by Newborough and Stepney (2005) propose that all population based algorithms are essentially the same: immune or evolutionary....
Cites background from "A generic framework for population-..."
...Work by Stepney et al.  proposes a conceptual framework that allows for the development of more biologically grounded AIS, through the adoption of an interdisciplinary approach....
... S. Stepney, Embodiment, in: D. Flower, J. Timmis (Eds.)...
... S. Stepney, R. Smith, J. Timmis, A. Tyrrell, Towards a conceptual framework for artificial immune systems, in: LNCS, vol. 3239, Springer, 2004, pp. 53–64....
...However, Stepney argues that this can only be achieved through careful design of both system and environment, to allow for sufficient amounts of interactions between both, thus allowing for the necessary dynamics to arise....
...The basic outline of the approach proposed by Stepney et al. is to first probe the biological system in question....
"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...