Empirical Analysis of the Dynamic Binary Value Problem with IOHprofiler
Diederick Vermetten Johannes Lengler Dimitri Rusin Thomas Bäck Carola Doerr




Analysis of Dynamic Binary Value Problem






LIACS, Leiden University, Leiden, The Netherlands
ETH Zürich, Zürich, Switzerland
Sorbonne Université, CNRS, LIP6, Paris, France

Vermetten, Lengler, Rusin, Bäck, Doerr





Empirical Analysis of the Dynamic Binary Value Problem with IOHprofiler
    Diederick Vermetten10000-0003-3040-7162, 
Johannes Lengler20000-0003-0004-7629,
Dimitri Rusin30009-0007-3316-0480,
Thomas Bäck10000-0001-6768-1478,
Carola Doerr30000-0002-4981-3227

    April 29, 2024
=========================================================================================================================================================================================




Optimization problems in dynamic environments have recently been the source of several theoretical studies. One of these problems is the monotonic Dynamic Binary Value problem, which theoretically has high discriminatory power between different Genetic Algorithms. 
Given this theoretical foundation, we integrate several versions of this problem into the IOHprofiler benchmarking framework. Using this integration, we perform several large-scale benchmarking experiments to both recreate theoretical results on moderate dimensional problems and investigate aspects of GA's performance which have not yet been studied theoretically. 
Our results highlight some of the many synergies between theory and benchmarking and offer a platform through which further research into dynamic optimization problems can be performed.   










§ INTRODUCTION

Evolutionary and genetic algorithms (EAs, GAs) are an important family of randomized optimization heuristics. In order to better understand the behavior of these algorithms, we should take advantage of the wide range of perspectives from which they have been studied, including theoretical runtime analysis, systematic benchmarking studies, and practical experience. While each of these domains offers its own viewpoint, these should not stay isolated but rather benefit from and strengthen each other. 

In the last years, there has been a substantial amount of theoretical work on two seemingly unrelated situations: optimization of monotonic functions <cit.>, and optimization in dynamic linear environments <cit.> like dynamic binary value <cit.>. For both of these topics, theoretical analysis shows that even among simple EAs, performance can dramatically differ. Hence, these situations have high discriminative power between different EAs. To give a flavour of the theoretical results, we highlight two specific results here:

    
  * The with mutation rate 1/N finds the optimum of the dynamic binary value environment in time O(Nlog N), while the same algorithm with mutation rate 2/N needs exponential time <cit.>.
    
  * The with mutation rate 1/N finds the optimum of every monotonic function in time O(Nlog^2 N) <cit.>, while the with the same mutation rate and large population size μ needs exponential time on some hard instances <cit.>.

These results illustrate the strengths, but also the limitations of theoretical analyses. They can identify interesting differences between similar algorithms, and may be able to prove results on whole classes of benchmarks like all monotonic functions. Moreover, they are able to provide a deep understanding of the given situation. On the other hand, they are often limited to rather simple algorithms, and to asymptotic statements like “O(N log N)” or “exponential”. Thus they leave important gaps that can be filled with systematic benchmarking studies.

In this paper we provide such a benchmarking study for two aforementioned situations of monotonic and of dynamic linear environments. To this end, we have several contributions:

    
  * We develop practical variants of the theoretical benchmarks that have been used for runtime analyses. This requires non-trivial modifications, as the theoretical variants are not suited for efficient evaluations, see Section <ref>.
    
  * We have integrated them into IOHexperimenter <cit.>,
    a module of the open-source IOHprofiler <cit.> project that allows general access to the new benchmarks in a framework where they can be easily used to test other iterative optimization algorithms. Part of this integration is a generic extension of IOHexperimenter to support dynamic environments.
    
  * We run a systematic evaluation of a large class of algorithms on the new benchmarks, identifying the parameters which are generally most crucial for the performance on these benchmarks.
    
  * We investigate several of the theoretical results in a wider context, asking how big the effects are for small dimensionality N, how sensitive they are for other parameter settings and how well they transfer to modifications of the algorithms. 


Since this paper brings together many different benchmarking aspects, we discuss them in more detail in the following sections.



 §.§ Dynamic environments


As mentioned, we have extended the IOHprofiler framework <cit.> to support dynamic environments, i.e., environments in which the fitness function f can change over time. In our experiments, whenever the environment changes, we re-evaluate the population with respect to the new environment, to avoid comparing fitnesses from different environments with each other. However, the implementation also supports keeping the old fitness values.

Dynamic environments can occur in various ways through a range of applications <cit.>. 
 For example, part of the problem description may be uncertain or become only available over time <cit.>. This work is based on dynamic linear functions <cit.> and the dynamic binary value function <cit.>, which were motivated by shifting training data for a machine learning system, especially in the context of co-evolution <cit.>. 



 §.§ Theory-inspired benchmarks


In recent years, there has been increasing interest and demand for composing a problem suite with theoretical benchmarks that are suitable for empirical testing. We provide a class of such benchmarks, based on two ideas from theory: dynamic binary value for dynamic environments and the function as an instance of a hard monotonic function. 

The dynamic binary value function is based on the static linear binary value function :{0,1}^N →ℝ; (x) = ∑_i=1^N 2^i-1x_i, which computes for a bit string x the integer encoded by x in binary representation. In the dynamic setting, we use the same set of weights, but shuffle them via a random permutation. Note that the same permutation is applied for all strings that are evaluated in the same environment. Hence, every environment is given by a linear function with positive weights. In particular, all environments share the all-one string as their common global optimum, which gives the optimization process a clear objective: it should produce solutions which are as close as possible to the invariant global optimum. Moreover, the functions are never deceptive in any coordinate: whenever we flip a zero-bit into a one-bit, then the fitness increases in all possible environments. This ensures that the benchmark is feasible and can be solved efficiently by some algorithms and parameter configurations, but not by all. This yields the high discriminatory power of the benchmark. 

Practically, the  function can not easily be implemented because the weights are so large that they cause numerical problems. We do provide an implementation via a lexicographic comparison, but since this requires an approach that is not compatible with the usual framework of fitness functions, it is less well-suited as a module to be used by other researchers. Instead, we use the observation from <cit.> that can be obtained in the limit from dynamic linear functions where we draw all weights independently from some heavy-tailed distribution. 
In this work, we consider the Uniform, Power-of-two (with a maximum power) and capped Pareto distributions, and compare them to the version based on lexicographic comparison. 

Moreover, our implementation leaves the freedom to either change the environment every generation, or to change it less frequently. This also gives a way to test a function similar to the function introduced in <cit.> (named in <cit.>). This function has served an important role as theoretical benchmark <cit.>, but it is forbiddingly slow to evaluate practically. However, it has been pointed out in <cit.> that may be approximated by a dynamic linear function in which the environment changes every n generations, for some constant . 

Thus, we provide several practical implementations of theoretical benchmarks. We empirically validate our implementations in Section <ref> by testing whether previous theoretical analyses can be recovered empirically, and find generally a good qualitative agreement.



 §.§ Theoretical results on the benchmarks


Here we review very briefly the known theoretical results on the related benchmarks. For both and , the is very well understood. For this simple algorithm, the main parameter is the mutation rate. For both benchmarks, there is a sharp phase transition in the mutation rate χ/N. There is a constant χ_0, which is χ_0 = 2.13… for  <cit.> and χ_0 = 1.59.. for  <cit.>. If χ < χ_0 then the finds the optimum in time O(Nlog N), otherwise it needs exponential time in N. The same dichotomy also holds for other dynamic linear functions, where all weights are drawn independently and identically distributed. The threshold χ_0 depends on the distribution and is always larger than the threshold 1.59.. for . For example, the threshold is χ_0 = 2 for an exponential distribution and χ_0 = (2-p)/(1-p) for a geometric distribution with parameter p.

For , it is known that this result generalizes to a large number of functions, including the , the , the , the , all without crossover, and the , where for the last three the parameter χ must be substituted appropriately <cit.>. However, all these results come with an important caveat: they hold only sufficiently close to the optimum. This may seem like a harmless condition as usually the hardest part of optimization is close to the optimum. However, this is not generally the case for . It was shown in <cit.> that for without crossover, the hardest part of is not around the optimum, but that the algorithm instead gets stuck in a region “in distance n” from the optimum, even though it would efficiently find the optimum if started in distance n/2 from the optimum <cit.>. This shows abstractly the surprising fact that progress from n to n/2 is harder than from n/2 to 0. However, the  could not be explicitly specified. One advantage of our benchmarking approach is that we are able to replace the abstract value of  by some concrete numbers, see Section <ref>. 

Another interesting result on is that crossover helps dramatically close to the optimum: for every mutation rate χ there is μ_0 such that the using either mutation or crossover, each with probability 0.5, is efficient close to the optimum. It remained an open question how the behavior is further away from the optimum, where there are the opposing effects of being (counter-intuitively) in a harder region of the search space, and having the benefits of crossover.

For , results other than for the are a bit more sparse. The benchmark has been introduced in <cit.>. Experimental results for a very limited set of parameters indicated that also here the hardest part of optimization is not always next to the optimum, at least not for the (2+1) EA and (3+1) EA without crossover. For the (2+1) EA this could also be shown formally in <cit.>. However, it can be ruled out that the reason is the same as for the on , since the latter effect crucially depends on the fact that functions maintain the order of weights for some period of time <cit.>. So even though there is a similar surprising behavior, the reasons must be different.




 §.§ IOHprofiler

IOHprofiler <cit.> is a modular toolbox for benchmarking iterative optimization heuristics. It provides access to a variety of problem suites through a common interface in its IOHexperimenter <cit.> module. This allows for a flexible benchmarking pipeline, which includes data logging. This data can be processed and visualized in the IOHanalyzer <cit.> module.

By providing access to a wide variety of problem types with common logging infrastructure, IOHprofiler has enabled a range of different research questions, both from a theoretical and practical perspective. For example, recent works have shown that the star-discrepancy optimization problem provides a challenging environment for a large set of optimization heuristics <cit.>, or created environments for competitions on several sets of submodular optimization problems <cit.>. 



§ EXPERIMENTAL SETUP



 §.§ DBV in IOHexperimenter
 

Our experimental setup is built upon the integration of several versions of the Dynamic BinVal problem class into the IOHexperimenter environment.
To handle the dynamic nature of the problem, a way of progressing its internal state (importance of each variable), a step-function has to be added to the problem itself. Note that this means that in practice, the algorithm determines when the problem's state is updated, which is needed since the problem itself has no ability to detect when an evaluation belongs to a new generation. 

The Dynamic BinVal problem is based on the Binary Value problem defined via BinVal:{0,1}^n →ℝ; x↦∑_i=1^n2^i-1x_i. In the dynamic version, we draw a permutation π for each generation and compute all fitnesses with respect to the permuted weights (x) = _π(x) = ∑_i=1^n 2^π(i)-1x_i. This version of the problem can not be implemented directly, as the weights would become too large for the standard datatypes used within IOHexperimenter. As such, we follow the observation from <cit.> and draw weights independently from different distributions instead. In this context, we consider three distinct distributions:

    
  * Uniform: Uniform Weights from 𝒰(0,1)
    
  * PowersOfTwo: Uniformly from the set {2^i : 1≤ i ≤ 31-log_2(N)} (to avoid overflow of the summed value)
    
  * Pareto: Pareto distribution with a limited upper bound ((1-𝒰(0,0.75))^-10, where 0.75 is chosen to avoid overflow of the summed value)


In addition to these 3 problem variants, we can also consider a 'true' version of the DBV (Ranking) by not implementing an evaluation, but a ranking function instead. This ranking function sorts the given individuals lexicographically according to the order of the weights, and thus does not require using the large powers of 2 directly. While this version is true to the problem, it requires any used optimization algorithm to be modified from objective-value evaluations to this ranking scheme, and thus does not give good modularity. 

The integration of the 4 versions of DBV into IOHexperimenter has the additional benefit that we can utilize several transformation methods to validate algorithmic invariances. These transformations, originally proposed in the context of the 'PBO' suite, include changing the target string with a random bitstring, swapping the order of variables and translating/scaling the returned objective value. In our experiments, when we refer to a problem instance, this corresponds to a function combined with a setting of these transformations.  




 §.§ Used Algorithm



In this paper, we make use of a standard GA which is heavily parameterized to allow for a variety of experimental setups. An outline of this algorithm is given in Algorithm <ref>, while the available parameters are indicated in Table <ref>. For our termination criterion, we use a combination of function evaluation budget (100 · N by default) and optimality (to save computation time). 

 






 §.§ Experimental Setup and Reproducibility


Throughout our experiments, we make use of N=1000, and perform independent runs on 15 different instances for each configuration. Each run is given a budget of 1000· N evaluations. Our full experimental setup, including the data collection, processing and visualization, is available on our Zenodo repository <cit.>. This repository also includes the full datasets from our experiments in an IOHanalyzer-compatible format.



§ RESULTS




 §.§ Exploration of Used Algorithms





For our first set of experiments, we perform a coarse grid sampling of our parameter space to identify which factors most impact the algorithm's performance. For this setting, performance is measured as the percentage of correct bits after 100· N evaluations. To analyze the resulting data, we make use of the SHAP approach <cit.>, which is a popular approach in the context of global explainability <cit.>. The resulting SHAP-values are shown in Figure <ref>, sorted from most impactful (top) to least (bottom).
In this figure, the color of each dot corresponds to the chosen option, e.g. for selection blue corresponds to a comma while red corresponds to a plus-strategy.

While the grid used to create Figure <ref> is rather coarse, it does provide an initial overview of the components of the algorithm which influence the selected performance measure in the most drastic ways.  In particular, we notice that using a comma selection greatly deteriorates the ability to get close the the optimum, and that using a low number of parents and a large number of offspring is beneficial in this experimental setting. This generalizes the theoretical result in <cit.>, where it was identified as a problem of the that the population is exchanged only slowly, and the family trees within the population become deep. Those properties are generally mitigated if the ratio of offspring versus parents is large. Also of note is the fact that the version of the function has quite some impact on the algorithm's performance, while the instantiation of the function is negligible. This suggests that the used GA is invariant to the used instance transformations, but not to the used weight-distribution.  




 §.§ Mutation in 1+1


For our second experiment, we focus on the (1+1) GA and study the impact of mutation and the used function version on its performance. To achieve this, we vary the mutation rate between 0 and 6 (with increments of 0.1), as well as the minimum number of mutated bits between 0 and 1. This is repeated for each version of the , with 25 independent runs of budget 1000· N. 








In Figure <ref>, we show the number of function evaluations required to reach the optimum for each of the selected GA versions. In Figure <ref> we plot the fraction of correct bits after the evaluation budget has been exhausted. A dotted black line highlights the mutation rate of 1.6, which is the theoretical threshold for the ranking-based version, the solid blue line, in the case where it is allowed that mutation flips zero bits (the parent is duplicated). Also, theory predicts that there are no other versions with smaller thresholds <cit.>. Indeed, both theoretical predictions are confirmed in Figures <ref> and <ref>. 

When comparing the different versions of in Figure <ref>, we observe quite a stark difference in algorithm performance between the Uniform-based and the other settings. While for low mutation rates all considered versions result in the same behavior, which results from flipping 1 bit, which is always accepted if it was a zero-bit and rejected otherwise, with larger mutation rates the uniform problem becomes visibly easier than the rest. This is visible both in the number of evaluations required to reach optimality, as well as in the number of correct bits after the budget threshold is reached (Figure <ref>). We also see that both the PowersOfTwo and Pareto are very similar to the Rank-based (with a slight preference for Pareto), so they seem to both be suitable to model the problem when function-evaluation-based approaches are required. 


To understand the dashed lines, we observe that in the (1+1) case, generations have no effect if the parent is duplicated (except for counting as an idle step). Hence, we should consider the number n_flip of flipped bits conditioned on flipping at least one bit. A bit counter-intuitively, the expectation 𝔼[n_flip| n_flip >0] goes down by overwriting the case n_flip =0 with n_flip=1, which means that this change decreases the number of flipped bits in the conditional space. Effectively this change decreases the mutation rate, which is why the threshold is shifted to the right.

Figure <ref> shows that the effect of a large mutation rate is quite dramatic. For example, for a mutation rate of 3/n the algorithm is only able to set less than 80% of the bits correctly after a very generous budget of 1000N. This is still a large distance from the optimum. Even with mutation rate of 3/n, the algorithm has a chance of roughly 15% (for n_min=0) to flip exactly one bit in a mutation, compared to 37% for mutation rate 1/n. Since those are the mutations that bring most progress in this range, the poor performance can not be explained by the moderate slowdown (factor 2-3) that larger mutation rates entail on other benchmarks like . The large effect shown in Figure <ref> has not been quantified by theory before.

While the heavy aggregation of Figures <ref> and <ref> shows the final performance of the considered algorithm configurations, it does not show the full behavior of the underlying runs. Since we recorded the full performance trajectory, we can load this data into IOHanalyzer to generate more fine-grained visualization, such as ERT curves <cit.> illustrated in Figure <ref>. The ERT gives some estimates for the expected running time under some pessimistic assumptions on the running time in which the optimum is not reached <cit.>. It tends to overestimate the actual running times <cit.>. Again, this shows how suddenly the performance drops at a given level, and how little is to be gained by increasing the computation budget.





 §.§ Adding multiple parents: Crossover


For our next set of experiments, we investigate the effects of crossover (uniform) on the performance of the (μ+1)-GA. We vary μ in {2,3,4,8,16}, and crossover rate in {0,0.5,0.9}. In addition to the crossover rate, we change whether an individual resulting from crossover still undergoes mutation or not. Mutation is not applied after crossover in the previous theory results.

To illustrate the impact of the different versions of crossover, we plot the number of evaluations until optimality for a given crossover rate 0.5 in Figure <ref>. In this figure, we can see a transition between these two mechanisms, where for lower mutation rates it is beneficial to still perform mutation after crossover, while disabling mutation once crossover is performed allows for more stable behavior at higher mutation rates. One perspective on this is that there is something like an optimal amount of mutation. If the mutation rate is smaller, then it may be beneficial to add mutation also after crossover. If the mutation rate is larger, then it is beneficial to not apply it in every generation.

A similar trade-off can be observed in Figure <ref> for population sizes. While an increase in population size requires more function evaluations per iteration (each individual needs to be re-evaluated to perform selection), it also improves the ability of the algorithm to work with much higher mutation rates. 







 §.§ Difficulty of the Search Stages



A remarkable theoretical result is that the hardest region for optimization is not always around the optimum. This has been shown theoretically for the (2+1) EA on  <cit.> and for the (μ+1) EA with large constant μ on  <cit.>. Notably, the underlying cause is very different in both settings. In this section we want to investigate how relevant this phenomenon for in practice, which has also been shown in some narrow-focused experiments in <cit.>, for example for the (3+1) EA for mutation rate 2.7/N. To this end, we seeded the algorithm with bit strings of a given Hamming distance from the optimum (fraction of correct bits). By seeding the algorithm with strings ranging from 0.5 to 0.95 and measuring the time needed to improve this fraction by 0.05, we get an overview of the relative hardness of each stage of the optimization procedure. The results of this experiment are visualized in Figure <ref>. 

In our experiments, we could not reproduce the finding that the hardest region was in some intermediate range. Comparing with the experiments in <cit.>, we suspect that this effect only shows for very large budgets. Since we want to systematically explore different parameter setting in this paper, the required budget becomes forbiddingly large. We believe our results do show that the effect may not be very common in practical setting, and we leave it to future work to nail down the difference further. However, in Figure <ref> we see another interesting effect. As for the mutation rate, the number of parents has a trade-off between different regions of the search space. We generally see that larger population sizes are beneficial in “easy” regions of the search space, but are detrimental in “harder regions”. This suggests that in the setting of dynamic optimization and , there may not be a fixed population size that is optimal throughout all phases of the optimization process.






 §.§ HotTopic: impact of update frequency


While the DBV problem is defined as a fully dynamic problem where the environment changes every iteration of the algorithm, we may also change it less frequently. This has been conjectured to be related to the well-studied problem, which is a static monotonic problem, but where different regions of the search space behave like different linear functions.

To illustrate the impact of the function update frequency, we again show the number of evaluations required by our (μ, 1)-GA with different settings of μ. The results of this experiment, where the crossover rate is 0.9 and mutation after crossover is enabled, can be seen in Figure <ref>. From this figure, we observe that for μ>1 the difficulty of the problem increases with the update frequency up until some point, after which the problem difficulty drops again. With a large enough update frequency, the problem becomes essentially static, at which point the problem collapses to a static binary value problem. While this function is by folklore conjectured to be the hardest static linear function, the class of static linear functions is rather easy, and this includes the static binary value problem. 

Interestingly, the intermediate range where the problem is hardest may correspond to functions, where informally the “environment” changes after N generations, where  is a small constant. There is a remarkable analogy to the theoretical results in <cit.>. There it was also shown that an intermediate regime is the hardest, but not for the update frequency, but rather for the distance from the optimum. However, the two quantities may be related in this context. In the analysis, the crucial observation was that  if the weight structure is stable, then some bad family tree structure may evolve temporarily. However, in some distance from the optimum, improvements are found while this bad family tree structures dominate. Similarly, here the same bad family tree structures might evolve while the environment is constant, and new offspring may evolve while these bad structures are around. We hope that this hypothesis gives inspiration for future work, be it empirically or theoretically.





§ CONCLUSIONS AND FUTURE WORK


Through a varied set of empirical experiments, we have highlighted several ways in which benchmarking can be used to build upon results from theoretical analysis in sometimes surprising ways. By integrating different versions of the Dynamic Binary Value problem into the IOHprofiler platform, we were able to compare several versions of , highlighting that sampling-based versions, specifically based on the Pareto distribution, lead to similar performance as the original formulation, without requiring impractically large weights. 

To highlight the potential of the integration of into different benchmarking pipelines, we analyzed the impact of a variety of algorithmic modifications to a standard GA, which allows for the exploration of research questions related to mutation rates, crossover methods and population sizes within the same setup. Perhaps most intriguing from a theory perspective is the non-monotone dependence on the update frequency in Figure <ref>. For symmetry reasons, the update frequency makes no difference for population size μ=1. Hence, the observation that a lower update frequency makes the problem harder must be due to the structure of the population. It would be very interesting to understand how the structure of the evolving populations depends on the update frequency, and why a lower update frequency leads to more susceptible populations.

The experimental environment described in this paper can be further extended to look at different kinds of dynamic environments or different algorithmic ideas. Such new empirical studies might be used to determine interesting aspects of these problems to further analyze theoretically, leading to a positive feedback loop between theory and practice. 



Acknowledgements
This work was initiated as part of the Dagstuhl Seminar 23332 "Synergizing Theory and Practice of Automated Algorithm Design for Optimization". Our work was supported by CNRS Sciences informatiques via the AAP project IOHprofiler. 








splncs04



