# Mapping Higher-Order Network Flows in Memory and Multilayer Networks with Infomap
## 4 Infomap
See Appendix A.5 for the overlapping clustering output, and Appendix A.4 for an alternative representation with a sparse memory network. In fact, Infomap internally represents the multilayer network in fig3a.net for \(r=0.4\) with the sparse memory network in Appendix A.4 with transition rates \(r/2\) between state nodes in different layers, since \(r/2\) stays among state nodes in the same layer in this symmetric two-layer network. # fig3a.net - Multilayer network
# Lines starting with # are ignored
*Vertices 5
#physicalId name
1 \"i\"
2 \"j\"
3 \"k\"
4 \"l\"
5 \"m\"
*Intra
#layerId physicalId physicalId weight
1 4 1
1 5 4 1
2 3 2 1

The inter-layer links will be generated based on the multilayer relax rate, but could also be modeled explicitly with an *Inter section as below*Inter
#layerIdphysicalIdlayerIdweight
1121
2111

### Clustering a Memory Network

The memory network in Figure 4b with transition rates corresponding to relax rate \(r=0.4\) for the multilayer network in Figure 4a, can be described with the memory network format in fig3b.net below and clustered with the command

./Infomap --input-formatmemoryfig3b.net. See Appendix A.5 for the overlapping clustering output, and Appendix A.4 for an alternative representation with a sparse memory network. # fig3b.net - Memorynetwork
# Linesstartingwith#areignored
*Vertices5
#physicalIdname
1\"i\"
2\"j\"
3\"k\"
4\"l\"
5\"m\"
*3 grams
#fromthroughtoweight
2120.8
2130.8
2140.2
2150.2
3120.8
3130.8
3140.2
3150.2
1211
1231
3211
3211
3211
3211
3211
4140.8
4150.8
4120.2
4130.2
5140.8
5150.8
5120.2
5130.2
14411
1451
5411
5451
1511
1511
154145114541

### Clustering a Sparse Memory Network

The sparse memory network in Figure 4c with transition rates corresponding to relax rate \(r=0.4\) for the multilayer network in Figure 4a, can be described with the sparse memory network format in fig3c.net below and clustered with the command

./Infomap-input-formatsparsefig3c.net. See Appendix A.5 for the overlapping clustering output. # fig3c.net- Sparsememorynetwork
# Linesstartingwith#areignored
*Vertices5
#physicalIdname
1\"i\"
2\"j\"
3\"k\"
4\"l\"
5\"m\"
*States
#stateIdphysicalIdname
11\"alpha-_i\"
22\"beta-_j\"
33\"gamma-_k\"
41\"delta-_i\"
54\"epsilon\"_l\"
65\"zeta-_m\"
*Links
#sourceStateIdtargetStateIdweight
120.8
130.8
150.2
160.2
211
231
311
321
450.8
460.8
420.2
430.2
541
561
641
651

For reference, the memory network in Appendix A.3 can also be represented with the sparse memory network format in fig3b_sparse.net below and clustered with the command

./Infomap-input-formatsparsefig3b_sparse.net. See Appendix A.5 for the overlapping clustering output. # fig3b_sparse.net-statenetwork
# Linesstartingwith#areignored
*Vertices5

#physicalIdname
1 \"i\"
2 \"j\"
3 \"k\"
4 \"l\"
5 \"m\"
*States
#stateId physicalIdname
1 1 \"alpha_i\"
2 1 \"beta_i\"
3 2 \"gamma_j\"
4 2 \"delta_j\"
5 3 \"epsilon_k\"
6 3 \"zeta_k\"
7 1 \"eta_i\"
8 1 \"theta_i\"
9 4 \"iota_1\"
10 4 \"kappa_1\"
11 5 \"lambda_m\"
12 5 \"mu_m\"
*Links
#sourceStateIdtargetStateIdweight
1 3 0.8
1 6 0.8
1 9 0.2
1 12 0.2
2 3 0.8
2 6 0.8
2 9 0.2
2 12 0.2
3 5 1
4 5 1
5 2 1
5 4 1
6 2 1
6 4 1
7 9 0.8
7 12 0.8
7 3 0.2
7 6 0.2
8 9 0.8
8 12 0.8
8 3 0.2
8 6 0.2
9 7 1
9 11 1
10 7 1
10 11 1
11 8 1
11 10 1
12 8 1
12 10 1

### Clustering Output

All examples in Appendices A.2-A.4 give the same overlapping physical node clustering below, where 1:1 0.166667 \"i\" 1 says, reading from right to left, that the physical node with id 1 is called i and has visit rate 0.166667 as the first node in the first module. # A tree output from running Infomap on the example networks in Figure 3
# path flow name physicalId:
1:1 0.166667 \"i\" 1
1:2 0.166667 \"j\" 2
1:3 0.166667 \"k\" 3
2:1 0.166667 \"i\" 1
2:2 0.166667 \"l\" 4
2:3 0.166667 \"m\" 5

With the optional argument --expanded, Infomap gives the clustering of each state node (not shown). ## References and Notes

* (1) [PERSON]; [PERSON] The anatomy of a large-scale hypertextual Web search engine. _Comput. Netw. ISDN_**1998**, _30_, 107-117.