Нomeostasis as the Chemical Basis of Consciousness

The general task of homeostasis, life and consciousness is to survive. Damage to the cells provokes turning on of homeostasis in them, causes an elementary negative sensation and an attempt to recover. The tension of homeostatic compensation can lead to the generation of action, corresponds to conscious decision-making and looks like a desire for life. We are developing here the idea of the connection between homeostasis and consciousness (Tsitolovsky, 2015). This makes it possible to simulate sensation, motivation, free decision making, to estimate elements of experience and to model personality. The most likely self defense tool may be chemical processes in cells, of which little is known. We explained neuron homeostasis and consciousness on the basis of imaginary, but possible chemical reactions that begin at the synapses, continue in the cytoplasm, leave traces of memory and are able to influence the decision of the neuron. Wherever possible, we tried to simplify the events taking place in living tissue, but in such a way as not to lose its function: the ability to autonomous, goaldirected behavior in an unfamiliar environment. We managed to explain many of the paradoxical properties of consciousness, which can be a collective manifestation of the elementary sensations of neurons.


Problem Statement
Brain is the most complex, puzzling and attractive object in the universe. Everybody knows that brain is responsible for control of our learning, memory, motivations, consciousness, etc. Moreover, a brain by a certain mysterious way produces the Subject (or Self, Person, Ego, Observerwhatever you like). By the way, Niels Bohr, Erwin Schroedinger, Wolfgang Pauli and Werner Heisenberg, the great quantum physicists of the twenty century, all admitted that consciousness is as primary as a substance [1]. They believed that the explanatory gap between the subjectivity and the physicochemical activity of neurons is analogous to wave-particle duality.
Recent advances in modeling of complex behavior [2] allow the creation of artificial intelligence systems for many difficult tasks: driving a car, logic games, translation, speech analysis, visual images, databases, etc. Sometimes it seems that this is a real way to model consciousness and personality. But such a robot follows the framework of the program embedded in it and improves its behavior with the help of a training program. The creation of such a robot does not bring us closer to modeling the subject, the owner of consciousness. His activity corresponds to the behavior of a person in an unconscious state (zombie).
An object with consciousness evaluates its state in the environment, spends efforts to save life and does not need external programming. The problem of generating a goal is much more complex than the methods for achieving it. The subject behaves appropriately immediately after birth: still not knowing anything about the external life, there is already a desire not to lose his own. The ability to feel in the center of the past and even older experience, to compare them and choose a line of behavior is a manifestation of thinking.
The subjective nature of sensation, the independent occurrence of a goal and freedom of choice, seem incompatible with the fundamental laws of physics, such as the principle of causality. If the system has a free choice, it is unpredictable, cannot be stable according to Lyapunov, and the equilibrium state does not correspond to the free energy minimum. The existence of conscious actions means that material objects (for example, muscles) can be controlled by the power of thought. Consciousness is changeable and is a process, but it is not a material process. Consciousness is nonlocal in space and directs the arrow of time to any point in the past or future, which contradicts the second law of thermodynamics. A huge number of features correspond to each image that somehow unite in the mind and indicate the cooperative work of brain cells or the existence of influences through long-range interaction. In the mind there are many past images and sensations connected by temporary or logical connections, but it is realized through the collapse of potential states into the only real one. Consciousness is almost endless: nobody has yet succeeded in filling consciousness completely. Self and Others are present in the consciousness: both are subjective, coexisting at the same moment. Free will is an opportunity for Self to influence Others.
My task is to explain these paradoxes on the fingers and find the way for modeling. These hard problems are rather far from being solved. We do not promise to settle them completely, but let us try. Our task is to appreciate some, still unexplained, brain functions, or at any rate, to outline pathways to their understanding. We will describe the mechanisms that will make it possible to create an autonomous, sensitive artificial object that formulates its own goal. Although the subject's goal is to preserve his personal life, along the way he can benefit his "employer".

Homeostasis: The Wisdom of the Body
W. Cannon brightly defined homeostasis as the wisdom of the body [3]. However, homeostasis can also underlie a much more complex phenomenon -consciousness. And the definition of W. Cannon points to the connection of homeostasis with wisdom as such.

Homeostatic Vitality Control
Any organism, complex or simple (even unicellular), maintains its existence by means of homeostasis. Violation of homeostasis leads to death and the organism makes efforts to restore its integrity. Features of homeostasis can be traced at the level of the cell, the physiological system of the body, the body as a whole and the population. Homeostasis of the cell (neuron) and the body is most important for us. In the simplest cases, homeostasis maintains the constancy of the system parameters, counteracting the disorder, which can grow even without the participation of the external environment. But maintaining constancy here is not a required condition. Cells contain protein sensors, responsible for regulation the particular variables of being. Nevertheless, persistent disturbance of particular characteristics of an injured cell does not lead to death, since homeostasis may tune other variables and thus compensate deleterious effects of the distorted variable. Therefore, homeostasis regulates a certain general quality of a neural cell, such as the level of damage. What is important is the state of the parameters at which vital functions are preserved.
Homeostasis controls vitality. Artificial systems usually minimize deviation from a given value, or look for an equilibrium point. However, living systems not only themselves regulate their condition, but also themselves set those optimal parameters that ensure their safety. The degree of viability of a system is determined by its position on the "life-death" interval. Viability is not a function of the state, since, generally speaking, it depends on the preliminary system history.
When the minimum damage to viability is reached, active homeostatic regulation ceases, and the system becomes stationary -this is its optimal state. The absence of a rigid connection between the state of the system and the assessment of its viability makes it possible for conscious (mental) behavior that is not associated with activities directly aimed at survival. Turning to past experiences, the system should not protect itself in real time.
There are two ways to explain how cell homeostasis works. Either there is a mechanism programmed for all variants of possible damage, or spontaneous relaxation to a stable or quasi-steady state is carried out. In the first case, the body needs to recognize the current situation and choose a genetically prescribed protection option. And that would create a gigantic load on the genome. It is interesting that genetic defects often have little effect on relevant functioning pathways, since homeostasis compensates for many of these defects [4]. Therefore, homeostasis is hardly algorithmically tuned by the genetic apparatus. The work of homeostasis is autonomous and not predetermined in advance. In the linear case, when the system restores the previous state, the work of homeostasis resembles the action of an elastic spring and can be organized according to the Le Chatelier principle. But homeostasis can be indirect and improve after training, since moderate damage enhances the effect of homeostatic compensation with more severe damage done shortly after compensation for the first damage [5].

The Nature of the Supreme Sensor of Homeostasis
The major trouble of homeostasis is self-preservation, but it is necessary to know the criterion of self-preservation. What is the most important flaw in a cell that is the omen of death?
The nature of the supreme viability damage sensor may be specific to a given cell. There are parameters that are important for the survival of the cell as a whole and even for the whole organism: energy reserves in the cell (ATP level), excitability, pH, concentrations of major ions (Na + , K + , Ca 2+ ), NO, cAMP, free radicals, and some that support vital functions, proteins (caspases, cytokines, antioxidants, etc.). It is possible that different functional systems may have their own specific supreme sensors associated with the generation of basic biological motivations. So, defensive motivations arise through the pathological activation of specific neurons. Respiratory -is controlled through CO 2 and pH sensors, temperature -through heat-sensitive Na + conductivity, drinking -through osmoreceptors, food -through energy metabolism sensors, and sexual -with sensors tuned to the damaging effect of steroid hormones [6]. Therefore, when modeling, it is necessary to introduce a special parameter: µan analogue of the degree of damage to the cell.
Assessment through the supreme sensor has a degree of viability for a living system. This is already close to a subjective assessment of their condition as satisfactory or dangerous. But it is important to understand how the system determines that µ = 0. The role of the damage parameter can be played by any value having a zone of stability and instability.

Search for Optimal Condition
The stationary state of the system is determined by such values of its parameters that do not require efforts to change the state. Living systems are able to search for the optimal values of their parameters on their own. When the system deviates from the optimum, the processes in living tissue behave unstably, and the optimum can be found by chance, but this path is ineffective. A more secure equilibrium can be ensured if at least two opposite forces control a set-point [6], such as oxidizing and reducing agents, excitation and inhibition, centers of hunger and saturation, potassium and sodium conductivity, etc. G-proteins exert an effect on a large variety of cellular processes and some G proteins are stimulatory, while other G proteins are inhibitory.
The degree of variability is probably connected with alteration in the state of vitality. The problem is solved by a simple rule: if you feel bad, does at least something. And if you feel good, calm down. When the system deviates from the optimal state, instability increases. The subject then acts in a random direction and more intensely as it approaches death, as long as it remains alive. The subject then acts in a random direction and more intensely as it approaches death, as long as it remains alive [7][8][9][10]. Then the system will stably drift to the optimum, overcoming even local minima, until the fluctuations vanish. Such, for example, is the mechanism of selective diffusion of Brownian particles to the cold pole.
Instability of neuronal reactions is tightly connected with the working brain, increases through instrumental behavior, during augmentation of motivational states, in the aware brain, after harmful influence and other hostile circumstances. Neighboring neurons vary their activity synchronously and, despite the high variability of neural processes, sensorimotor actions can be very accurate.
If, as we believe, consciousness results from the emergence of homeostasis, then the autonomy of the subject is a consequence of the autonomy of homeostasis.

Homeostasis, Action Generation and Free Will
Simple forms of behavior are aimed at satisfying the metabolic needs arising from the deviation of vital functions from the physiological norm. Metabolic problems may be solved through actions directed at the environment in cases where the damage cannot be completely compensated by inner available resources. At the heart of this process is homeostasis, which concentrates the ability of any living object to make efforts aimed at survival. The actions, in the end, will be directed at overcoming the imbalance that homeostasis is not able to overcome.
Need is the basis of motivation, which is no longer a physiological concept that has a certain measure and dimension. Motivation is the subjective attitude of an individual to his current or future physiological state, which somehow modulates the generation of actions until an optimal state is reached. Motivation occurs when neurons in specific motivational zones leave the state of homeostatic equilibrium and there is a need for recovery. It modulates the generation of attempts to influence the environment until an optimal state is reached. This makes the passive object active. The presence of motivation based on homeostasis turns an object into a subject with behavior that is independent of the observer. It was found that damage and arousal of nerve tissue are closely related [6]. Inhibition protects neurons from death while extreme excitation usually causes cell damage. On the other hand, moderate damage increases excitability of neurons, whereas protection inhibits neurons. Severe damage deregulates ion equilibrium and excitability of a dying neuron bleakly decreases. Homeostasis improves the functional condition of damaged neurons, restores their excitability and provokes spike generation.
Randomness can be sufficient for the physical realization of mental causation and a strong free will, if the degree of instability of the neuronal activity increases due to gain disagreement of homeostasis. Augmentation of the disturbance evokes enhancement of corrective actions, resembling the phobic reaction to missing the goal of a single cell during taxis [11]. The goal is the optimal value of the supreme sensor in which fluctuations are vanishingly small and has thus a quasistationary status. The sequence of steps as a whole is the goal-directed action. Though the goal is not predetermined beforehand and if there are a quantity of targets, the system can reach any of them and each one will produce its own goal-directed action. To an outside observer, this looks like a system's desire for life. Even the path of the system's movement to the target is not predetermined due to the fact that a satisfactory state of the supreme sensor can be achieved with different sets of particular system constants. Search does not need external programming. Absence of a steady cause-and-effect connection between an input signal and an output reaction favors such reactions to be similarly emitted rather than elicited. Therefore, relationship between the homeostatic mismatch and instability can explain the appearance of free will.
Really, the numerical experiments for one and twodimensional non-linear cases demonstrated that the proposed mechanism ensures overcoming the obstacle to an optimal state [7][8][9]12]. However, such a quest is too slow for tuning of multi-variable functions. They require a lot of time and computational resources, but in the process of functioning, the model accumulates memory of those states of its sensors that do not entail actions for their correction, as well as the relationship between their own actions and the direction of changes in the state of the sensors. This information later makes it possible to quickly calculate ways to overcome the mismatch at the next stage of training.
The most appropriate approach for such systems description is given by the apparatus of the generalized Lagrangian dynamics developed recently [13]. In this case, Lagrange's equations gain a non-zero right side proportional to the derivative of the Lagrangian with respect to the action. Such adaptation of Lagrangian mechanics does not use or depend on specific properties of the physical system being modelled. Therefore, this Lagrangian approach may be equally applied to biological systems. If we introduce the Lagrange function, as the difference between the sensor mismatch and the compensating effect, the principle of least action will determine the way to bring the system in order [14], without using random search. Action is an attribute of the dynamics of a physical system; it is a mathematical functional, which takes the trajectory of the system as its argument and has the numerical value as its result; this is not the action, as it is usually understood in the neurosciences, but it is surprising that here the meaning of "action" in physics coincides with what is meant by "action" in the neurosciences. The movement in which the system is stationary is real. Sandler's approach [13] describes the process of finding the optimum of homeostatic systems and animal behavior. It should be noted that the movement of the system in accordance with the principle of least action is predetermined and therefore may underlie learned, automated, and not arbitrary actions. Arbitrary is only their initiation. However, this is what is observed after intensive training.

What is Consciousness
We conclude that there is consciousness in an object if its behavior is expedient and not predetermined in advance by either deterministic or probabilistic laws. These subjective phenomena imply the presence of an observer, even if the observer is you yourself. This is very similar to an imaginary creature that lives in our heads, uses our receptors, effectors, and at the same time interferes in the development of physiological processes of its own accord, thereby disrupting the course of physical laws. In the natural sciences, a phenomenon objectively exists if it occurs without an observer. But we are interested in just the observer: it is something like the Maxwell demon, which the physicist hardly got rid of. And if we think about how the demon functions, we will have to assume that it has its own control center: the demon demon. The subject is not a physical object. Consciousness cannot be characterized by mass, extent, charge, impulse. In addition, the time parameter in consciousness is special: in it coexists the unity of the experienced present, past and future.
There are material correlates of the presence of consciousness in the studied object [12]. So, conscious perception activates some areas of the brain more than others. With conscious behavior, the excitation of neurons is usually higher. 1-2 seconds before making an awaked decision on brain activity, you can judge whether it will be made, and awareness takes more time than reflex responses. Consciousness is temporarily destroyed, for example, after an injury, during anesthesia and during sleep.
The nature of subjective feelings, goals and arbitrary actions is still the greatest of mysteries. Consciousness defies attempts to define it. According to various ideas, consciousness is a subjective reality related to the knowledge of the world. It is isolated from the environment; it is distinguished by autonomy, variability, an active attitude towards itself, the ability to self-organization, intentionality, attention, self-awareness and many others. Such definitions reduce one incomprehensible category to another, no more understandable.
We believe that consciousness in a system arises when the system acquires the ability to assess a change in its level of vitality in the environment. This definition absorbs many other definitions of consciousness and helps explain the basic paradoxes. In order to possess consciousness, the system must be able to track not only its condition that is position on the life-death scale, but also the rate of change of this position. In this case, even in the absence of memory, you can, in a first approximation, assess your condition in the past and future. The presence of memory will make it possible to find those parameters of your state that in the past contributed to the avoidance of death. Moreover, the system must distinguish its own parameters from those factors that it is not able to control directly (external environment). Such understanding of conscious actions is close enough to the Entelecheia of Aristotle: inner strength, potentially containing a goal and an end result. However, now it has become possible to fill this concept with a specific physical meaning.

Sensation
Development of the theory of homeostatic systems regulating optimal parameters of their own state gives hope to solve the problem of senses, as homeostasis is the key mechanism that keeps the system alive. Most likely, the emergence of consciousness as an isolated state separated from the environment is a consequence of the unique vitality of biological systems. Individual life probably by necessity has to evaluate its own integrity and the process of maintaining its optimality is indistinguishable from goaldirected actions. Perhaps life awakens as the capacity to sense one's own state and its health and the process of homeostatic compensation is a manifestation of the will to live. Along with heredity, this is the main sign of life. The living system takes action to protect itself after assessing the threat to its condition at the moment or in the near future. Sensation is nothing but a subjective assessment of the time derivative of the mismatch of the supreme sensor. This is what allows you to locally compare the present, past and future of the system without even having to use a memory device.
The ability to goal-directed behavior of one degree or another is manifested by all living things, including single cells, tissues in animal bodies and even plants [15]. Of course, these processes in plants are much slower. The living cell avoids, attacks, seeks protection. Moreover, the behavior of a cell is determined not only by the concentration of molecules in the medium that affect its receptors, but also by their change in time [16] and this indicates that they may have the rudiments of consciousness. In particular, the cells that form the body do not become its "parts" and do not cease to be individual organisms. Cell homeostasis regulates its state, and their collective action is the state of the entire system, as, for example, the temperature in the termite is maintained. Before evaluating how this happens in a large system, it is necessary to understand the motives for the action of the cell.
The cell, which in its activity is guided by the state of only one global variable such as shift in the scale of "damageprotection", will behave as the object possessing minimum awareness. It state, is really changed within the scale "betterworse". If we interpret this as a worsening of the state, we have not any possibility to determine how the cell evaluates its states as "Too little ATP" or "It is terrible!" Negative sensation causes the body to make efforts (to strain homeostasis) to restore its condition. For the outside observer, this is reminiscent of intentional action and a manifestation of will. In order to explain both sensation and volitional act, it is not necessary to introduce a new entity. A living system responds to damage as if it is experiencing a negative sensation, no matter what term it is called.
This also applies to a neuron. An individual neuron is a living system [10,[17][18][19][20]. He seeks to avoid damage, evaluates the biological significance of the current state of the environment, briefly reconfigures his excitability to adequately respond to environmental challenges and compares the response of the environment to his expectations. The state of the neuron also changes with external actions: glutamate leads to excitation (exitotoxicity), while opiates and GABA lead to inhibition and to a positive sensation. In special circumstances, the action potential activity of single cortical neurons can evoke measurable sensory effects. Moreover, a neuron may be responsible for the behavior of the entire animal [21,22] and, therefore, is a complete system. In a neuron, you can even cause drug dependence on morphine (for review see [6]). I view a neuron as a primitive living subject, and the brain as a collective of neurons.
Each of the neurons in different areas of the brain feels how bad or good it is at the moment. For this, the neuron evaluates the chemical image of the pattern of activated synapses at the moment or at some points in the past and its effect on his well-being, based on his experience (see below). The environment, acting on receptors or damaging a cell, is reflected in its inner world as a sensation specific to that cell. But when one neuron feels bad, the body is thirsty, when the other -the body is scared or painful, and when another feels bad -green has appeared or the body is in some area in outer space. Restoration of the state of the cell causes a positive sensation of the same modality. More complex sensations can be interpreted as the combined "pleasures" and "sorrows" of many brain neurons. Appearance of a global evaluation of the quality of life might be the basis of feeling in multicellular animals.

The Self and Others (Non-self)
Given the unique complexity of the phenomenon of consciousness, it is necessary to identify those signs that cannot be neglected in an attempt to simplify the phenomenon. Consciousness operates with both current and past images. Therefore, it is closely connected with the memory device. An image in consciousness is a combination of a large number of signs that are perceived together but localized separately (binding problem). In addition, these images are connected in temporary and logical chains. This enables the emergence of a process that is designated as reasoning, thinking. Our body is material and is not an integral part of consciousness. Nevertheless, consciousness, according to our senses, controls the body. This requires an explanation. Finally, the Self and awareness of Others are always present in consciousness. This is a mysterious "activist" within us that controls our body and contemplates the world through our senses.

Active Behavior and Contemplation
When organizing the behavior of an organism, neurons must enter into a temporary association with other neurons: with neurons of the same level (combining into a system for enriching perception) and with neurons of the next stage (for enriching the possibilities of action).
The core of consciousness is the perception of oneself as a person, and everything else that is not associated with a person. The difference between these forms of perception is a difficult question, but if we single out the most essential, then this is the presence or absence of a causal relationship between a change in one's state and one's own will, as well as one's own actions that favorably (or not) influenced the environment in the past (according to type of implication). In this case, consciousness refers to procedural memory: the memory of the actions that the subject generates.
Contemplative behavior -the perception, awareness and memorization of the external world, its events, images and scenes, refers to declarative memory. It provides memorization of objects whose management is independent of the will of the subject. Contemplative behavior is simpler than active. It is based on the total amount of information about the history of the effect of the environment on the body (or synaptic influences on the neuron, if we are talking about a specific neuron). The same array of information is necessary as an integral part of more extensive data for the functioning of active behavior. But here, each of the images of memory is correlated with the action or inaction of the organism (or the neuron) at the time of receiving the image and with the influence of this action on the environment and, indirectly, on its own state. An element of procedural memory should not keep a history of all the effects of a given image. All that matters is how often one's own activity influences changes in the environment when this image appears in it. There are also ways to classify memory based on other criteria, but this criterion emphasizes the relationship between memory problems and consciousness.
The memory mechanism is not yet fully understood, but it obviously has a chemical nature. In order to evaluate the meaning of the input signal, coordinate it with experience and calculate the probable consequences of its own action on its future state, the neuron must take into account the combined chemical effect of its activated inputs on the longterm memory and choose the degree of its participation in the current activity. An image cannot be recorded in memory as material changes in certain brain coordinates. Although the efficiency of some synapses, as well as the excitability of some neurons and the electrical connections (gap junctions) between some cells, change after learning [25,26], these mechanisms cannot underlie long-term memory. If a trace is recorded on an empty spot, then upon activation of the trace, the brain will not be able to establish what exactly was recorded: there must be a recognition system outside the image. But if for each trace its coordinates are predetermined, then a place should be reserved even for those images with which the body will never meet. There is not enough space in the brain for this. It should be assumed that the neuron is capable of memorizing a combination of synaptic inputs, and not each of them. This can only be done chemically.
Indeed, the memory trace is not local; the memory is restored after damage to the brain tissue and even after passing through metamorphosis, when the nerve connections are completely rebuilt [6]. Chemical processes in neurons change specifically during training, and experimental chemical intervention in their course affects memorization. It is possible that the barrier between blood and the brain is necessary to protect memory antigens from attack of their own immune systems. The factors affecting cell damage and homeostasis, such as second and retrograde messengers, cytokines, neuropeptides, gap junction regulators, anesthetics, etc. possess a clear psychoactive potential.

Possible Nature of Self and Others
It is convenient to consider forms of consciousness associated with active and contemplative behavior as a manifestation of the Self and Others (apart from the self). The feeling of Self and Others can be attributed not only to the body as a whole, but also, as an elementary sensation, to its neurons. Both Self and Others are subjective. At the same time, the possibility of the mutual influence of the substrate and consciousness is preserved. We feel the existence of Self in interaction with the internal model of the environment, Others. Others is passive suffering or enjoyment with the current or past exposure to the environment without the ability to somehow influence it. Even when the perception of the image is generally indifferent, some specific neurons should be not indifferent, shifting on the life-death scale. Otherwise, it is difficult to imagine the occurrence of sensation. The perception of the situation is integral, but the action is competitive and aimed at a specific result.
Self is a subjective assessment of one's current and future state of suffering or pleasure, depending on one's own impact on the environment -the core of active behavior. Self refers to everything that you dispose of: your thoughts, your finitude, your property and even living beings dependent on you. Perhaps the desire for power over other entities is associated with an increase in the degree of reliability of Self with its expansion. However, the problem of Self does not concern the mechanism of consciousness.
Cells defend themselves from the extracellular environment, while brain organizes behavior for defense from the outer environment. Neurons only feel the level of security of their own existence, depending on their own efforts. This, at first glance, simple behavior of neurons is based on an analysis of the state of the environment at the moment and in the past, comparison of episodes of their behavior in similar situations and calculation of the prediction of their own state in the future. Neurons also use their predictions when combined into an ensemble that implements behavior. We can assume that the neuron is the possessor of minimal consciousness. Sometimes it is even believed that at any given moment the consciousness is concentrated in a specific neuron or a small group of neurons [21,22]. To us, such an assumption seems to be an excessive complication of the capabilities of a neuron. The cell does not have an apparatus capable of accommodating all the richness of the sensation of the body, even when it comes to a specific moment in time. Each neuron -can act as a Self element for some images. If the action of the neuron had no effect on behavior in at least some situations, then such a neuron would be superfluous: it simply would not participate in the activity of the brain. On the other hand, when receiving signals, a neuron experiences their influence and when they passively change its homeostatic variables, the neuron is an element of Others.
Many neurons participate in the generation of Self and Others: this is the result of their collective activity. Different material groups of specific cells cannot serve as the material basis of Self and Others. By participating in learning processes, a neuron may gain or lose membership in Self. Given that the same image can pass from the Self category to the Others category and vice versa, this property is unlikely to be determined by cell morphology. Moreover, at the same moment in time, the neuron compares the available information and its possible impact on its future change. Experiments have shown that reproducing information from time to time activates in the brain a not quite matching group of neurons. Neurons whose activity was synchronous with a large group of neurons were more likely to preserve their responses across days. These results suggest that although information stored in individual neurons is relatively labile, it is very stable in networks of synchronously active neurons [27].
Assembling the self by means of forming cellular ensembles entails objective basis and subjective component. Ensemble incorporates a plethora of individual estimations for the conditions of being of each involved cell. This evaluation is one-dimensional for every member of the ensemble: overload or rest, injury or protection or even pleasure or frustration. The term is unessential. In any case, these criteria will have a subjective coloring for individual cells, although they are established on the basis of objective evaluation of error signal in performance criterion of homeostasis. They set up their excitability to spike generation or spike failure with mobilization of the homeostatic machinery (see further) and the current membership in Self or Others depends on it.
The question arises, are we too complicated the neuron? Is it necessary to attribute to a neuron an analysis of the functions of many variables in order to obtain an estimate of a single parameter: a prediction of intrinsic safety? The need for such a complex dependence of the sensation of a neuron on the state of its inputs is required to coordinate the activities of so many neurons. It is necessary to make a reservation that the interaction of neurons is not reduced only to their union and competitive interaction.

Merging Sensations of the Elements of Others
The image in declarative memory is a co-operative, collective sensation of many neurons. The subjective microsensation of the brain cell is an element of the sensation of the body, and the collective of sensitive neurons is united in consciousness. As a result, the dominant ensemble will incorporate a broad appraisal of personal qualities of the cells. The consistent sensation of many neurons cannot be related to their physical interaction, since the speed and accuracy of reproducing the image of declarative memory exceeds the speed of propagation of neural signals in the brain through axons. Synaptic connections determine the sequence of acts of neurons, and not a choice among equivalent partners. The combination of disparate features into a single image of the outside world should occur as the simultaneous presence of several features of the type of conjunction. For example, something small, flying, buzzing and able to bite is perceived as a mosquito. The sensation of a neuron is an assessment of one's condition as negative or positive in violation of its homeostasis. The individual contribution to the overall sensation is determined by the position of the neuron in the brain, the information which it receives from the extracellular environment. While the joint sensations of the cells proceed simultaneously, these elementary sensations merge in our consciousness and we do not observe that neurons even in the damaged brain reproduce scattered information about unrelated episodes of memory. Neurons reproduce elements of a single image in response to a characteristic signal that has arrived at the moment or in the past. A characteristic signal here plays the same role for organizing the coherent behavior of elements as an external magnetic field in pheromagnets. There can be no situation where at the same moment different neurons process different images. A healthy brain cannot reproduce or forget a half-image. Even severing the cortical connections between hemispheres splits perception, but does not create two independent conscious perceivers within one brain [28].
The environment synchronizes the current activity of neurons, but the thought process is associated with the evaluation of information received in the past as well.
Neurons somehow come to the reproduction of specific elements of the same past image. The current information that neurons record has a specific meaning for each of them, but it is connected by identical logical connections with past information and synchronized at the time of recording in memory. Being in the same cranium during life, participating in the same behavioral scenarios and receiving the same rewards and punishments, neurons acquire the ability to coherently respond to environmental challenges. Team members exposed to a similar background should simultaneously make similar decisions. Moreover, the sense of elementary sensation remains individual for a particular neuron (small, flying, etc.). The collective behavior of neurons must be much more consistent than the behavior of a crowd subject to intense propaganda, since neurons are simpler and the set of their possible actions is much more primitive than the activity of an organism.
Of course, there must be criteria for the similarity of team members, the parameters of the information impact on them, and the characteristics of their individual memory for the emergence of their consistent behavior. This is the subject of future research. The coherence of ensemble elements can be based on fast lateral interactions between elements: in the nervous system there is a tool for quick synchronization of neuron behavior, electrical connections between cells. But then it should be assumed that the efficiency of direct connections depends on the memory mechanism. This is quite possible for managing local networks and, apparently, is used to select the specificity of the action.

Choice of Action by the Self
A neuron evaluates the biological significance of the signal and modulates its participation in the behavior: the efficiency of the synapses and the threshold are tuned at the time of the decision. However, the cause of postsynaptic potentials is located outside the neuron, while the threshold is its internal property. By adjusting the threshold, a neuron can exercise the effect of its Self on Others.
Self neural elements are involved in the generation of the entire system. Many neurons make decision simultaneously, but they make their own decisions. The actions of different elements do not quite coincide: some determine dominant behavior, others have an auxiliary meaning. Therefore, the collective of an ensemble that recognizes a situation, makes a decision and performs an actual action should be combined into a functional system and choose the influence of which of its neurons will be decisive. A neuron only has an axonal output and does not have the means to direct a spike along a specific path. The only possibility to hold more than one output on the basis of neural cells is gap junctions (intercellular communication channels). Coupling between adjacent cells occurs as hemichannel proteins (connexins) from one cell dock with hemichannels from a bordering cell and form gap junctions. Gap junctions are modifiable and their variations in strength provide a mechanism for reconfiguring cellular circuits. Because of their continuous nature and bidirectionality, gap junctions allow electrical currents underlying changes in membrane potential to leak to coupled partners, dampening excitability and altering their integrative properties [25]. In order to choose a preferred action, the group must augment one output and diminish others.
Electrical synapses might have a role in cognitive functions. Gap junctions seem to participate in creation of aware states of the brain, are strongly reduced by general anesthetics and this may be a reason for loss of consciousness. Cell uncoupling disturbs their accorded activity. Therefore the gap junctions may ensure the plausible choice of interacting neighbors.
The choice of action can be based on the reliability of the prognosis that each of the neurons calculates. As a result, the parameter proportional to the excitability, θ, changes in the neuron for a short time (during its reaction). Rapid association of cells into a system can occur through channels of direct connections that synchronize the activity of neighboring neurons. The gate mechanism and the conductivity of the gap junction channels, Ѡ, that connect neighboring cells may depend on the threshold value. On the two sides of a gap junction plaque can be modified independently and properties of gap junctions allow regulation of the strength of intracellular connections [29]. Thus, gap junctions allow for the possibility that a neuron can affect nonsymmetrical its adjacent cells. The integrity of the system is formed through such an interaction of its elements, which turns into mutual cooperation to achieve the goal. An output reaction is produced by those neurons that gave the highest estimation of a proposed result of their actions, whereas non-relevant cells favor the relevant action. Rapid modulation of gap junctions allows on-line reorganization of the neuronal coalition for current needs. When one cell is more specific in relation to the current signal, this cell reorganizes its excitability and generates the AP first. Really, when conductances in two coupled cells are different, the coupling coefficient from a high to a low conductance cell is less than that in the opposite direction and the current is largely carried by K + ions. Gap junctions unite cells into a tightly interacting group. Intercellular channels allow also the transfer of water, ions, metabolites, messenger molecules and calcium waves between connected cells, providing a mechanism for coordinating of the chemical activities of groups of cells.
Such an understanding of the Self and Others is certainly superficial. However, this allows us to model the most important properties of consciousness. So, the prerequisites to create quasi-living systems capable of fully autonomous existence already exist.

The Alleged Chemical Basis of Consciousness
Chemical changes in the nervous tissue during homeostasis and behavior we describe through a sequence of chemical reactions. We will describe a possible (but not the only possible) system of chemical reactions for modeling consciousness. So we demonstrate that such a description is achievable. It cannot be argued that the processes postulated by us occur in the real brain. But they do not contradict the knowledge that is now known. The kinetics of these supposed chemical reactions can be described by a set of differential equations. Reaction rate constants are subject to selection. An example of such a selection for modeling the training procedure, see [30].

Reception and Perception of a Signal by a Neuron
A neuron receives information from the environment (for it, it's other neurons) through chemoreceptors sensitive to neurotransmitters ϕ i , i=1,.. n. Substances and their concentrations are denoted by one symbol. In addition, ϕ 0 (possibly glutamate or cytokines) is a damaging substance, and ϕ n+1 (possibly GABA or endogenous opioids) is a reward substance that causes healing. Activation of chemoreceptors causes synthesis of second messengers in a neuron x i .
Here i=0,.. n+1. Chemical reaction constant indicated, k 1 . x 0 leads to a violation of the homeostasis of the cell µ, and x n+1 acts in the presence of damage, reducing the mismatch µ.

⇒
(2) When mismatch µ appears, the compensating effect is usually carried out by the method of counter regulation of harmful and health mediators. Independent and oppositely directed effects are generated, ζ + , ζthe amplitude of which is greater, the greater the imbalance of homeostasis. Their combined action leads to an increase in instability with increasing damage. The mismatch gradually decreases and recovery sets in [7][8][9].
The reaction rate constant k 4 increases with increasing mismatch dµ/dt > 0 and decreases at dµ/dt < 0 (in accordance with the principle: if you feel bad and get worse, increasing your activity).
A harmful mediator exacerbates the damage, recovery restores homeostasis: In the future, it makes sense to consider the effect of homeostasis in those cases when the supreme sensor goes beyond the optimum limit to excess values.

The Formation, Recording and Reproduction of Declarative Memory
The simple summation of synaptic influences does not play a decisive role in the activity of a neuron. A single neuron recognizes a synaptic pattern, as a whole. This dramatically increases the ability of a neuron to recognize signals. The chemical singularity during learning was generated by interactions of second messengers x i , x j specific to the corresponding excited synapses or for the rewarding inputs. The simplest way to model the response of a neuron to a combination of simultaneously activated synapses is to take into account their pair interactions. i, j = 0,…, n+1.
Here w ij is the instant memory: the current image of the synchronously activated inputs, which, when accumulated, forms a short-term declarative memory about the environment W ij , that is, Others elements for neurons: A trace of memory corresponds to a combination of relatively simple substances.
W 00 indicates an increase, and W (n+1) (n+1) indicates a decrease in the mismatch µ. One way or another, a neuron feels a mismatch Ψ: µ ~ Ψ Ψ is not substance; it indicate only a state that the neuron evaluates as dangerous or safe, and the consequences of an increase or decrease Ψ is equivalent to damage or recovery and causes a subjective negative or positive sensation Ψ ± , which corresponds to changes in µ.
The reason for these changes may be external W 00 ~ Ψ + ; W (n+1) (n+1) ~ Ψor internal, as a result of the activity of homeostasis: ζ + + ζ -~ Ψ ± . Unlike ζ + and ζ -, W 00 and W (n+1)(n+1) change asymmetrically. The quality of sensation Ψ ± is constant for a given neuron. We can assume that the neuron is the possessor of minimal consciousness.
Signal recognition and decision making by a neuron are fast, but long-term memory processes are slow and require the participation of nucleic acids. While rapid information processing in neural circuits requires millisecond resolution, genomic responses have slower kinetics, minutes or hours [24]. The short-term declarative memory W ij during accumulation goes into the long-term memory Ϣ ij : In this case, access factors to the long-term memory χ i , χ j are formed. The i-th factor extracts from the long-term memory the joint effects of intermediaries with which it was activated earlier.
The indices j in (9) and (10) may not coincide. Next are reproduced associations of the next level. This corresponds to the emergence of virtual sensations of increasing or decreasing mismatch.

Formation, Recording and Reproduction of Procedural Memory
In the learning process, information to neurons comes in the form of a combination of synaptic inputs. The appearance of such a combination may indicate the appearance of the reward x (n+1) in those cases when a spike is generated (procedural memory W + ij ), or when there is no spike (Wij ). But equations (11)(12)(13)(14) can also be written for the case of punishment x 0 .
W + Na "# W (12) Na + (sodium ionsmeans that in these cases a spike has occurred. Here i,j = 1,… n: At the beginning of training, trial and error arises. Available declarative information {W ij }, including reproduced from long-term memory, takes part in the formation and reproduction of procedural memory {W ± ij }. Excess Wij or W + ij replenishes the long-term procedural memory {Ϣ ± ij } and prepares access factors χ ± i , χ ± j for it.
W ± "# Ϣ ± + χ ± + χ ± The access factor to declarative memory also activates access factors to procedural memory, allowing past procedural memory to influence the current action. Therefore, the action can be selected, both on the basis of the current signal, and on the basis of information reproduced from the memory at one of successive iterations. As the skill strengthens, the appeal to long-term memory decreases and automatism appears.
The reactivity of factors χ ± i should be higher than that of factors χ i . This is important for an urgent response to environmental changes. The past memory W ± ij and W ij also participates in the generation of the action. The cell system will move from image to image and from potential action to another possible action until the most reliable prognosis is established.

Action, Threshold Modulation
Let β ± be the opening and closing factors of the Na + channel and the substance β − influence the probability of sodium channel transition into the open state. A cell in one way or another feels its damage, strains its metabolism and restores the function of spike generation if the damage to the neuron was significant. This means that homeostatic compensation of damage may lead to generation of output neuronal reactions.
Arbitrary actions may be generated as the result of effort by the homeostatic device during compensation of damage. But in this way, the action that occurred, being specific with respect to the current localization of the homeostatic damage, is not related to the informational state of the environment. Memory is not involved and the action is not aimed at the target.
The current state of the environment is taken into account using the apparatus for selective regulation of excitability in the reproduction of memory. This has been experimentally demonstrated [6,17,21], is reflected in the system of equations (11)(12)(13)(14), and confirmed by modeling [30]. The current procedural memory W ± ij accumulated at this stage of training, together with the associated memory from a longterm storage, indirectly affect the balance of β ± -factors. Equation (19. 20) and equations (21)(22)(23) contribute to the change in β ± . However, the processes described by equations (21)(22)(23) are more specific and faster.
The result is the synthesis of the substances α ± that shift the balance between the substances β ± .
, ± + + + + "# + ± (22) The cascade of chemical reactions results in the change of the neuronal electrogenesis by means of its action on the state of potential-sensitive channels.
This e ect is realized by the following scheme of Na +channel transition into the open state and inversely: k − , k + are the functions of the membrane potential. Active information processing depends on the parameters of Hodgkin-Huxley equations (see details, [30]). Chemical processes initiated in the synapses involved in learning begin at chemoreceptors and terminate on excitable membrane channels.
As a result of these chemical calculations, the excitability changes briefly according to the parameter θ and an arbitrary action of a neuron is generated, which is associated with the current informational situation and experience. The purpose of the action is to overcome the violation of homeostasis. In this case, damage to homeostasis does not have to be extreme. The resulting goal-directed behavior will for outside observers look like a manifestation of motivation, the desire to live and is consistent with conscious decision-making. This creates a connection between the material substrate and subjective sensation, i.e., between physiology and the psyche. Since θ -corresponds to the change in excitability, which the neuron calculated as its most relevant response to environmental challenges at the moment (taking into account the past and even more old experience) in order to affect its state, this corresponds to the degree of belonging of the neuron to the Self category. Denote by Ψ θ the sensation of a neuron of the degree of belonging to Self. Ψ θ , like Ψ, is not a material quantity, but the occurrence of sensation coincides with the ability to influence one's own behavior.
The following is a slow degradation of operational and short-term memory: preparation for the next recognition cycle: "# 0 (25)

Building a Neural Ensemble for Choosing an Action
The whole perception of the external environment through the apparatus of declarative memory W ij , perhaps, does not require special mechanisms for combining cells into a system, although this needs a more thorough analysis. However, this is necessary for the procedure for selecting a specific action. A neuron has only one exit to the axon and is not able to change the direction of its output signal. It can be assumed that the interaction of the excitability parameters θ with direct electrical communication channels Ѡ between the cells (gap junctions) changes their conductivity for К + ions in different directions on different sides of the channel, Ѡ + and Ѡ -. К + goes from less to a more specific neuron. The coupling coefficient from more to less specific cell becomes smaller. Taking into account that activity in coupled cells is synchronized, less precise cells will support activity of more specific ones, and this will promote the origin of a dominant state in the vicinity of high definitive responses.
Ѡ "# Ѡ + К In short, the following sequence of events may occur. The homeostasis damaging agent ζ + activates communication with the environment and increases the leakage of К + from the damaged neuron. Extracellular K + excites astrocytes located near specific neurons and activates Са 2+ -depot. К ! "# Са 5 (30) Са 2+ -waves propagate through the tissue and activate distant, not only neighboring neurons. Intracellular Ca 2+ rises in glial cells and triggers glutamate release that modulates neuronal function. Similarly, in response to neuronal activity, elevated Ca 2+ in astrocytes leads to glutamate-dependent Ca 2+ elevations in neurons and can induce membrane depolarization that eventually can trigger action potential discharges and this can aggravate damage [6,29].
However, these ideas need to be clarified and developed. The following is relaxation: From general considerations, it should be expected that not all processes proceed with equal speed and therefore may not coincide in time. In particular, one might think that k 24 > k 25 > k 26 ; k 11 = k 12 = k 13 = k 14 ; k 9 < k 10 < k 16 < k 18, etc.

Conclusion
The analysis showed that the paradoxical properties of homeostasis and the psyche find their explanation on the basis of known processes in nerve cells under certain assumptions, which are not yet confirmed in the experiment, but do not contradict the data currently known. We managed to explain the nature of subjectivity, the emergence of an independent goal, the existence of free will, the mutual influence of consciousness and matter, the meaning of the binding problem, the relationship between the past and the future in consciousness and coexistence in consciousness Self and Others.
The state of the supreme sensor is a material parameter. But here a special, non-material, evaluative parameter appears, Ψ. It will arise as a feeling of inconsistency in the parameter that the supreme or lower order sensor is tuned to in this medium of minimal consciousness. Ψ characterizes the quality of life, the degree of its safety. In each particular episode, the sensation corresponds to a set of material, quantitative parameters, but these parameters can vary from case to case. This non-material parameter appears together with the mismatch of homeostasis, is associated with the dynamics of the state of the object and the environment in time and the occurrence of a compensating action. These are important characteristics of consciousness. Of course, material processes are the basis of consciousness, and nothing prevents us from reformulating the problem in such a way as not to involve evaluative, subjective parameters. But this is apparently an inefficient way. Firstly, relying on a consideration of subjective parameters, we remain within the framework of a logical analysis of the mechanisms of targeted behavior and within the framework of the usual motives of human activity. And, secondly, by excluding these non-material parameters from consideration, we drastically complicate the logic of the appearance of behavior and are forced to rise every time to a detailed analysis of subtle and not always clear molecular processes.
In any case, the living system behaves as if it were controlled by the Self. This made it feasible to formulate the main stages of creating an artificial personality. The traced path is not a ready-made recipe, but it allows us to start designing. Some stages of the model are already mainly developed theoretically and simulated. It was established that a system with instability that is dependent on the mismatch of the supreme sensor finds a stationary state, breaking even local minima [7][8][9]. With a few optima, the system can find any of them. Search is dramatically accelerated using the principle of least action [6,13,14]. We have developed a neuronal model that after a learning procedure, exhibits different excitability to stimuli, thus predicting different changes in the environment [6,30]. The neuron model calculates the forecast for receiving rewards depending on their own actions, based on the current state and experience gained in short-term memory. In accordance with the forecast, the output signal of the model is facilitated or inhibited by modulating the threshold of its generation [30]. Several of these model neurons connected in a simple network show the stability of the function to damage part of their elements. The lost function after additional training was restored much faster than the primary training required.
We argued that the consciousness of a whole organism is most likely formed through the collective behavior of its sensitive neurons. We expressed only fundamental considerations and a thorough analysis of the problem remains to be done. An organism is built of unreliable elements and self-regulation is directed to protecting them against damage. Does this mean that an artificial mind that is capable of feeling could be created on the base of unreliable elements? To our thinking, the response is no. The main point is rather a possibility of elements of self-recovery instead of their option to be damaged.