Evolving optimum camouflage with Generative Adversarial Networks

We describe a novel method to exploit Generative Adversarial Networks to simulate an evolutionary arms race between the camouflage of a synthetic prey and its predator. Patterns evolved using our methods are shown to provide progressively more effective concealment and outperform two recognised camouflage techniques. The method will be invaluable, particularly for biologists, for rapidly developing and testing optimal camouflage or signalling patterns in multiple environments.


2
In recent years, research has focused predominantly on testing the advantage of particular camouflage strategies using predefined patterns designed by the experimenter 5 .Although these studies are able to provide strong evidence that certain camouflage works better than others, they have limited power to explain what would be the optimum pattern for concealment.One of the challenges is simply the number of potential patterns in a complex visual environment: the parameter space for all possible colour and texture combinations is often gigantic.
One solution to this problem is to employ dynamically evolving stimulus sets in detection experiments.Bond and Kamil presented blue jays with digital moths on computer screens in greyscale, with birds trained to peck on detected prey items 6 .The digital moths evolved on the basis of predetermined "genes".While this approach was effective, improving survival, manually encoding genes for a specific task makes generalisability difficult: for example, increasing the parameter space beyond a certain complexity (using colour rather than greyscale, say) makes testing live subjects unrealistic because of the number of trials required.However, putting a credible artificial observer into the evolutionary loop would circumvent this problem.
Recently, methods that stem from Artificial Intelligence have proved capable of deceiving human observers: deep neural networks can mimic fine art 7 or create photorealistic images based on text descriptions 8 .Here, for the first time, we report an unsupervised method to create biologically-relevant camouflaged stimuli based on Generative Adversarial Networks (GANs) 9 .GANs employ competing agents, usually modelled as deep neural networks, to perform a zero-sum game.In their original example, Goodfellow and colleagues illustrated the underlying idea of GANs using a competition between police and a counterfeiter.The objective of the police (discriminative network) was to distinguish between counterfeit and real money, whilst the counterfeiter (generative network) aimed to produce counterfeit money that the discriminative network would falsely identify as real.Both agents evolved over time: the police became more sensitive to fake money, while the counterfeiter produced more and more authentic-looking forgeries.As pointed out by Goodfellow et al, over time, and if such a pair of strategies exist, these two systems will become stable at a so-called Nash equilibrium: given the two agents, with complete knowledge of their opponent's strategy, there is no possible improvement that can be made to their own.Nash Equilibria, form the basic building block of evolutionary game theory, the theory, proposed by Maynard Smith and Price 10 , where these Nash equilibria often correspond to evolutionary stable strategies.This arms race between a counterfeiter and the police mirrors antagonistic agents, like predator and prey, and is therefore of inherent biological interest.
In particular, predators evolve, or learn, to locate prey by detecting them against some background, while prey evolve to remain undetected using protective colouration.The objective of the predators is to distinguish visual input that contains prey from empty scenes.
Meanwhile, the prey aims to achieve a visual signature that makes a scene containing them look empty to a predator.In this example, the discriminative network can be thought of as the visual system of the predator that evolves over time to more effectively detect prey, and the generative network represents the genotype of prey, where new generations can inherit properties of previous survivors and exhibit better camouflage.
To model the evolution of camouflage and produce increasingly difficult-to-see patterns, we implemented GANs to conceal triangular targets presented against images of ash tree (Fraxinus excelsior) bark, a complex texture (Fig. 1).Targets were extracted from each network after a set number of iterations and contrasted with two control patterns: the average colour of backgrounds, and a pattern developed through Fourier analysis (Fig. 2).
Averaging the background is considered to offer "good" concealment 11 and, as in our study, is often used in camouflage research as a baseline control 12 .The Fourier approach has previously been shown to be highly effective 13 , as has the related technique of log-Gabor wavelets when used to assess camouflage in targets such as ours 14 .To quantify difficulty, we measured the reaction time for human participants to detect the targets when displayed on a computer screen.It is important to note that contrary to other GAN implementations 15 , where the generative network modifies a whole image, in our implementation only the target was evolved by the generative network, leaving the background unmodified.Using this approach, we demonstrate that a purely artificial system can demonstrate the gradual evolution of camouflage.
We found that targets produced by GANs after more iterations were increasingly harder to find.In the first analysis, the effect of increasing training steps on reaction time was examined.General linear mixed models (GLMMs) were used to show that targets became significantly harder to find as the number of iterations increased.The effect of iterations on 6 log-transformed reaction times were analysed by fitting general linear mixed models.Fitting the simplest model gave an estimate for the effect of training steps on reaction time of 2.077 x 10 -5 (SEM = 1.006 x 10 -6 ) and this was highly significantly different from zero (Δdeviance = 418.42,d.f.= 1, p < 0.0001).This result demonstrates that our method can successfully illustrate an evolutionary arms-race, producing camouflage that is increasingly difficult to identify.From visual inspection it is clear that the largest changes occur at earlier stages of pattern evolution with the rate of change in patterns beginning to decrease beyond 5,000 iterations (Fig. 2).Accordingly, increments in detection times also started to diminish (Fig. 3).Furthermore, targets evolved by GANs were more effective than controls (Fig. 3).Treatment means were significantly different (Δdeviance = 1089.7,d.f.= 6, p < 0.0001).Based on Tukey post hoc tests all GAN-derived stimuli greater than 500 steps had significantly higher mean reaction times than Average targets.Fourier targets were significantly harder to detect than Average (p < 0.001) but GAN-derived stimuli with 5,000+ training step were significantly harder to detect than Fourier (p < 0.001).For details on the Tukey post hoc tests see Table S1 in the ESM.
We also found that some GANs produced more effective camouflage than others.Reaction times to GAN-derived stimuli of 10,000 training steps were selected and grouped by the network of origin.A random effects model with a common slope but different intercepts was chosen as the initial model.The effect of networks on reaction time was significantly different from zero (Δdeviance = 29.144,d.f.= 9, p < 0.0001).Mean reaction times ranged between 1.57 (SEM = 0.09) and 1.25 (SEM = 0.04) seconds (see Figure S2 in the ESM).In this study, both generator and discriminator networks were initialised with white noise, which is the reason why patterns at low iterations have a high inter-network variability (see first column in Fig. 2).We used this setup to demonstrate convergent evolution: the visual variance between the chosen backgrounds of tree bark was low and hence we expected that networks would come up with similar (and similarly effective) solutions after a higher number of training iterations.Nevertheless, certain networks were found to produce significantly .CC-BY 4.0 International license available under a not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity.It is made The copyright holder for this preprint (which was this version posted March 18, 2019.; https://doi.org/10.1101/429092doi: bioRxiv preprint 7 harder to see patterns than others, which suggests that our method has the potential for modelling polymorphic scenarios, commonly found in nature 16 .The method can also clearly be adapted to use fixed initialisations, for example one could initialise the discriminator with pre-trained networks capable of better target detection 17 .Our implementation follows a design that was deliberately simple, and we acknowledge that many alternative and more complex GAN architectures could be employed 18 .However, we believe that maintaining a simple architecture aids understanding and allows easier implementation for early adopters. One promising development that could be beneficial in modelling biological systems is introducing multiple discriminator networks, standing for multiple observers influencing the target (generator network).For example, one of the discriminators could be limited to dichromatic representations of the target, simulating a typical mammalian predator 19 , or with altered visual acuity or viewing distance.It is also possible to introduce restrictions and limitations to the generator, other than the size and shape of the target; for example, bilateral symmetry.
We have demonstrated that GANs outperform other well-established methods for generating effective camouflage.This novel technique allows the exploration of high-dimensional feature and colour spaces in a way impossible using human, or non-human, observers.This obviously has applications for the development of military and civilian camouflage, but will also allow biologists to assess the trade-offs, beyond a pure concealment function, in natural camouflage patterns 20 .More widely, by reversing the reward function for the generative and/or discriminative networks, one can determine the optimal conspicuous signal and or sensory tuning for a given environment.

Figure 1 .
Figure 1.Examples of experimental stimuli.All examples feature targets evolved after 10,000 GAN iterations.See Figure S1 in the Electronic Supplementary Material (ESM) for

Figure 3 .
Figure 3. Mean reaction times for experimental stimuli.Error bars represent standard