between nodes in different clusters. Importantly, each node in the graph had exactly 4 edges, or a degree of k = 4. Thus, for any two nodes that were connected by an edge, the transition probability was equal to 25%. The lattice graph was similar to a ring lattice, in which nodes near one another on the ring tended to be connected to one another. As with the modular graph, each node had exactly 4 edges, or a degree k = 4, thereby creating a flat transition probability of 25% between any two connected nodes. Random graphs were selected out of a possible pool formed by creating 1500 instantiations of the Erd˝os–Rényi graph model, all of which we guaranteed were fully connected and had radius of at least 3, meaning there was at least one pair of nodes with a shortest path involving three edges. We then sorted the ensemble by their estimated modularity$^{43}$, and we discarded graphs with the highest and lowest 2.5% of modularity values. The same pool of random graphs was used across all subjects within a given experiment, though the pool differed between the experiments. In these random graphs, the degree of each node varied from k = 1 to k = 9, and the transition probabilities varied accordingly. Finally, in the second stage of the first experiment, we used a fully connected graph as a point of comparison, in which any node can transition to any other node. In this case, the degree of each node was k = 14, and the probability of transitioning between any two nodes was 1/14 or approximately 7.14%. 

We ran three separate experiments (see Supplementary Table 1). Each one consisted of two stages that differed in which graph was used to generate the stimulus sequence. The first experiment examined learning as the underlying structure transitioned from a regular graph to a fully connected graph, and did so by comparing reaction times in response to novel versus previously learned edges. The first stage of the first experiment used either a modular graph (n=30), a lattice graph (n=43), or a random graph (n=36) to generate a 1500-node random stimulus walk, while the second stage used a fully connected graph to generate a 500-node walk (random stimulus order). In the second experiment, both stages consisted of a walk over the modular graph. However, the first stage was a 1500-node random walk, while the second stage was a 500-node Hamiltonian walk (n=59). The third experiment employed a within-subjects design to directly compare learning effects between the graph types, accounting for individual variability in baseline reaction times and learning rates. Similar to the first experiment, the first stage of the second experiment consisted of a 1500-node random stimulus walk from either a modular graph, a lattice graph, or a random graph; however, unlike the first experiment, the second stage was a 1500-node random stimulus walk on one of the remaining two graph types. For example, if a subject was shown a sequence of stimuli produced from the modular graph in the first stage, then in the second stage the subject would be shown a sequence of stimuli produced from either the lattice graph or the random graph. For each of the six possible pairs of graphs we collected reaction time data from at least 30 subjects (modular/lattice: n=36, modular/random: n=37, lattice/modular: n=36, lattice/random: n=38, random/modular: n=34, and 

