2016,GPEM,Subtree semantic geometric crossover for genetic programming

文章提出了一种名为子树语义几何交叉的新算子,用于遗传编程中的交叉操作。该算子解决了Moraglio等人提出的语义几何交叉中的指数代码增长问题,通过在子树级别进行几何属性的近似,实现了性能的提升和计算时间的减少。实验表明,SSGX在多个符号回归问题上表现出色,且相对于其他算子,它在保持较强利用性的同时,平衡了探索性,降低了代码复杂性。
摘要由CSDN通过智能技术生成

Abstract

Moraglio 等人提出的语义几何交叉(SGX)取得了非常有前景的结果,受到了研究者的极大关注,但在解的规模呈指数增长方面存在显著劣势。为了解决这个问题,我们提出了一种名为子树语义几何交叉(SSGX)的交叉算子。它与SGX类似,但使用子树语义相似度来近似几何性质。我们将SSGX与标准交叉(SC)、SGX以及最近的其他基于语义的交叉算子进行比较,并在几个符号回归问题上进行测试。总体而言,我们的新算子在测试数据性能上优于其他算子,并且相对于大多数算子减少了计算时间。进一步分析表明,虽然SGX具有较强的利用性,而SC具有较强的探索性,但SSGX实现了两者的平衡。同时也展示了进一步提升SSGX性能的简单方法。

1 Introduction

First, running GP with SGX requires excessive hardware resources and long running time. Second, the solutions found by SGX might be arbitrarily large and complex

Therefore, finding small and comprehensible solutions is of great importance for the usefulness of GP.

In order to lessen the code growth problem in SGX, some GP researchers [22, 36] have used a version of the operator in which the geometric property is approximated, using a library of sub-programs of known semantics. However, these methods may increase the computation time of the system due to the library search process.In this paper, we introduce another way to address code growth in SGX by proposing a new semantic geometric crossover that works on subtrees. The new crossover not only helps to greatly reduce the complexity of the evolved solutions, compared to SGX, but also to further enhance GP performance. The main contributions and findings of the paper can be summarized as follows:

  • A new semantic-based crossover, called subtree semantic geometric crossover (SSGX), is proposed and its performance is investigated. The experimental results show that this operator helps to alleviate code growth in SGX and also to improve its performance.
  • Analysis of computation time shows that while using an additional library as in the random desired operator (RDO) and approximate geometric crossover (AGX) of Krawiec et al. [22, 36] increases the execution time of GP systems considerably, the overhead of SSGX is negligible.
  • The design of SSGX allows for further improvements. In this paper, a simple method for improving SSGX is also introduced that leads to better performance.

2 Background

这一部分为本文的研究提出了一些必要的背景。首先,介绍了一种度量语义的方法。其次,定义了语义距离。最后简要介绍了SGX [29]。

2.1 Measuring semantics

术语" ‘语义’ "的含义因领域而异。在GP中,通常将程序的语义简单地定义为程序对一组输入值的行为。在本文中,我们遵循先前的GP研究[23、26、29、34、36],将程序(个体)的语义定义为问题的适应度案例的输出。形式上,程序的语义定义如下:

定义 1 K = ( k 1 , k 2 , . . . , k N ) K = (k_1, k_2, ..., k_N) K=(k1,k2,...,kN)为该问题的适应度情况。程序 P P P的程序语义 S ( P ) S(P) S(P)是在所有适应度情况下运行 P P P得到的输出值的向量。

该定义对于定义了一组适应度案例的问题是有效的。

2.2 Semantic distance

基于上述定义,两棵树或子树之间的语义距离通常被定义为它们对应的输出向量相对于适应度案例输入向量的距离。在本文中,我们使用问题的适应度案例数归一化的曼哈顿度量作为两个个体的语义距离

定义 2 两棵树 ( P 1 P_1 P1 P 2 P_2 P2)之间的语义距离(SD)定义如下。

这个定义对于输出为单个实数的程序是有效的,就像在符号回归中一样。

2.3 Semantic geometric crossover

如前所述,Moraglio等人[29]提出了几个问题域的几何语义算子(交叉和变异)。他们的思想来源于进化算法的统一几何理论[27]。这些算子的动机是允许GP直接在语义空间进行搜索。形式上,实值符号回归的几何交叉(SGX)定义如下[29]。

定义 3 给定两个父代函数 P 1 , P 2 : R n → R P_1,P_2:\Bbb{R}^n \to \Bbb{R} P1P2RnR,几何语义交叉返回实函数 P 3 = T R P 1 + ( 1 − T R ) P 2 P_3 = T_RP_1 + (1-T_R)P_2 P3=TRP1+(1TR)P2其中 T R T_R TR [ 0 , 1 ] [ 0 , 1] [0,1]中的随机实常数或与陪域 [ 0 , 1 ] [ 0 , 1] [0,1]的随机实函数。

如果 T R T_R TR是一个随机实常数,则交叉产生的子代位于语义空间中连接两个父代的关于欧氏距离的线段上。这是一条 ‘‘thin’’ 线段。然而,如果 T R T_R TR是随机实函数,那么子代位于父代之间关于曼哈顿距离的线段上。这是一条’ ‘厚’ '的线段。之前的一些研究表明,曼哈顿版本的SGX表现更好的[7、30],所以本文研究的版本。这里TR作为函数而不是常数的选择与语义距离选择曼哈顿而不是欧氏距离和适应度函数选择平均绝对误差而不是均方根误差有关。

SGX算子生成包含父代和子代完整结构的子代。因此,孩子的规模大于父母的规模之和。个体规模的指数增长使得该算子在一个简单的实现中不切实际,尽管这可能部分地通过像Moraglio等[29]中使用子代的自动简化来解决,或者通过实现来解决[ 28、38]中提出的缓存。在Sect.4,提出了解决该问题的备选方案。

SGX算子依赖于对问题的若干假设。如前所述,它将语义定义为关于一组预定输入的输出值向量,这可能并不适用于所有问题。它依赖于输出在合适的度量空间中的几何性质,以及GP语言的"功能性",即没有副作用或程序状态。所有这些假设对于包括符号回归在内的重要问题类都是成立的,但它们的确代表了对SGX的一个限制。包括本文在内的其他几种现代语义交叉算子也是如此。可以允许解除这种限制的语义的替代定义在GP中也被用于[12、16]。

3 A review of semantic crossovers in GP

Semantic methods for GP operators can be classified into two types: direct and indirect [39]. Direct methods effectively act directly on the semantics of individuals [29, 38], while indirect methods achieve their semantic goals indirectly by acting on syntax and then applying semantically defined survival criteria [19, 23, 33, 34].

Although both AGX and RDO have been empirically shown to have superior performance to both LGX and SC, they have some limitations. First, these operators can be time consuming as a result of the backpropagation and library search processes. Second, RDO is not fully black-box: it is not usable if the target semantics of the problem is not explicitly defined (or calculated), as is common, for example, in some reinforcement learning and security problems [36]. Moreover, on problem domains like classification where the semantics of an individual may not be strongly correlated to the target semantics of the problem, the performance of RDO may suffer.

  • AGX 与 RDO 的花销主要在反向传播与库搜索上

4 Subtree semantic geometric crossover

新的交叉算子称为SSGX,类似于 Moraglio 等人[29]的交叉算子。但它是在子树级别实现的。其过程如下。选择两个父代 P 1 P_1 P1 P 2 P_2 P2以及一个概率值 ϵ \epsilon ϵ。若随机生成一个 R ∈ [ 0 , 1 ] R\in[0,1] R[0,1] ϵ \epsilon ϵ 更小的值,则执行新的几何子树交叉。否则,执行标准(子树)交叉。这一步意味着一定比例的交叉操作由SC执行。在早期的实验中,我们实现了100%的几何子树交叉,发现种群很快崩溃到非常小的个体。对于复杂问题,如果个体生长不足,GP的性能会显著恶化。

在进行新型几何子树交叉的情况下,在 P 1 P_1 P1中随机选择一个满足大小约束的子树(由参数 MaxTrial 给出),不包括 P 1 P_1 P1本身。我们用 S t 1 St_1 St1表示其中与 P 1 P_1 P1语义最相似的一个。通过这种方式选择 S t 1 St_1 St1的目的是用一个更小的子树代替一个高适应度的父树,该子树近似其语义。尺寸约束旨在控制子代的代码增长。在本文中,我们使用了一个简单的约束,其中只有一个大小在 [ α , β ] [\alpha, \beta] [α,β]范围内的子树被选择。下界 ( α \alpha α) 旨在避免选择非常小的子树(例如叶子节点),这可能会破坏父树的结构。上界( β \beta β)用于限制代码增长。

我们在 P 2 P_2 P2中选择与 S t 1 St_1 St1相同的 S t 2 St_2 St2。然后通过子树 S t 1 St_1 St1 S t 2 St_2 St2的凸组合生成两个子代1。换句话说, C 1 C_1 C1 C 2 C_2 C2是, 生成为: C 1 = T R S t 1 + ( 1 − T R ) S t 2 C_1 = T_RSt_1 + (1 - T_R)St_2 C1=TRSt1+(1TR)St2 C 2 = ( 1 − T R ) S t 1 + T R S t 2 C_2 = (1 - T_R)St_1 + T_RSt_2 C2=(1TR)St1+TRSt2. T R TR TR是一个具有域 [ 0 , 1 ] [ 0 , 1] [0,1]的随机函数,通过生成最大深度为 2 2 2的随机树,并将结果通过logistic函数传递而创建。 S t 1 St_1 St1 S t 2 St_2 St2有效地近似了 P 1 P_1 P1 P 2 P_2 P2的语义,并代替它们使用。 P 1 P_1 P1 P 2 P_2 P2本身不用于交叉。如果 S t 1 St_1 St1 S t 2 St_2 St2精确复制 P 1 P_1 P1 P 2 P_2 P2的语义,则语义效果与Moraglio等人[29]提出的几何语义交叉相同,但代码增长较少。在实际应用中, S t 1 St_1 St1 S t 2 St_2 St2只会逼近 P 1 P_1 P1 P 2 P_2 P2的语义。因此,我们可以将该过程看作是一种几何语义交叉,然后是一种启发式和不精确的简化,类似于Moraglio等[29]提出的精确后算子简化。SSGX的细节在算法 1 中给出,其中 SD \text{SD} SD 是Sect 2 中定义的两个个体之间的语义距离,以及 S i z e O f ( S t ) SizeOf(St) SizeOf(St)函数返回树 S t St St的节点数。

  • 1产生两个子代而不是原始版本SGX中的一个子代的原因是允许在SSGX中同时执行SC和几何交叉。此外,这种实现使得SSGX与传统的子树交换交叉一致。

在Sect.8测试MaxTrial的几个值,以考察其对SSGX性能的影响。与SGX [29]相比,这种交叉具有一些有趣的性质。首先,在子树层次上近似几何性质,在保持几何交叉(在Sect .6)为此提供了证据)的部分优势的同时,潜在地有助于减少子代规模。其次,只有一部分SSGX交叉点使用几何方法,即子树的凸组合。因此,我们可以使用任意版本的子树交叉,如SSC,MSSC[33、34]或LGX [19]。在Sect .9,我们将研究这是否可以进一步提升SSGX的性能。

有可能在一代中被选为 S t 1 St_1 St1 S t 2 St_2 St2的子树在以后的一代中再次被选为 S t 1 St_1 St1 S t 2 St_2 St2,因为每个交叉操作都将 S t 1 St_1 St1 S t 2 St_2 St2保留为子树。如果这种情况经常发生,搜索可能会因为重新访问旧的遗传物质而效率低下。

然而,这种情况发生的概率并不高,因为在我们的实验中,只有一部分(30%)是几何交叉,剩余部分(70% )是SC。变异也被用来修饰个体。这些降低了子树被重新选择的概率。

5 Experimental settings

10 regression problems(6 GP benchmark problems,four real-valued problems drawn from the UCI repository)

在这里插入图片描述

The GP parameters used for our experiments are given in Table 2
在这里插入图片描述

The first aims to investigate the performance of SSGX in comparison with SC and other semantic-based crossovers. The second aims to analyse the solution size, execution time, and semantic effects of the tested operators. The third set attempts to test how sensitive the performance of SSGX is when its parameters are varied. Lastly, in the fourth set, we propose a scheme to further enhance the performance of SSGX. The results of these sets of experiments are detailed in the following sections.

6 Performance analysis

The tested semantic-based operators include SGX [29], AGX [22] and RDO [36].2

three metrics including training error, testing error and running time were used.

The first analysis is the mean best fitness on the training data. These values are presented in Table 3.3
在这里插入图片描述
The table shows that RDO is the ‘‘winner’’ (has the smallest training error) in eight out of ten problems (SSGX winning in one and SGX in one problem).

The median of these values across 30 runs was calculated and are shown in Table 4.
在这里插入图片描述
SSGX was the winner (the operator that achieves the best result on the testing data) in four out of ten problems. AGX and RDO were each the winner in three problems.

检验: Bonferroni correction factor of 100、Wilcoxon
在这里插入图片描述

References

Nguyen Q U, Pham T A, Nguyen X H, et al. Subtree semantic geometric crossover for genetic programming[J]. Genetic Programming and Evolvable Machines, 2016, 17: 25-53.

算法原理

新的交叉算子称为SSGX,其过程如下:
选择两个父代 P 1 P_1 P1 P 2 P_2 P2以及一个概率值 ϵ \epsilon ϵ。若随机生成一个 R ∈ [ 0 , 1 ] R\in[0,1] R[0,1] ϵ \epsilon ϵ 更小的值,则执行新的几何子树交叉。否则,执行标准(子树)交叉。这一步意味着一定比例的交叉操作由SC执行。

在进行新型几何子树交叉的情况下,在 P 1 P_1 P1中随机选择一个满足大小约束的子树(由参数 MaxTrial 给出),不包括 P 1 P_1 P1本身。我们用 S t 1 St_1 St1表示其中与 P 1 P_1 P1语义最相似的一个。通过这种方式选择 S t 1 St_1 St1的目的是用一个更小的子树代替一个高适应度的父树,该子树近似其语义。尺寸约束旨在控制子代的代码增长。在本文中,我们使用了一个简单的约束,其中只有一个大小在 [ α , β ] [\alpha, \beta] [α,β]范围内的子树被选择。下界 ( α \alpha α) 旨在避免选择非常小的子树(例如叶子节点),这可能会破坏父树的结构。上界( β \beta β)用于限制代码增长。

P 2 P_2 P2中选择与 S t 1 St_1 St1相同的 S t 2 St_2 St2。然后通过子树 S t 1 St_1 St1 S t 2 St_2 St2的凸组合生成两个子代1。换句话说, C 1 C_1 C1 C 2 C_2 C2的生成为: C 1 = T R S t 1 + ( 1 − T R ) S t 2 C_1 = T_RSt_1 + (1 - T_R)St_2 C1=TRSt1+(1TR)St2 C 2 = ( 1 − T R ) S t 1 + T R S t 2 C_2 = (1 - T_R)St_1 + T_RSt_2 C2=(1TR)St1+TRSt2. T R TR TR是一个具有域 [ 0 , 1 ] [ 0 , 1] [0,1]的随机函数,通过生成最大深度为 2 2 2的随机树,并将结果通过logistic函数传递而创建。 S t 1 St_1 St1 S t 2 St_2 St2有效地近似了 P 1 P_1 P1 P 2 P_2 P2的语义,并代替它们使用。 P 1 P_1 P1 P 2 P_2 P2本身不用于交叉。如果 S t 1 St_1 St1 S t 2 St_2 St2精确复制 P 1 P_1 P1 P 2 P_2 P2的语义,则语义效果与Moraglio等人[29]提出的几何语义交叉相同,但代码增长较少。在实际应用中, S t 1 St_1 St1 S t 2 St_2 St2只会逼近 P 1 P_1 P1 P 2 P_2 P2的语义。因此,我们可以将该过程看作是一种几何语义交叉,然后是一种启发式和不精确的简化,类似于Moraglio等[29]提出的精确后算子简化。SSGX的细节在算法 1 中给出,其中 SD \text{SD} SD 是Sect 2 中定义的两个个体之间的语义距离,以及 S i z e O f ( S t ) SizeOf(St) SizeOf(St)函数返回树 S t St St的节点数。

  • 1产生两个子代而不是原始版本SGX中的一个子代的原因是允许在SSGX中同时执行SC和几何交叉。此外,这种实现使得SSGX与传统的子树交换交叉一致。

总结: 2016,GPEM,Subtree semantic geometric crossover for genetic programming

原文地址:点击跳转

算法原理梳理

P 1 P_1 P1 中选择一个与原语义最近似的子树 S t 1 St_1 St1 P 2 P_2 P2 中选择一个与原语义最近似的子树 S t 2 St_2 St2,通过交叉操作产生子代为: C 1 C_1 C1 C 2 C_2 C2的生成: C 1 = T R S t 1 + ( 1 − T R ) S t 2 C_1 = T_RSt_1 + (1 - T_R)St_2 C1=TRSt1+(1TR)St2 C 2 = ( 1 − T R ) S t 1 + T R S t 2 C_2 = (1 - T_R)St_1 + T_RSt_2 C2=(1TR)St1+TRSt2.

P 2 P_2 P2中选择与 S t 1 St_1 St1相同的 S t 2 St_2 St2。然后通过子树 S t 1 St_1 St1 S t 2 St_2 St2的凸组合生成两个子代1。换句话说, C 1 C_1 C1 C 2 C_2 C2的生成为: C 1 = T R S t 1 + ( 1 − T R ) S t 2 C_1 = T_RSt_1 + (1 - T_R)St_2 C1=TRSt1+(1TR)St2 C 2 = ( 1 − T R ) S t 1 + T R S t 2 C_2 = (1 - T_R)St_1 + T_RSt_2 C2=(1TR)St1+TRSt2. T R TR TR是一个具有域 [ 0 , 1 ] [ 0 , 1] [0,1]的随机函数,通过生成最大深度为 2 2 2的随机树,并将结果通过logistic函数传递而创建。 S t 1 St_1 St1 S t 2 St_2 St2有效地近似了 P 1 P_1 P1 P 2 P_2 P2的语义,并代替它们使用。 P 1 P_1 P1 P 2 P_2 P2本身不用于交叉。如果 S t 1 St_1 St1 S t 2 St_2 St2精确复制 P 1 P_1 P1 P 2 P_2 P2的语义,则语义效果与Moraglio等人[29]提出的几何语义交叉相同,但代码增长较少。在实际应用中, S t 1 St_1 St1 S t 2 St_2 St2只会逼近 P 1 P_1 P1 P 2 P_2 P2的语义。因此,我们可以将该过程看作是一种几何语义交叉,然后是一种启发式和不精确的简化,类似于Moraglio等[29]提出的精确后算子简化。SSGX的细节在算法 1 中给出,其中 SD \text{SD} SD 是Sect 2 中定义的两个个体之间的语义距离,以及 S i z e O f ( S t ) SizeOf(St) SizeOf(St)函数返回树 S t St St的节点数。
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值