Symmetry group factorization reveals the structure-function relation in the neural connectome of Caenorhabditis elegans

The neural connectome of the nematode Caenorhabditis elegans has been completely mapped, yet in spite of being one of the smallest connectomes (302 neurons), the design principles that explain how the connectome structure determines its function remain unknown. Here, we find symmetries in the locomotion neural circuit of C. elegans, each characterized by its own symmetry group which can be factorized into the direct product of normal subgroups. The action of these normal subgroups partitions the connectome into sectors of neurons that match broad functional categories. Furthermore, symmetry principles predict the existence of novel finer structures inside these normal subgroups forming feedforward and recurrent networks made of blocks of imprimitivity. These blocks constitute structures made of circulant matrices nested in a hierarchy of block-circulant matrices, whose functionality is understood in terms of neural processing filters responsible for fast processing of information.

which swaps AVBL with RIBL, and AVBR with RIBR. This permutation is an automorphism, because the circuits before and after the action of P are exactly the same, as seen in Supplementary Fig. 1a. Moreover, it is easy to check that [P, A] = 0. Next, consider the action of the permutation Q shown in Supplementary Fig. 1b which exchanges AVBL with RIBR and leaves the other neurons fixed. Permutation Q is not an automorphism, because it does not preserve the connectivity between neurons.
Indeed, before the action of Q, AVBL and AVBR are connected by a link with a weight=3, while after they are connected by a link with a weight=1. Thus, Q is not a symmetry, because it alters the connectivity structure of the circuit by changing the weights on the links. Consistently, we also have that [Q, A] = 0.
The set of all network automorphisms obeys all group axioms, so it forms a group.
This group, denoted as G sym (A), is called the permutation symmetry group of the network [6], and formally defined as: An algorithm to find perfect automorphisms of a given network is call Nauty, and it is given in Ref. [10], which is based on the well-known problem of testing isomorphism of graphs.

Supplementary Note 3 -Pseudosymmetries
A 25% variation across animals has been found in the connectivity of connectomes [1,11].
For this reason, exact symmetries (= automorphisms) of the connectome are a simplification and an idealization. However, they should not be regarded as a falsification of symmetry principles, but rather as an intrinsic property of biological diversity. Symmetry principles, in biology, are invariably idealized and approximate: living systems do have to be sufficiently non-symmetric to evolve and diversify. Were it not so, the nature of exact symmetries would forbid any change in organisms' structure and functions. Furthermore, the animal displays a range of behaviors that are plastic and can change through learning and memory [12].
Unlike automorphisms, which are canonically defined by Eq. (1), the definition of pseudosymmetry depends on an additional parameter, a small number ε > 0, which, for our purposes, represents the 25% variation existing across animals.
A permutation P ε is called a pseudosymmetry if the commutator [P ε , A] is non-zero but that is, P ε approximates an exact symmetry in the limit ε → 0.
The norm of the commutator in Eq. (5), defined as shown. The structure of this group is then converted into the system of imprimitivity when this interneuron circuit is incorporated into the whole connectome. This is a general property of all functional circuits in the connectome, to be elaborated in a follow up paper.
counts the number of links where P ε and A do not commute. The ideal limit of classical symmetry corresponds to ∆(P ε ) → 0, and we recover exact automorphisms. In general, the quantity ∆(P ε ) → 0 in Eq. (6) quantifies the deviation of P ε from an ideal automorphism.
Thus, we are lead naturally to the following definition of pseudosymmetry.
Definition of network pseudosymmetry-A permutation P ε is called pseudosymmetry of the network if its deviation ∆(P ε ) from ideal automorphism is smaller than a given indetermination constant ε, i.e., ∆(P ε ) < εM , where M is the total number of links including the weights. In other words, we require pseudosymmetries to preserve at least a fraction (1 − ε) of the total number of links.

Algorithm to find pseudosymmetries
In the present work, we choose the indetermination constant to be smaller than ε < 0.25, which represents the 25% variation in the connectivity of connectomes across animals [1,3,11,13], as a condition for the permutation to be considered a pseudosymmetry. We then obtain the set of pseudosymmetries shown in the real circuits in the main text. Finding pseudosymmetries is relatively simple when the size of the network is small, because they can be determined by an exhaustive search as those permutations satisfying ∆(P ε ) < M ε.
To find the pseudosymmetries we compute for each permutation P the norm ∆(P ε ) given by Eq. (6), and we select only those such that ∆(P ε ) < M ε. All pseudosymmetries found in the locomotion circuits represents transformation with indetermination constant ε below 25%.
The list of the indetermination constants of all subgroups appears in Table I. We notice that pseudosymmetries of locomotion circuits are, in general, highly degenerate, and their number increases as a function of ε. Due to the fact that ε is relatively small, these real circuits can then be easily symmetrized to obtain the circuits with ideal symmetries with ε = 0. This is so, since the pseudosymmetries are relatively close to a perfectly symmetric circuit.
The provided ideal circuits are examples of idealized symmetrical circuit and represents the closest ideal structure to the real one and at the same time respect the same symmetries as the pseudosymmetries of the real circuit. The real circuits (and only them) and their pseudo-symmetries remain the actual circuits to be studied. When the size N of the network is larger than N > 20, finding pseudosymmetries by using an exhaustive search becomes computationally impossible. In this case, pseudosymmetries should be determined as the solutions of a constrained quadratic assignment problem, to be elaborated and described in detail in a follow up paper.

Supplementary Note 4 -Factorization of the symmetry group
Factorization of the symmetry group into simple and normal subgroups is the fundamental tool for understanding the main results of this work. Descending to subgroups gives us useful information about the fine structure of the connectome, and eventually will allow us to identify its basic building blocks. Next, we explain the notion of subgroups and then the procedure to find the building blocks of the connectome through the factorization of its symmetry group. All definitions are standard in the group theory literature and appear in Ref. [6].
Definition of Subgroup-A subset H of permutations selected from a group G is said to be a subgroup of G if the subset H forms itself a group (under the same composition law that was used in G). The concept of subgroup is fundamental in mathematics and physics since it gives the structure of fundamental forces and particles [14].
Definition of Simple Subgroup-A simple subgroup is a nontrivial group whose only subgroups are the trivial group and the group itself. A group that is not simple can be broken into two smaller groups, a normal subgroup and the quotient group, and the process can be repeated, as explained next. Since G may be, in general, a non-abelian group, the left cosets may differ from right cosets.

Definition of Normal
To be definite, in the following we consider only left cosets. Each left coset is of the form gH for some g ∈ G. Let us consider two cosets g 1 H and g 2 H. Since H is a subgroup, it must contain the identity element e, i.e. e ∈ H. Therefore g 1 e = g 1 is in the coset g 1 H.
Analogously, g 2 e = g 2 is in the coset g 2 H. Now, if cosets behave like a group, then the product g 1 g 2 must be in the product of two cosets, that is g 1 g 2 ∈ (g 1 H)(g 2 H). Since g 1 g 2 is also in the coset g 1 g 2 H, then the product of any element in the first coset with any element in the second coset should be in the coset g 1 g 2 H, i.e., (g 1 H)(g 2 H) = g 1 g 2 H. To see when this happens, consider an arbitrary element in the first coset g 1 H and call it g 1 h 1 , and an element in the second coset g 2 h 2 . Multiplying these two elements we get g 1 h 1 g 2 h 2 . If this is in the coset g 1 g 2 H, then this product must be equal to g 1 g 2 h 3 for some h 3 . Starting from this equation we can write: Since H is a subgroup, the right hand side of Eq. (7) is in H, i.e. h 3 h −1 2 ∈ H. As a consequence, also g −1 2 h 1 g 2 is an element of H, so we have in general that g −1 2 Hg 2 ∈ H. In a similar way, one can prove that H ∈ g −1 2 Hg 2 , and thus conclude that To recap, we just proved that if H ≤ G is a subgroup and the cosets form a group, then it must hold true that [g, H] = 0 for any g ∈ G. In a similar way it can be proven that the converse is also true, that is, if [g, H] = 0 then the cosets form a group. If this happens, then H is called a normal subgroup, denoted as H G, and the coset group is called quotient subgroup, denoted as G/H. Every group G has at least two normal subgroups, which are the identity {e} and the group itself G. If these are the only normal subgroups then G is called a simple group. In other words, a simple group does not have any quotient subgroups, and for this reason simple groups represent the building blocks of other groups.
Normal subgroups (and only normal subgroups) can be used to decompose the symmetry group as a direct product, as we discuss next.
Definition of Direct Product Factorization-To explain the factorization of a group as a direct product of normal subgroups, it is useful to introduce the following notation. Let us consider a permutation group G and suppose that K is a subset of G. Then, we define the support of K by: Then, suppose that two subsets K and H of a group G have non-overlapping supports, that Also, assume that each subset H i cannot be further partitioned into smaller subsets with non-intersecting supports.
The important point is that the subsets H i found in this way are, by simple construction, the uniquely defined normal subgroups that factorize G into a direct product as: More concretely, take the sector of blue motor neurons in Fig. 4a (VB3, VB4, VB5 In Supplementary Note 5 we will show that both forward and backward circuits, either of gap-junctions or chemical synapses, have symmetry groups which factorize as a direct product of normal subgroups that correspond to specific broad functional categories from the Wormatlas.

Supplementary Note 5 -Symmetry group of C. elegans locomotion circuit
Forward gap-junction circuit The real circuit with the weights of the synapses is shown in Supplementary Fig. 3. The corresponding symmetry group is factorized as a direct product of 6 normal subgroups: The pair of subgroups [C 2 × C 2 ] acts on the set of four interneurons (AVBL, AVBR, RIBL, RIBR), but does not move any motor neuron. For this reason, we put them together to form the composite subgroup C Fgap , which we call command subgroup of the forward gap-junction circuit and define as: Similarly, the product [S 5 × D 1 × C 2 × C 2 ] in Eq. (11) acts only on the motor neurons VB and DB, but not on the interneurons. Therefore, we put them together to form the composite M Fgap , and we call it the motor subgroup of the forward gap-junction circuit, defined as The formal decomposition of the circuit into the functional categories is: Backward gap-junction circuit The real circuit is shown in Supplementary Fig. 4 with the weighted links. The symmetry group of the backward circuit of gap-junctions breaks into a direct product of command and motor normal subgroups as: where the command subgroup is acts only on motor neurons DA and VA and leaves the interneurons fixed. The formal decomposition of the circuit is:

Forward chemical synapse circuit
We construct the forward circuit of chemical synapses using the same neurons of the forward gap-junction circuit discussed in Supplementary Note 5. In addition, we consider also the two neurons PVCL and PVCR, since they are connected to the other ones via chemical synapses (but not via gap-junctions). The resulting real circuit with the weighted links is displayed in Supplementary Fig. 5, and its pseudosymmetries are listed in Table I The corresponding (pseudo)symmetry group factorizes as the direct product of five normal subgroups in the following way: The first subgroup C 2 in Eq. (19) acts only on the pair of neurons (PVCL, PVCR) and leaves the rest fixed. For this reason, we name it touch subgroup of forward chemical synapse circuit, nd define as: The subgroup D 1 acts only on the four interneurons, thus forming a composite subgroup named command subgroup of the forward chemical synapse circuit, which is defined as: Lastly, the pair of subgroups S 10 × D 1 acts only on the motor neurons of this circuit, thus forming the motor subgroup of the forward chemical synapse circuit, which is defined by: The decomposition of this circuit is:

Backward chemical synapse circuit
Since this circuit has a quite dense connectivity structure, for easier visualization, we plot it by separating two parts. Supplementary Fig. 6a shows the real circuit involved in the touch-command subgroups. We then add the motor neurons in the class A and replot the interneurons involved in backward locomotion but only those that connect with the motor neurons in Supplementary Fig. 6b. These are the neurons AVA, AVE and AVD. Interneurons AIB and RIM in the command subgroup are not included for clarity of visualization because they do not contribute to the connections between the different sectors. We then obtain the real circuit displayed in Supplementary Fig. 6b involved in the touch-command-motor subgroups.
The symmetry group of the backward chemical synapse circuit shown in Fig. 4c is factorized as: The touch sensitivity subgroup is composed of neurons AVD, the command interneuron   [2]. A classification for every neuron into four broad neuron categories is provided as follows: (1) 'motor neurons, which make synaptic contacts onto muscle cells', (2) 'sensory neurons', (3) 'interneurons, which receive incoming synapses from and send outgoing synapses onto other neurons', and (4) polymodal neurons, which perform more than one of these functional modalities'.
The Wormatlas classifies most neurons (some of them unknown) in further functional categories as well as provides the neurotransmitters. We reproduce the information from the Wormatlas used in the main text in Supplementary Table I and Supplementary Table II obtained systematically through the concept of system of imprimitivity of a symmetry group G. All definitions appear in [6].
To define a system of imprimitivity we need first the notions of transitivity and blocks.
A group G is said to be transitive on the set of nodes V if for every pair of nodes i, j ∈ V there exist P ∈ G such that P (i) = j (in other words, G has only one orbit). A group which is not transitive is called intransitive. A block is defined as a non-empty subset B of nodes such that for all permutations P ∈ G we have that: • either P fixes B: P (B) = B; • or P moves B completely: P (B) ∩ B = ∅.
If B = {i} or B = {V }, then B is called a trivial block. Any other block is nontrivial. If G has a nontrivial block then it is called imprimitive, otherwise is called primitive.
The importance of blocks rests on the following fact. If B is a block for G, then P (B) is also a block for every P ∈ G, and is called a conjugate block of B. Suppose that G is transitive on the set of nodes V and define Σ = {P (B) | P ∈ G} as set of all blocks conjugate to B. Then the sets in Σ form a partition of the set of nodes V , and each element of Σ is a block for G. We call Σ a system of imprimitivity for the (symmetry) group G [6].
In the text we have shown that the action of G on the system of imprimitivity Σ gives important information about the functionality of the neural circuits, provided B is not a trivial block.

Supplementary Note 8 -Circulant Matrices and Fast Fourier Transform
In this section we discuss the relationship between circulant matrices and discrete Fourier analysis (see Fig. 1g). In particular, we show that the eigenvalues of circulant matrices can be computed extremely fast through a routine of just O(N log N ) operations, called Fast Fourier Transform (FFT).
For instance, the low-pass filter: can be written as L = I + P . Next, we introduce the matrix F with entries F ab defined as follows: Matrix F is a unitary matrix (F † = F −1 ) which represents the kernel of the discrete Fourier transform (DFT). Specifically, given a vector x, its DFT, denoted asx, is the vector defined as:x a = b F ab v b . The crucial point is that the permutation matrix P = circ(0, 1, 0, . . . , 0) is diagonalized by F , that is P = F ΛF −1 . This can be easily seen by calculating explicitly the product F −1 P F , which reads: Eigenvalues {λ a } can be computed efficiently using the FFT of the vector α ≡ 1 √ N (a 0 , a N −1 , ..., a 1 ) T . To see this, we rewrite λ a as where we used the fact that F satisfies the following sum rules: Using the vectors α ≡ 1 √ N (a 0 , a N −1 , a N −2 , ..., a 1 ) T and λ ≡ (λ 0 , λ 1 , ..., λ N −1 ) T , we can write Eq (32) in the simple form which shows that the eigenvalues {λ a } of A are the components of the DTF of vector α. Since