{'fraction_non_alphanumeric': 0.026841889728602807, 'fraction_numerical': 0.006701165258181006, 'mean_word_length': 5.024220677281901, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On the Genotype Compression and Expansion for Evolutionary Algorithms in the Continuous Domain

This paper investigates the influence of genotype size on evolutionary algorithms' performance. We consider genotype compression (where genotype is smaller than phenotype) and expansion (genotype is larger than phenotype) and define different strategies to reconstruct the original variables of the phenotype from both the compressed and expanded genotypes. We test our approach with several evolutionary algorithms over three sets of optimization problems: COCO benchmark functions, modeling of Physical Unclonable Functions, and neural network weight optimization. Our results show that genotype expansion works significantly better than compression, and in many scenarios, outperforms the original genotype encoding. This could be attributed to the change in the genotype-phenotype mapping introduced with the expansion methods: this modification beneficially transforms the domain landscape and alleviates the search space traversal.


Introduction
The dimensionality of an optimization problem significantly impacts any optimization procedure used to solve it, including evolutionary algorithms (EAs) [3,16]. However, there is still an open question of whether the difficulties of EAs with high dimensional problems are mainly due to the larger number of variables or the problem becoming harder to solve. Often, these two factors are correlated: a higher number of variables increases the search space size, which in turn makes the problem more complexfor example, by increasing the number of local minima, as in the case of rugged fitness landscapes [9]. Therefore, from existing research, it is difficult to deduce how increasing the dimension space influences the algorithms' performance since changes in performance could also be due to an increase in difficulty. This paper aims to observe how the performance of EAs correlates with different dimension sizes while keeping the same problem size. This means that the algorithms operate on a different number of variables than required by the optimization problem. These algorithm-side variables are then transformed in a specific way to obtain the correct number of problem-specific variables before the evaluation procedure. In this way, the complexity of the original problem is preserved (i.e., the problem does not become easier or more difficult to solve), whereas the search space size is artificially enlarged or reduced. Doing so makes it possible to obtain a more objective estimation of the influence of the problem dimensionality for the performance of optimization methods.
Approaches that artificially increase or decrease the search space did not receive much attention in the literature yet. Salcedo-Sanz et al. [20] proposed a genotype compression-expansion strategy to improve the convergence speed of a Genetic Algorithm (GA) on the Inductive Query By Example (IQBE) optimization problem related to information retrieval systems. The GA genotype encodes the Boolean terms in a query, and the compression step groups in fixed-size subsets the terms belonging to the same topic, representing them with a single bit. The compressed individual is then expanded back for fitness evaluation. Koutnik et al. [11] considered the problem of reducing the search space in the context of neuroevolution. In that work, the weight matrix of a neural network is represented in the frequency domain utilizing a Fourier transform. Evolutionary algorithms are then used to search in this compressed representation, where high-frequency coefficients are removed. Steenkiste et al. [22] adopted a similar approach but used a wavelet transform instead. In both cases, the underlying assumption for this compression strategy is that successful networks have spatially correlated weights. Moreno et al. [13] proposed methods based on artificial neural network autoencoders for the automatic generation of genotype-phenotype mappings to improve evolvability. One of the proposed methods uses the encoder part of a bottlenecked autoencoder to reduce the genotype size and the decoder segment for the genotype-phenotype mapping. Stanley et al. [21] developed a taxonomy for Artificial Embriogeny, a subdiscipline of evolutionary computation, where some genes from the genotype are used multiple times while mapping from genotype to phenotype. This allows for a simpler representation of a complex phenotype, which therefore reduces the search space. Similarly, Bongard et al. [2] used a developmental encoding scheme based on Artificial Ontogeny to map the genotype in a phenotype that represents a complete agent.
From the above examples, the few works focusing on genotype compression and expansion mainly consider specific optimization problems, and the proposed strategies leverage domain-specific knowledge. As far as we know, this paper represents the first study on the influence of genotype compression/expansion for evolutionary algorithms, where the compression and expansion strategies are independent of the underlying optimization problem. Our experimental setup considers continuous optimization problems and several evolutionary algorithms to draw conclusions. More precisely, we consider three problems: the COCO benchmark functions, Physical Unclonable Functions (PUF) modeling, and neural network weights optimization. For the compression procedure, we investigate the scenario where two variables are combined into a single variable (reducing the dimensionality of the problem by half). The compression procedure is conducted via two strategies: interleaving and concatenation. We experiment with several sizes of the expanded variables for the expansion procedure and two procedures to obtain those: summation and multiplication. Our results show that the compression procedure consistently gives poor results, but expansion can significantly improve the performance of the algorithm (as evaluated by the final solution).

Genotype Compression
The compression strategies presume that a number of original variables are combined into a single compressed variable. Let m represent the number of original variables combined into a single one; then the total number of variables after the compression will be equal to t m . Regardless of the original uncompressed variables' scope, we keep every value of the compressed variable in the interval [0, 1]. In the floating-point representation, the number of decimal places is denoted by p and given by the precision of the number format used to store those values. In our experiments, we used a standard double-precision format with 16 significant digits. Since the values of the compressed variables are in [0, 1] range, the decimal part of the compressed value is used to decode m uncompressed numbers. As a result, each original variable will use d = p m decimal digits of the compressed number. A compressed variable is decompressed by the following two strategies: sequential and alternating. In the sequential strategy (concatenated), the decoding is performed so that the first p/m digits represent the first original value, the following p/m digits the next value, etc.
In the alternating scheme (interleaved), the digits of the compressed variable are distributed so that each m-th digit is used for recreating one original variable. After the decomposition, in both schemes, the resulting values are additionally mapped to the desired domain interval with a simple linear transformation, i.e., the value 0 represents the lower, while the value 1 the upper bound. Regardless of the decoding scheme, the described compression approach inevitably incurs a loss of precision to the original variables; in the above example, the original variable would have only half of the significant digits representing its value. Depending on the actual problem domain, the loss of precision may affect the algorithm performance; unfortunately, this is not immediately evident in every case. In all experiments in this paper, we limit the division factor to m = 2, so the resulting precision is p/2 significant digits in the original domain.

Genotype Expansion
Let t denote the number of variables of a particular continuous optimization problem, referred to as the original variables. In the genotype expansion, each original variable is represented with several expanded variables; let m represent the number of expanded variables for a single original variable. The optimization algorithm operates on individuals comprised of expanded variables; only when evaluating a potential solution, the corresponding original values are recreated, and the fitness is calculated and assigned to the individual.
To recover the original variables, we consider the following two strategies: summation and multiplication. In the summation scheme, the original variable x i can be split into the sum of m variables x i = x i1 + x i2 + . . . + x im . In the multiplication scheme, the original variable x i is represented as a product of m variables x i = x i1 · x i2 · . . . · x im . This means that the expanded representation can be decoded into the original variable by consecutively summing or multiplying m expanded variables. In both cases, m can be an arbitrary integer number larger than 1. The number of variables in the expanded scheme is then t · m.
The expansion strategies were selected with both simplicity and efficiency in mind to demonstrate the applicability of such an approach, although more complex transformations can be defined. However, one potential pitfall of the multiplication strategy has to be outlined. When the allowed domain is defined only between 0 and 1, then as the number of multiplications increases, the result will approach 0. This can be resolved either by increasing the domain to have multiplications with larger numbers or by decreasing the number of multiplications.
The expanded variables use the same domain (defined with lower and upper bound) as the original variables. The decoded original value can be clipped to the bound value if it exceeds a specific interval to facilitate constrained optimization with explicit bounds. Unlike in [11] where certain elements are discarded from the search space, both proposed strategies use the entire genotype during the transformation to phenotype. In that way, all elements are directly considered during optimization.

Experimental Setup
The genotype expansion or compression is used independently of the optimization algorithm; however, the efficiency of the approach may still be influenced by the chosen algorithm. We have performed the experiments using several well-known evolutionary algorithms, each using the original variables (denoted as "default"), the expanded, and the compressed variables. We investigate the genetic algorithm (GA), evolutionary strategy (ES), differential evolution (DE), and clonal selection algorithm (CLONALG). However, as GA and DE achieved the best results and the tested approaches exhibited a similar behavior on the other algorithms as well, we report the detailed results only for GA and DE.
The GA uses a steady-state selection scheme where, in each iteration, three individuals are selected at random. The worst one is eliminated and replaced with the crossover offspring from the remaining two. The resulting new individual is additionally mutated with a mutation rate of 0.3. The differential evolution uses a scaling constant (differential weight) F = 1 and the crossover rate CR = 0.9. The population size in all experiments is set to 100. The parameters we use are selected based on a short preliminary tuning.
All the algorithms operate on the same genotype, where individuals are represented as vectors of floating-point values. In GA, a single mutation operator is used, which alters a randomly chosen gene (a single floating-point value) to a new random value from the domain with a uniform distribution. For the crossover in GA, we use multiple operators where a random one is selected every time crossover is performed. The crossover operator is selected from the following: discrete crossover [7], simple and whole arithmetic crossover [7], local crossover [6], SBX crossover [17][4], BLX-alpha crossover [8], flat crossover [19], BGA crossover [14], heuristic crossover [23], and average crossover [15].
We use the Mann-Whitney non-parametric test to check whether the proposed approaches' results are significantly better than the standard (default) number of variables (pair-wise comparison). First, we test the hypothesis that the proposed approach is significantly better than the standard one. If this hypothesis is rejected, we perform an additional test to check whether the proposed approach is significantly worse than the default one. The results are considered significant if the obtained p-values are less than 0.05. Each table will include the results of the statistical tests between the proposed approach and the default approach. The test results are listed after each value in the tables and denoted as +, -or =, representing the result is significantly better, significantly worse, or that there is no significant difference, respectively.

Benchmark Problems
The COCO platform is used to analyze the performance of the proposed expansion/compression approaches [10]. From this platform, the set of 24 noiseless functions of arbitrary variable sizes is selected for the experiments. Based on their properties, the functions can be grouped into five categories: • Separable functions -variables of the function are mutually independent, meaning that the optimum can be obtained by performing optimization in each dimension separately (functions f 1f 5). . The benchmark problems were optimized with all four algorithms, but the results are only shown for GA and DE. Each algorithm used the maximum number of function evaluations as the stopping criterion, which is set to the value of D · 100 000, where D represents the number of dimensions for the considered problems. The approaches are benchmarked on 2, 5, 10, and 20-dimensional functions. The search space is defined as the interval [ −5, 5] in every dimension. For each tested function, 50 instances are created in the standard procedure used by the COCO platform by shifting or rotating the functions (for example, the separable functions are only shifted). Additionally, the COCO platform defines a run as successful if an objective value of 1e − 8 or less is reached, which is then denoted as a hit.
The experiments indicate that the GA obtained the best results among the tested methods, followed by DE. The GA results will be outlined for most of this paper, as the observations made there are also applicable for the other tested algorithms. Table 1 shows the results obtained by GA for optimizing the set of test functions in two dimensions. The columns in the table represent different encodings, with "exp" corresponding to the expansion and "com" to genotype compression, while "def " denotes the default encoding in which the number of variables is unchanged. We also report the expansion factor (2 or 3) and the decoding scheme; summation (s) and multiplication (m) for the expansion, sequential (seq), and alternating (alt) for the compression. Each row denotes the median fitness value obtained over the 50 executed instances, the number of hits for each function (denoted in brackets), and whether the approach in this column is significantly better, equal, or worse concerning the default genotype encoding. The experiments in which the proposed methods obtained significantly better results than the default encoding are emphasized with grey cells. It can be observed that compressing the search space to fewer variables leads to poor results, even for the simplest functions. This is backed up by statistical tests, demonstrating that the compression-based approaches achieve significantly worse results than the default encoding with the original number of variables for each function. For the expansion of variables, the results are more interesting. For the group of separable functions, the results show that all variants achieved the maximum number of hits. This shows that none of the expansion approaches has difficulties converging to the minimum on simple functions. On the second group of functions, we see that the expanded representations achieve a larger number of hits than the default method, except for function f7, where all methods achieved the maximum number of hits. Additionally, the expansion-based approaches obtained significantly better results in most cases for the other functions. As such, the proposed approaches perform better on non-separable functions that are not ill-conditioned.
Additionally, tests are performed on the two-dimensional set of functions to test the number of variables to which the original representation should be expanded. The tested expansions are 2t, 3t, 5t, and 10t. In all cases, the obtained results are quite similar, and the approaches did not show a significant deterioration in the results as the expanded number of variables increased. For that reason, we decided to keep the number of expanded variables minimal, as there is no benefit of using larger values.

Modeling Physical Unclonable Functions (PUFs).
Physical Unclonable Functions (PUFs) are lightweight hardware devices commonly used in authentication schemes and anti-counterfeiting applications. PUFs use inherent manufacturing differences within every physical object to give each physical instance (a PUF) a unique identity. PUFs are usually divided into two categories: weak PUFs and strong PUFs. A strong PUF can be queried with an exponential number of challenges to receive an exponential number of responses (challenge-response pairs -CRP). Existing strong PUFs can be simulated in software, and the required parameters for such a software model can be approximated by using machine learning or evolutionary algorithms [1,18]. Usually, strong PUFs rely on delayed-based Arbiter PUFs (APUFs) as their main building blocks for PUF constructs and protocols [24]. Such APUFs can be modeled by a linear function, which is at the foundation of various AI-based attacks using challenge-response pairs [5].
Arbiter PUF consists of one or more chains of two 2-bit multiplexers that have identical layouts. Each multiplexer pair is denoted as a stage, with n stages in a single chain. A single input signal is introduced to the first stage to both the bottom and top multiplexer in the pair. The chain is fed a control signal of n bits called a challenge, where each bit determines whether the two input signals in that stage would be switched (crossed over) or not. In ideal conditions, the input signal would propagate at the same speed through each stage, and both the lower and upper signal would arrive at the arbiter (at the end of the chain) at the same time. Due to the manufacturing inconsistencies, each delay of a multiplexer is slightly different, and the top and bottom input signals are not synchronized. The arbiter at the end of the chain determines which signal arrived earlier and thus forms the response (0 or 1). The response of a PUF is determined by the delay difference between the top and bottom input signal, which is, in turn, the sum of delay differences of the individual stages. To efficiently model a PUF, one tries to determine the delay vector w = (w 1 , . . . , w n+1 ) which models the delay differences in each stage. Lim [12] proposed a linear additive model that captures the APUF behavior where we require the map f (c) = φ of the applied challenge c of length n to a feature vector φ of length n + 1. The product of the feature vector and delay vector decides what signal came first, and based on it, what is the response bit r: (1) The optimization algorithm aims to find a delay vector that reproduces  the target PUF behavior, with its actual delay values being unknown. The delay vector is a sequence of floating-point values with n elements, which correspond to n stages in a PUF. As the optimized delay vector approaches the actual one, the clone PUF model will reproduce the target PUF responses more accurately, which is the goal of the attacker. The performance measure of the PUF model is commonly defined as the number of wrong responses in a given set of challenge-response pairs. This value is minimized, and the lower the value, the more accurate the PUF model. Our experiments modeled PUF targets with two chain sizes, 32 and 64 elements (corresponding to 32 and 64 variables). In Table 3, we give the results optimizing both PUF targets with 2 000 challenge-response pairs using GA and DE. Although there is no significant difference for the GA, the expansion summation method slightly improved upon the default encoding. The multiplication approach obtained slightly worse results, following the observation that the summation variant scales better with increased dimensionality, which is considerably larger in this case. We depict the results for PUF with 64 stages in Figure 2, where the y axis denotes the number of incorrectly modeled challenge-response pairs. Observe how the expansion procedure with summation improves slightly over the default approach, while the compression approaches work significantly worse on average. Still, the best solutions for the sequential strategy compression perform similarly to the default strategy.

Optimizing Neural Network Weights.
Artificial neural networks (ANNs) are a widely used model applied for various problem types. However, determining the multiplexer's optimal weights of a neural network for a given problem is a difficult optimization problem. As a result, various algorithms are used to optimize the weights of ANNs, ranging from gradient-based to evolutionary methods. We apply the proposed approaches for optimizing the weights of ANNs for three selected regression problems. The considered problems are: (3) We selected these problems as they include both linear and nonlinear functions. For each problem, the number of training samples is between 250 and 300. We consider a simple feed-forward fully-connected ANN consisting of two hidden layers. The notation a-b-c-d is used to denote the architecture of a network with a nodes in the input layer, b and c nodes in the first and second hidden layers, and d nodes in the output layer. The Sigmoid function is used as the activation function in the hidden layers, whereas the linear sum function is used in the output layer. The following architectures are applied for the first and second regression problems: 1-5-3-1, 1-5-5-1, 1-7-5-1, 1-7-7-1. For the second function, the input layer consisted of two nodes instead of one. Since the third regression problem was less difficult to solve, it is used to test some smaller architectures: 1-2-2-1, 1-3-3-1, 1-5-5-1, 1-7-5-1. Each experiment is run 30 times to obtain statistically significant results. The domain is set to [−5, 5], and the termination criterion is set to 100 000 function evaluations. The fitness function of this problem is defined as the mean squared error between the real values and the ANN output. Note that the problems and architectures of the considered neural networks are simple by today's deep learning standards, but they were selected to test the feasibility of the proposed approach for such problems. Table 4 displays the results obtained by GA for each regression problem and the selected architectures, while Figure 3 represents the distribution of solutions. Each row contains the median MSE value of the 30 executions and the standard deviation, denoted after the ± sign. The results support what was already demonstrated in previous experiments: the compression-based approaches again obtain inferior performance compared to all other tested approaches. On the other hand, the summation-based expansion approach achieved equally good or significantly better results than the default approach in all experiments. The multiplication-based approaches also performed well, although slightly worse than the summation-based ones. Surprisingly, for this problem, the increase of the number of variables, i.e., weights, did not affect the expansion approaches' performance, unlike in the case of the COCO benchmarks. Therefore, the results also demonstrate that the expansion approaches' performance depends on the considered optimization problem.
The probable reason why the compression-based methods achieve inferior results is that two variables are fused into one. This means that changes are being performed on both original variables at the same time as the changes are performed on the compressed variable. As such, it is quite difficult to ensure that both variables are being changed in a meaningful way, which would lead us closer to the minimum, or that only a single of those two variables is updated. The compression-based methods also suffer from a reduced precision since the same space is used to store more than one variable at a time. This can limit the algorithms since they cannot perform an equally fine-grained search as without the genotype reduction. On the other hand, the expansion approaches seem to perform better due to a larger degree of freedom. However, in the expansion approaches, due to each variable being expressed with multiple values, the algorithm now has an infinite number of combinations in which it can represent a single value with several ones. Although the search space also increases, it seems that this additional freedom proves to be beneficial and allows the algorithms to find new paths towards the minimum.

Conclusions and Future Work
This paper discusses how to expand or compress genotypes for continuous optimization and EAs. We compare four evolutionary algorithms' performance, four strategies for reconstructing the original genotype after compression/expansion, and three sets of problems. Our analysis shows that compression works poorly in all the tested cases, while expansion manages to outperform the default encoding in numerous settings. We find the summation-based expansion strategy to be especially promising.
As the approach we discuss here is novel, there are multiple research directions one could follow. While we discuss the continuous optimization  problems where we see the improvements stemming from the genotype expansions, it is not difficult to imagine problems where such an approach would not be beneficial. We plan to investigate such problems and understand what the differences are. Also, we considered a scenario where every variable is either expanded or compressed. It would be interesting to see what happens when only a subset of variables is adapted in this way. This could provide a trade-off between the improvements in the performance and the size of the genotype.