Extended Data Fig. 4. Flow fields are highly consistent across feedback conditions in random 2D projections.
We used a flow field analysis to compare neural trajectories in different 2D projections. a, To determine a cursor trajectory flow field, we segmented the 2D workspace projection into a grid of 20 mm × 20 mm voxels. Dots indicate cursor positions at each time point for all trials (for the example session E20190719). Dots are colored by the start target (blue: start target A at left of workspace; red: start target B at right of workspace). b,c, The velocity for a given voxel is defined as the velocity () averaged across all time points with a cursor position () in that voxel. For visual clarity, we show the flow fields separately for each target condition (b: target A to target B; c: target B to target A). The orientation of the arrows indicates the direction and the length of the arrows represents the magnitude of the velocity. The color indicates the number of time points that contributed to the average. d–h, The flow field analysis (Fig. 5) shows that the time courses of neural activity are strongly constrained within the SepMax projection, regardless of whether the animal receives feedback of their neural activity in the MoveInt or SepMax projections. However, it is not yet clear whether these constraints are limited to specific subspaces or whether neural trajectories are constrained in other dimensions of the 10D space. To test this, we applied a flow field analysis similar to that used in Fig. 5 (Methods; a–c above) to neural activity in random 2D projections of the 10D space. We first projected neural trajectories into random 2D subspaces: where is a random matrix with orthonormal columns and is the latent state at time step as defined in equation (5). Then we estimated flow fields in this 2D subspace, using a 1 × 1 latent unit voxel size. d, ‘Other feedback’ comparison. We compared the flow fields in a given projection between feedback conditions. For example, in the SepMax projection we compared the flow field during MoveInt feedback (top) and the flow field during SepMax feedback (bottom). Note that the illustrated flow field comparison is the same as is shown in Fig. 5 for the SepMax projection (Fig. 5 light blue arrow), but we repeat the comparison for 400 random 2D projections per experiment to get the cyan distribution in g and h. In order to appreciate the amount of change we observe in the flow fields in the ‘other feedback’ comparison, we constructed control distributions for which we expect no change and maximal change in the flow fields. For a no-change distribution, we compared flow fields for different subsets of trials with the same visual feedback. We call this distribution ‘fixed feedback.’ For maximal change distributions, we constructed two distributions: one in which the flow fields are overlapping and maximally different, that is, the ‘time-reversed’ condition (e), and one in which the flow fields are different but less overlapping, that is, the ‘alternate-target’ condition (f). e, ‘Time-reversed’ comparison. In the time-reversed comparison, we compared the flow fields between trials for a given feedback condition, for example, MoveInt trajectories (top) to a time-reversed version of the MoveInt trajectories (bottom). We generated the time-reversed neural trajectories in an offline analysis by reversing the temporal sequence of trajectories , making the last time point the first and the first time point the last. Note that the schematic simply reverses the direction of the velocity vectors. f, ‘Alternate-target’ comparison. In the alternate-target comparison, we compared the A-to-B flow field to the B-to-A flow field for a given feedback condition. For example, we compared trajectories from one start target (top) to trajectories from the other start target (bottom) during MoveInt feedback. g, Quantification of flow field comparisons. We compared 400 random 2D projections per experiment for each flow field comparison. By comparing the difference in flow fields for the ‘other feedback’ comparison to these three control distributions across random projections, we can determine whether the feedback provided to the monkeys changed neural trajectories in the full 10D space. For each experiment, we compare the flow fields of 50 random trial splits in each of the 400 random projections. The total number of available trials for a given start target condition (49 ± 3.8 trials) was randomly sub-selected to form two sets of 20 trials and flow fields were estimated for each set. All comparisons were between flow fields for each set of trials (except for the fixed feedback case which compared flow fields between sets of trials for a given trial split). We calculated the mean squared difference between velocity vectors of corresponding voxels of the flow fields and took the median of those values across voxels (Methods) for each of the random trial splits in each projection. For the jth projection, we quantified the flow difference, , as the mean across trial splits of the median values. To compare these distributions across experiments, we normalized the flow difference with respect to the fixed feedback as the lower limit, and time-reversed as the upper limit , where is the normalized flow field difference for jth projection, is the flow difference for the jth projection, and are the per experiment average across projections of the flow difference magnitude for the fixed feedback and time-reversed distributions, respectively. A indicated that there was no change in flow difference magnitude between conditions, while indicated that flow difference magnitudes were maximally different between comparison conditions. We averaged across projections to yield a single value, , for each experiment. By definition, for the Fixed feedback comparisons and for the Time-reversed comparisons. We found that the flow difference for the other feedback comparisons was small. The other feedback (cyan) comparison was not significantly different from the fixed feedback (gray) comparison (paired t-test, p = 0.0934). h, We also measured ‘flow field overlap’, which quantifies the degree to which the trajectories occupy the same region of state space. Flow field overlap, was quantified as the number of voxels with a minimum of 2 time points within that voxel for each of the flow fields being compared. Like the flow difference metric, we calculated the flow field overlap of 50 random trial splits for each of the 400 random projections. To compare these distributions across experiments, we normalized the flow field overlap with respect to the fixed feedback comparison, which has the highest degree of observed flow field overlap , where is the normalized flow field overlap for jth projection, is the flow field overlap for the jth projection and is the per experiment average across projections of the overlapping voxels for the fixed feedback distributions. A indicates that the region of the state space occupied by the trajectories was highly non-overlapping between distributions, while indicates that the overlap between trajectories was the same as the amount of overlap observed in the fixed feedback condition. We averaged across projections to yield a single value, , for each experiment. We found that the fixed feedback, other feedback and time-reversed comparisons all show high flow field overlap, although the flow field overlap for the fixed feedback comparison was significantly larger than the other comparisons (paired t-test, p < 0.001). If the neural trajectories are constrained in the 10D space, the other feedback flow field comparisons should have low flow difference (similar to that for the fixed feedback comparison) and high flow field overlap (similar to that for the fixed feedback and time-reversed comparisons). Taken together, these results indicate that neural flow fields and the resulting neural trajectories are highly consistent in all dimensions, regardless of the visual feedback provided to the animal.