Multilayer and Multiplex Networks in Psychological Science

Author

Luis Ulloa

1. Simple Graphs

A simple graph is defined by:

\[\text{G = (V, E)}\]

In psychological networks, nodes might be symptoms, emotions, behaviors, questionnaire items, people, words, or brain regions. Edges might represent associations, temporal predictions, social interactions, similarity, or some other relationship defined by the study.

A common node-level measure is degree, the number of edges connected to a node. For a binary undirected graph, the degree of node \(i\) is:

\[deg(v) = \sum_{j \in V} a_{vj}\] where the \(a\) is the binary value in the adjacency matrix that is 0 or 1 and \(v\) is a vertex that is connected to \(j\) number of vertcies in \(V\)

The important point is simple: a single graph gives one view of a system but many real-world systems are often much more complicated than the structures we’ve discussed so far.

An example in psychology we can show personality as a single layer graph. The nodes would be personality traits (Openness, optimism, pessimism, quick tempered, etc) and edges can be the relationship between the traits (Openness has a relationship with optimism, pessimism and vice versa).

At a single layer level, sure it can show relations among these traits but traits can express themselves different under different contexts. These contexts can be shown as different layers in a network

2. Why Add Layers?

Many psychological systems are not captured well by one network. The same nodes may be related differently depending on measurement mode, time, context, or relationship type.

For example, symptoms could be connected through:

  • self-report responses,
  • behavioral tasks,
  • clinician ratings,
  • physiological measurements.

A single graph would collapse these into one structure. A layered approach keeps them separate.

A multilayer network is a way to model multiple layers of a system that has different importance or dynamics at different layers. Multilayer networks use Intra (connections among nodes in a single layer) and inter (connections among nodes across different layers) links to describe the connections among nodes.

In the most general case, a node in one layer can connect to any node in another layer. This broader framework includes temporal networks (Shout out to Ella Rogers in 290 and Nicole and Keira in 190), multiplex networks, and networks of networks (Boccaletti et al., 2014; Aleta & Moreno, 2018).

A multilevel model that we can make into a multilayer network is students in a school. A way we can model the layers as interaction types. for example, one layer can be a friendship, another can be bullying, and another can be class. The edges can show relationships among the students (nodes) at each layer

Another multilevel model we can make a multilayer network is peer pressure. Every layer can be different context. the layers can be family, friends, workplace, gym, etc. The edges can be interlayered as peer pressure from a more easily pressured layer (family) and have a relationship with a node in a less pressured layer. Your family peer pressuring you to drink alcohol has a relationship with you failing to peer pressure when offered party drugs at a party

3. Multilayer, Multiplex, and Temporal Networks

Multilayer network

A multilayer network is the broadest category. Layers may represent different times, contexts, measurement systems, groups, levels of organization, or relationship types.

A multilayer network can be written as:

\[M = (G, C)\]

where \(G\) is the family of layer-specific graphs and \(C\) is the set of connections between layers.

Keepng in theme with the students in school example \(G = (V,E,D)\) can be represented with V being students, E being a relationship, and D being the amount of layers modeled(friendship, bullying, class)

A concrete way to think about this is as a block matrix. If we have \(L\) layers, the full layered network can be represented as a supra-adjacency matrix:

\[\mathcal{A} = \begin{pmatrix} A^{(1)} & C^{(12)} & \cdots & C^{(1L)} \\ C^{(21)} & A^{(2)} & \cdots & C^{(2L)} \\ \vdots & \vdots & \ddots & \vdots \\ C^{(L1)} & C^{(L2)} & \cdots & A^{(L)} \end{pmatrix}\]

The diagonal blocks, such as \(A^{(1)}\) and \(A^{(2)}\), are the adjacency matrices for the separate layers. The off-diagonal blocks, such as \(C^{(12)}\), represent connections between layers.

Supra-adjacency matrices are central for spectral analyses, diffusion, random walks, and other dynamics on multilayer networks (Boccaletti et al., 2014; Aleta & Moreno, 2018; Guo et al., 2016).

The supra-adjacency matrix keeps layered structure that a adjacency matrix of a single layer graph could not show. A property of the supra-adjacency matrix is that when you exponentiate by x steps it can show distance between the edges at that step.

Laplacian

The laplacian equation for a single layer network can be written as \[L=A-D\] Where A is the adjacency matrix and D is the diagonal matrix where each entry corresponds to a node’s degree. Similarity to the supra-adjacency matrix you can have the supra-laplacian matrix

The supra-laplacian matrix can represent the flow or diffusion (super diffusion) of a network. Using eigenvalues of the supra-laplacian matrix it can show how interconnected or disconnected the multilayer network is

Multiplex network

A multiplex network is a special type of multilayer network. In a strict multiplex network:

  1. The same nodes appear in every layer.
  2. Interlayer connections only connect a node to its own replica in another layer.

Multiplex networks are often useful when the same units are connected by different relationship types. Examples include your network of friends/colleagues, emotional states, and personality

To extend on the friendship network example, you can imagine you have your network of friends. Now think about what social medias you follow them on. Say you follow 400 people on instagram including your bestest friend in the whole wide world and some classmate you met in PSC 190. You also have facebook that you exclusivity made for family and family friends so they can tag you in post. You follow your best friend on facebook since they are also pretty close to your family. The “facebook” layer shows how more personally close you are to someone vs. instagram that you give out. In a single layer network all that would be shown is that there is a relationship present. In a multiplex network the context of each layer can be informative in the type of relationship

Recap on Temporal Networks

Temporal networks are similar to multilayer networks as they use time as the layers of the networks. They both also can show more information than a simple single layer graph, ie communities. However multilayer networks can be applied to more contexts than time. The interlayer links also don’t have to be dependent on time. > Re-introduce the concept of temporal networks and how they bridge into the multilayer space. What is the same? What is different?

4. Simulate a Multiplex-Style Symptom Network

In this example, the nodes are symptoms and the layers are measurement modalities.

The simulated data are intentionally constructed so that each layer has a clear community pattern, but the community pattern changes across layers. This makes the community-detection section useful: the flattened graph will give each symptom only one community label, but the multilayer representation can show that a symptom can belong to different communities in different measurement contexts.

This is a multiplex because the layers describe different types of relationships among the same symptom set. We focus on intralayer edges and then add simple replica-to-replica coupling for the multilayer community detection section.

Describe how you would convert this to a more general multilayer framework.

5. Plot the Individual Layers

The plotting code below uses the same circular layout for every layer. That way, when the edges change, you know the change is due to the layer and not due to a different layout algorithm.

Notice that the same symptoms do not group together in every layer. That is the point of the example.

6. Flatten the Multiplex Network

A multiplex network can be transformed into a flattened or aggregated network. Flattening means we collapse across layers.

In the table below:

  • from and to identify a symptom pair;
  • each layer column says whether that edge appears in that layer;
  • weight counts how many layers contain that edge.
              from            to self_report behavioral_task clinician_rated
1        anhedonia concentration           0               1               1
2        anhedonia       fatigue           1               1               0
3        anhedonia      insomnia           1               0               0
4        anhedonia   psychomotor           0               1               0
5        anhedonia       sadness           1               0               1
6        anhedonia         worry           0               0               1
7  appetite_change concentration           1               0               0
8  appetite_change       fatigue           0               0               1
9  appetite_change      insomnia           0               1               1
10 appetite_change   psychomotor           1               0               1
   physiological weight
1              1      3
2              0      2
3              0      1
4              0      1
5              1      3
6              1      2
7              0      1
8              1      2
9              1      3
10             1      3

If an edge has weight = 2, it appeared in two layers. If it has weight = 1, it appeared in only one layer.

7. Plot the Flattened Graph

Plotting the flattened graph is important. Otherwise, students only see the table and may not appreciate how much the graph changes after flattening.

In this plot, thicker edges indicate symptom pairs that appear in more layers.

Compare the flattened graph to the individual layer plots. The flattened graph is denser and less clearly tied to any one measurement modality.

8. What Is Lost When We Flatten?

9. Degree Within and Across Layers

In a single graph, degree is the number of edges attached to a node. In a multilayer network, degree can be computed separately for each layer.

For a multiplex network with \(L\) layers, the degree of node \(i\) can be represented as a vector:

\[\mathbf{k}_i = (k_i^{(1)}, k_i^{(2)}, \ldots, k_i^{(L)})\]

A simple summary is the total degree, or degree overlap:

\[o_i = \sum_{\alpha=1}^{L} k_i^{(\alpha)}\]

The vector is important because the same symptom can be highly connected in one layer and weakly connected in another. Reviews of multilayer networks emphasize that scalar summaries can miss layer-specific patterns, edge overlap, and cross-layer roles (Boccaletti et al., 2014; Aleta & Moreno, 2018).

When Low Degree Matters

A node with low degree in every layer can still matter, but the reason depends on the kind of layered graph. > this low degree node can be important if it connects the layers what does different degrees mean in layers vs flat

In a multiplex network,

In a multilayer network,

10. Community Detection on Multiple Layers

Community detection asks whether a network contains groups of nodes that are more densely connected internally than externally. In a single-layer graph, algorithms such as Louvain are often used to find communities by approximately maximizing modularity.

For multilayer networks, community detection is more interesting because the same symptom can have the same or different community memberships across layers.

Mucha et al. (2010) generalized modularity to multislice networks. In practice, packages such as multinet implement generalized Louvain-style methods using parameters such as \(\gamma\) for modularity resolution and \(\omega\) for interlayer coupling. The multinet documentation describes glouvain_ml(n, gamma = 1, omega = 1) and modularity_ml() for this purpose.

Below, I first implement a small base-R version using a supra-adjacency matrix. This is not meant to replace a polished package implementation. It is meant to make the idea visible and runnable.

10.1 Build adjacency matrices

10.2 Build The Supra-Adjacency

The functions below places layer adjacency matrices on the diagonal blocks and replica-to-replica coupling edges on the off-diagonal blocks. The coupling strength is \(\omega\).

                            sadness|self_report anhedonia|self_report
sadness|self_report                           0                     1
anhedonia|self_report                         1                     0
fatigue|self_report                           1                     1
insomnia|self_report                          1                     1
appetite_change|self_report                   0                     0
psychomotor|self_report                       0                     0
worry|self_report                             0                     0
concentration|self_report                     0                     0
                            fatigue|self_report insomnia|self_report
sadness|self_report                           1                    1
anhedonia|self_report                         1                    1
fatigue|self_report                           0                    1
insomnia|self_report                          1                    0
appetite_change|self_report                   0                    0
psychomotor|self_report                       0                    0
worry|self_report                             0                    0
concentration|self_report                     0                    0
                            appetite_change|self_report psychomotor|self_report
sadness|self_report                                   0                       0
anhedonia|self_report                                 0                       0
fatigue|self_report                                   0                       0
insomnia|self_report                                  0                       0
appetite_change|self_report                           0                       1
psychomotor|self_report                               1                       0
worry|self_report                                     1                       1
concentration|self_report                             1                       1
                            worry|self_report concentration|self_report
sadness|self_report                         0                         0
anhedonia|self_report                       0                         0
fatigue|self_report                         0                         0
insomnia|self_report                        0                         0
appetite_change|self_report                 1                         1
psychomotor|self_report                     1                         1
worry|self_report                           0                         1
concentration|self_report                   1                         0

The first block of the supra-adjacency matrix is the first layer. The later blocks contain the other layers. The off-diagonal values connect symptom replicas across layers.

(DETLET)### 10.3 A simple modularity maximizer

This is a deliberately simple greedy modularity routine. It is good enough for this seminar example.

10.4 Compare Flat Communities to Multilayer Communities

First, detect communities on the flattened graph.

  sadness 
0.1666667 
          symptom flat_community
1         sadness              1
2       anhedonia              1
3         fatigue              2
4        insomnia              2
5 appetite_change              2
6     psychomotor              2
7           worry              1
8   concentration              1

Now detect communities on the supra-adjacency matrix.

sadness|self_report 
          0.7083333 
                    state_node multilayer_community         symptom
1          sadness|self_report                    1         sadness
2        anhedonia|self_report                    1       anhedonia
3          fatigue|self_report                    1         fatigue
4         insomnia|self_report                    1        insomnia
5  appetite_change|self_report                    2 appetite_change
6      psychomotor|self_report                    2     psychomotor
7            worry|self_report                    2           worry
8    concentration|self_report                    2   concentration
9      sadness|behavioral_task                    4         sadness
10   anhedonia|behavioral_task                    3       anhedonia
11     fatigue|behavioral_task                    3         fatigue
12    insomnia|behavioral_task                    4        insomnia
             layer
1      self_report
2      self_report
3      self_report
4      self_report
5      self_report
6      self_report
7      self_report
8      self_report
9  behavioral_task
10 behavioral_task
11 behavioral_task
12 behavioral_task

Put the multilayer communities into a symptom-by-layer table.

          symptom self_report behavioral_task clinician_rated physiological
1         sadness           1               4               5             7
2       anhedonia           1               3               5             7
3         fatigue           1               3               6             8
4        insomnia           1               4               6             8
5 appetite_change           2               4               6             8
6     psychomotor           2               3               6             8
7           worry           2               4               5             7
8   concentration           2               3               5             7

Walk us through the results. What are the limitations in this case of the flat community results relative to the multilayer ones?

10.5 Plot flat and multilayer community results

The flattened graph gives one partition of symptoms. The multilayer plot shows that the community structure depends on the measurement layer. This is why community detection should not stop at the flat graph.

10.6 Have \(\texttt{R}\) Just Do It

If you have igraph, you can run Louvain on the flattened graph. This is useful as a comparison, but it is not a replacement for multilayer community detection.

        sadness       anhedonia         fatigue        insomnia appetite_change 
              1               1               2               2               2 
    psychomotor           worry   concentration 
              2               1               1 

If you have multinet, you can reconstruct the same simulated network as a multinet object and run generalized Louvain.

If you use the package-based version, explain \(\omega\). Smaller \(\omega\) […]. Larger \(\omega\) […].

11. Why This Matters in Psychological Science

A symptom can look different depending on the measurement layer.

Provide Examples of Your Own:

  • A
  • B
  • Cannibalism

12. Caveats

Layers require theory

needs strong throey for why usesing layers

Interlayer edges require interpretation

mutiplex vs multi layered have different meanings weights can make it hard to figure out?

Flattening is Sometimes Useful

De Domenico et al. (2015) discuss reducibility

13. Discussion Questions

Takeaways

A simple graph gives one view of a system. A multiplex or multilayer network lets us keep track of different views at the same time.

The supra-adjacency matrix is a useful way to see the whole layered system as one structured object: layer-specific adjacency matrices sit on the diagonal, and interlayer connections sit off the diagonal.

For psychological science, this matters because symptoms, behaviors, emotions, words, people, and brain regions may relate differently across measurement systems, contexts, or time. Flattening can be useful, but it should be treated as a modeling decision, not as a harmless default.