Inferring P systems from their computing steps: An evolutionary approach

https://doi.org/10.1016/j.swevo.2022.101223Get rights and content

Abstract

Inferring the structure and operation of a computing model, given some observations of its behavior, is in general a desirable but daunting task. In this paper we try to solve a constrained version of this problem. We consider a P system Π with active membranes and using cooperative rewriting, communication, and division rules and a collection of pairs of its consecutive configurations. Then, we feed this collection of configurations as input to a (μ+λ) evolutionary algorithm that evolves a population of (initially random) P systems, each with its own rules, with the aim of obtaining an individual that approximates Π as well as possible. We discuss the results obtained on different benchmark problems, designed to test the ability to infer cooperative rewriting, communication, and membrane division rules. We will also provide a description of how fitness results are influenced by different setting of the hyperparameters of the evolutionary algorithm. The results show that the proposed approach is able to find correct solutions for small problems, and it is a promising research direction for the automatic synthesis of P systems.

Introduction

Membrane systems, also called P systems, have been introduced by Gh. Păun in 1998 as a framework for defining parallel models of computation inspired from the functioning of living cells. In the basic model, a tree-like membrane hierarchy divides the Euclidean space into regions. Each membrane can contain other membranes; the outermost membrane is called the skin, and divides the P system from the surrounding environment. The leaves of the membrane hierarchy correspond to elementary membranes, that is, membranes that do not contain any other membrane. Each membrane delimits a region, that contains a (possibly empty) finite multiset of objects over a given finite alphabet. Every region contains also a set of rewriting rules, written following an appropriate formal grammar; these rules are usually applied in the so-called maximally parallel way to evolve the multiset of objects located in the region. Each of the objects obtained from the application of the rewriting rules can possibly cross the membrane enclosing the region, thus moving up in the membrane hierarchy, or can cross one of the membranes contained into the region in which it has been produced, moving down towards the bottom of the membrane hierarchy. This is made, respectively, through so-called send-out and send-in communication rules.

Since the introduction of this basic model of computation, many variants of P systems have been proposed and studied in the literature, giving rise to the research topic known as membrane computing. This is currently a very active field of research, where three types of models are extensively studied: cell-like P systems [1], based on the tree-like hierarchical structure of the membranes within a living cell; tissue-like P systems [2], based on the intercommunication between the cells in biological tissues, and usually modeled as a graph-like interconnection structure of computing elements, each representing a cell; and spiking neural P systems [3], inspired by the electrical impulses (called spikes) that neurons emit as information, also represented as networks of cells exchanging information in the form of spike symbols. Two nice and clear introductions to P systems can be found in [4], [5], while a comprehensive presentation of the state of knowledge in 2010 is given in The Oxford Handbook of Membrane Computing [6]. For the latest developments and an extensive bibliography, we refer the reader to the P systems Web page [7].

The reason why P Systems are an attractive and widely studied computing model of computation can be essentially summarized by the fact that they are an intrinsically parallel computing model, different variants are universal, they can be used to attack computationally hard problems by trading space for time [8], can be applied to various real life problems and to the description of various biological systems. Since their birth, P systems have stimulated a relevant number of investigations both on the theoretical side – dealing with their computing power and efficiency in solving computationally difficult problems – and from the point of view of applications – studying how P systems can be applied to simulate several kinds of natural phenomena. For these reasons, a significant number of applications were reported in several areas – biology, bio-medicine, linguistics, computer graphics, economics, approximate optimization, cryptography, etc [9]. To empathize how P systems have been applied among different frameworks and used for a diversity of tasks, let us provide some of their applications proposed in recent years. In [10], authors propose a membrane computing model to directly derive an approximate solution of combinatorial problems with a specific reference to the 0/1 knapsack problem On the other hand, in [11], a complete arithmetic calculator implemented by spiking neural P systems (SNPS) is proposed. Lastly, in [12], authors proposes a novel multi-behaviors coordination controller model using enzymatic numerical P systems for autonomous mobile robots navigation in unknown environments.

Focusing on cell-like P systems, one of the models that have attracted the most attention are P systems with active membranes [13]. In this kind of P systems the membranes take a more active role during the computations: not only they contain objects, rules, and other membranes, but each membrane may also have an associated electrical charge, or a thickness, or some other feature, that affects the applicability of the rules. In this paper we will not consider any of these additional membrane features; however, membranes will have the ability to duplicate themselves through division rules. These rules, inspired by biological mitosis, duplicate an existing membrane, thus modifying the membrane hierarchy, copying the contents (objects, and membranes) of the membrane into the two offspring membranes. Moreover, all the rules we will consider – either rewriting, communication, or division rules – will be cooperative, meaning that they are triggered by the simultaneous presence of a prescribed multiset of objects.

Designing a P system for a given application is often tedious handiwork, requiring typically many hours of work, focus, and skill. This is why it is of great interest to look for design techniques that would help researchers in this work. In this paper, we investigate the possibility to use evolutionary algorithms to automatically synthesize P systems with active membranes. These algorithms start with a population of randomly generated P systems, and are given as input a collection of configuration pairs, each describing the desired effect of a computation step of the target P system. The population of P systems is evolved for a number of generations, with the aim of obtaining at least one individual that matches the described computation steps as well as possible.

Notice that the idea of combining evolutionary algorithms and membrane computing is not new. In fact, Evolutionary Membrane Computing (EMC) is a topic by itself, with multiple works published in the literature; for a survey, we refer the reader to [14]. In general, we can identify two ways of combining evolutionary algorithms and P systems: Membrane-Inspired Evolutionary Algorithm (MIEA) and Automated Design of Membrane Computing Models (ADMCM). In MIEA, the P systems are used as a part of an evolutionary algorithm. That is, P systems are not the output of a MIEA, but a way in which an optimization process can be improved. On the other side, ADMCM aims to circumvent the programmability issue of membrane-based models for membrane systems by searching for automated synthesis of such models. Thus, in this approach, an evolutionary optimization process produces, as output, a P system to solve a specific computational task. The exact kind of output depends on the specific algorithm and task. The first approach to perform this kind of task came from [15], where an evolutionary algorithm, the PSystemEvolver, was introduced for calculating n2. In [16] the previous method has been extended in order to compute generic squared numbers, by introducing a binary encoding technique to represent an evaluation rule set of a P system. Moreover, a QIEA (Quantum-Inspired gate update) has been exploited to make the population of P system evolve towards a successful one. In [17], again a binary encoding technique has been applied to the genetic algorithm and, moreover, the evaluation method has been improved by non-determinism and halting penalty factors. In [18], it is introduced an automatic design method of a cell-like P system for performing five basic arithmetic operations. In [14], the investigations concentrated on how to design a redundant rule set and how to select a proper subset of the latter with the aim of compute: 2(n1), 2n1, n2, 12[n(n1)], n(n1), (n1)2+2n+2, a2nb3n and 12(3n1), (n>1 or 2). In [19] has been designed a cell-like halting P system for 42, by tuning for the first time membrane structures, initial objects and evolution rules. In [20], an automatic design method, the Permutation Penalty Genetic Algorithm, is proposed for a deterministic and non-halting membrane system by tuning membrane structures, initial objects and evolution rules.

As stated above, in this paper we propose a way of performing the automatic synthesis of the rules of P systems with active membranes using cooperative evolution, communication, and division rules, by means of evolutionary algorithms and using only pairs of configurations in consecutive time steps to drive the synthesis. In particular, we define a (μ+λ) evolutionary algorithm using sets of P systems’ rules, where the fitness function is based on a distance measure between labeled trees, each representing a configuration of a P system. The choice of using (μ+λ) evolutionary algorithms is twofold: first of all, the algorithm is simple but generally effective, on the other hand, the distance measure used should be sufficient to guide the search process. We then define seven different benchmark problems, each one dedicated to investigating the ability of the evolutionary algorithm to learn different types of rules, namely send-in, send-out, division, and object rewriting rules. Let us note that, while we employ our specific model of P systems with active membranes, the approach proposed here is quite general and can, in principle, be applied to a large number of different P system models.

The rest of this paper is organized as follows: Section 2 recalls some basic notions and notations which are used in the following. Section 3 details how the proposed (μ+λ) evolutionary algorithm works. The experimental settings and the benchmark problems used during our computer experiments are exposed in Section 4, while the results are presented in Section 5. Section 6 contains the conclusions, and proposes some directions for future research.

Section snippets

Preliminaries

In this section, we introduce some notions and notations that will be used in the rest of the paper. In particular, we recall the definition and operation of P systems with active membranes and cooperative rules, and the definition and operation of (μ+λ) evolutionary algorithms.

A (μ+λ)-EA for the inference of p systems

In this section we detail how the generic scheme of a (μ+λ)-EA described above can be adapted to evolve a population of P systems, each with its own set of rules. In particular, the (μ+λ)-EA will be used to synthesize the sets of rules of the P systems, so it is necessary to:

  • describe how the rules of a P system will be represented;

  • provide a fitness function to evaluate the solutions encoded by the individuals of the population.

  • detail how to generate the initial population;

  • say precisely how to

Experimental setting

To assess the ability of the proposed (μ+λ)-EA, we performed multiple experiments with different benchmark problems, each of these involving a parametric class of P systems. Specifically, we will consider the following problems: send-in and send-out (to test the ability to learn communication rules), variable assignment (to test the ability to learn weak membrane division rules), and Turing machine simulation (to test the ability to learn cooperative rewriting rules). Moreover, we will test our

Results and discussion

The results of the experiments are presented in Fig. 2, Fig. 3, Fig. 4, Fig. 5. Each figure shows, for every considered benchmark problem, the fitness distribution at last generation, obtained through the different settings of the hyperparameters, as one of the goals of this work is also to find the best hyperparameter for the evolutionary algorithm, both when dealing with cooperative and non-cooperative rules. Moreover, the last generation fitness of the best hyperparameter setting is plotted

Conclusions and directions for future work

In this paper, we have defined a new way of performing automatic synthesis of P systems via an evolutionary-based approach. To assess the ability of the proposed (μ+λ)-EA to perform this task, we defined different parametric P systems to be used as benchmark problems, focusing on one particular feature to test: learning send-in or send-out rules, performing membrane division, synthesis of cooperative multiset rewriting rules, and learning how to perform basic arithmetic operations.

We performed

CRediT authorship contribution statement

Alberto Leporati: Conceptualization, Writing – review & editing, Validation. Luca Manzoni: Conceptualization, Software, Writing – original draft, Supervision. Giancarlo Mauri: Writing – review & editing, Validation. Gloria Pietropolli: Conceptualization, Software, Writing – original draft, Investigation, Visualization. Claudio Zandron: Conceptualization, Writing – review & editing, Validation.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References (25)

  • ZhuM. et al.

    An adaptive optimization spiking neural P system for binary problems

    Int. J. Neural Syst.

    (2021)
  • ZhangG. et al.

    A complete arithmetic calculator constructed from spiking neural P systems and its application to information fusion

    Int. J. Neural Syst.

    (2021)
  • Cited by (3)

    View full text