To address the role of cell-type-specific connectivity patterns in greater detail, we next incorporated excitatory and distinct inhibitory populations by replacing each unit in the above model with four units, leading to an eight-population model (since each of the four types has fast and slow subtypes) (Figure 4A). One of these populations (corresponding to V2a interneurons in the zebrafish) consisted of excitatory units with descending, ipsilateral projections. The other three populations consisted of inhibitory units, essentially breaking the inhibitory population from the earlier model into three populations that have identical activity (since they all receive the same inputs) but differ in their projection targets. One population of inhibitory units (corresponding to V1 interneurons in the zebrafish) had ascending, ipsilateral projections; another (corresponding to V2b interneurons in the zebrafish) had descending, ipsilateral projections; and a third (corresponding to dI6 and V0d interneurons in the zebrafish) had contralateral projections. The tonic drive was provided equally to all units.

A model with excitatory and inhibitory populations.

(A) Schematic diagram illustrating connectivity among cell types (but not longitudinal connectivity) for the eight-population model. (B) Detailed connectivity matrices for an example mid-body unit from each population. (C) Time-dependent activity traces at slow (left) and fast (right) locomotion frequencies (traces are slightly offset for clarity).

The outgoing spatial connectivity of each of these cell types is illustrated in Figure 4B. Each cell-type projects equally to all of the units within each segment that it targets, so that all units within each segment receive the same inputs. As in the two-population model above, we set the spatial connectivity patterns for the inhibitory units according to the desired phase relationships between units, with short-range contralateral inhibition and intermediate-range ipsilateral inhibition. For the excitatory units, we assumed that the projections are descending only in order to facilitate head-to-tail propagation. All units within each speed module had the same membrane time constant and axonal conduction velocity. As in the earlier models, providing distinct tonic drives to the fast- and slow-module units led to coordinated locomotion at a range of frequencies (Figure 4C).

Before analyzing the full model in detail, we decoupled the two speed modules from one another and began by studying the effects of various single-cell and cell-type-specific connectivity properties on the characteristic oscillation frequency of an individual speed module. Unsurprisingly, the locomotion frequency depended strongly on the membrane time constants, with smaller values of these parameters leading to faster frequencies (Figure 5A, B). Because the characteristic frequencies of the two speed modules set the upper and lower limits of locomotion frequency once the modules are coupled together in the full model, it is likely advantageous for an organism to have values of these parameters that differ strongly in fast- and slow-preferring neurons. This agrees with observations from the zebrafish, where the membrane time constants and axonal delays differ for fast- and slow-preferring excitatory and inhibitory interneurons (Menelaou and McLean, 2019; Menelaou et al., 2022). For our subsequent simulations, we fixed these parameters for the fast and slow modules at the experimentally determined values indicated in Figure 5A, B; Menelaou and McLean, 2019; Menelaou et al., 2022.

Single-cell properties and excitatory connectivity influence locomotor frequency in an individual speed module.

(A, B) Dependence of locomotion frequency on the axonal delay per segment and membrane time constant of units ((A) shows a broad range of values; (B) shows an inset from (A)). Stars denote experimentally observed values for fast and slow excitatory V2a cells in zebrafish (Menelaou and McLean, 2019; Menelaou et al., 2022). (C) Dependence of locomotion frequency on the projection distances of excitatory connections originating from the excitatory unit labeled blue.

We next investigated the effect of connectivity properties on locomotion frequency for the decoupled speed module. We found that the frequency was modulated by more than a factor of two as the excitatory projection distances were varied (Figure 5C). This agrees with observations from zebrafish, where the extents of intersegmental projections have been shown to differ for fast- and slow-preferring excitatory interneurons, with fast-preferring V2a interneurons projecting more distally than slow-preferring V2a neurons (Menelaou et al., 2014). For our subsequent simulations, we fixed these parameters for the fast and slow modules at the experimentally determined values illustrated in Figure 5B (Menelaou et al., 2014).

Having shown that the spatial extent of excitatory projections has a strong effect on locomotion frequency, we next asked whether varying connectivity properties would also modulate the range of possible frequencies in the full model with two coupled speed modules. Varying the global strength of excitatory projections had a strong effect on the range of possible frequencies, with stronger excitation facilitating faster locomotion (Figure 6A). In particular, whereas the purely inhibitory model with experimentally determined membrane time constants and axonal conduction velocities realizes a maximum frequency much lower than that observed in larval zebrafish (approximately 20 Hz, black line in Figure 6A), the inclusion of excitatory interneurons facilitates maximum frequencies of over 50 Hz, which is approaching peak swim speeds in larval zebrafish (Agha et al., 2024). Thus, while excitatory interneurons are not necessary for producing coordinated locomotion in our model, they do facilitate faster locomotion, suggesting that this may be a fundamental role for feedforward excitation in the spinal network.

Frequency range depends on excitatory projection strength and modularity.

(A) Dependence of the range of possible locomotion frequencies on the global strength of excitatory projections relative to that of inhibitory projections. (B) Dependence of the frequency range on connectivity modularity, which quantifies the strength of inter-module (fast-to-slow and slow-to-fast) projections relative to intra-module (fast-to-fast and slow-to-slow) projections. (Missing intermediate points correspond to cases where coordinated locomotion does not appear.) (C) Dependence of the frequency range on connectivity modularity of excitatory units, where inhibitory units have modularity set to zero. (D) Dependence of the frequency range on connectivity modularity of inhibitory units, where excitatory units have modularity set to zero. (In (A), modularity is set to zero; in (B-D), strength of excitation is set to 0.4.)

Given that connectivity within and between speed modules has been shown in zebrafish to be modular, with stronger projections within modules than between modules (Song et al., 2020), we asked what would be the effect of varying modularity in the model. We defined modularity as the difference between intra- versus inter-module connection strength divided by the sum of these quantities, such that modularity of 1 corresponds to fully decoupled modules, while modularity of 0 corresponds to identical connection strengths within versus between modules.

Varying the modularity of all four populations together, we found that there was essentially no effect on the maximum or minimum possible frequencies. Further, the model lost the ability to produce locomotion at intermediate frequencies as modularity was increased (Figure 6B). However, when we varied modularity among only the excitatory or only the inhibitory populations, we observed much more significant changes in the maximum frequency (Figure 6C, D). These changes occurred in opposite directions, with excitatory (inhibitory) modularity favoring faster (slower) speeds, suggesting that the lack of an observed change in frequency range when both types of modularity were varied together (Figure 6B) was due to cancellation between these two effects.

Together, these results show that the strength of feedforward excitation and the modularity of excitatory connectivity have a strong effect on the range of possible locomotion frequencies. There is a trade-off, however, in that the model loses the ability to smoothly interpolate between fast and slow frequencies in cases where the excitatory connectivity becomes too strong or too modular (Figure 6A, C). This requirement that excitation not be too strong is in accord with experimental observations from zebrafish (Agha et al., 2024), which have shown that peak excitatory post-synaptic currents are much weaker than peak inhibitory post-synaptic currents in V2a interneurons, consistent with the possibility that excitation may be globally weaker than inhibition in the spinal circuitry. Further, the fact that the model exhibits a frequency range similar to that of the zebrafish for parameters that are close to the critical values where smooth frequency control becomes impossible suggests that the spinal locomotor circuit faces a trade-off between speed and controllability, and that its excitatory connectivity may be configured in a way that optimizes this trade-off.

Having established the roles played by single-cell and connectivity properties of different cell types in the eight-population model, we fixed these parameters and analyzed the behavior of the model over the range of possible tonic drives to fast and slow populations (Figure 4—figure supplement 1). Similar to the two-population model, the eight-population with coupled fast and slow speed modules model exhibited head-to-tail propagation with constant phase lag (Figure 4—figure supplement 1G), left–right alternation (Figure 4—figure supplement 1F), and frequency-dependent recruitment of fast and slow populations (Figure 4—figure supplement 1E). In addition to varying the frequency of oscillations, we also found that the overall amplitude of interneuron activity in the model could be varied by co-varying the drives to the fast and slow populations (Figure 4—figure supplement 1C, D). This provides a potential mechanism to independently control frequency and amplitude of locomotion, although the manner in which the amplitude of interneuron activity relates to the amplitude of locomotion would depend on the assumptions made about how interneuron activity drives the activity of motor neurons, which we have not included in our models.

We next investigated the effects of perturbing the model by partially ablating (i.e. attenuating the outgoing activity of) each interneuron population (Figure 7). At all locomotion speeds, we found that ablating excitatory units decreased locomotion frequency. This is in agreement with experiments in zebrafish, where ablation of excitatory V2a interneurons had the same effect (Eklöf-Ljunggren et al., 2012). Further, we found that ablating inhibitory units with ascending ipsilateral projections decreased locomotor frequency, while ablating inhibitory units with descending projections increased locomotor frequency across all locomotion speeds. This is also in agreement with experiments in zebrafish, where ablation of inhibitory V1 interneurons slowed swimming (Kimura and Higashijima, 2019), while ablation of V2b interneurons led to faster swimming (Callahan et al., 2019; Sengupta et al., 2025). Finally, we found that ablating the contralaterally projecting inhibitory units led to a modest increase in frequency, but that coordinated locomotion was lost when the degree of ablation became too great. The impact on frequency was most obvious at fast speeds, with a more modest impact at slow speeds. This is consistent with recent experiments in zebrafish, which found the impact of attenuating contralateral inhibitory projections from dI6 neurons on coordination was most obvious at fast speeds (Agha et al., 2024). Similar results were found in Xenopus, where silencing contralaterally projecting inhibitory interneurons can eliminate rhythm generation (Moult et al., 2013) or lead to an increase in swim frequency (Dale, 1995). Together, these results show that, where comparisons with experimental data are possible, perturbations to our model lead to effects on locomotion frequency that generally agree with experimental observations. This agreement provides support for the possibility that the basic mechanisms underlying variable-frequency locomotion in our model—namely cell-type-specific connectivity patterns and speed-module recruitment—may also be at play in the spinal locomotor network.

Ablating populations affects locomotion frequency dependence of locomotion frequency (normalized to its unperturbed value) on ablation of each of the four interneuron populations during slow speed oscillations (dashed lines; fast drive = 1.0, slow drive = 1.0; frequency = 9.3 Hz) and fast speed oscillations (dotted lines; fast drive = 2.0, slow drive = 0.5; frequency = 34.0 Hz).

Asterisks mark points where the model failed to produce a coherent oscillation (see Methods).