A Compositional Model of Consciousness based on Consciousness-Only

Scientific studies of consciousness rely on objects whose existence is independent of any consciousness. This theoretical-assumption leads to the"hard problem"of consciousness. We avoid this problem by assuming consciousness to be fundamental, and the main feature of consciousness is characterized as being other-dependent. We set up a framework which naturally subsumes the other-dependent feature by defining a compact closed category where morphisms represent conscious processes. These morphisms are a composition of a set of generators, each being specified by their relations with other generators, and therefore other-dependent. The framework is general enough, i.e. parameters in the morphisms take values in arbitrary commutative semi-rings, from which any finitely dimensional system can be dealt with. Our proposal fits well into a compositional model of consciousness and is an important step forward that addresses both the hard problem of consciousness and the combination problem of (proto)-panpsychism.


Introduction
Despite scientific advances in understanding the objective neural correlates of consciousness [1], science has so far failed in recovering subjective features from objective and measurable correlates of consciousness. One example is the unity of consciousness. Current models postpone the explanation of that unity, assuming there will be further developments [2]. In the meantime, they reduce conscious experience to neural events.
In this article, we present an alternative approach: consciousness as a fundamental process of nature. This strategy addresses reductionism and the hard problem of consciousness. Our approach takes inspiration from the Yogacara school [3,4], and is also in line with the hypothesis of conscious agents [5] and phenomenology [6,7]. In our framework, a key feature of consciousness is characterised as "other-dependent nature", i.e. the nature of existence arising from causes and conditions. Without falling into idealism or dualism, we propose that consciousness should be treated as a primitive process.
To model the other-dependent nature, we propose a compositional model for consciousness. This model is based on symmetric monoidal categories (Section 2), also called Process Theory [8,9]. Process theory is an abstract framework which describes how processes are composed, and thus ontologically neutral. It has been widely used in various research fields such as the foundations of physical theories [10], quantum theory [11,12], causal models [13,14], relativity [15] and interestingly also natural language [16] and cognition [17,18]. At the core of process theory lies the principle of compositionality. Compositionality describes any unity as a composition, possibly non-trivially, of some basic processes [8,9]. In this paper, we use a fine-grained version of process theory called ZX-calculus to model Alaya consciousness (Section 3). In our model, we use generators in the form of basic diagrams. A diagram represents processes defined by interdependent relations (Section 4, 4.1, 4.1.1 and 4.1.2), exhibiting the other-dependence feature of consciousness. The framework also comes with a standard interpretation for each diagram (Section 4.1.3 and 4.1.4), making our theory sound, i.e. without internal contradictions. This makes process theory and our compositional framework suitable for investigating the irreducible structural properties of conscious experience [19].
This framework may become an important step forward, by mathematizing phenomenology to target major questions of conscious experience [20,21]. For instance, the unity of consciousness naturally arises as result of composition, and the combination problem of fundamental experiences is described as an application of our framework (Section 5). This new perspective of scientific models of consciousness invokes pure mathematical entities, avoiding ontological claims, without the need for any physical realization (Section 6).

Category Theory and Process Theory
In this section, we briefly introduce the basic notions of Category theory [22], process theory [9] and graphical calculus [23].

Preliminaries
Category A category C consists of: (g, f ) → g • f ; • for each object A, an identity morphism 1 A ∈ C(A, A), satisfying the following axioms: • associativity: for any f ∈ C(A, B), g ∈ C(B, C), h ∈ C(C, D), there holds (h • g) • f = h • (g • f ); • identity law: for any f ∈ C(A, B), is an isomorphism if there exists a morphism g ∈ C(B, A) such that g • f = 1 A and f • g = 1 B . A product category A × B can be defined componentwise by two categories A and B.

Functor
Given categories C and D, a functor F : C −→ D consists of: • preserving composition: for any morphisms A bifunctor (also called binary functor) is just a functor whose domain is the product of two categories.

Natural transformation
Let F, G : C −→ D be two functors. A natural transformation τ : F → G is a family (τ A : F(A) −→ G(A)) A∈C of morphisms in D such that the following square commutes: for all morphisms f ∈ C(A, B). A natural isomorphism is a natural transformation where each of the τ A is an isomorphism.

Strict monoidal category
A strict monoidal category consists of:

Strict symmetric monoidal category
A strict monoidal category C is symmetric if it is equipped with a natural isomorphism

Strict monoidal functor
Given two strict monoidal categories C and D, a strict monoidal functor F : for any objects A, B of C, and any morphisms f ∈ C(A, A 1 ), g ∈ C(B, B 1 ).
A strict symmetric monoidal functor F is a strict monoidal functor that preserves symmetrical structures, i.e., F(σ A,B ) = σ F(A),F (B) . The definition of a general (non-strict) symmetric monoidal functor can be found in [22].

Strict compact closed category
A strict compact closed category is a strict symmetric monoidal category C such that for each object A of C, there exists a object A * and two morphisms A strict compact closed category is called self-dual if A = A * for each object A [12].

Process Theory
Process theory is an abstract description of how things have happened, be they mental or physical and regardless of their nature. In common with all theories, process theory has its own assumptions, albeit with the advantage that it's major feature is that it contains minimal assumptions.
We first assume an event to have occurred. i.e., a change from something typed as A to something typed as B. This is called a process and denoted as a box: Second, we assume that it is impossible that all the things being considered, happened simultaneously and thereafter ceased. So there must be processes, say g and f , that happen sequentially: C f happens after g can be seen as a single process from type C to type B, which is denoted by f • g : C → B. This means processes admit sequential composition. As such, three things happening in sequence is seen as one process without any ambiguity, i.e., the sequential composition of processes is associative: . We also assume that for each type A, there exists a process called the identity 1 A , which does nothing at all to A. This is depicted as a straight line: A As a consequence, given a process f : Third, we assume that there should be different "things" happening simultaneously. Two processes f and g that happen simultaneously are described as: A If we view two types, say A and C, as a single type which we denote as A ⊗ C, then the simultaneous processes f and g can be seen as a single process from type A ⊗ C to type B ⊗ D which we denote as f ⊗ g : A ⊗ C → B ⊗ D. So we have a parallel composition of processes. The above depiction of f ⊗ g is asymmetric: f on the left while g on the right. This is due to the limitation of a planar drawing. Two processes that occur simultaneously should be placed in a symmetric way, which means that if we swap their positions, they should be essentially the same where all the types should match. This can be realised by adding a swap process D With these basic assumptions, processes can be organised into what is called a process theory in the framework of a strict symmetric monoidal category (SMC). A much more detailed description of process theory can be found in [12].
Furthermore, in this paper, we also consider the origin of space and time as part of our framework. Intuitively, time emerges from sequentially happened processes, and space is a form which displays simultaneously happened processes. Similar to the theory of relativity where space and time are a unified entity, here we assume that space and time are related to each other in the sense that sequential composition and parallel composition are convertible. This is realized by adding the compact structure to the process theory, then we have: Mathematically speaking, we now have a compact closed category.
Since process theory focuses on the processes instead of the objects, they provide a philosophical advantage: process theories emphasise transformations, avoiding any ontological claim or "substance-like" description.

Fine-grained Version of Process Theory
In general process theory, most of the boxes (processes) are unspecified in the sense that what is inside a box is unknown, whereas we need to know more details about their interactions in some applications. In other words, we need a fine-grained version of process theory. The typical way to derive such a version is to generate all the processes by a set of basic processes called generators, while specifying those generators in terms of equations of processes composed of generators. Below, we illustrate this idea by a typical example called ZX-calculus.
ZX-calculus is a process theory invented by Bob Coecke and Ross Duncan as a graphical language for a pair of complementary quantum processes (represented by two diagrams called green spider and red spider respectively) [23]. All the processes in ZX-calculus are diagrams composed sequentially or in parallel, either of green spiders with phase parameters, red spiders with phase parameters, straight lines, swaps, caps or cups. These generators satisfy a set of diagrammatic equations called rewriting rules: one can rewrite each diagram into an equivalent one by replacing a part of the diagram which is on one side of an equation with the diagram on the other side of the equation. All the ZX diagrams modulo 1 and the rewriting rules form a self-dual compact closed category [23]. To guarantee that there are no conflicts in this rewriting system, ZX-calculus needs a property called soundness: there exists a standard interpretation from the category of ZX diagrams to the category of matrices, i.e., a symmetric monoidal functor between them [23].

Why use a compositional approach based on consciousness-only
In this section, we motivate and explain the concepts of consciousness as fundamental and also the structure for consciousness given by the Yogacara School.

Process Theory for consciousness
In any attempt to model consciousness, we expect to fulfill at least three theoretical requirements. First, one would like a theory with a basic and minimum set of assumptions. Process theory is such a framework. Symmetric monoidal categories start from a minimum and specific intuitive form to deal with compositions, sequential and parallel, between different mathematical categories and structures (section 2.2). As introduced in section 2, symmetric monoidal categories define process theories, where the morphisms of the category are treated as processes or transformations.
Second, one would expect those minimum assumptions to be explicit. In other words, we need to model the nature of consciousness from explicit, primitive and axiomatic principles. Process theory in particular, and category theory in general, provides us with an exceptionally well suited mathematical framework for such axiomatic purposes. Since assumptions in process theory are minimal, any extra structure needs to be explicitly added and have explicit mathematical meaning.
Third, one would like to recover important properties of consciousness from those basic and explicit axioms. Specifically the unity of consciousness. According to the phenomenology of consciousness, one of the most salient features of conscious experience is its unity [24,25]. Importantly, in process theory, unity is formed by sequential and parallel compositions. Under those operations, the concept 1 Modulo means using an equivalent relation. of compositionality defines the whole as compositions of the parts. These parts however, are not trivial decompositions, they contain in themselves the very properties that define the whole (in our case, processes compound other processes). Parts and the whole are therefore defined together. Compositionality is thus a middle ground between reductionism and holism. Due to this foundational aspect, compositionality is a convenient way to target the unity of consciousness (section 5).

Consciousness as Fundamental
At the heart of a general theory of consciousness there always lies the mind-body problem: how physical processes (physical properties, neural events and the body) are related to a conscious subjective experience (mental properties, qualia)? [24,26,27]. Answers to this problem diverge into two main paths: dualism and physicalism (sometimes also called materialism). Dualism holds the view that the mental and the physical are both real and neither can be reduced to the other. The main difficulty of dualism is the problem of interaction: if the mental and the physical are radically different kinds of things, i.e different from each other, how could they interact with each other while still keeping a unified picture of a creature possessed of both a mind and a body [28]? On the other hand, physicalism assumes that everything is physical, and that mental states are just physical states. Physicalism has two main problems. The first one is the hard problem of consciousness: why and how does experience arise from a physical basis? [24,26,27]. The second problem of physicalism comes from its basic assumption of objectivity: there exist physical objects whose existence is independent of any consciousness. However, there is an epistemic issue here. Essentially, "our knowledge is limited to the realm of our own subjective impressions, allowing us no knowledge of objective reality in and of itself" [7,29]. This means that consciousness-independent objectivity is always an assumption that can never be verified.
To deal with those issues, we remove the assumption of objectivity, we take consciousness as fundamental and work on the basis that all physical phenomena arise from consciousness. In other words, we assume that all primary objects are indeed conscious-dependent. These fundamental and interdependent interactions form a process theory for consciousness (section 2 and 4).
This specific conception of consciousness as fundamental differs from other Western philosophies that also consider consciousness as fundamental. Some examples are (proto)-panpsychism and idealism. The former convey the combination problem [30] and the later the dual version of the hard problem of consciousness: how do physical phenomenon arise from a subjective basis? One concrete example is the recent conscious agent model [5,31], where the world consists of conscious agents and their experiences. The conscious agent model focuses on the computational properties of consciousness [5] and approach the mind-body relationship considering the fundamental agent independent, i.e. existing by itself.
In view of these, to realise the principle of consciousness as fundamental, we are inspired by the Eastern philosophy known as Yogacara. In our model, consciousness as fundamental becomes an axiom that is equally as valid, but which is more promising at filling "missing gaps", than a model where matter and objectivity are seen as fundamental.

Yogacara Philosophy
Yogacara (Sanskrit for Yoga Practice), also called Vijnanavada (Doctrine of Consciousness) or Vijnaptimatra (Consciousness Only), is one of the two main branches of Mahayana (Great Vehicle) Buddhism (the other being Madhyamaka, Middle way). The key feature of the Yogacara philosophy is consciousness-only which works on the basis that there is nothing outside of consciousness.
To understand the idea of consciousness-only, we should understand another concept from Yogacara, namely Trisvabhāva or the three natures. Trisvabhāva is the premise that all the possible forms of existence are divided into three types: i) Parikalpita-svabhāva, the fully conceptualized nature, ii) Paratantra-svabhāva, the other-dependent nature, and iii) Parinis . panna-svabhāva, the perfect-accomplished-real nature. As explained by [4]: "The first nature is the nature of existence produced from attachment to imaginatively constructed discrimination. The second nature is the nature of existence arising from causes and conditions. The third nature is the nature of existence being perfectly accomplished (real)", which is "the ultimate reality, something that never changes". It is actually "the perfect, complete, real nature of all dharmas" [32].
These three natures are inseparable from the mind (translated from the Sanskrit word Citta) and its attributes (Citta-Caittas). This is clearly stated in Cheng Weishi Lun [33], a representative work of the Yogacara School in China and translated to English by [32] and [34], where consciousness is actually of the second nature of existence: the other-dependent nature. In the following, this "other dependence" is taken as the main feature of consciousness processes, unlike the common view of fundamental physical particles, whose existences are identified by their own properties like mass, spin and charge, thus independent of others.
The concept of "mind" in the Yogacara School has a rich structure. It is divided into eight types of consciousnesses: the first seven consciousnesses-the five sense-consciousnesses (eye or visual, ear or auditory, nose or olfactory, tongue or gustatory, body or tactile consciousnesses), mental consciousness (the sixth consciousness), manas consciousness (the seventh or thought-centre consciousness), and the eighth consciousness-alaya consciousness (storehouse consciousness). Among them the Alaya consciousness is of particular note in that the "act of perception of the eighth consciousness is extremely subtle, and therefore difficult to perceive. Indeed the Alaya is described as incomprehensible because it's internal object (the Bijas (seeds) and the sense-organs held by it) is extremely subtle while its external object (the receptacle-world) is immeasurable in its magnitude" [34]. These eight consciousnesses are not independent of each other. "...the Alaya consciousness and the first seven consciousnesses generate each in a steady process and are reciprocally cause and effect. [32]". As a feature of the Yogocara School, "in the Three Worlds (Dhatus in Sanskrit) there is nothing but mind" [34], which means consciousness-only in the world.
Each type of consciousness is capable of being transformed (parinama in Sanskrit) into two divisions: the perceived division (nimittabhaga in Sanskrit) and the perceiving division (darsanabhaga in Sanskrit), and the function of the latter is to perceive the former. The phenomenon of the physical world and the body which we feel everyday comes from the perceived division of Alaya consciousness: "it transforms internally into seeds and the body provided with organs, and externally into the world receptacle. These things that are its transformations become its own object of perception (dlanzbana)" [32]. The receptacle-world and the Body as part of the perceived division of Alaya consciousness should not be thought of as the physical world and the physical body that we feel in our normal lives, but as being related in that the appearance of the latter is based on the existence of the former. As a consequence, the objectivity of the world comes from the same structure shared by different sentient beings in the perceived division of their Alaya consciousnesses. Furthermore, we note that the sixth consciousness (mental consciousness) is close to modern notions of awareness. Perceptual objects in mental consciousness are known as the inner or the sixth guna, which are composed of impressions of colours, shapes, sounds, smells, tastes, and touches.

Yogacara philosophy compared to Idealism
With consciousness as fundamental, we now compare western idealism with eastern Yogacara philosophy. Yogacara philosophy is fundmentally different from idealism. A notable first difference is the richer structure of consciousness. Yogacara identifies eight different types of consciousness and their relationships. Idealism and other types of monism do not have this complex structure. Secondly, the interdependence between the three natures of existence, and specifically between types of consciousness. The eight consciousnesses are reciprocally a cause and effect of the others [32], while idealism in general does not present these reciprocal cause and effect interactions. The third difference corresponds to the concept of Alaya consciousness itself. The subtle nature of Alaya consciousness in addition to the perceived and the perceiving division is absent in philosophies such as idealism. The world arises from the perceived and the mind from perceiving transformations of Alaya consciousness. In other words, they share similar structures, but they are not reduced to each other, as would happen in idealism or materialism. A final main difference is the third nature (perfect-accomplished-real nature) which is the real nature of each consciousness process in Yogacara philosophy. The feature of this real nature is that it is unchangeable and unconditional, never affecting nor being affected by anything. On the other hand, it makes the existence of any changeable thing possible -things can not exist if they have no real nature, and can not change if they have self-identities. This idea does not exist in western idealism.

Compositional Model for Consciousness-Only
After the discussion in section 3, we now provide a compositional model of consciousness based on the Yogacara philosophy of consciousness-only. The full enterprise means to use process theory and model the eight types of consciousness and their relations. In this paper, we first focus on the model of two important types, Alaya consciousness and mental consciousness. We leave the modelling of the manas consciousness and the five sense-consciousnesses for future work.

Process Theory for Alaya Consciousness
The first step is to show how to model Alaya consciousness. In order for this, we need to make explicit the key features of Alaya consciousness. The first feature of Alaya consciousness is other-dependence, which means each process of Alaya consciousness is dependent on other processes. The general process theory can not display the other-dependence feature because most of its processes are not specified (see section 2.3). So we need a fine-grained version of process theory which has generators specified by explicit rewriting rules. The second feature of Alaya consciousness is its deepness and subtleness. To realise this feature we request that each process in the chosen process theory has no explicit meaning in consciousness and any parameter appeared in the theory is not a concrete number. The third feature of Alaya consciousness is that the structure of the physical world is included in its perceived division. Since quantum theory is a fundamental formalism for the physical world, we would expect the fine-grained process theory to be quantum-related and has space and time arising from.
Based on the requirements for a fine-grained process theory that are noted above, we introduce a formalism called qufinite ZX ∆ -calculus, which is a generalisation of the normal ZX-calculus [23] regarding the following aspects: 1) a labelled triangle symbol is introduced as a new generator, that's why there is a ∆ in the name of the generalised ZX-calculus, 2) all the qudit ZX-calculus (ZX-calculus for qudits-quantum versions of d-ary digits) are unified in a single framework, 3) the parameters (phases) of normal ZX-calculus are generalised from complex numbers to elements of an arbitrary commutative semiring.
We claim that the qufinite ZX ∆ -calculus meet all the requirements of a desired fine-grained process theory for Alaya consciousness. First, all the processes in the qufinite ZX ∆ -calculus are either generators themselves which are specified by relations with other diagrams or are composed of generators, so other-dependence is realised. Second, all the processes in the qufinite ZX ∆ -calculus are just diagrams without explicit meaning, and parameters are just general elements of an arbitrary commutative semiring. Therefore deepness and subtleness are embodied. Finally, the qufinite ZX ∆ -calculus is naturally quantum-related and has the compact structure which relates space and time.
We give the details below of the qufinite ZX ∆ -calculus: generators, rewriting rules and its standard interpretation. Throughout this section, N = {0, 1, 2, · · · } is the set of natural numbers, 2 ≤ d ∈ N, ⊕ is the modulo d addition, S is an arbitrary commutative semiring [35]. All the diagrams are read from top to bottom as in previous sections.

Remark 1. Each input or output of a generator is labeled by a positive integer. For simplicity, the first four generators have each of their inputs and outputs labelled by d, and we just give one label to a wire.
For simplicity, we use the following conventions:  (1, · · · , 1); , · · · , 0); ε represents an empty diagram.

Rules of Qufinite ZX ∆ -calculus
We provide rewriting rules for qufinite ZX ∆ -calculus in Figure 1 and Figure 2. These rules specify the generators as listed in Table 1. Concretely, it means that two or more generators define each other. For example, the green dot d is specified by the rule in the way that it is the only green spider which has no input and one output and can be copied by the red spider d . Moreover, the red spider d is also specified by the effects in the green dot d . Qufinite ZX ∆ -calculus rules II, where − → In order to form a compact closed category of diagrams, we also need the following structural rules: The first two diagrams in equation (1) mean the cap η s and the cup ǫ s are symmetric, while the last diagram means the connected cap and cup can be yanked. The first two diagrams of equation (2) mean any diagram could move across a line freely, representing the naturality of the swap morphism. The last diagram of equation (2) means the swap morphism is self-inverse. Note that now we have a self-dual compact structure rather than a general compact structure, which makes representation of diagrams much easier.
From the rewriting rules noted above, we form a strict self-dual compact closed category Z of ZX diagrams. The objects of Z are all the positive integers, and the monoidal product on these objects are multiplication of integer numbers. Denote the set of generators listed in Table 1 as G. Let Z [G] be a free monoidal category generated by G in the following way -i) any two diagrams D 1 and D 2 are placed side-by-side with D 1 on the left of D 2 to form the monoidal product on morphisms D 1 ⊗ D 2 , or ii) the outputs of D 1 connect with the inputs of D 2 when their types all match to each other to form the sequential composition of morphisms D 2 • D 1 . The empty diagram is a unit of parallel composition and the diagram of a straight line is a unit of the sequential composition. Denote the set of rules listed in Figure 1, Figure  2, equations (1) and equations (2) by R. One can check that rewriting one diagram to another diagram according to the rules of R is an equivalence relation on diagrams in Z [G]. We also call this equivalence as R, then the quotient category Z = Z [G]/R is a strict self-dual compact closed category. The qufinite ZX ∆ -calculus is seen as a graphical calculus based on the category Z.

Standard interpretation of qufinite ZX ∆ -calculus
To ensure that qufinite ZX ∆ -calculus is sound, we need to test its rules in a preexisting reliable system which we now describe. These interpretations, however, does not represent the explicit meaning in terms of our consciousness processes. They are given here to test soundness.
Let Mat S be the category whose objects are non-zero natural numbers and whose morphisms M : m → n are n × m matrices taking values in a given commutative semiring S. The composition is matrix multiplication, the monoidal product on objects and morphisms are multiplication of natural numbers and the Kronecker product of matrices respectively. Then Mat S is a strict self-dual compact closed category. We give a standard interpretation, namely · , for the qufinite ZX ∆ -calculus diagrams in Mat S : |i 1 , · · · , i m j 1 , · · · , j n | ; where s, t ∈ N\{0}; i| = d (0, · · · , 1 i+1 , · · · , 0); |i = ( d (0, · · · , 1 i+1 , · · · , 0)) T ; i ∈ {0, 1, · · · , d − 1}; and [r] is the integer part of a real number r. One can verify that the qufinite ZX ∆ -calculus is sound in the sense that for any two diagrams D 1 , D 2 ∈ Z, D 1 = D 2 must imply that D 1 = D 2 . This standard interpretation · is actually a strict symmetric monoidal functor from Z to Mat S .
According the standard interpretation, if S is the field of complex numbers, then the green spider corresponds to the computational basis |i } d−1 i=0 , with d − 1 phase angles. The red spider corresponds to the Fourier basis coming from Fourier transformation of the computational basis, up to a global scalar. The red d j diagram represents the j-th unitary which is also a permutation matrix, with j ranging from 0 to d. The triangle diagram labelled with d acts as a successor of phase parameters (adding 1's to them). The two trapezium diagrams represent unitaries between the Hilbert space of H s ⊗H t and the Hilbert space H st , these two diagrams are invertible to each other.
Remark 2. Similar to the situation that ZX and ZW calculus over qubits are isomorphic to the category of matrices with size powers of 2 [36], we would like to prove in future work that the qufinite ZX ∆ -calculus over semiring S is isomorphic to the category of Mat S (maybe more rules to be added). If this can be done, then the structure of the category of diagrams of the qufinite ZX ∆ -calculus is independent of the choice of generators and rules.

Modelling Alaya Consciousness
We claim that Alaya consciousness is modelled by qufinite ZX ∆ -calculus. A general diagram represents some sort of conscious process and a diagram with outputs but without inputs will represent a state of consciousness. Sequential composition of two diagrams represents two successive conscious processes happening one after the another, while parallel composition of two diagrams represents two conscious processes happening simultaneously. Furthermore, we model the perceived and perceiving division of Alaya consciousness. On the one hand, as we have introduced in section 3.3, the content of the perceived version of Alaya consciousness is the phenomenon of the physical world and the body which is supposed to have the same mathematical structure for all sentient beings in this world. Since each physical object is supposed to be composed of quantum systems, the perceived version of Alaya consciousness is modelled here by the category FdHilb: the category whose objects are all finite dimensional complex Hilbert spaces and whose morphisms are linear maps between the Hilbert spaces with ordinary composition of linear maps as compositions of morphisms. The usual Kronecker tensor product is the monoidal tensor, and the field of complex numbers C (which is a one-dimensional Hilbert space over itself) is the tensor unit. FdHilb is the category of quantum processes which composes the physical world.
On the other hand, the function of the perceiving division of Alaya consciousness is to perceive the perceived division, which means a perceiving action of the Alaya consciousness. Thus, the perceiving division of Alaya consciousness is modelled by a functor from Z to FdHilb. This functor is set up as a modification of the standard interpretation functor · , i.e.: just choose a semiring homomorphism f from S to C and let {|i } d−1 i=0 a standard basis of a Hilbert space with dimension d, then replace a i with f (a i ) in the codomain of the interpretation · . One can check that a monoidal functor is obtained in this way, where a semiring homomorphism from S to C is selected.

Process Theory for Mental Consciousness
After describing the category for Alaya consciousness, we now consider a model for mental consciousness. Consider N-semimodules [35] freely generated by a finite set of perceptions (impressions), either of colours, shapes, sounds, smells, tastes or touch feelings. We call these N-semimodules single-type perception semimodules. Let X be the category whose objects are finite tensor products of single-type perception semimodules, and whose morphisms are semimodule homomorphisms between them [35]. Then X forms a symmetric monoidal category [37]. An object of X is called here an experience space. We give an example of experience space as follows. An experience space about two shapes of a square and a triangle is a free N-semimodule with a basis {square, equilateral triangle }. A general element in this semimodule is of form m(square)+n(equilateral triangle), which means an impression where there are m squares and n equilateral triangles. Therefore mental consciousness is modelled by the category X whose objects are explained as experience spaces and whose morphisms are explained as mental consciousness processes which transform from one experience space to another. The reason why we use the semi-ring N is because we take our experiences as being basically finite.
As we described in section 3.3, mental consciousness (or the sixth consciousness) is generated from the alaya consciousness. Since mental consciousness and alaya consciousness are modelled by the category X and the category Z respectively, it is natural to model the generation of mental consciousness as a symmetric monoidal functor from Z to X. First, we set up a functor F from FdHilb N to X, where FdHilb N is the category obtained from FdHilb by restricting the coefficients of complex numbers to natural numbers. Clearly we can have an interpretation of diagrams of Z in FdHilb N similar to · , which is denoted by · N . For each object H n of dimension n, F (H n ) is a single-type perception semimodule generated by n elements {x i } n−1 i=0 which has a bijection σ : |i → x i with an orthonormal basis {|i } n−1 i=0 of H n . Obviously, σ and σ −1 can be linearly extended to semimodule homomorphisms which will be called with the same names. For each linear map f from H m to H n , F ( f ) is the semimodule homomorphism σ • f • σ −1 . Also we give the morphism where g is the following generator of the qufinite ZX ∆ -calculus:

st t s
One can check that F ( g N ) is a natural isomorphism and F is a symmetric monoidal functor. Then the functor from Z to X is given by the composite functor B = F • · N , which is a symmetric monoidal functor (SMF) since both components are SMFs.

The Unity of Experience
As an application of our model of consciousness, we consider the combination problem on the unity of experience. Our approach is an alternative to conserve the irreducible and fundamental nature of experience. It is not, however, the only one. Panpsychism and Panprotopsychism, among others, also consider experience seriously, but assigns a quantifiable character to that experience. According to these views, consciousness is present in all fundamental physical entities [38] and the composition of basic blocks of experience creates our conscious experience. Nevertheless, an important question remains: How "microphenomenal seeds of consciousness" constitute macrophenomenal conscious experiences as we experience them? -the so-called combination problem for Panpsychism and Panprotopsychism [30]. In other words, how these building blocks of experience compound one single unified phenomenal subjective experience [25]: the phenomenal unity of experience [25,39]. Basically, the dualism between mind and matter is now replaced by two modes, micro and macro experience, of the same ontology.

The combination Problem
The combination problem has three aspects [30]: structural, subject and quality. Each one of these aspects leads to a specific sub-problem. On the one hand, the structure of the micro world, mostly associated with quantum mechanics, gives the impression of being different from the structure of macro experiences. This is the structural mismatch problem, which also appears between macro experience structure and macro physical structures in the brain [30]. On the other hand, there is the question of how micro subject and micro qualities combine to give rise to macro subjects and qualities. It seems that no group of micro subjects need the existence of a macro subject, and additionally, it is not clear how possible limited micro qualities yield to the many macro qualities that can be experienced, including different colors, shapes, sounds, smells, and tastes (for detail see [30]). According to Chalmers, a satisfactory solution of the combination problem must face all these three aspects.
Our framework targets all of these aspects of the combination problem. First, the mathematical structure of the qufinite ZX ∆ -calculus for Alaya consciousness is a unification of all dimensional qudit ZX-calculus. If generators are interpreted in Hilbert space, the latest becomes a graphical language for quantum theory. This means that the ZX ∆ -calculus for conscious processes shares a similar structure to quantum theory. This similarity solves the mismatch at the level of micro experience. At the level of macro experiences we avoid any match or mismatch with macro physical structures because the model does not reduce experience to neural events (non-isomorphic relationship). Second, the model does not distinguish between subject and quality, everything is a conscious process. Those fundamental conscious processes of reality, namely the generators of the theory, compound other conscious processes just by means of connecting them together: via sequential and parallel composition. The result of those compositions are other subjective and qualitative processes. New compounded processes depend on the basic generators, while the generators are interrelated to define themselves. In other words, each process need other processes to specify itself. If someone insists on generators being matched with subjects or agents, then micro (generators) and macro subjects (composition of generators) necessitate themselves as imposed by the other dependent nature. This deals with the problem of subject composition. An example for quality composition in mental consciousness is discussed in the next section. In our framework, unity of consciousness is naturally described as a result of process composition [40].

The Combination Problem for Mental Consciousness
One application of the above comments is instantiated for the combination of qualitative experiences at the level of mental consciousness. Since we have modelled mental consciousness as the category X, the combination of qualitative experiences should be modelled as a morphism within this category. Given an experience space of rank s (the smallest number of generators) and an experience space of rank t, we claim that a combination of experiences from these two spaces to an experience space of rank st is modelled by the morphism F ( g N ) as given in section 4.2. Now we show by an example why F ( g N ) could model a combination of experiences. Consider that there is a colour experience space A 2 freely generated by {green, red} and a shape experience space B 2 freely generated by {square, circle}. Then F ( g N ) is seen as a combination scheme to gain an experience space C 4 of shapes with colour freely generated by {green square, green circle, red square, red circle}: Here two combined experiences presented at the same time are modelled by the superposition of the two experiences. For example, a green square and red circle that show up in our mind simultaneously are represented as green ⊗ square + red ⊗ circle. One can then check that the morphism F ( g N ) is the abstract mechanism that realises the combination: given green square and red circle simultaneously, a green square and a red circle is obtained simultaneously via F ( g N ); the other cases are similar. One may wonder that whether the morphism F ( g N ) is just a renaming of the basis. In general, any isomorphism can be seen as a renaming of a basis, however, as we pointed out in section 4.2, F ( g N ) is a natural isomorphism, thus mathematically more complex than just a renaming of basis.

Conclusions
In approaching the problem of consciousness through the framework of qufinite ZX ∆ -calculus, we avoided reductionism in tackling the "hard problem" described above.
Our framework is based on arbitrary commutative semirings as a compositional model of consciousness, with the emphasis on its potential use for the mathematical and structural studies of consciousness [19][20][21]. We utilise generators and processes as abstract mathematical structures, resembling quantum theory. The philosophy that underlies our approach is taken from the Yogacara school of Buddhism which assumes that consciousness is fundamental and which characterizes the main feature of consciousness as other-dependence.
A positive consequence of this approach is that the structure is close, but not the same, as quantum theory, and if we restrict our semiring to the field of complex numbers, adding the standard interpretation of the diagrams in matrices, we get to finite-dimensional quantum theory. Therefore, the qufinite ZX ∆ -calculus is a unification, in this respect, of all finite dimensional qudit ZX-calcului, which are graphical languages for quantum theory when interpreted in Hilbert space.
In a future work, we expect to generalise the qufinite ZX ∆ -calculus to the infinite dimensional case, from which standard quantum mechanics might be recovered. It is to be noted that we have not recovered standard quantum mechanics. To do so would mean generalising our model in order to derive the Schrödinger equation. This is important because once subjectivity is taken as fundamental, a new inverse problem comes into play. Namely, how do objective phenomena such as quantum physics or relativity arise from subjective experiences?
The aim of models such as the conscious agent model is to recover fundamental physics from the agent's interactions, as for instance in quantum mechanics [31]. It is not clear that current versions of the conscious agent model are capable of recovering the entire objective realm (see objections and replies section in [31]). In our framework part of the reconstruction goal pursued by the conscious agent model is achieved for free, and without overhead, invoking only phenomenal aspects. In doing so, our approach to consciousness processes and quantum theory share a similar mathematical structure. We are hopeful that due to its other-dependent feature, and sufficient generality, our framework may pave the way for further research on the scientific study of consciousness.
In following works, we also expect the extension of the model to, inter alia, five sense-consciousnesses and manas consciousness, to consider infinite diagrams for Alaya consciousness and infinite dimensional Hilbert spaces for its perceived division. This mean adding more structure for mental consciousness, allowing us to compare our approach to other models of qualia space.
We close by remarking that a process theory for consciousness is not only about modelling consciousness with any type of mathematics, but about modelling consciousness with category theory in a graphical form, i.e. axiomatic mathematics. This form of mathematics explicitly introduces structures, assumptions and axioms. We believe this approach is better suited to describing the conscious experience as fundamental.
Author Contributions: Conceptualization, CMS and QW; investigation CMS, QW and IK; writing-original draft preparation, CMS; writing-review and editing, CMS, QW and IK; visualization, CMS and QW.