Simplicial complexes
A network describes pairs of states (Saqr, López-Pernas, Conde-González, & Hernández-García, 2024). A simplicial complex also describes groups: two connected states form a 1-simplex (an edge), three mutually connected states a 2-simplex (a filled triangle), and k + 1 mutually connected states a k-simplex (Battiston et al., 2020). build_simplicial() builds the clique complex, in which every group of mutually connected states is a simplex. Two states are connected when the transition between them, in either direction, has a probability of at least threshold.
Building the complex
The threshold decides which transitions count. At 0.05 every pair of the nine actions is connected and the complex is a single 8-simplex, which describes nothing; at 0.12 the complex keeps the frequent transitions.
Clique Complex
9 nodes, 31 simplices, dimension 2
Density: 24.0% | Mean dim: 0.90 | Euler: -1
f-vector: (f0=9 f1=16 f2=6)
Betti: b0=1 b1=2
Nodes: Command, Correct, Frustrate, Inquire, Interrupt, Refine, Request, Specify, Verify
The complex has 9 states, 16 edges and 6 filled triangles, and no larger groups. Its Betti numbers count its holes: means it is connected, that it has two loops, cycles of edges that are not filled by triangles. The Euler characteristic, 9 − 16 + 6 = −1, equals .
node d0 d1 d2 total
8 Specify 1 6 5 11
1 Command 1 5 3 8
3 Frustrate 1 4 2 6
5 Interrupt 1 3 2 5
6 Refine 1 3 2 5
7 Request 1 3 2 5
2 Correct 1 3 1 4
4 Inquire 1 3 1 4
9 Verify 1 2 0 2
simplicial_degree() counts, for each state, the simplices of each dimension it belongs to.
The four panels show the number of simplices per dimension (the f-vector), the Betti numbers, each state’s number of simplices, and that number by dimension.
Persistent homology
A complex at one threshold depends on the threshold. Persistent homology builds the complex at a sequence of thresholds, from the strongest edge down, and records when each component and each loop appears and disappears (Edelsbrunner, Letscher, & Zomorodian, 2002). A feature that lasts over a wide range of thresholds does not depend on the choice of one.
Persistent Homology
25 filtration steps [0.6158 → 0.0062]
Features: b0: 8 (1 persistent) | b1: 3 (0 persistent)
Longest-lived:
b0: 0.6158 → 0.0000 (life: 0.6158)
b0: 0.6158 → 0.1706 (life: 0.4452)
b0: 0.6158 → 0.2005 (life: 0.4154)
The left panel, the Betti curve, shows the number of components and loops at each threshold. The right panel, the persistence diagram, places each feature at the threshold where it appears and the one where it disappears; points far from the diagonal last longest. The states join into one component as the threshold falls below 0.17. Three loops appear at some threshold and all are filled by triangles before the lowest one.
Q-analysis
Q-analysis describes how the largest simplices are connected to each other (Atkin, 1974). Two simplices are q-connected when they share a face of dimension q or higher: a state for q = 0, an edge for q = 1, a triangle for q = 2.
Q-Analysis (max q = 2)
Components: q2:6 q1:4 q0:1
Fragments at q = 1 (1 → 4 components)
Structure: Command:2 Correct:2 Frustrate:2 Inquire:2 Interrupt:2 Refine:2 Request:2 Specify:2 Verify:1
At q = 0 the complex is one component: every group of states shares at least one state with another. At q = 1 it splits into four components, so the triangles are joined through single states rather than through shared edges. The structure vector gives, for each state, the dimension of the largest simplex it belongs to: every state except Verify belongs to a triangle.
A complex from the higher-order paths
type = "pathway" builds the complex from the paths of the higher-order network instead of the cliques: each frequent path is a simplex of the states it passes through.
pathway_complex <- build_simplicial(hon, type = "pathway", max_pathways = 30)
pathway_complex
Pathway Complex
9 nodes, 34 simplices, dimension 3
Density: 13.3% | Mean dim: 1.03 | Euler: 0
f-vector: (f0=9 f1=16 f2=8 f3=1)
Betti: b0=1 b1=1
Nodes: Command, Correct, Frustrate, Inquire, Interrupt, Refine, Request, Specify, Verify
The 30 most frequent paths form a connected complex () with one loop (), of 16 edges, 8 triangles and one 3-simplex.
Checking the computation
verify_simplicial() recomputes the cliques with igraph and checks the Euler-Poincaré relation between the simplex counts and the Betti numbers.
Cliques: MATCH (31 simplices)
Betti: b0=1 b1=2 b2=0
Euler: -1 (Euler-Poincare: VERIFIED)
References
Atkin, R. H. (1974). Mathematical structure in human affairs. Heinemann Educational.
Battiston, F., Cencetti, G., Iacopini, I., Latora, V., Lucas, M., Patania, A., Young, J.-G., & Petri, G. (2020). Networks beyond pairwise interactions: Structure and dynamics. Physics Reports, 874, 1–92. https://doi.org/10.1016/j.physrep.2020.05.004
Besag, J., & Mondal, D. (2013). Exact goodness-of-fit tests for Markov chains. Biometrics, 69(2), 488–496. https://doi.org/10.1111/biom.12009
Cover, T. M., & Thomas, J. A. (2006). Elements of information theory (2nd ed.). Wiley. https://doi.org/10.1002/047174882X
Edelsbrunner, H., Letscher, D., & Zomorodian, A. (2002). Topological persistence and simplification. Discrete & Computational Geometry, 28(4), 511–533. https://doi.org/10.1007/s00454-002-2885-2
LaRock, T., Nanumyan, V., Scholtes, I., Casiraghi, G., Eliassi-Rad, T., & Schweitzer, F. (2020). HYPA: Efficient detection of path anomalies in time series data on networks. In Proceedings of the 2020 SIAM International Conference on Data Mining (pp. 460–468). SIAM. https://doi.org/10.1137/1.9781611976236.52
López-Pernas, S., Misiejuk, K., Kaliisa, R., & Saqr, M. (2025). Capturing the process of students’ AI interactions when creating and learning complex network structures. IEEE Transactions on Learning Technologies, 18, 556–568. https://doi.org/10.1109/TLT.2025.3568599
Misiejuk, K., López-Pernas, S., Oliveira, E., Rinja, D., & Saqr, M. (2026). It takes two to vibe code: Profiling student-AI programming interactions processes and their high order structure. In Proceedings of the 26th Koli Calling International Conference on Computing Education Research (pp. 1–11). ACM. https://doi.org/10.1145/3856208.3856254
Saebi, M., Xu, J., Kaplan, L. M., Ribeiro, B., & Chawla, N. V. (2020). Efficient modeling of higher-order dependencies in networks: From algorithm to application for anomaly detection. EPJ Data Science, 9(1), 15. https://doi.org/10.1140/epjds/s13688-020-00233-y
Saqr, M., López-Pernas, S., & Misiejuk, K. (2026). Nestimate: An R package for dynamic, probabilistic, and high order network analysis. Applied Psychological Measurement. https://doi.org/10.1177/01466216261472019
Saqr, M., López-Pernas, S., & Tikka, S. (2025). Mapping relational dynamics with transition network analysis: A primer and tutorial. In M. Saqr & S. López-Pernas (Eds.), Advanced learning analytics methods: AI, precision and complexity (pp. 371–411). Springer. https://doi.org/10.1007/978-3-031-95365-1_15
Saqr, M., López-Pernas, S., Conde-González, M. Á., & Hernández-García, Á. (2024). Social network analysis: A primer, a guide and a tutorial in R. In M. Saqr & S. López-Pernas (Eds.), Learning analytics methods and tutorials: A practical guide using R (pp. 491–518). Springer. https://doi.org/10.1007/978-3-031-54464-4_15
Saqr, M., López-Pernas, S., Törmänen, T., Kaliisa, R., Misiejuk, K., & Tikka, S. (2025). Transition network analysis: A novel framework for modeling, visualizing, and identifying the temporal patterns of learners and learning processes. In Proceedings of the 15th International Learning Analytics and Knowledge Conference (LAK25) (pp. 351–361). ACM. https://doi.org/10.1145/3706468.3706513
Saqr, M., Misiejuk, K., & López-Pernas, S. (2026). Human-AI collaboration or obedient and often clueless AI in instruct, serve, repeat dynamics? The Internet and Higher Education, 70, 101087. https://doi.org/10.1016/j.iheduc.2026.101087
Sarkar, A., & Drosos, I. (2025). Vibe coding: Programming through conversation with artificial intelligence. In Proceedings of the 36th Annual Conference of the Psychology of Programming Interest Group (PPIG 2025). https://doi.org/10.48550/arXiv.2506.23253
Scholtes, I. (2017). When is a network a network? Multi-order graphical model selection in pathways and temporal networks. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 1037–1046). ACM. https://doi.org/10.1145/3097983.3098145
Tikka, S., López-Pernas, S., & Saqr, M. (2025). tna: An R package for transition network analysis. Applied Psychological Measurement, 49(6), 326–328. https://doi.org/10.1177/01466216251348840
Xu, J., Wickramarathne, T. L., & Chawla, N. V. (2016). Representing higher-order dependencies in networks. Science Advances, 2(5), e1600028. https://doi.org/10.1126/sciadv.1600028