Fig 1.
Encoding of torque in muscle activation.
Each dorsolongitudinal muscle (DLM) is composed of five separately innervated subunits. The subunits fire simultaneously with a single muscle action potential acting as a combined motor unit [23]. Contraction of the DLMs produces the downstroke through deformation of the thorax, which is restored by the upstroke dorsoventral muscles (DVMs) (A—only main flight muscle shown; sub-figure derived from [14]). There are three major groups of steering muscles (axillary, basalar, and subalar) which are not shown for clarity, but lie just lateral to the DLMs and DVMs, near the wing hinge (see [24]). DLM recordings during tethered flight (B) are parameterized by the spike timing variables (tL, tR). Activation varies in the timing of the spike, not the number of spikes. Changes in timing can produce variation in yaw torque (C). In PLS feature analysis (D-H), we relate these motor signals (the U matrix) to the turning torque (the M matrix) (D). The raw torque signal is calibrated to extract the within-stroke torque (E). We then spike-trigger (dots in e; each of the first four extracted torque chunks is colored) and align the torque (D), find a reduced dimensional feature space via the partial least squares (PLS) method (F), test if synergy models can account for this feature space (G), and reconstruct the torque waveform from the timing variables (H).
Fig 2.
Motor-spike-triggered ensembles and turning deciles.
We aligned the torque waveforms to either the zero phase crossing (A) or the timing of the right DLM’s spike (B). We then divided the data into deciles ordered by average torque. The decile averages (C, D) and the interpolated contour surfaces (below) from two animals (“J” and “L”) show the range of torque variation within wingstrokes. Deciles are ordered from the greatest leftward (”L”) to rightward (”R”) torque. Grey transects highlight distinctive features mentioned in the text. Because wingstrokes are triggered on the right muscle’s spikes, we do not expect these patterns to be left-right symmetric.
Table 1.
PLS regression summary.
Fig 3.
PLS features improve variance explained in motor commands.
We extracted 10 features for each dimensionality reduction and alignment method (PCA: A-C; PLS: D-F). We plotted the variance in each muscle timing variable (colored lines) explained by each feature from the phase- (A, B) and spike-triggered ensembles (B, E) as well as the cumulative variance for the spike-triggered case (C, F). To determine the variance explained by random features (dashed lines) we resampled the torque waveforms and muscle timings 1000 times. We used the 99.5% quantile as a threshold for how much variation could be explained by chance from a single feature. Some higher-ranked features in the PCA analyses had significant contributions (circled) above chance. We repeated the spike-triggered PLS analysis with Δt included in the U matrix to ensure that statistical bias did not change the number of important features (G). To compare across all animals (H, I), we normalized the variance explained by the cumulative variance explained when including 10 features. The box plots indicate the proportion of this maximum explanatory power described by each successive feature (N = 7 animals; 298–620 wingstrokes per animal).
Fig 4.
Identified features support the independence model.
We plotted the timecourse (loadings) of each significant PLS feature (A). The decile-averaged score for each feature varied from one extreme of turning to the other (B). We determined how well different subsets of the timing variables (the independence, synergy, and redundancy models) predicted either the mean torque (C) or the feature scores (D, E) with a hold-one-out PRESS statistic. The box plots represent the mean and quartiles, with whiskers encompassing all non-outliers. Horizontal lines indicate statistically separate groups.
Fig 5.
Reconstructing the torque waveforms.
Different reconstructions of the decile-averaged torque waveforms are shown for animal J (A) and animal L (B). The full ensemble is in grey and the decile ensemble in black. The measured torque (yellow) was compared to the reconstructions based on: the two feature projection of the measured torque (green), predicting the torque from subsets of the motor signals via the features (cyan), or by predicting the mean torque alone and adding it as an offset to the STA (orange).
Fig 6.
STA and features reconstruction performance.
Reconstruction error for each decile of wingstrokes averaged across all animals was quantified for the STA and two-feature projections of the torque data using the normalized RMS error (A) and the unexplained, or residual, variance (B). The STA-alone reconstruction uses the spike-triggered average for each individual moth as the basis for comparison. The feature-only reconstruction compares the torque waveform constructed from the motor signals to the two feature projection of the measured waveform (rather than the full measured waveform). This demonstrates how well the motor signals can predict the features themselves rather than the entire within-wingstroke torque. Horizontal lines above each group of bars in (A) indicate statistically separate groups.
Fig 7.
Comparing feature- and mean torque-based reconstructions.
We compared reconstruction performance with normalized RMS (A) and unexplained variance plots (B; N = 7 animals) as in Fig 6. Low error values indicate better performance. Horizontal lines indicate statistically separate groups. Significant differences exist between the deciles within each distribution (repeated measures ANOVA, P < 0.0001). The RMS of the reconstructed torque waveform with a variable number of features (0–4) is also plotted against the RMS of the measured torque waveform (C) for all the deciles of animal L. Deviation from unity (solid black line) shows the error in the RMS reconstruction. To compare the feature-based independence model to the mean torque (D) and the synergy models (E), we plotted the RMS error of each against the other for all deciles and all animals (N = 70 animal-deciles). Points below the unity line indicate improved performance (smaller error) with the feature-based independence model.
Fig 8.
Cross-validation and sensitivity.
To combine reconstruction performance into a single error metric we normalized the RMS of the error for each decile (averaged across animals) to the RMSE of the two feature reconstruction (*** indicates P<0.001 for all paired conditions). In addition to the standard reconstruction (A) we repeated the feature extraction and model testing with Δt included in the original U matrix (B) and with the phase-triggered rather than spike-triggered torque waveforms (C). Finally, we cross-validated (D) the reconstructions performing 1000 replicates with 70% of the wingstrokes as a training set and 30% withheld for a test set. Model abbreviations: 2F—two features, SΔt—differential synergy, SPC—empirical (PCA) synergy, R—redundancy, I—independence, S< τ > mean torque differential synergy, I< τ >—mean torque independence.
Fig 9.
Reconstructing individual wingstrokes.
RMS error (A) and residual variance (B) measures of the average performance for reconstructing individual wingstrokes show necessarily greater error, but consistent patterns across synergy and independence models. Colors and models correspond to those of Fig 7. Data are from reconstructing all of the individual wingstrokes from animal L (n = 298 wingstrokes) with error bars being s.e.m.